[PATCH] D28107: [ELF] - Do not create huge garbage files on section offset overflow.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 03:32:29 PST 2017


grimar added a comment.

In https://reviews.llvm.org/D28107#630909, @davide wrote:

> This needs a testcase.


Should it check that we do not create temporarily file ? Seems there is  no clean way to check this,
we do not know its exact name from test.

locationcounter.s already checks that "unable to move location counter backward for: .text" text is shown for this case.

Problem that openFile() creates temporarily huge file and unable to create mapped_file_region then,
so it leaves temporarily file behind. Not sure what is the best solution, but since we already know we have an error,
it seems reasonable not even try to open any files, that is what patch do.


https://reviews.llvm.org/D28107





More information about the llvm-commits mailing list