Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: src/serialize.cc

Issue 919613002: Whitelist serialized objects wrt MSAN. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: removed printf Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 // Code age headers are not serializable. 2113 // Code age headers are not serializable.
2114 code->MakeYoung(serializer_->isolate()); 2114 code->MakeYoung(serializer_->isolate());
2115 WipeOutRelocations(code); 2115 WipeOutRelocations(code);
2116 // We need to wipe out the header fields *after* wiping out the 2116 // We need to wipe out the header fields *after* wiping out the
2117 // relocations, because some of these fields are needed for the latter. 2117 // relocations, because some of these fields are needed for the latter.
2118 code->WipeOutHeader(); 2118 code->WipeOutHeader();
2119 object_start = code->address(); 2119 object_start = code->address();
2120 } 2120 }
2121 2121
2122 const char* description = code_object_ ? "Code" : "Byte"; 2122 const char* description = code_object_ ? "Code" : "Byte";
2123 #ifdef MEMORY_SANITIZER
2124 // Object sizes are usually rounded up with uninitialized padding space.
2125 MSAN_MEMORY_IS_INITIALIZED(object_start + base, bytes_to_output);
2126 #endif // MEMORY_SANITIZER
2123 sink_->PutRaw(object_start + base, bytes_to_output, description); 2127 sink_->PutRaw(object_start + base, bytes_to_output, description);
2124 if (code_object_) delete[] object_start; 2128 if (code_object_) delete[] object_start;
2125 } 2129 }
2126 if (to_skip != 0 && return_skip == kIgnoringReturn) { 2130 if (to_skip != 0 && return_skip == kIgnoringReturn) {
2127 sink_->Put(kSkip, "Skip"); 2131 sink_->Put(kSkip, "Skip");
2128 sink_->PutInt(to_skip, "SkipDistance"); 2132 sink_->PutInt(to_skip, "SkipDistance");
2129 to_skip = 0; 2133 to_skip = 0;
2130 } 2134 }
2131 return to_skip; 2135 return to_skip;
2132 } 2136 }
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 return GetHeaderValue(kNumInternalizedStringsOffset); 2645 return GetHeaderValue(kNumInternalizedStringsOffset);
2642 } 2646 }
2643 2647
2644 Vector<const uint32_t> SerializedCodeData::CodeStubKeys() const { 2648 Vector<const uint32_t> SerializedCodeData::CodeStubKeys() const {
2645 int reservations_size = GetHeaderValue(kNumReservationsOffset) * kInt32Size; 2649 int reservations_size = GetHeaderValue(kNumReservationsOffset) * kInt32Size;
2646 const byte* start = data_ + kHeaderSize + reservations_size; 2650 const byte* start = data_ + kHeaderSize + reservations_size;
2647 return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start), 2651 return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start),
2648 GetHeaderValue(kNumCodeStubKeysOffset)); 2652 GetHeaderValue(kNumCodeStubKeysOffset));
2649 } 2653 }
2650 } } // namespace v8::internal 2654 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698