Skip to content
Commit 159b948e authored by Fangrui Song's avatar Fangrui Song
Browse files

[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).
parent 3ee44cb7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment