php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76080 Segmentation fault running a simple script
Submitted: 2018-03-10 16:40 UTC Modified: 2018-03-10 17:22 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: r dot dellaversana+php at gmail dot com Assigned:
Status: Duplicate Package: Reproducible crash
PHP Version: 7.2.3 OS: Ubuntu 17.10
Private report: No CVE-ID: None
 [2018-03-10 16:40 UTC] r dot dellaversana+php at gmail dot com
Description:
------------
I have a segmentation fault in a very simple class. It builds a simple linked list and when I try to scan the list the php cli crashes. I tried with php 5.6.33 and php 7.2.3 both on Ubuntu 17.10.

Simply run the script below and see the core dump happen!

gdb says:
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000556cb4949594 in gc_mark_grey (ref=0x7fa2b2378c60) at /tmp/php-build/source/7.2.3/Zend/zend_gc.c:499


Test script:
---------------
https://pastebin.com/8KeB6RSZ


Expected result:
----------------
start counting
count: 200000


Actual result:
--------------
Segmentation fault

gdb says:
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000556cb4949594 in gc_mark_grey (ref=0x7fa2b2378c60) at /tmp/php-build/source/7.2.3/Zend/zend_gc.c:499


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-10 17:11 UTC] ekin at coproductivity dot com
Can reproduce on fresh master. valgrind says:
==21607== 
start counting
count: ==21607== Stack overflow in thread #1: can't grow stack to 0xffe801000
==21607== 
==21607== Process terminating with default action of signal 11 (SIGSEGV)
==21607==  Access not within mapped region at address 0xFFE801FF8
==21607== Stack overflow in thread #1: can't grow stack to 0xffe801000
==21607==    at 0xCC4E4E: zend_std_get_gc (zend_object_handlers.c:119)
https://gist.github.com/ekinhbayar/d1c8a4c26b75d219f6703bdc41f3eaa9
 [2018-03-10 17:22 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2018-03-10 17:22 UTC] nikic@php.net
Duplicate of bug #75636.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC