-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable v8_enable_local_off_stack_check compile time flag #2752
base: main
Are you sure you want to change the base?
Conversation
6dc21a5
to
32b2cef
Compare
32b2cef
to
ca9840a
Compare
.bazelrc
Outdated
@@ -61,6 +61,9 @@ build --host_per_file_copt='external/zlib@-Wno-unknown-warning-option,-Wnodeprec | |||
build --per_file_copt=external/com_google_tcmalloc@-DANNOTATE_MEMORY_IS_INITIALIZED=ABSL_ANNOTATE_MEMORY_IS_INITIALIZED | |||
build --per_file_copt=external/com_google_protobuf@-Wno-deprecated-declarations,-Wno-deprecated-pragma | |||
build --host_per_file_copt=external/com_google_protobuf@-Wno-deprecated-declarations,-Wno-deprecated-pragma | |||
# Enables heap allocation debug checks for local handles. | |||
# Ref: https://chromium-review.googlesource.com/c/v8/v8/+/4905902 | |||
build --per_file_copt='external/v8@-DV8_ENABLE_LOCAL_OFF_STACK_CHECK' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I was wrong about this only being needed when building V8: Since the define present in include/v8-local-handle.h
and include/v8-fast-api-calls.h
we also need to apply it when building our own code. Let's change this to a regular copt
.
Nit: We reproduce V8 build flags in |
ca9840a
to
6b128a6
Compare
I've submitted a patch to v8 to fix this error. https://chromium-review.googlesource.com/c/v8/v8/+/5876953 |
Referencing the original commit introducing the flag:
Local handles (object of the v8::Local) should never be allocated on the heap, and we should use
v8::LocalVector
instead of heap allocation. This flag ensures that we follow v8 recommendation.