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
fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules #34844
Conversation
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.
@MarshallOfSound the patch was removed in favor of the pointer compression being generated as part of config.gypi
electron/script/generate-config-gypi.py
Lines 17 to 19 in e83c3ec
# Enabled in Chromium's V8. | |
if target_cpu in ('arm64', 'x64'): | |
args += ['--experimental-enable-pointer-compression'] |
I can confirm pointer compression is enabled with |
@deepak1556 I don't think the way pointer compression is being generated now is working quite right, unfortunately. If you try to compile a native module that uses nan using any Electron 20 alpha or beta build, the module crashes. You can see an example of that happening here (sorry, this example is Windows-only): https://gist.github.com/VerteDinde/90c7f4555c0f7ba5fd374fed3f20cbb0 Adding |
@deepak1556 Ah I think I now understand the issue. We only upload a single This is why it works on CI for linux, because it uses the correct It should probably be considered a flaw in the generation of |
9f22c86
to
c566ce9
Compare
Release Notes Persisted
|
I have automatically backported this PR to "20-x-y", please check out #34851 |
We discussed this on Slack and concluded that if a slight adjustment (c556ce9) was made that this change was GTG |
…ve modules (electron#34844) * fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules * build: rely on config.gypi to enable pointer compression
…ve modules (electron#34844) * fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules * build: rely on config.gypi to enable pointer compression
We screwed up in #34157 and created logic that said "turn off pointer compression, unless we are on a 32 bit host, in which case also turn off pointer compression" 😭
This also takes the opportunity to align other new flags in E20 (specifically sandbox related flags) with their state in our v8 build. Without this alignment everything just falls apart randomly.
Notes: Fixed spontaneous crashing in native modules that depended on
nan