Details
- Reviewers
sammccall - Commits
- rG3778c1cd6ef5: [Sema] Fix a null pointer reference crash.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Sema/SemaDecl.cpp | ||
---|---|---|
14496 | I have a reproduce test case, and wait for the creduce to minimize it (will add it once creduce finishes) I think the bug is obvious, by reading the code on the line 14495, FD could be a nullptr. |
LG because not crashing here is surely better than crashing, but I'm not sure whether the behaviour is actually right.
If we can't be sure, maybe leave a comment?
clang/lib/Sema/SemaDecl.cpp | ||
---|---|---|
14496 | Yes, the bug is clear.
cc @mibintc who may know the answer to at least the 3rd question, and I guess your testcase will give an example of either 1 or 2. I'm *fairly* sure that not applying the strictfpattr is better than crashing here though. |
clang/lib/Sema/SemaDecl.cpp | ||
---|---|---|
14496 | my understanding is that dcl is null if clang fails to to parse the function declarator in some way, but still can recover to parse the function body. I'm going to land this patch now as this issue blocks one of our internal tools, @mibintc feel free to polish it. |
I have a reproduce test case, and wait for the creduce to minimize it (will add it once creduce finishes)
I think the bug is obvious, by reading the code on the line 14495, FD could be a nullptr.