summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2021-10-24 23:31:49 +0200
committerLinus Groh <mail@linusgroh.de>2021-11-16 00:49:48 +0000
commit153312326371aca3537cca15b9d61fdc967fa56b (patch)
tree431c512f6384cccc66d4f2492566f499311fc527 /Userland/DevTools/Profiler
parent134f43ba12488201fab7cf43fbf525040fecbb57 (diff)
downloadserenity-153312326371aca3537cca15b9d61fdc967fa56b.zip
Profiler: Stop disassembly on invalid instructions
Diffstat (limited to 'Userland/DevTools/Profiler')
-rw-r--r--Userland/DevTools/Profiler/DisassemblyModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/Profiler/DisassemblyModel.cpp b/Userland/DevTools/Profiler/DisassemblyModel.cpp
index 4e6dd9cb7c..749377b38c 100644
--- a/Userland/DevTools/Profiler/DisassemblyModel.cpp
+++ b/Userland/DevTools/Profiler/DisassemblyModel.cpp
@@ -123,7 +123,7 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
break;
auto insn = disassembler.next();
- if (!insn.has_value())
+ if (!insn.has_value() || !insn.value().is_valid())
break;
FlatPtr address_in_profiled_program = node.address() + offset_into_symbol;