Bug #66358 [NEW]: fpm starts segfault
| From: | laruence@php.net | Date: | Fri, 27 Dec 2013 04:59:34 +0000 |
| Subject: | Bug #66358 [NEW]: fpm starts segfault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-183468@lists.php.net to get a copy of this message | ||
From: laruence
Operating system:
PHP version: master-Git-2013-12-27 (Git)
Package: *General Issues
Bug Type: Bug
Bug description:fpm starts segfault
Description:
------------
(PHP-5.6) after commit e30b2aae5ad93405eee19bca6125ea872f409c82
php-fpm starts segfault with backtrace
Program received signal SIGABRT, Aborted.
0x00000034dc030285 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00000034dc030285 in raise () from /lib64/libc.so.6
#1 0x00000034dc031d30 in abort () from /lib64/libc.so.6
#2 0x00000034dc06971b in __libc_message () from /lib64/libc.so.6
#3 0x00000034dc071756 in free () from /lib64/libc.so.6
#4 0x000000000099c37b in init_request_info () at
/home/huixinchen/opensource/php-5.6/sapi/fpm/fpm/fpm_main.c:1356
#5 0x000000000099d4d8 in main (argc=3, argv=0x7fff7f242528)
at /home/huixinchen/opensource/php-5.6/sapi/fpm/fpm/fpm_main.c:1866
seems because tsrm_real_path return previously a malloced realpath, but
after that commit it return a emalloced?
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 91abfea..3da603b 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1353,7 +1353,7 @@ static void init_request_info(TSRMLS_D)
} else {
SG(request_info).request_uri = env_script_name;
}
- free(real_path);
+ efree(real_path);
}
} else {
/* pre 4.3 behaviour, shouldn't be used but provides BC */
welting, please look at this.
Test script:
---------------
none
Expected result:
----------------
none
Actual result:
--------------
none
--
Edit bug report at https://bugs.php.net/bug.php?id=66358&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66358&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66358&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66358&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66358&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66358&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66358&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66358&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66358&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66358&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66358&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66358&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66358&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66358&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66358&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66358&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66358&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66358&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66358&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66358&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66358&r=mysqlcfg