Commit 6101248
authored
[clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (#160970)
ASTContext::getSubstBuiltinTemplatePack finds InsertPos and then calls
itself
recursively, which may lead to rehashing and invalidation of all
pointers to
buckets. The function then proceeds with using the potentially invalid
InsertPos, leading to use-after-free.
The issue goes back to #157662.
I didn't manage to produce a reasonably-sized test case yet.1 parent 779adf1 commit 6101248
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5873 | 5873 | | |
5874 | 5874 | | |
5875 | 5875 | | |
5876 | | - | |
| 5876 | + | |
5877 | 5877 | | |
| 5878 | + | |
| 5879 | + | |
| 5880 | + | |
| 5881 | + | |
| 5882 | + | |
| 5883 | + | |
5878 | 5884 | | |
5879 | 5885 | | |
5880 | 5886 | | |
| |||
0 commit comments