From: Felipe Pena Date: Wed, 17 Nov 2010 21:41:30 +0000 (+0000) Subject: - Fixed bug #53306 (php crashes with segfault when DTrace "exception-thrown" probe... X-Git-Tag: php-5.4.0alpha1~191^2~643 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45189fa8030b8d1df48c9dcfeb49fb119d6b1ab5;p=php - Fixed bug #53306 (php crashes with segfault when DTrace "exception-thrown" probe fires) patch by: mike at harschsystems dot com --- diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index adfef3f3d1..bcc492d2f3 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -87,8 +87,13 @@ void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */ if (DTRACE_EXCEPTION_THROWN_ENABLED()) { char *classname; int name_len; - zend_get_object_classname(exception, &classname, &name_len); - DTRACE_EXCEPTION_THROWN(classname); + + if (exception != NULL) { + zend_get_object_classname(exception, &classname, &name_len); + DTRACE_EXCEPTION_THROWN(classname); + } else { + DTRACE_EXCEPTION_THROWN(NULL); + } } #endif /* HAVE_DTRACE */