From: indeyets Operating system: Mac OS X PHP version: 5.3SVN-2011-02-24 (SVN) Package: Date/time related Bug Type: Bug Bug description:Segfault on startup, DATEG(timezone) not initialized
Description: ------------ In case there is some problem with extension loaded from php.ini (shared dependency not available), php segfaults while trying to show error. it happens in debug+zts mode at least. Debugger output: (lldb) run Process 23067 launched: '/opt/php53/bin/php' (x86_64) (lldb) Process 23067 stopped * thread #1: tid = 0x2d03, 0x00000001000097f0 php`guess_timezone + 48 at php_date.c:843, stop reason = EXC_BAD_ACCESS (code=13, address=0x0) 840 char *env; 841 842 /* Checking configure timezone */ 843 -> if (DATEG(timezone) && (strlen(DATEG(timezone)) > 0)) { 844 return DATEG(timezone); 845 } 846 /* Check environment variable */ (lldb) frame s 3 frame #3: 0x000000010053edb1 php`php_log_err + 369 at main.c:585 582 char *error_time_str; 583 584 time(&error_time); 585 -> error_time_str = php_format_date("d-M-Y H:i:s", 11, error_time, 1 TSRMLS_CC); 586 len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL); 587 #ifdef PHP_WIN32 588 php_flock(fd, 2); (lldb) print log_message (char *) log_message = 0x0000000101807a50 "PHP Warning: PHP Startup: Unable to load dynamic library '/opt/php53/lib/php/extensions/debug-zts- 20090626/gobject.so' - dlopen(/opt/php53/lib/php/extensions/debug-zts- 20090626/gobject.so, 9): Library not loaded: /opt/homebrew/Cellar/gobject- introspection/0.10.2/lib/libgirepository-1.0.1.dylib\n Referenced from: /opt/php53/lib/php/extensions/debug-zts-20090626/gobject.so\n Reason: image not found in Unknown on line 0" (lldb) bt thread #1: tid = 0x2d03, stop reason = EXC_BAD_ACCESS (code=13, address=0x0) frame #0: 0x00000001000097f0 php`guess_timezone + 48 at php_date.c:843 frame #1: 0x0000000100009c69 php`get_timezone_info + 89 at php_date.c:940 frame #2: 0x000000010000a05b php`php_format_date + 59 at php_date.c:1190 frame #3: 0x000000010053edb1 php`php_log_err + 369 at main.c:585 frame #4: 0x0000000100543b76 php`php_error_cb + 2342 at main.c:1003 frame #5: 0x00000001005f6da3 php`zend_error + 1139 at zend.c:1020 frame #6: 0x000000010053fdb5 php`php_verror + 3301 at main.c:807 frame #7: 0x000000010053ff9c php`php_error_docref0 + 364 at main.c:819 frame #8: 0x000000010040d031 php`php_load_extension + 561 at dl.c:158 frame #9: 0x0000000100554d32 php`php_load_php_extension_cb + 50 at php_ini.c:351 frame #10: 0x00000001005e8661 php`zend_llist_apply + 65 at zend_llist.c:193 frame #11: 0x0000000100554cb7 php`php_ini_register_extensions + 87 at php_ini.c:751 frame #12: 0x0000000100542f89 php`php_module_startup + 3529 at main.c:2029 frame #13: 0x000000010071b944 php`php_cli_startup + 36 at php_cli.c:402 frame #14: 0x000000010071895f php`main + 2575 at php_cli.c:776 frame #15: 0x0000000100000c64 php`start + 52 (lldb) Expected result: ---------------- Error is displayed Actual result: -------------- Segfault -- Edit bug report at http://bugs.php.net/bug.php?id=54087&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54087&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54087&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54087&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54087&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54087&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54087&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54087&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54087&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54087&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54087&r=support Expected behavior: http://bugs.php.net/fix.php?id=54087&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54087&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54087&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54087&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54087&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54087&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54087&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54087&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54087&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54087&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54087&r=mysqlcfg