[PATCH] D25233: [ELF] - Do not crash when unable to parse ELF object file.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 01:05:19 PDT 2016


grimar added inline comments.


> ruiu wrote in InputFiles.cpp:73-74
> This seems very weird. HasError should be used at major checkpoints, and we shouldn't have so many checkpoints. It is on the other hand called for every instantiation of the class.

What about my comment above about switching error -> fatal in createELFObj() then ? 
This should be consistent with latest ELF parsing hardening as we use fatal for broken objects and
createELFObj() now call error() even if ELF is broken, what I think is the only possible reason for fail.

https://reviews.llvm.org/D25233





More information about the llvm-commits mailing list