# zlib issues in 5.4 and trunk

- Thread: https://externals.io/message/55247
- Original archive: https://news-web.php.net/php.internals/55247
- Started by Pierre Joye on 2011-09-06T15:59:11+00:00
- Messages: 11
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #55247 — Pierre Joye — 2011-09-06T15:59:11+00:00

URL: https://externals.io/message/55247#55247

hi,

It seems that 5.4 and trunk has something broken in zlib and maybe
bas64 encoding/decoding.

We have a serie of tests failing on linux or windows:

ext\zlib\tests\bug_52944.phpt
ext\zlib\tests\gzcompress_basic1.phpt
ext\zlib\tests\gzcompress_variation1.phpt
ext\zlib\tests\gzdeflate_basic1.phpt
ext\zlib\tests\gzdeflate_variation1.phpt
ext\zlib\tests\gzencode_basic1.phpt
ext\zlib\tests\gzencode_variation1-win32.phpt (the unix version too)
ext\zlib\tests\gzfile_basic.phpt
ext\zlib\tests\gzfile_basic2.phpt
\tests\gzfilegzreadfile.phpt
ext\zlib\tests\gzuncompress_basic1.phpt
ext\zlib\tests\readgzfile_basic.phpt
ext\zlib\tests\readgzfile_basic2.phpt

cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #55251 — Stas Malyshev — 2011-09-06T17:01:54+00:00

URL: https://externals.io/message/55247#55251 · In reply to: #55247

Hi!


> hi,
>
> It seems that 5.4 and trunk has something broken in zlib and maybe
> bas64 encoding/decoding.
>
> We have a serie of tests failing on linux or windows:

Interestingly enough, none of these fail for me on Darwin. Could you 
publish the diffs?
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #55253 — Stas Malyshev — 2011-09-06T18:03:49+00:00

URL: https://externals.io/message/55247#55253

Hi!


> here you go (from win)
>
> It fails variously on linux or windows. Laruence reproduces the fails
> on linux too, some segfault from time to time.

Hmm... Kind of hard to go on "from time to time" - are you sure there's 
no build/old library issue? Do we have a reproduction for the segfaults? 
The diffs look like your gzip is producing different data - I wonder if 
some version might be doing something slightly different.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #55255 — Pierre Joye — 2011-09-06T18:35:40+00:00

URL: https://externals.io/message/55247#55255 · In reply to: #55253

> Hmm... Kind of hard to go on "from time to time" - are you sure there's no
> build/old library issue? Do we have a reproduction for the segfaults? The
> diffs look like your gzip is producing different data - I wonder if some
> version might be doing something slightly different.

Yes, we use the same libs for 5.3 and 5.4 and same tests pass in 5.3.
Bu it is also reproducible on many unrelated hosts.

Laruence will be back tomorrow, I will ask him to provide his diffs
too (and some bt)

-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #55256 — Stas Malyshev — 2011-09-06T19:03:00+00:00

URL: https://externals.io/message/55247#55256 · In reply to: #55255

Hi!


> Yes, we use the same libs for 5.3 and 5.4 and same tests pass in 5.3.
> Bu it is also reproducible on many unrelated hosts.

Well, maybe somebody that could reproduce it could look into it? Because 
I'm unable to reproduce any of it...
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #55258 — Pierre Joye — 2011-09-06T19:09:49+00:00

URL: https://externals.io/message/55247#55258 · In reply to: #55256

> Hi!
>
> 
> > […]
>
> Well, maybe somebody that could reproduce it could look into it? Because I'm
> unable to reproduce any of it...

Really? three linux (ubuntu latest and debian 5/6 here) as well on windows.

-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #55263 — Hannes Magnusson — 2011-09-06T23:26:12+00:00

URL: https://externals.io/message/55247#55263 · In reply to: #55258

> 
> > […]
>
> Really? three linux (ubuntu latest and debian 5/6 here) as well on windows.
>

What is "Ubuntu latest"? is that 11.04 or the current beta?
I'm running Ubuntu 11.04, and none of these fail for me.
Two skipped (win only), and one expected to fail due to bug #47178 it seems.

Please be a darling and post the diff so we can have something to look
at. Maybe seeing the output could jumpstart someones memory and help
you debug it.

-Hannes

---

## #55264 — Ferenc Kovacs — 2011-09-06T23:37:24+00:00

URL: https://externals.io/message/55247#55264 · In reply to: #55263

On Wed, Sep 7, 2011 at 1:26 AM, Hannes Magnusson
<hannes.magnusson@gmail.com> wrote:
> 
> > […]
>
> What is "Ubuntu latest"? is that 11.04 or the current beta?
> I'm running Ubuntu 11.04, and none of these fail for me.
> Two skipped (win only), and one expected to fail due to bug #47178 it seems.
>
> Please be a darling and post the diff so we can have something to look
> at. Maybe seeing the output could jumpstart someones memory and help
> you debug it.
>
> -Hannes
>
> --
> 
> 
>
>

those tests passes on my debian squeeze(amd64)

tyrael@phpize:~/checkouts/php-src/trunk$
TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php run-tests.php -g
SKIP,XFAIL,FAIL -n -c tmp-php.ini ext/zlib/

=====================================================================
PHP         : sapi/cli/php
 `PHP_SAPI`    : cli
 `PHP_VERSION` : 5.5.0-dev
ZEND_VERSION: 2.4.0
 `PHP_OS`      : Linux - Linux phpize 2.6.32-5-amd64 #1 SMP Tue Jun 14
09:42:28 UTC 2011 x86_64
INI actual  : /home/tyrael/checkouts/php-src/trunk
More .INIs  :
CWD         : /home/tyrael/checkouts/php-src/trunk
Extra dirs  :
VALGRIND    : Not used
=====================================================================
Running selected tests.
SKIP Test `gzencode()` function : variation
[ext/zlib/tests/gzencode_variation1-win32.phpt] reason: only for
Windows
SKIP Test `gzencode()` function : variation - verify header contents
with all encoding modes
[ext/zlib/tests/gzencode_variation2-win32.phpt] reason: .. only for
Windows
XFAIL Test `gzencode()` function : variation - verify header contents
with all encoding modes [ext/zlib/tests/gzencode_variation2.phpt]
XFAIL REASON: Test will fail until bug #47178 resolved; missing gzip
headers when `FORCE_DEFLATE` specified
=====================================================================
Number of tests :  146               144
Tests skipped   :    2 (  1.4%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Expected fail   :    1 (  0.7%) (  0.7%)
Tests passed    :  143 ( 97.9%) ( 99.3%)
---------------------------------------------------------------------
Time taken      :   10 seconds
=====================================================================

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Test `gzencode()` function : variation - verify header contents with all
encoding modes [ext/zlib/tests/gzencode_variation2.phpt]  XFAIL
REASON: Test will fail until bug #47178 resolved; missing gzip headers
when `FORCE_DEFLATE` specified
=====================================================================

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

---

## #55266 — Laruence — 2011-09-07T01:03:50+00:00

URL: https://externals.io/message/55247#55266 · In reply to: #55247

Hi:
  ext/zlib/tests/gzencode_variation1.phpt failed in Linux(redhat 64-bit)

  test log  http://pastebin.com/TzpW8GTK

thanks

2011/9/6 Pierre Joye <pierre.php@gmail.com>:
> hi,
>
> It seems that 5.4 and trunk has something broken in zlib and maybe
> bas64 encoding/decoding.
>
> We have a serie of tests failing on linux or windows:
>
> ext\zlib\tests\bug_52944.phpt
> ext\zlib\tests\gzcompress_basic1.phpt
> ext\zlib\tests\gzcompress_variation1.phpt
> ext\zlib\tests\gzdeflate_basic1.phpt
> ext\zlib\tests\gzdeflate_variation1.phpt
> ext\zlib\tests\gzencode_basic1.phpt
> ext\zlib\tests\gzencode_variation1-win32.phpt (the unix version too)
> ext\zlib\tests\gzfile_basic.phpt
> ext\zlib\tests\gzfile_basic2.phpt
> \tests\gzfilegzreadfile.phpt
> ext\zlib\tests\gzuncompress_basic1.phpt
> ext\zlib\tests\readgzfile_basic.phpt
> ext\zlib\tests\readgzfile_basic2.phpt
>
> cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> --
> 
> 
>
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

---

## #55303 — Pierre Joye — 2011-09-08T10:21:37+00:00

URL: https://externals.io/message/55247#55303 · In reply to: #55266

hi,

That's the only remaining, the other failed tests were due to LF (was
sure I did the conversion already, incl. external data being read).

However it happens randomly and only on unix.


> Hi:
>  ext/zlib/tests/gzencode_variation1.phpt failed in Linux(redhat 64-bit)
>
>  test log  http://pastebin.com/TzpW8GTK
>
> thanks
>
> 2011/9/6 Pierre Joye <pierre.php@gmail.com>:
> > […]
>
>
>
> --
> Laruence  Xinchen Hui
> http://www.laruence.com/
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #55305 — Laruence — 2011-09-08T12:30:33+00:00

URL: https://externals.io/message/55247#55305 · In reply to: #55303

Hi:
    I have linked against zlib-1.2.5 , still failed
    and I found php5.3-trunk passed in my environ.

    I can not go further till deflateEnd(zlib.c),   and the deflate
result is different between 5.3 and 5.4..

 thanks

2011/9/8 Pierre Joye <pierre.php@gmail.com>:
> hi,
>
> That's the only remaining, the other failed tests were due to LF (was
> sure I did the conversion already, incl. external data being read).
>
> However it happens randomly and only on unix.
>
> 
> > […]
>
>
>
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/
