Commit 6e94676d authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cpu-profiler] Fix flaky crashes on Windows caused by stack reads

This read can cause a guard page violation on Windows, where the sp is
sometimes incorrect and points far into the future stack space.

Bug: v8:8883, v8:5193
Change-Id: I55c1fcac873a9c43484a5d1c3f2661f3589b1daf
Reviewed-on: https://chromium-review.googlesource.com/c/1480378Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59810}
parent a8a45e41
......@@ -176,7 +176,12 @@ DISABLE_ASAN void TickSample::Init(Isolate* v8_isolate,
MSAN_MEMORY_IS_INITIALIZED(regs.sp, sizeof(void*));
// Sample potential return address value for frameless invocation of
// stubs (we'll figure out later, if this value makes sense).
tos = i::ReadUnalignedValue<void*>(reinterpret_cast<i::Address>(regs.sp));
// TODO(petermarshall): This read causes guard page violations on Windows.
// Either fix this mechanism for frameless stubs or remove it.
// tos =
// i::ReadUnalignedValue<void*>(reinterpret_cast<i::Address>(regs.sp));
tos = nullptr;
} else {
tos = nullptr;
}
......
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