[PATCH] D25025: [ELF] - Do not crash on invalid symbol index.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 08:25:21 PDT 2016
ruiu added inline comments.
> InputFiles.h:154-155
> SymbolBody &getSymbolBody(uint32_t SymbolIndex) const {
> + if (SymbolIndex >= SymbolBodies.size())
> + fatal("invalid symbol index");
> return *SymbolBodies[SymbolIndex];
In the previous patch, you checked a value in a constructor of a symbol class. Here, you are checking it in InputFile. That seems inconsistent. Probably we should do all error checking in InputFile.cpp?
https://reviews.llvm.org/D25025
More information about the llvm-commits
mailing list