From 00daa3f5100af32dabb2be3baa61480a24cc6395 Mon Sep 17 00:00:00 2001 From: "ricow@chromium.org" Date: Thu, 17 Mar 2011 08:16:27 +0000 Subject: [PATCH] Partially fix serializer which crashes on x64 running with no snapshot. We used the wrong heap space number when reading in code chunks (we used LO_SPACE, should use kLargeCode). Review URL: http://codereview.chromium.org/6670083 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/serialize.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/serialize.cc b/src/serialize.cc index 3d74ddb0df..16d27598c6 100644 --- a/src/serialize.cc +++ b/src/serialize.cc @@ -722,6 +722,11 @@ void Deserializer::ReadObject(int space_number, LOG(SnapshotPositionEvent(address, source_->position())); } ReadChunk(current, limit, space_number, address); +#ifdef DEBUG + bool is_codespace = (space == Heap::code_space()) || + ((space == Heap::lo_space()) && (space_number == kLargeCode)); + ASSERT(HeapObject::FromAddress(address)->IsCode() == is_codespace); +#endif } @@ -877,7 +882,7 @@ void Deserializer::ReadChunk(Object** current, CASE_STATEMENT(where, how, within, CODE_SPACE) \ CASE_BODY(where, how, within, CODE_SPACE, kUnknownOffsetFromStart) \ CASE_STATEMENT(where, how, within, kLargeCode) \ - CASE_BODY(where, how, within, LO_SPACE, kUnknownOffsetFromStart) + CASE_BODY(where, how, within, kLargeCode, kUnknownOffsetFromStart) #define EMIT_COMMON_REFERENCE_PATTERNS(pseudo_space_number, \ space_number, \