Issue #7040 has been updated by nagachika (Tomoyuki Chikanaga).

Assignee set to drbrain (Eric Hodel)

Hello,

I'd like to switch to ruby-core, but I don't know how to do it on redmine...

Anyway, I've found that zstream_run_func() leaks Z_BUF_ERROR because deflate() could return Z_BUF_ERROR even when z->stream.avail_out > 0.
My tiny patch below prevent the exception, but I'm not confident at all it's right way to fix this issue.

diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 6135e82..bcf289f 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -987,6 +987,7 @@ zstream_run_func(void *ptr)
 
        if (z->stream.avail_out > 0) {
            z->flags |= ZSTREAM_FLAG_IN_STREAM;
+           err = Z_OK;
            break;
        }
 

I think Eric (a.k.a drbrain) should have any idea, so him.

thakns,
----------------------------------------
Bug #7040: gem install ??х?劫????? gem ?????ゃ?潟?鴻????若??с??????
https://bugs.ruby-lang.org/issues/7040#change-29567

Author: hsbt (Hiroshi SHIBATA)
Status: Open
Priority: Normal
Assignee: drbrain (Eric Hodel)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-09-20 trunk 36993) [x86_64-darwin12.2.0]


trunk ??х?劫????? gem(箴??????? libv8膈?)?????ゃ?潟?鴻????若???????????????????????紊掩???????????障????障?????

 % gem i libv8
 ERROR:  While executing gem ... (Zlib::BufError)
     buffer error

Twitter 筝???? nagachika ???????????? Zlib ??? GVL 絲上??????????????с??????????潟?<?潟?????????????障???????????筝?荐??????取;腓坂札?????茯??祉??????????????障????????



-- 
http://bugs.ruby-lang.org/