php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55150 php -a segfaults
Submitted: 2011-07-06 14:10 UTC Modified: 2011-07-11 03:10 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hannes dot magnusson at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.4SVN-2011-07-06 (SVN) OS: Linux
Private report: No CVE-ID: None
 [2011-07-06 14:10 UTC] hannes dot magnusson at gmail dot com
Description:
------------
Running the following under interactive php shell segfaults :]
<?php
header("foobar: baz");
flush();
?>

Test script:
---------------
bjori@mini:~/Work/php/5.4$ gdb ./sapi/cli/php 
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
[..]
Reading symbols from /home/bjori/Work/src/php/php/php-src/branches/PHP_5_4/sapi/cli/php...done.
(gdb) run -a
Starting program: /home/bjori/Work/src/php/php/php-src/branches/PHP_5_4/sapi/cli/php -a
[Thread debugging using libthread_db enabled]
Interactive mode enabled

<?php
header("foobar: baz");
flush();



Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x000000000072e088 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7ffff7f910e8)
    at /home/bjori/Work/php/5.4/Zend/zend_vm_execute.h:580
580		if (UNEXPECTED((fbc->common.fn_flags & 
(ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
(gdb) bt
#0  0x000000000072e088 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7ffff7f910e8)
    at /home/bjori/Work/php/5.4/Zend/zend_vm_execute.h:580
#1  0x0000000000735921 in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0x7ffff7f910e8)
    at /home/bjori/Work/php/5.4/Zend/zend_vm_execute.h:2209
#2  0x000000000072d1eb in execute (op_array=0x7ffff7fc84f0) at 
/home/bjori/Work/php/5.4/Zend/zend_vm_execute.h:410
#3  0x00000000006df3b9 in execute_new_code () at 
/home/bjori/Work/php/5.4/Zend/zend_execute_API.c:1314
#4  0x0000000000699b7e in zendparse () at 
/home/bjori/Work/php/5.4/Zend/zend_language_parser.y:161
#5  0x00000000006a0cbe in compile_file (file_handle=0x7fffffffddb0, type=8) at 
Zend/zend_language_scanner.l:576
#6  0x00000000006f09da in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /home/bjori/Work/php/5.4/Zend/zend.c:1213
#7  0x0000000000669f16 in php_execute_script (primary_file=0x7fffffffddb0) at 
/home/bjori/Work/php/5.4/main/main.c:2382
#8  0x000000000083098e in do_cli (argc=2, argv=0x7fffffffe168) at 
/home/bjori/Work/php/5.4/sapi/cli/php_cli.c:990
#9  0x0000000000831856 in main (argc=2, argv=0x7fffffffe168) at 
/home/bjori/Work/php/5.4/sapi/cli/php_cli.c:1358
(gdb) 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-09 08:02 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2011-07-09 08:02 UTC] felipe@php.net
It's related to the literals one in interactive mode.
 [2011-07-11 03:10 UTC] dmitry@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=313125
Log: Fixed bug #55150 (php -a segfaults)
 [2011-07-11 03:10 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 [2011-07-11 03:10 UTC] dmitry@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-04-18 09:49 UTC] laruence@php.net
Automatic comment on behalf of dmitry
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fb6440b4f13cc3281d37141ca8796d73369682be
Log: Fixed bug #55150 (php -a segfaults)
 [2012-07-24 23:41 UTC] rasmus@php.net
Automatic comment on behalf of dmitry
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fb6440b4f13cc3281d37141ca8796d73369682be
Log: Fixed bug #55150 (php -a segfaults)
 [2013-11-17 09:37 UTC] laruence@php.net
Automatic comment on behalf of dmitry
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fb6440b4f13cc3281d37141ca8796d73369682be
Log: Fixed bug #55150 (php -a segfaults)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 23:01:30 2024 UTC