php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66748 GC causes Segmentation Fault
Submitted: 2014-02-20 15:06 UTC Modified: 2014-12-30 10:42 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (33.3%)
From: znakomstvaastrasoft at gmail dot com Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.4.25 OS: CentOS 6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: znakomstvaastrasoft at gmail dot com
New email:
PHP Version: OS:

 

 [2014-02-20 15:06 UTC] znakomstvaastrasoft at gmail dot com
Description:
------------
I'm running a CLI script causing a segfault.
Debugging with GDB gives me this:

(gdb) bt
#0  zval_scan (pz=0x0) at /usr/src/debug/php-5.4.25/Zend/zend_gc.c:516
#1  0x0000000000601b8d in zval_scan (pz=<value optimized out>) at /usr/src/debug/php-5.4.25/Zend/zend_gc.c:568
#2  0x0000000000601b8d in zval_scan (pz=<value optimized out>) at /usr/src/debug/php-5.4.25/Zend/zend_gc.c:568
#3  0x0000000000601b8d in zval_scan (pz=<value optimized out>) at /usr/src/debug/php-5.4.25/Zend/zend_gc.c:568
#4  0x0000000000602431 in zobj_scan () at /usr/src/debug/php-5.4.25/Zend/zend_gc.c:605
#5  gc_scan_roots () at /usr/src/debug/php-5.4.25/Zend/zend_gc.c:625
#6  gc_collect_cycles () at /usr/src/debug/php-5.4.25/Zend/zend_gc.c:796
#7  0x00000000006028d4 in gc_zval_possible_root (zv=<value optimized out>) at /usr/src/debug/php-5.4.25/Zend/zend_gc.c:166
#8  0x0000000000669011 in gc_zval_check_possible_root (execute_data=0x7f1e1e4ab340) at /usr/src/debug/php-5.4.25/Zend/zend_gc.h:183
#9  zend_pzval_unlock_func (execute_data=0x7f1e1e4ab340) at /usr/src/debug/php-5.4.25/Zend/zend_execute.c:81
#10 _get_zval_ptr_var (execute_data=0x7f1e1e4ab340) at /usr/src/debug/php-5.4.25/Zend/zend_execute.c:184
#11 ZEND_ASSIGN_SPEC_CV_VAR_HANDLER (execute_data=0x7f1e1e4ab340) at /usr/src/debug/php-5.4.25/Zend/zend_vm_execute.h:33137
#12 0x000000000064bf88 in execute (op_array=0x1a11720) at /usr/src/debug/php-5.4.25/Zend/zend_vm_execute.h:410
#13 0x00000000005e1e40 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/debug/php-5.4.25/Zend/zend.c:1315
#14 0x0000000000584b68 in php_execute_script (primary_file=0x7fff7ad27070) at /usr/src/debug/php-5.4.25/main/main.c:2502
#15 0x000000000068d903 in do_cli (argc=6, argv=0x7fff7ad283c8) at /usr/src/debug/php-5.4.25/sapi/cli/php_cli.c:989
#16 0x000000000068e0c8 in main (argc=6, argv=0x7fff7ad283c8) at /usr/src/debug/php-5.4.25/sapi/cli/php_cli.c:1365


Digging deeper, GC tries to check zval, which is 0-pointer and fails.
I can send a core dump by request.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-24 05:57 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2014-06-24 05:57 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC