Fix failing test test-debug-helper/GetObjectProperties
This test sets a value to zero to simulate not knowing where read-only space starts, since v8::debug_helper code often must work with only partial information. However, the zero value persisted to another part of the test which expected a precise result, and could cause a test failure if an object happened to be allocated at the same offset from its containing chunk as a known read-only object. This CL fixes the test to only use the zero value during the steps that need it. Bug: v8:13646 Change-Id: I90f1593bf9b5bb36177ee904a910a183384a4e64 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178630 Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/main@{#85385}
This commit is contained in:
parent
978ca84374
commit
c462b8fba1
@ -92,9 +92,6 @@
|
||||
'test-code-stub-assembler/PopAndReturnFromJSBuiltinWithStackParameters' : [FAIL],
|
||||
'test-code-stub-assembler/PopAndReturnFromTFCBuiltinWithStackParameters' : [FAIL],
|
||||
|
||||
# https://bugs.chromium.org/p/v8/issues/detail?id=13646
|
||||
'test-debug-helper/GetObjectProperties': [SKIP],
|
||||
|
||||
# Slow tests.
|
||||
'test-api/InternalFieldsSubclassing': [PASS, SLOW],
|
||||
'test-debug/CallFunctionInDebugger': [PASS, ['mode == debug', SLOW]],
|
||||
|
@ -228,19 +228,22 @@ TEST(GetObjectProperties) {
|
||||
// its properties should match what we read last time.
|
||||
d::ObjectPropertiesResultPtr props2;
|
||||
{
|
||||
heap_addresses.read_only_space_first_page = 0;
|
||||
d::HeapAddresses heap_addresses_without_ro_space = heap_addresses;
|
||||
heap_addresses_without_ro_space.read_only_space_first_page = 0;
|
||||
uintptr_t map_ptr = props->properties[0]->address;
|
||||
uintptr_t map_map_ptr = *reinterpret_cast<i::Tagged_t*>(map_ptr);
|
||||
#if V8_MAP_PACKING
|
||||
map_map_ptr = reinterpret_cast<i::MapWord*>(&map_map_ptr)->ToMap().ptr();
|
||||
#endif
|
||||
uintptr_t map_address =
|
||||
d::GetObjectProperties(map_map_ptr, &ReadMemory, heap_addresses)
|
||||
d::GetObjectProperties(map_map_ptr, &ReadMemory,
|
||||
heap_addresses_without_ro_space)
|
||||
->properties[0]
|
||||
->address;
|
||||
MemoryFailureRegion failure(map_address, map_address + i::Map::kSize);
|
||||
props2 = d::GetObjectProperties(second_string_address, &ReadMemory,
|
||||
heap_addresses, "v8::internal::String");
|
||||
heap_addresses_without_ro_space,
|
||||
"v8::internal::String");
|
||||
if (COMPRESS_POINTERS_BOOL) {
|
||||
// The first page of each heap space can be automatically detected when
|
||||
// pointer compression is active, so we expect to use known maps instead
|
||||
|
Loading…
Reference in New Issue
Block a user