Bug #69326 [Fbk->NoF]: SIGSEGV (signal 11, Segmentation fault) in zend_string.h

From: Date: Sun, 20 Jun 2021 04:22:19 +0000
Subject: Bug #69326 [Fbk->NoF]: SIGSEGV (signal 11, Segmentation fault) in zend_string.h
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234545@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69326&edit=1 ID: 69326 Updated by: php-bugs@lists.php.net Reported by: pegasus at vaultwiki dot org Summary: SIGSEGV (signal 11, Segmentation fault) in zend_string.h -Status: Feedback +Status: No Feedback Type: Bug Package: Reproducible crash Operating System: Centos 6 64-bit PHP Version: master-Git-2015-03-29 (Git) Assigned To: cmb Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2021-06-09 14:26:26] cmb@php.net [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ [2021-06-09 14:24:38] cmb@php.net Is this still an issue with any of the actively supported PHP versions[1]? ------------------------------------------------------------------------ [2015-04-12 04:22:24] 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. ------------------------------------------------------------------------ [2015-04-02 04:05:47] pegasus at vaultwiki dot org I was able to resolve the segfault by making a small change to the script. Unfortunately, it is a very large script and the segfault seemed to occur only with certain data sets -- I could not reproduce the segfault on a separate installation or by using a smaller test script. I compared the data sets that segfaulted to sets that didn't and there were no differences or irregularities that I could see. However, here is the test script I made that demonstrates the kinds of operations the script performs, as well as where the segfault occurs (while this test doesn't actually segfault): ### class Info_Object { } class Item_Object { protected $infoid = 0; public function getInfoId() { $this->infoid = 1; return $this->infoid; } } function fetch_info(&$infoid) { global $infocache; $infoid = intval($infoid); if (!isset($infocache["$infoid"])) { $infocache["$infoid"] = array( 'contentid' => 1, 'title' => 'Content' ); $shortcut =& $infocache["$infoid"]; } // other code here was the backtrace in the core dump // such as $infocache["$infoid"]['itemid'] = $infoid; // but when walking through, we learned that the segfault was later return $infocache["$infoid"]; // segfault } $view = new Info_Object(); $view->item = new Item_Object(); $view->infoid = $view->item->getInfoId(); if ($view->infoid) { $info = fetch_info($view->infoid); } echo 'SUCCESS'; exit; #### I was able to resolve the segfault by modifying this line: #### $info = fetch_info($view->infoid); #### So that the new line was like so: #### $infoid = $view->infoid; $info = fetch_info($infoid); #### Hopefully this gives a clue as to where to look. ------------------------------------------------------------------------ [2015-04-01 20:02:58] pegasus at vaultwiki dot org Apologies, the line numbering issue I had noted was actually an issue with the way my code viewer counted lines. I have switched viewers, and the line numbers given by userland errors are now correct. In my last reply I mentioned the segfault occurred on line 195 in my script. Using the correct line numbers, line 195 is the closing brace in the last line of the snippet I provided. I should also mention that in this case, the backtrace claims that $dependency is passed explicitly as "" (not just using the default value). I believe I have located the site URL that leads to this the segfault, so I can start stepping through the calling script and see if there's anything unusual going on. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=69326 -- Edit this bug report at https://bugs.php.net/bug.php?id=69326&edit=1

« previous php.bugs (#234545) next »