V8_COMPRESS_POINTERS flag

394 views
Skip to first unread message

theratliter theratliter

unread,
Oct 2, 2022, 11:49:45 AM10/2/22
to v8-users
Hi, i compile V8(10.8) with -DV8_COMPRESS_POINTERS, but when i run the code it crashes with the error as follows.
```
Embedder-vs-V8 build configuration mismatch. On embedder side sandbox is DISABLED while on V8 side it's ENABLED.
```
Does anybody know why ? thanks!

Ben Noordhuis

unread,
Oct 2, 2022, 2:26:10 PM10/2/22
to v8-u...@googlegroups.com
Compile your own code with -DV8_COMPRESS_POINTERS to fix that.

Pointer compression changes the layout of objects in memory. Embedder
and engine have to agree on the object layout, otherwise things go
boom.

theratliter theratliter

unread,
Oct 2, 2022, 2:39:55 PM10/2/22
to v8-users
Oh, sorry, i mean i compile my code with  -DV8_COMPRESS_POINTERS and compile V8 with default config, but it still crash. I encountered this error long time ago and it can be fixed with  -DV8_COMPRESS_POINTERS, but it does not work in V8 10.8. I print the value of V8_COMPRESS_POINTERS, it shows 1. it maybe related to my PC or compiler ?

Daryl Haresign

unread,
Oct 2, 2022, 3:02:54 PM10/2/22
to v8-u...@googlegroups.com
You need -DV8_ENABLE_SANDBOX.

You can look at the BUILD.gn file to figure out how the default values look.


There’s an option you can enable when you build v8 so that it spits out a v8-gn.h that you can include to ensure you have the correct defines when you build the embedder side code.



On Oct 2, 2022, at 14:39, theratliter theratliter <thera...@gmail.com> wrote:

Oh, sorry, i mean i compile my code with  -DV8_COMPRESS_POINTERS and compile V8 with default config, but it still crash. I encountered this error long time ago and it can be fixed with  -DV8_COMPRESS_POINTERS, but it does not work in V8 10.8. I print the value of V8_COMPRESS_POINTERS, it shows 1. it maybe related to my PC or compiler ?
--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/6c5b48f1-9172-4af0-a7ff-d48fbdcaa999n%40googlegroups.com.

theratliter theratliter

unread,
Oct 3, 2022, 9:46:04 AM10/3/22
to v8-users
Thanks ! it works :-).
Reply all
Reply to author
Forward
0 new messages