Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Fix bug #65470	Segmentation fault in zend_error() with --enable-dtrace
This commit is contained in:
Stanislav Malyshev 2013-08-18 17:22:50 -07:00
commit bcf785fb66
2 changed files with 6 additions and 2 deletions

2
NEWS
View File

@ -3,6 +3,8 @@ PHP NEWS
?? ??? 2013, PHP 5.5.3
- Core:
. Fixed bug #65470 (Segmentation fault in zend_error() with
--enable-dtrace). (Chris Jones)
. Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert)
. Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van Hees)

View File

@ -1092,17 +1092,19 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
error_filename = "Unknown";
}
va_start(args, format);
#ifdef HAVE_DTRACE
if(DTRACE_ERROR_ENABLED()) {
char *dtrace_error_buffer;
va_start(args, format);
zend_vspprintf(&dtrace_error_buffer, 0, format, args);
DTRACE_ERROR(dtrace_error_buffer, (char *)error_filename, error_lineno);
efree(dtrace_error_buffer);
va_end(args);
}
#endif /* HAVE_DTRACE */
va_start(args, format);
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)
|| !(EG(user_error_handler_error_reporting) & type)