aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-12-15 18:21:48 -0800
committerFangrui Song <i@maskray.me>2021-12-15 18:21:48 -0800
commit159b948e434556fa6c397066e0a13a893cc6a7d0 (patch)
tree9632212e46bf17f461583546b937c8eafb9081ca /llvm/lib/Object/MachOObjectFile.cpp
parent3ee44cb775ebe58e833c668c03b6fcf0a850e5c7 (diff)
downloadllvm-159b948e434556fa6c397066e0a13a893cc6a7d0.zip
llvm-159b948e434556fa6c397066e0a13a893cc6a7d0.tar.gz
llvm-159b948e434556fa6c397066e0a13a893cc6a7d0.tar.bz2
[ELF] ObjFile<ELFT>::initializeSymbols: don't call Allocate when firstGlobal==0
Calling `Allocate` with 0 size (when .symtab is absent, e.g. `invalid/mips-invalid-options-descriptor.test`) may return a nullptr, which will crash with -fsanitize=null (the underlying `Allocate` function is LLVM_ATTRIBUTE_RETURNS_NONNULL).
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions