]> granicus.if.org Git - php/commitdiff
Removed fork of ext/zlib/tests/bug_52944.phpt
authorAnatol Belski <ab@php.net>
Wed, 24 Apr 2013 12:31:59 +0000 (14:31 +0200)
committerAnatol Belski <ab@php.net>
Wed, 24 Apr 2013 12:31:59 +0000 (14:31 +0200)
The real issue is a bug in asm zlib build, reported here
https://github.com/madler/zlib/issues/41 . Non ASM builds
behave more predictable.

ext/zlib/tests/bug_52944-win.phpt [deleted file]
ext/zlib/tests/bug_52944.phpt

diff --git a/ext/zlib/tests/bug_52944-win.phpt b/ext/zlib/tests/bug_52944-win.phpt
deleted file mode 100644 (file)
index fa369f8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---TEST--
-Bug #52944 (segfault with zlib filter and corrupted data)
---SKIPIF--
-<?php if (!extension_loaded("zlib")) print "skip"; ?>
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
-       die("skip windows only");
-}
---INI--
-allow_url_fopen=1
---FILE--
-<?php
-require dirname(__FILE__) . "/bug_52944_corrupted_data.inc";
-
-$fp = fopen('data://text/plain;base64,' . $data, 'r');
-stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ);
-var_dump(fread($fp,1));
-var_dump(fread($fp,1));
-fclose($fp);
-echo "Done.\n";
---EXPECT--
-string(1) "%"
-string(1) "C"
-Done.
index ed4af3e1578f69578154bd74d2ebfe9d43cb4ac3..ff82d29cc7f1f38390896911b9bd7d091926a16e 100644 (file)
@@ -3,9 +3,6 @@ Bug #52944 (segfault with zlib filter and corrupted data)
 --SKIPIF--
 <?php if (!extension_loaded("zlib")) print "skip"; ?>
 <?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-       die("skip not for windows");
-}
 if (PHP_OS == 'Darwin') {
        die("skip not for Darwin");
 }
@@ -13,6 +10,10 @@ if (PHP_OS == 'Darwin') {
 allow_url_fopen=1
 --FILE--
 <?php
+/* NOTE this test can fail on asm builds of zlib 1.2.5 or 
+   1.2.7 on at least Windows and Darwin. Using unoptimized
+   zlib build fixes the issue. */
+
 require dirname(__FILE__) . "/bug_52944_corrupted_data.inc";
 
 $fp = fopen('data://text/plain;base64,' . $data, 'r');