Skip JS shared memory tests on build configs that don't have it
Drive-by fix to align what builds the test runner considers to be able to have shared memory features and what builds can create a shared Isolate. Bug: v8:12007 Change-Id: I151513ccbfbee31e5b35c5ce8e9192732eabfee2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3421507 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#78824}
This commit is contained in:
parent
49e31074f7
commit
eb722a0408
1
BUILD.gn
1
BUILD.gn
@ -2218,6 +2218,7 @@ action("v8_dump_build_config") {
|
||||
"v8_enable_pointer_compression_shared_cage=" +
|
||||
"$v8_enable_pointer_compression_shared_cage",
|
||||
"v8_enable_sandbox=$v8_enable_sandbox",
|
||||
"v8_enable_shared_ro_heap=$v8_enable_shared_ro_heap",
|
||||
"v8_enable_third_party_heap=$v8_enable_third_party_heap",
|
||||
"v8_enable_webassembly=$v8_enable_webassembly",
|
||||
"v8_dict_property_const_tracking=$v8_dict_property_const_tracking",
|
||||
|
@ -3211,17 +3211,19 @@ Isolate::Isolate(std::unique_ptr<i::IsolateAllocator> isolate_allocator,
|
||||
|
||||
handle_scope_data_.Initialize();
|
||||
|
||||
// When pointer compression is on with a per-Isolate cage, allocation in the
|
||||
// shared Isolate can point into the per-Isolate RO heap as the offsets are
|
||||
// constant across Isolates.
|
||||
// A shared Isolate is used to support JavaScript shared memory features
|
||||
// across Isolates. These features require all of the following to hold in the
|
||||
// build configuration:
|
||||
//
|
||||
// When pointer compression is on with a shared cage or when pointer
|
||||
// compression is off, a shared RO heap is required. Otherwise a shared
|
||||
// allocation requested by a client Isolate could point into the client
|
||||
// Isolate's RO space (e.g. an RO map) whose pages gets unmapped when it is
|
||||
// disposed.
|
||||
CHECK_IMPLIES(is_shared_, COMPRESS_POINTERS_IN_ISOLATE_CAGE_BOOL ||
|
||||
V8_SHARED_RO_HEAP_BOOL);
|
||||
// 1. The RO space is shared, so e.g. immortal RO maps can be shared across
|
||||
// Isolates.
|
||||
// 2. HeapObjects are shareable across Isolates, which requires either
|
||||
// pointers to be uncompressed (!COMPRESS_POINTER_BOOL), or that there is a
|
||||
// single virtual memory reservation shared by all Isolates in the process
|
||||
// for compressing pointers (COMPRESS_POINTERS_IN_SHARED_CAGE_BOOL).
|
||||
CHECK_IMPLIES(is_shared_, V8_SHARED_RO_HEAP_BOOL &&
|
||||
(!COMPRESS_POINTERS_BOOL ||
|
||||
COMPRESS_POINTERS_IN_SHARED_CAGE_BOOL));
|
||||
|
||||
#define ISOLATE_INIT_EXECUTE(type, name, initial_value) \
|
||||
name##_ = (initial_value);
|
||||
|
@ -1801,4 +1801,9 @@
|
||||
'tzoffset-transition-moscow': [FAIL],
|
||||
}], # variant == google3_nociu
|
||||
|
||||
# Tests that cannot run without JS shared memory
|
||||
['no_js_shared_memory', {
|
||||
'shared-memory/*': [SKIP],
|
||||
}], # 'no_js_shared_memory'
|
||||
|
||||
]
|
||||
|
@ -192,6 +192,7 @@ class BuildConfig(object):
|
||||
self.lite_mode = build_config['v8_enable_lite_mode']
|
||||
self.pointer_compression = build_config['v8_enable_pointer_compression']
|
||||
self.pointer_compression_shared_cage = build_config['v8_enable_pointer_compression_shared_cage']
|
||||
self.shared_ro_heap = build_config['v8_enable_shared_ro_heap']
|
||||
self.sandbox = build_config['v8_enable_sandbox']
|
||||
self.third_party_heap = build_config['v8_enable_third_party_heap']
|
||||
self.webassembly = build_config['v8_enable_webassembly']
|
||||
@ -732,6 +733,9 @@ class BaseTestRunner(object):
|
||||
"lite_mode": self.build_config.lite_mode,
|
||||
"pointer_compression": self.build_config.pointer_compression,
|
||||
"pointer_compression_shared_cage": self.build_config.pointer_compression_shared_cage,
|
||||
"no_js_shared_memory": (not self.build_config.shared_ro_heap) or
|
||||
(self.build_config.pointer_compression and
|
||||
not self.build_config.pointer_compression_shared_cage),
|
||||
"sandbox": self.build_config.sandbox,
|
||||
"dict_property_const_tracking": self.build_config.dict_property_const_tracking,
|
||||
}
|
||||
|
@ -351,6 +351,7 @@ class SystemTest(unittest.TestCase):
|
||||
v8_enable_verify_csa=False, v8_enable_lite_mode=False,
|
||||
v8_enable_pointer_compression=False,
|
||||
v8_enable_pointer_compression_shared_cage=False,
|
||||
v8_enable_shared_ro_heap=False,
|
||||
v8_enable_sandbox=False)
|
||||
result = run_tests(
|
||||
basedir,
|
||||
|
@ -23,6 +23,7 @@
|
||||
"v8_enable_pointer_compression": true,
|
||||
"v8_enable_pointer_compression_shared_cage": true,
|
||||
"v8_enable_sandbox": false,
|
||||
"v8_enable_shared_ro_heap": true,
|
||||
"v8_control_flow_integrity": false,
|
||||
"v8_enable_single_generation": false,
|
||||
"v8_enable_third_party_heap": false,
|
||||
|
@ -23,6 +23,7 @@
|
||||
"v8_enable_pointer_compression": false,
|
||||
"v8_enable_pointer_compression_shared_cage": false,
|
||||
"v8_enable_sandbox": false,
|
||||
"v8_enable_shared_ro_heap": false,
|
||||
"v8_control_flow_integrity": false,
|
||||
"v8_enable_single_generation": false,
|
||||
"v8_enable_third_party_heap": false,
|
||||
|
@ -23,6 +23,7 @@
|
||||
"v8_enable_pointer_compression": true,
|
||||
"v8_enable_pointer_compression_shared_cage": true,
|
||||
"v8_enable_sandbox": false,
|
||||
"v8_enable_shared_ro_heap": true,
|
||||
"v8_control_flow_integrity": false,
|
||||
"v8_enable_single_generation": false,
|
||||
"v8_enable_third_party_heap": false,
|
||||
|
Loading…
Reference in New Issue
Block a user