From 153312326371aca3537cca15b9d61fdc967fa56b Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Sun, 24 Oct 2021 23:31:49 +0200 Subject: Profiler: Stop disassembly on invalid instructions --- Userland/DevTools/Profiler/DisassemblyModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/DevTools/Profiler') 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; -- cgit v1.2.3