Commit 82176ac3 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Fix allocation of win64 crashpad data

Ensure that the "padding" (actually needed for crashpad) is allocated
at the beginning of the new code space.

R=ahaas@chromium.org

Bug: v8:9477
Change-Id: I44b9e9feb559788e286fd5c57df90db7cf7f5340
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803650
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63790}
parent 2f9d2fc1
...@@ -1199,9 +1199,9 @@ void NativeModule::AddCodeSpace(base::AddressRegion region) { ...@@ -1199,9 +1199,9 @@ void NativeModule::AddCodeSpace(base::AddressRegion region) {
!implicit_alloc_disabled) { !implicit_alloc_disabled) {
size_t size = Heap::GetCodeRangeReservedAreaSize(); size_t size = Heap::GetCodeRangeReservedAreaSize();
DCHECK_LT(0, size); DCHECK_LT(0, size);
Vector<byte> padding = code_allocator_.AllocateForCode(this, size); Vector<byte> padding =
CHECK(region.contains(reinterpret_cast<Address>(padding.begin()), code_allocator_.AllocateForCodeInRegion(this, size, region);
padding.size())); CHECK_EQ(reinterpret_cast<Address>(padding.begin()), region.begin());
} }
#endif // V8_OS_WIN64 #endif // V8_OS_WIN64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment