-
Notifications
You must be signed in to change notification settings - Fork 315
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
V8 Sandbox feature #1448
Comments
I already found one complication: diff --git .gn .gn
index f7097dd..0c1f746 100644
--- .gn
+++ .gn
@@ -30,7 +30,7 @@ default_args = {
symbol_level = 1
use_debug_fission = false
- v8_enable_sandbox = false
+ v8_enable_sandbox = true
v8_enable_javascript_promise_hooks = true
v8_promise_internal_field_count = 1
v8_use_external_startup_data = false
@@ -63,7 +63,7 @@ default_args = {
# be cleaned which causes resource exhaustion. Disabling pointer compression
# makes sure that the EPT is not used.
# https://bugs.chromium.org/p/v8/issues/detail?id=13640&q=garbage%20collection&can=2
- v8_enable_pointer_compression = false
+ v8_enable_pointer_compression = true
# Maglev *should* be supported when pointer compression is disabled as per
# https://chromium-review.googlesource.com/c/v8/v8/+/4753150, but it still
|
@wingo is working on a fix for the memory leak, which will hopefully allow us to re-enabling pointer compression. |
Fix has been completed. Andy wrote a blog post about it https://wingolog.org/archives/2024/05/13/partitioning-pitfalls-for-generational-collectors We're waiting for a new V8 LKGR before re-enabling pointer compression. |
We landed 12.6-lgkr in rusty_v8 which was a prereq for pointer compression: #1473 |
It looks like sandbox now requires shared read only space as well. |
@wingo Am I understanding correctly here that ReadOnlyHeap and SharedReadOnlyHeap are both being kind of "merged" into the sharedness of IsolateGroup? That would be great if we can control isolate grouping in the public API as the only reason we don't use SharedReadOnlyHeap right now is that we have different isolate snapshots running in the same process. If we could put those in separate groups that would be great. |
Roughly speaking, an isolate group has a one-to-one relationship with a pointer cage. That pointer cage may be sandboxed or not, depending on the configuration. If shared read-only heaps are enabled, they are associated with the isolate group / pointer-cage. There is still no public API for isolate groups; we have some drafts but we want to avoid shipping something that doesn't match use-cases. Right now we are most concerned with the use case where all isolate groups have the same snapshot. I think our current drafts should work with different snapshots though also. |
After reading https://v8.dev/blog/sandbox, I wonder whether you plan to enable the sandbox feature anytime soon?
It's currently disabled:
rusty_v8/.gn
Line 33 in 89fbf2a
And needs to be enabled at build time:
Thanks!
The text was updated successfully, but these errors were encountered: