[PATCH] D44285: Fix computeSymbolSizes SEGFAULT on invalid file

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 13:44:20 PDT 2020


dblaikie added a comment.

In D44285#2335892 <https://reviews.llvm.org/D44285#2335892>, @aprantl wrote:

> I'm not sure if I specifically can help here: The only change I committed (on behalf of the author) was this one, which tests the  `echo "0x1" > %t.input` case.

Sorry, that's the test case I'm talking about - the test case uses an input file ("%p/Inputs/zero") that wasn't included in the patch/committed, so far as I can see? And so the test isn't testing what it is intending to test, so far as I can tell. I believe the test was meant to include a (probably valid ELF? MachO? Maybe it doesn't matter which) file no sections in it, to tickle the `for (unsigned I = 0, N = Addresses.size() - 1; I < N; ++I) {` loop - or to tickle the Addresses.empty() check intended to fix the issue3


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D44285/new/

https://reviews.llvm.org/D44285



More information about the llvm-commits mailing list