felipe                                   Wed, 17 Nov 2010 21:41:30 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=305472

Log:
- Fixed bug #53306 (php crashes with segfault when DTrace "exception-thrown" 
probe fires)
  patch by: mike at harschsystems dot com

Bug: http://bugs.php.net/53306 (Assigned) php crashes with segfault when DTrace 
"exception-thrown" probe fires
      
Changed paths:
    U   php/php-src/trunk/Zend/zend_exceptions.c

Modified: php/php-src/trunk/Zend/zend_exceptions.c
===================================================================
--- php/php-src/trunk/Zend/zend_exceptions.c    2010-11-17 20:46:44 UTC (rev 
305471)
+++ php/php-src/trunk/Zend/zend_exceptions.c    2010-11-17 21:41:30 UTC (rev 
305472)
@@ -87,8 +87,13 @@
        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 */


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to