[vm] Fix assert in heap snapshot writer.
TEST=iso-stress Bug: https://github.com/dart-lang/sdk/issues/60701 Change-Id: I0e66fc1e9ce38eb566f68eddb63ebbe5e2200275 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428081 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
committed by
Commit Queue
parent
564444d92b
commit
21dd5d02d9
@@ -131,10 +131,10 @@ class ObjectSlots {
|
||||
// and be without holes (otherwise, e.g. if a slot was not declared,
|
||||
// the visitors will visit them but we won't emit the field description in
|
||||
// the heap snapshot).
|
||||
if (contains_only_tagged_words) {
|
||||
intptr_t expected_offset = kWordSize;
|
||||
if (contains_only_tagged_words && (slots->length() > 0)) {
|
||||
intptr_t expected_offset = (*slots)[0].offset;
|
||||
for (auto& slot : *slots) {
|
||||
RELEASE_ASSERT(slot.offset = expected_offset);
|
||||
ASSERT_EQUAL(slot.offset, expected_offset);
|
||||
expected_offset += kCompressedWordSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace dart {
|
||||
F(Class, constants_) \
|
||||
F(Class, declaration_type_) \
|
||||
F(Class, invocation_dispatcher_cache_) \
|
||||
F(Class, declaration_instance_type_arguments_) \
|
||||
F(PatchClass, wrapped_class_) \
|
||||
F(PatchClass, script_) \
|
||||
F(Function, name_) \
|
||||
@@ -246,10 +247,11 @@ namespace dart {
|
||||
F(Class, direct_subclasses_)
|
||||
|
||||
#define JIT_CLASSES_AND_FIELDS(F) \
|
||||
F(Class, allocation_stub_) \
|
||||
F(Class, dependent_code_) \
|
||||
F(Class, direct_implementors_) \
|
||||
F(Class, direct_subclasses_) \
|
||||
F(Class, allocation_stub_) \
|
||||
F(Class, dependent_code_) \
|
||||
F(Library, kernel_program_info_) \
|
||||
F(Code, active_instructions_) \
|
||||
F(Code, deopt_info_array_) \
|
||||
F(Code, static_calls_target_table_) \
|
||||
|
||||
Reference in New Issue
Block a user