[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-07-07 Thread Milian Wolff via Phabricator via cfe-commits
milianw abandoned this revision. milianw added a comment. great, thanks for the help - please land the other change then Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82740/new/ https://reviews.llvm.org/D82740

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-07-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @milianw I just approved https://reviews.llvm.org/D82629 - I feel like that patch is addressing the core issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82740/new/ https://reviews.llvm.org/D82740

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-07-03 Thread Milian Wolff via Phabricator via cfe-commits
milianw added a comment. @jkorous ping? can you chime in on either of the two patches? I'm fine with either, and D82629 comes with a test too. So maybe let's just go with that one? If so, could you integrate that one please? Repository: rG LLVM Github

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-07-01 Thread Milian Wolff via Phabricator via cfe-commits
milianw added a comment. @jkorous how would you use a debugger (would be GDB for me) to find the source - I would have to use RR or something like that to see why and where the invalid node is added, no? I also don't have the breaking code at hand anymore, I can try to come up with a way to

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-07-01 Thread Milian Wolff via Phabricator via cfe-commits
milianw added a comment. Also see https://reviews.llvm.org/D82629 which I believe is also a fix for this crash. But I didn't use a VLA in my code, but maybe the parse error just triggered something similar like that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-06-30 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Your patch definitely fixes the symptoms of the bug. I just want to make sure that we aren't covering some logic error with a bandaid as it would be harder to find out the root cause once we land this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-06-29 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @milianw could you try to reduce the reproducer you have? Maybe take lldb and see where does the `nullptr` come from? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82740/new/ https://reviews.llvm.org/D82740

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-06-29 Thread Milian Wolff via Phabricator via cfe-commits
milianw added a comment. I'm not sure how to write a unit test for this, but I ran into a reproducible crash with a complex C++ file which got fixed by this patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82740/new/

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-06-29 Thread Milian Wolff via Phabricator via cfe-commits
milianw created this revision. milianw added reviewers: bkramer, yvvan, nik. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. Fixes crash when visiting a partial AST after encountering a parse error in the input code: #5 clang::Stmt::getStmtClass (this=) at