aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <wallace@fb.com>2022-07-12 12:41:30 -0700
committerWalter Erquinigo <wallace@fb.com>2022-07-12 16:23:03 -0700
commitdbc0cb0198129fbded7ff3be5d080cd12ad91783 (patch)
tree48affbb2a5aca9bb12e16e354af93534eaa2da7d /clang/lib/CodeGen/CodeGenFunction.cpp
parentad7bcda9402d4473c12461a76a2bc27a600a8001 (diff)
downloadllvm-dbc0cb0198129fbded7ff3be5d080cd12ad91783.zip
llvm-dbc0cb0198129fbded7ff3be5d080cd12ad91783.tar.gz
llvm-dbc0cb0198129fbded7ff3be5d080cd12ad91783.tar.bz2
[trace] Avoid a crash in the dumper when disassembling fails
In rare situations, disassemblying would fail that produce an invalid InstructionSP object. We need to check that it's valid before using. With this change, now the dumper doesn't crash with dumping instructions of ioctl. In fact, it now dumps this output { "id": 6135, "loadAddress": "0x7f4bfe5c7515", "module": "libc.so.6", "symbol": "ioctl", "source": "glibc/2.34/src/glibc-2.34/sysdeps/unix/syscall-template.S", "line": 120, "column": 0 } Anyway, we need to investigate why the diassembler failed disassembling that instruction. From over 2B instructions I was disassembling today, just this one failed, so this could be a bug in LLVM's core disassembler. Differential Revision: https://reviews.llvm.org/D129588
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions