浏览代码

Fix use-after-free error wrt. pending exception

Don't dtor pending exception, PHP's exception handling does after all.
Stefan Siegl 9 年之前
父节点
当前提交
7e1f2e9355
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      v8js_v8.cc

+ 0 - 1
v8js_v8.cc

@@ -169,7 +169,6 @@ void v8js_v8_call(v8js_ctx *c, zval **return_value,
 	/* There was pending exception left from earlier executions -> throw to PHP */
 	/* There was pending exception left from earlier executions -> throw to PHP */
 	if (Z_TYPE(c->pending_exception) == IS_OBJECT) {
 	if (Z_TYPE(c->pending_exception) == IS_OBJECT) {
 		zend_throw_exception_object(&c->pending_exception TSRMLS_CC);
 		zend_throw_exception_object(&c->pending_exception TSRMLS_CC);
-		zval_dtor(&c->pending_exception);
 		ZVAL_NULL(&c->pending_exception);
 		ZVAL_NULL(&c->pending_exception);
 	}
 	}