﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	phpversion	appname	pending	exts	sapi	probability	blocking
297	Segmentation fault on php execution	sknaetsch	moo	"Using xcache version 3.0.1 on Solaris 10 SPARC leading to coredump with php version 5.4.10.

Here are some useful information from the system and also an patch which resolved the problem on the system:


uname –a
SunOS buildhost 5.10 Generic_147440-10 sun4u sparc SUNW,SPARC-Enterprise

gcc –v
Target: sparc-sun-solaris2.10
Thread model: posix
gcc version 4.6.3 (OpenPKG-CURRENT)


Backtrace:
Reading symbols from /php...(no debugging symbols found)...done.
[New LWP 1]
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Core was generated by `php -i'.
Program terminated with signal 10, Bus error.
#0  0xfd1f73e0 in xcache_OnUpdateULong () from /php-xcache/xcache.so
(gdb) bt
#0  0xfd1f73e0 in xcache_OnUpdateULong () from /php-xcache/xcache.so
#1  0x00527e40 in zend_register_ini_entries ()
#2  0xfd1f6188 in zm_startup_xcache () from /php-xcache/xcache.so
#3  0x005100a0 in zend_startup_module_ex ()
#4  0x0051c028 in zend_hash_apply ()
#5  0x005107dc in zend_startup_modules ()
#6  0x00458648 in php_module_startup ()
#7  0x006593c4 in ?? ()
#8  0x006593c4 in ?? ()


Patch:
--- xcache-3.0.1/xcache.c       2012-12-19 09:44:31.000000000 +0100
+++ xcache-fixed/xcache.c    2013-01-14 15:01:33.126570800 +0100
@@ -720,7 +720,7 @@
/* {{{ PHP_INI */
PHP_INI_BEGIN()
        PHP_INI_ENTRY1     (""xcache.coredump_directory"",      """", PHP_INI_SYSTEM, xcache_OnUpdateString,   &xc_coredump_dir)
-       PHP_INI_ENTRY1     (""xcache.coredump_type"",          ""0"", PHP_INI_SYSTEM, xcache_OnUpdateULong,    &xc_coredump_type)
+       PHP_INI_ENTRY1     (""xcache.coredump_type"",          ""0"", PHP_INI_SYSTEM, xcache_OnUpdateBool,     &xc_coredump_type)
        PHP_INI_ENTRY1_EX  (""xcache.disable_on_crash"",       ""0"", PHP_INI_SYSTEM, xcache_OnUpdateBool,     &xc_disable_on_crash, zend_ini_boolean_displayer_cb)
        PHP_INI_ENTRY1_EX  (""xcache.test"",                   ""0"", PHP_INI_SYSTEM, xcache_OnUpdateBool,     &xc_test,             zend_ini_boolean_displayer_cb)
        STD_PHP_INI_BOOLEAN(""xcache.experimental"",           ""0"", PHP_INI_ALL,    OnUpdateBool,        experimental,      zend_xcache_globals, xcache_globals)
"	defect	closed	major	3.0.2	cacher	3.0.1	fixed				5.4.10		0		Irrelevant		
