Commit ba9ccd97 authored by QiuJi's avatar QiuJi Committed by V8 LUCI CQ

[riscv64] Fix of accidently sampled corrupt stack frame by cpu-profiler

Bug: v8:12144
Change-Id: I19821db79a6a4453ad2120450b5f7b247599f276
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118554Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76500}
parent 454272df
......@@ -176,7 +176,9 @@ class StackFrame {
intptr_t type = marker >> kSmiTagSize;
// TODO(petermarshall): There is a bug in the arm simulators that causes
// invalid frame markers.
#if defined(USE_SIMULATOR) && (V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM)
#if (defined(USE_SIMULATOR) && \
(V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM)) || \
V8_TARGET_ARCH_RISCV64
if (static_cast<uintptr_t>(type) >= Type::NUMBER_OF_TYPES) {
// Appease UBSan.
return Type::NUMBER_OF_TYPES;
......
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