From:             
Operating system: Linux/CentOS
PHP version:      5.3.4
Package:          *Web Server problem
Bug Type:         Bug
Bug description:fatal error with bad memory allocation in a script echo & exit

Description:
------------
Linux/CentOS 5.5 x86_64

PHP 5.3.4

Apache 2.2.16

Tested and can be reproduced under Apache httpd + mod_php5/nginx+fastcgi.

Ok under CLI(at least cant be reproduced under cli.)



I tested a script like below, which was simplified to the minimal.

I was about to dump something, then wrote a var_dump() with an exit;, then
i found the php results a fatal error like:



Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 1702113144 bytes) in Unknown on line 0 ...



then In apache error log:



PHP Fatal error: Exception thrown without a stack frame in Unknown on line
0



Apache httpd/nginx usually gives *no response* to the http get request.





check the following code:

uncomment:

  1st __halt_compiler();   .... OK

  2nd __halt_compiler();   .... BAD



then exchange the lines of definitions of class a and b, uncomment:

  1st __halt_compiler();   .... OK

  2nd __halt_compiler();   .... OK





only in 5.3.4, works perfectly in 5.3.3.

Test script:
---------------
<?php

echo 'a';

exit;

#__halt_compiler();

class a extends b{}

class b{}



#__halt_compiler();

#new a;

Expected result:
----------------
a

Actual result:
--------------
error like 

[quote]

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 1702113144 bytes) in Unknown on line 0 ...



then In apache error log:



PHP Fatal error: Exception thrown without a stack frame in Unknown on line
0



Apache httpd/nginx usually gives *no response* to the http get request.



[/quote]

-- 
Edit bug report at http://bugs.php.net/bug.php?id=53663&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53663&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53663&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53663&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53663&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53663&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53663&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53663&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53663&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53663&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53663&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53663&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53663&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53663&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53663&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53663&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53663&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53663&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53663&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53663&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53663&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53663&r=mysqlcfg

Reply via email to