Commit 68bdd2b
committed
[Analysis] Make ThreadSafety correctly handle base class destructors
After the landing of llvm#169320,
the clang CFG analyses are able to do slightly more analysis around
destructors. This results in thread safety also seeing slightly more
destructors. This exposed a bug in ThreadSafety, where we would call
getDestructorDecl, which can return nullptr for base class destructors,
but not do a null pointer check, resulting in a segmentation fault.
This patch fixes the issue by adding a null pointer check and adds a
regression test so this gets caught before downstream integration
testing in the future.1 parent 4cfbc44 commit 68bdd2b
File tree
2 files changed
+13
-1
lines changed- clang
- lib/Analysis
- test/SemaCXX
2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2820 | 2820 | | |
2821 | 2821 | | |
2822 | 2822 | | |
2823 | | - | |
| 2823 | + | |
2824 | 2824 | | |
2825 | 2825 | | |
2826 | 2826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments