[llvm] r262455 - Bug 20810: Use report_fatal_error instead of unreachable

Rafael Espíndola via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 06:14:05 PST 2016


On 4 March 2016 at 18:54, Matt Arsenault <arsenm2 at gmail.com> wrote:
>
>> On Mar 3, 2016, at 15:12, Rafael Espíndola via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> This is not how we split llvm_unreachable/report_fatal_error in llvm
>> and I don't think r600 should be an exception.
>>
>> If this code is known to be buggy, add a note for potential users
>> saying that they should build with assertions and report bugs.
>>
>> It is still the case that report_fatal_error is for valid errors.
>> llvm_unreachable is for detecting *bugs* in the code.
>>
>> Cheers,
>> Rafael
>
> I’m just trying to address the issue in the bug report where this can cause infinite looping since it isn’t guaranteed to terminate the program.

Without further analysis you cannot say you fixed a bug. You have just
pushed it under the carpet and confused the issue on what is a bug and
what is invalid input.

Cheers,
Rafael


More information about the llvm-commits mailing list