php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61559
Patch bug61115-1.patch.txt revision 2012-04-02 23:24 UTC by mattficken@php.net

Patch bug61115-1.patch.txt for Testing related Bug #61559

Patch version 2012-04-02 23:24 UTC

Return to Bug #61559 | Download this patch
Patch Revisions:

Developer: mattficken@php.net

--- ext/standard/tests/streams/bug61115-1.phpt	2012-04-02 15:24:50.989764442 -0700
+++ ext/standard/tests/streams/bug61115-1.phpt	2012-04-02 16:13:38.896062367 -0700
@@ -1,5 +1,11 @@
 --TEST--
 Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link - variation 1
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+    die('skip non-windows only test');
+}
+?>
 --FILE--
 <?php
 
@@ -8,4 +14,4 @@
 ftruncate($fileResourceTemp, PHP_INT_MAX);
 ?>
 --EXPECTF--
-Fatal error: Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes) in %s on line %d
+Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s on line %d
--- ext/standard/tests/streams/bug61115-1-win32.phpt	2012-04-02 15:24:50.989764442 -0700
+++ ext/standard/tests/streams/bug61115-1-win32.phpt	2012-04-02 16:13:38.896062367 -0700
+ --TEST--
+ Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link - variation 1
+ --SKIPIF--
+ <?php
+ if (substr(PHP_OS, 0, 3) != 'WIN') {
+     die('skip Windows only basename tests');
+ }
+ ?>
+ --FILE--
+ <?php
+ 
+ // Windows has a slightly different error message, but the behavior should be the same
+ 
+ $fileResourceTemp = fopen('php://temp', 'wr');
+ stream_context_get_options($fileResourceTemp);
+ ftruncate($fileResourceTemp, PHP_INT_MAX);
+ ?>
+ --EXPECTF--
+ Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d bytes) in %s on line %d
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 22:01:27 2024 UTC