Skip to content

Instantly share code, notes, and snippets.

@shakaran
Created April 11, 2013 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shakaran/5367490 to your computer and use it in GitHub Desktop.
Save shakaran/5367490 to your computer and use it in GitHub Desktop.
Analysis for PHP #64635 bug stacktrace https://bugs.php.net/bug.php?id=64635
Call:
https://github.com/php/php-src/blob/PHP-5.3.23/Zend/zend_API.c
Stack:
zend_error (type=32, format=0x2aadd8a8f828 "Cannot load module '%s' because conflicting module '%s' is already loaded")
Code:
if (zend_hash_exists(&module_registry, lcname, name_len+1)) {
efree(lcname);
/* TODO: Check version relationship */
zend_error(E_CORE_WARNING, "Cannot load module '%s' because conflicting module '%s' is already loaded", module->name, dep->name);
return NULL;
}
==Next call==
https://github.com/php/php-src/blob/PHP-5.3.23/Zend/zend.c#L1078
Stack: -
php_error_cb (type=32, error_filename=0x2aadd8a5f8d6 "Unknown", error_lineno=0, format=<value optimized out>, args=<value optimized out>)
Code:
case E_COMPILE_WARNING:
/* The error may not be safe to handle in user-space */
zend_error_cb(type, error_filename, error_lineno, format, args);
break;
default:
==Next call==
https://github.com/php/php-src/blob/PHP-5.3.23/main/main.c#L1031
Stack:
php_log_err (log_message=0xa90fc38 "PHP Warning: Cannot load module 'XCache' because conflicting module 'eAccelerator' is already loaded in Unknown on line 0")
Code:
spprintf(&log_buffer, 0, "PHP %s: %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno);
php_log_err(log_buffer TSRMLS_CC);
efree(log_buffer);
==Next call==
https://github.com/php/php-src/blob/PHP-5.3.23/main/main.c#L610
Stack:
php_format_date (format=0x2aadd8a7cedc "d-M-Y H:i:s e", format_len=13, ts=1365708397, localtime=1)
Code:
#ifdef ZTS
if (!php_during_module_startup()) {
error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1 TSRMLS_CC);
} else {
error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0 TSRMLS_CC);
}
#else
error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1 TSRMLS_CC); // HERE is the problem!!
#endif
len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL);
==Next call==
https://github.com/php/php-src/blob/PHP-5.3.23/ext/date/php_date.c#L1198
Stack:
get_timezone_info ()
Code:
if (localtime) {
tzi = get_timezone_info(TSRMLS_C);
t->tz_info = tzi;
t->zone_type = TIMELIB_ZONETYPE_ID;
timelib_unixtime2local(t, ts);
}
==Next call==
https://github.com/php/php-src/blob/PHP-5.3.23/ext/date/php_date.c#L948
Stack:
guess_timezone (tzdb=0x2aade0e9f500)
Code:
tz = guess_timezone(DATE_TIMEZONEDB TSRMLS_CC);
==Next Call==
https://github.com/php/php-src/blob/PHP-5.3.23/ext/date/php_date.c#L856
Stack:
timelib_timezone_id_is_valid (timezone=0xa3cb5f0 " \267<\n", tzdb=0x2aade0e9f500)
Code:
if (env && *env && timelib_timezone_id_is_valid(env, tzdb)) {
return env;
}
==Next call==
https://github.com/php/php-src/blob/PHP-5.3.23/ext/date/lib/parse_tz.c#L309
Stack:
inmem_seek_to_tz_position (tzf=0x7fff15df62f8, timezone=0xa3cb5f0 " \267<\n", tzdb=0x2aade0e9f500)
Code:
int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
return (seek_to_tz_position(&tzf, timezone, tzdb));
}
==Next Call==
https://github.com/php/php-src/blob/PHP-5.3.23/ext/date/lib/parse_tz.c#L259
Stack:
CRASH
Code:
static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
{
int left = 0, right = tzdb->index_size - 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment