Reland "[sandbox] Also enable the sandbox outside of Chromium builds"
This is a reland of commit 5b9401dde4
Now also skip tests that require large amounts of virtual address space
if tsan is enabled as tsan may cause V8 to create a smaller sandbox
which is then unable to allocate the required amount of memory.
Original change's description:
> [sandbox] Also enable the sandbox outside of Chromium builds
>
> Drive-by: include the right header in sandboxed-pointer-inl.h and fix
> missing sandbox initialization in generate-bytecode-expectations.cc.
>
> Bug: v8:10391
> Change-Id: Ic39ba04b7c98eaa58ea3943189c23b297f581f5a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630082
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Samuel Groß <saelo@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81216}
Bug: v8:10391
Change-Id: I141080fdf61a77ef48b22e353e3cfbc1ff816e5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3716474
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81277}
This commit is contained in:
parent
f260308d28
commit
a4d17470ab
5
BUILD.gn
5
BUILD.gn
@ -501,9 +501,8 @@ if (v8_enable_sandbox == "") {
|
||||
# once that is enabled everywhere by default.
|
||||
# TODO(chromium:1325784) the sandbox is not currently supported in Chromium
|
||||
# on Fuchsia.
|
||||
v8_enable_sandbox =
|
||||
build_with_chromium && v8_enable_pointer_compression_shared_cage &&
|
||||
v8_enable_external_code_space && target_os != "fuchsia"
|
||||
v8_enable_sandbox = v8_enable_pointer_compression_shared_cage &&
|
||||
v8_enable_external_code_space && target_os != "fuchsia"
|
||||
}
|
||||
|
||||
# Enable sandboxed pointers when the sandbox is enabled.
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define V8_SANDBOX_SANDBOXED_POINTER_INL_H_
|
||||
|
||||
#include "include/v8-internal.h"
|
||||
#include "src/common/ptr-compr.h"
|
||||
#include "src/common/ptr-compr-inl.h"
|
||||
#include "src/execution/isolate.h"
|
||||
#include "src/sandbox/sandboxed-pointer.h"
|
||||
|
||||
|
@ -700,6 +700,11 @@
|
||||
|
||||
# BUG(v8:12920): Breaks on TSAN.
|
||||
'regress/regress-crbug-620253': [SKIP],
|
||||
|
||||
# Skip tests that require a large amount of virtual address space (inside the
|
||||
# sandbox if that is enabled) if tsan is enabled.
|
||||
'wasm/many-memories': [SKIP],
|
||||
'regress/wasm/regress-1010272': [SKIP],
|
||||
}], # 'tsan == True'
|
||||
|
||||
##############################################################################
|
||||
|
@ -347,6 +347,11 @@ V8InitializationScope::V8InitializationScope(const char* exec_path)
|
||||
v8::V8::InitializeICUDefaultLocation(exec_path);
|
||||
v8::V8::InitializeExternalStartupData(exec_path);
|
||||
v8::V8::InitializePlatform(platform_.get());
|
||||
#ifdef V8_ENABLE_SANDBOX
|
||||
if (!v8::V8::InitializeSandbox()) {
|
||||
FATAL("Could not initialize the sandbox");
|
||||
}
|
||||
#endif
|
||||
v8::V8::Initialize();
|
||||
|
||||
v8::Isolate::CreateParams create_params;
|
||||
|
@ -153,4 +153,11 @@
|
||||
'simd*': [SKIP],
|
||||
}], # no_simd_hardware == True
|
||||
|
||||
##############################################################################
|
||||
# Skip tests that require a large amount of virtual address space (inside the
|
||||
# sandbox if that is enabled) if tsan is enabled.
|
||||
['tsan == True', {
|
||||
'memory_copy': [SKIP],
|
||||
}],
|
||||
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user