Skip to content

V8_ENABLE_SANDBOX must be defined for default builds of v8 version > 10.8 #117

Description

I was getting a crash in CAMotics when building cbang against the latest V8 in arch linux.
Embedder-vs-V8 build configuration mismatch. On embedder side sandbox is DISABLED while on V8 side it's ENABLED.

According to this link, the default build configuration was changed in V8 version 10.8. The maintainer for the Arch v8-r package that I am building against was not enabling it until the latest release, 11.4.71, so I haven't had an issue until now. I can fix it on my end with this patch, but I think it should probably be in an if block depending on the v8 version being used.

--- a/src/cbang/js/v8/V8.h      2023-04-12 13:01:26.846888687 -0400
+++ b/src/cbang/js/v8/V8.h      2023-04-12 13:02:23.030223080 -0400
@@ -41,5 +41,6 @@
 #define V8STDINT_H_

 #define V8_ENABLE_CHECKS
+#define V8_ENABLE_SANDBOX

 #include <v8.h>

I haven't done extensive testing, just built and ran the camotics.tpl simulation in CAMotics, and that worked.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions