[PATCH] D25016: [ELF] - Fixed assert fail when symbol table has invalid sh_info value.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 13:08:10 PDT 2016
rafael added inline comments.
================
Comment at: ELF/InputFiles.cpp:84
@@ -83,3 +83,3 @@
uint32_t FirstNonLocal = Symtab->sh_info;
- if (FirstNonLocal > NumSymbols)
+ if (!FirstNonLocal || (FirstNonLocal > NumSymbols))
fatal(getFilename(this) + ": invalid sh_info in symbol table");
----------------
davide wrote:
> ruiu wrote:
> > Probably `FirstNonLocal == 0` is better as we all know that 0 is not a valid symbol index.
> Agree.
Do you need this check in here to avoid the crash? How was it crashing before getting to the other check you added in Writer?
https://reviews.llvm.org/D25016
More information about the llvm-commits
mailing list