Bug #68623 [Opn->Fbk]: php - switch return - php-fpm SIGSEGV
| From: | aharvey@php.net | Date: | Thu, 18 Dec 2014 18:46:49 +0000 |
| Subject: | Bug #68623 [Opn->Fbk]: php - switch return - php-fpm SIGSEGV | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189113@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68623&edit=1
ID: 68623
Updated by: aharvey@php.net
Reported by: claude dot ws01 at gmail dot com
Summary: php - switch return - php-fpm SIGSEGV
-Status: Open
+Status: Feedback
Type: Bug
Package: FPM related
Operating System: CentOS 6.6
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Please try 5.5.20, which has just been released in the last few hours with a bunch of FPM fixes, and
if that doesn't resolve the issue, please provide a backtrace using the instructions at https://bugs.php.net/bugs-generating-backtrace.php.
Thanks!
Previous Comments:
------------------------------------------------------------------------
[2014-12-18 17:06:35] claude dot ws01 at gmail dot com
Description:
------------
php v5.5.19 centos 6.6 nginx v1.6.2 (tracking sys would not accept 5.5.19 as php version)
Getting a SIGSEGV in php-fpm on the return statement within a switch-case block.
I did not analyse the core dump. But pin-pointed the location in the php code.
A while ago, after updating php, recompiling nginx, I got the same issue, same class, other
function, same switch-return concept, that I solved by changing it with an if-then-else.
Last week I did another php update, and then another function caused same SIGSEGV, same class, same
switch-return concept, and solved it by putting the return after the switch.
I'm using same php v5.5.19 in a windows stack and linux server, and this issue is only on the
linux server.
I do not know what more information I can provide.
My objective is only to report it, as I have solved it, but worth reporting
Kind regards
Claude.
Test script:
---------------
static function get-a-SIGSEGV-without-any-result-returned()
{
switch (PHP_OS) {
case 'WINNT':
$result = utf8_encode(strftime($Language->getDateFormatLong(), mktime($hour,
$minute, $second, $month, $day, $year)));
return $result;
default:
$result = strftime($Language->getDateFormatLong(), mktime($hour, $minute, $second,
$month, $day, $year));
return $result;
}
}
static function get-the-result-returned-without-SIGSEGV()
{
switch (PHP_OS) {
case 'WINNT':
$result = utf8_encode(strftime($Language->getDateFormatLong(), mktime($hour,
$minute, $second, $month, $day, $year)));
break;
default:
$result = strftime($Language->getDateFormatLong(), mktime($hour, $minute, $second,
$month, $day, $year));
}
return $result;
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68623&edit=1