]> granicus.if.org Git - php/commitdiff
- Fixed bug #53306 (php crashes with segfault when DTrace "exception-thrown" probe...
authorFelipe Pena <felipe@php.net>
Wed, 17 Nov 2010 21:41:30 +0000 (21:41 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 17 Nov 2010 21:41:30 +0000 (21:41 +0000)
  patch by: mike at harschsystems dot com

Zend/zend_exceptions.c

index adfef3f3d1b87b7ed6400193af358e284934d630..bcc492d2f3b84e69142298660e807d636afc4298 100644 (file)
@@ -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 */