Bug #71092 [Opn->Fbk]: Segmentation fault

From: Date: Fri, 11 Dec 2015 15:10:44 +0000
Subject: Bug #71092 [Opn->Fbk]: Segmentation fault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197796@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71092&edit=1 ID: 71092 Updated by: laruence@php.net Reported by: emilie dot guth at gmail dot com Summary: Segmentation fault -Status: Open +Status: Feedback Type: Bug Package: *General Issues Operating System: Mac OS X Version 10.11.1 (15B42) PHP Version: 7.0.0 Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2015-12-11 14:05:59] emilie dot guth at gmail dot com Description: ------------ I get a segfault with this code while including an empty file (see test script which contains a.php and c.php). This bug comes from a larger script, so I tried to get the shortest test script I could. When I change a tiny little thing (switch to if, no id() function ...) in it, there is no more segfault. I'm working on Mac OS X Version 10.11.1 with PHP 7.0.0 : $ php -v PHP 7.0.0 (cli) (built: Dec 11 2015 14:48:07) ( NTS ) I tried the same code on an Ubuntu 15.10 computer with PHP 7.0.0 there is no problem at all. Test script: --------------- File a.php : <?php declare(strict_types = 1); function id() { return ['id']; } function boom(): array { $data = [id()]; switch($data[0]) { case ['id'] : return; } } set_exception_handler(function($e) { require_once './c.php'; echo "plop"; }); boom(); ?> File c.php : <?php ?> Expected result: ---------------- I am supposed to be shown "plop" as a result. Instead of that I get : $ php a.php Segmentation fault: 11 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71092&edit=1

« previous php.bugs (#197796) next »