[PATCH] D25016: [ELF] - Fixed assert fail when symbol table has invalid sh_info value.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 12:06:30 PDT 2016


davide 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");
----------------
ruiu wrote:
> Probably `FirstNonLocal == 0` is better as we all know that 0 is not a valid symbol index.
Agree.


https://reviews.llvm.org/D25016





More information about the llvm-commits mailing list