This will be used to test clang driver lld crash reproduction
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Personally I am not feeling very comfortable adding such an environment variable just so that it can be tested.
I think it may make sense to add the clang driver change without a test.
Comment Actions
We could also use LLD_IN_TEST=-1 as a signal for artificially testing the crash? Clang has #pragma clang __debug crash. I don't think crafting an invalid .o is reasonable to me, since we want to survive invalid inputs at all times.
lld/Common/ErrorHandler.cpp | ||
---|---|---|
113 | I think you should use LLVM_BUILTIN_TRAP since __builtin_trap() isn't supported by all compilers. | |
114 | Add extra LF please. | |
lld/tools/lld/lld.cpp | ||
244 | Can this go above L217? Do we need to have the __buildin_trap at two places? Here an in exitLld()? |
I think you should use LLVM_BUILTIN_TRAP since __builtin_trap() isn't supported by all compilers.