[PATCH] D25279: [ELF] - Do not crash on large output.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 10:25:41 PDT 2016
rafael added inline comments.
> Writer.cpp:1223
> Off += Sec->getSize();
> + if (T > Off)
> + fatal("attemp to set offset for " + Sec->getName() +
I wonder how many cases there can be where overflow and if there is a general solution.
How was this crashing before?
> Writer.cpp:1388
> template <class ELFT> void Writer<ELFT>::openFile() {
> + if (FileSize > SIZE_MAX)
> + fatal("output file size is too large for this configuration");
Maybe move this to another patch?
> too-large-output-i386.s:3
> +
> +## too-large-output-i386.elf contains section with address align.
> +## of 0xFFFFFFFF. Total file size calculation overflows because of that.
Can you create this with yaml2obj?
https://reviews.llvm.org/D25279
More information about the llvm-commits
mailing list