[clang] [clang][ASTImporter] Fix possible crash "given incorrect InsertPos for specialization". (PR #89887)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Wed May 22 07:42:42 PDT 2024


balazske wrote:

The problem is that there is a distance between getting the "InsertPos" and the insetion into the list. Between getting the `InsertPos` (`VarTemplate->findSpecialization`) and the insertion further AST import statements can occur and probably it can cause the list of specializations to change. I have a test that can cause the same situation (change of list before the insertion) but still the assertion did not show up.

https://github.com/llvm/llvm-project/pull/89887


More information about the cfe-commits mailing list