-
Notifications
You must be signed in to change notification settings - Fork 303
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
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 |
6b128a6
to
e251b27
Compare
Should be noted that the v8 patch is temporary. A future v8 update will include it and the patch will be dropped. |
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.
Code LGTM, this can probably go in after the update to 13.0. I wonder if there's any performance impact with this. It looks like Local<> stops being trivially copyable and the Local constructor calls StackAllocated::VerifyOnStack() which is mostly a DCHECK – I'd imagine that's an acceptable impact.
I could also see libkj's fibers performing arcane magic on the stack that cause the check to fail when it shouldn't, but let's try this out.
We don't call any V8 APIs on fibers so this shouldn't be an issue. |
Optional Side Quest: we should see about a clang-tidy rule to catch uses of things like |
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.