phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.83k stars 200 forks source link

die/exit from within exported PHP functions causes segfault #122

Closed stesie closed 9 years ago

stesie commented 9 years ago

If JS context calls a PHP function that triggers either die or exit, the engine segfaults.

Example:

<?php
$v8 = new V8Js();
$v8->foo = function() { echo "Hallo\n"; die("blar ...\n"); };
$v8->executeString('PHP.foo();');
stesie commented 9 years ago

I cannot reproduce this any longer, but nevertheless I pushed the test case shown above, since it definitely shouldn't crash the engine.