Commit ea310a6
committed
[clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack
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.
I didn't manage to produce a reasonably-sized test case yet.1 parent be6c5d0 commit ea310a6
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