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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 13:52:52 PDT 2016


ruiu added inline comments.


> grimar wrote in InputFiles.cpp:73-74
> 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.

That's probably better. We shouldn't do too much to try to recover from unrecoverable errors.

https://reviews.llvm.org/D25233





More information about the llvm-commits mailing list