sandbox error with v8 11.1.277.13
rbro opened this issue · 1 comments
Just wanted to share in case others run into this as I believe I found a way to fix it:
After compiling v8 11.1.277.13 and v8js, I got the below error when trying to run javascript:
# Fatal error in , line 0
# Embedder-vs-V8 build configuration mismatch. On embedder side sandbox is DISABLED while on V8 side it's ENABLED.
#
#
#
#FailureMessage Object: 0x7fff413d8740
==== C stack trace ===============================
/opt/v8/lib/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x13) [0x7f48993ef6b3]
/opt/v8/lib/libv8_libplatform.so(+0x106eb) [0x7f489a7a06eb]
/opt/v8/lib/libv8_libbase.so(V8_Fatal(char const*, ...)+0x170) [0x7f48993e3060]
/opt/v8/lib/libv8.so(+0x6b566c) [0x7f4899aac66c]
/usr/lib64/php/modules/v8js.so(+0x113da) [0x7f489a7bb3da]
php(+0x233e25) [0x559826c33e25]
php(+0x234cdb) [0x559826c34cdb]
php(zend_execute+0x135) [0x559826e70b35]
php(zend_execute_scripts+0xd0) [0x559826dfe750]
php(php_execute_script+0x26a) [0x559826d97d6a]
php(+0x4e7267) [0x559826ee7267]
php(+0x23f3fc) [0x559826c3f3fc]
/lib64/libc.so.6(+0x3feb0) [0x7f489ca28eb0]
/lib64/libc.so.6(__libc_start_main+0x80) [0x7f489ca28f60]
php(_start+0x25) [0x559826c3f475]
Aborted (core dumped)
After finding https://groups.google.com/g/v8-users/c/vNlbtTQqs1U/m/-qEgODUjBAAJ, I added -DV8_ENABLE_SANDBOX to my v8js configure line, which seems to have resolved the issue:
./configure --with-v8js=/opt/v8 LDFLAGS="-lstdc++" CPPFLAGS="-DV8_COMPRESS_POINTERS -DV8_ENABLE_SANDBOX"
Please let me know if this is the correct way to fix it, or if something else should be done.
Thanks for your help.
it is - at least - a valid work-around :-)
... actually config.m4 should auto-detect if V8 has been compiled with sandbox enabled or disabled. But obviously detection didn't work here