com php-src: Removed fork of ext/zlib/tests/bug_5294 4.phpt: ext/zlib/tests/bug_52944-win.phpt ext/zlib/tests/bug_52944.phpt
| From: | Anatol Belski | Date: | Wed, 24 Apr 2013 12:31:59 +0000 |
| Subject: | com php-src: Removed fork of ext/zlib/tests/bug_5294 4.phpt: ext/zlib/tests/bug_52944-win.phpt ext/zlib/tests/bug_52944.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72003@lists.php.net to get a copy of this message | ||
Commit: 8d41f6dab66167ed1f888a4c8c66390033eda155
Author: Anatol Belski <ab@php.net> Wed, 24 Apr 2013 14:31:59 +0200
Parents: ee65e6953f10c6e4d0e6e118ba53aebfe836302b
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8d41f6dab66167ed1f888a4c8c66390033eda155
Log:
Removed fork of ext/zlib/tests/bug_52944.phpt
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.
Changed paths:
D ext/zlib/tests/bug_52944-win.phpt
M ext/zlib/tests/bug_52944.phpt
Diff:
diff --git a/ext/zlib/tests/bug_52944-win.phpt b/ext/zlib/tests/bug_52944-win.phpt
deleted file mode 100644
index fa369f8..0000000
--- a/ext/zlib/tests/bug_52944-win.phpt
+++ /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.
diff --git a/ext/zlib/tests/bug_52944.phpt b/ext/zlib/tests/bug_52944.phpt
index ed4af3e..ff82d29 100644
--- a/ext/zlib/tests/bug_52944.phpt
+++ b/ext/zlib/tests/bug_52944.phpt
@@ -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');