[clang] [clang][parse] Fix UAF in MaybeDestroyTemplates (PR #77698)

2024-03-01 Thread Erich Keane via cfe-commits
erichkeane wrote: We do need a unit test for this, a reduced version of the original fuzzed result will help us review this. https://github.com/llvm/llvm-project/pull/77698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][parse] Fix UAF in MaybeDestroyTemplates (PR #77698)

2024-01-10 Thread via cfe-commits
https://github.com/DavidKorczynski edited https://github.com/llvm/llvm-project/pull/77698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][parse] Fix UAF in MaybeDestroyTemplates (PR #77698)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (DavidKorczynski) Changes There are cases where `Tok.is(tok::eof)` is true and `PP.mightHavePendingAnnotationTokens()` is also true, and in these cases a UAF may happen on the destroyed template IDs. Fixes:

[clang] [clang][parse] Fix UAF in MaybeDestroyTemplates (PR #77698)

2024-01-10 Thread via cfe-commits
https://github.com/DavidKorczynski created https://github.com/llvm/llvm-project/pull/77698 There are cases where `Tok.is(tok::eof)` is true and `PP.mightHavePendingAnnotationTokens()` is also true, and in these cases a UAF may happen on the destroyed template IDs. Fixes: