[PATCH] D97849: [AST][PCH][ASTImporter] Fix UB caused by uninited SwitchStmt member
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 3 10:11:08 PST 2021
martong added a comment.
In D97849#2600220 <https://reviews.llvm.org/D97849#2600220>, @steakhal wrote:
> In D97849#2600201 <https://reviews.llvm.org/D97849#2600201>, @aaron.ballman wrote:
>
>> This looks reasonable to me (good catch!), but is there a way for us to add a regression test for it?
>
> I'm not sure if it's possible to write a test for deterministically demonstrating the bug - which is a non-deterministic crash.
> So, even if we would have a test case, that would not catch the regression deterministically.
> We could include the minimal reproducer for CTU analysis - the way we observed and tracked down this crash.
>
> AFAIK, it did not reproduce with memory sanitizers.
Address and ubsan could not catch it (LLVM_USE_SANITIZER: Address;Undefined). And I had trouble with the Memory and MemoryWithOrigins setup because ninja could not generate the .inc files since clang-tblgen failed always with uninited errors. Fortunately, vlagrind could catch the error consistently all the time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97849/new/
https://reviews.llvm.org/D97849
More information about the cfe-commits
mailing list