[PATCH] D33574: PPC: Verify that branch fixups fit within the range.

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 05:54:05 PDT 2017


asb added a comment.

In https://reviews.llvm.org/D33574#850019, @hfinkel wrote:

> I think that the test here is: is this something that a user could hit, (including with inline assembly, etc.), or does this indicate an internal problem only? For internal errors, we have lots of checks that we optimize out for release builds (and there's always the option of building release+asserts, and I deploy those builds on more experimental platforms as a general rule). If it is something that a user could hit, then it should be an error that the user will always get.


That matches my understanding of when to use report_fatal_error or mechanisms like MCContext::reportError. Unless I'm missing in the PowerPC backend, I believe invalid fixup values can be easily triggered by user input, e.g.

  b distant
  .space 1<<27
  distant:


Repository:
  rL LLVM

https://reviews.llvm.org/D33574





More information about the llvm-commits mailing list