[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

Volodymyr Sapsai via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 15:23:41 PDT 2024


vsapsai wrote:

Looked at this more and haven't found anything sketchy. `ASTWriter::WriteHeaderSearch` writes the same content both with and without `-fno-modules-prune-non-affecting-module-map-files`. `Preprocessor::alreadyIncluded` is called in reasonable places (as for me, ASTWriter is the most questionable spot).

As I cannot find any other risks, ensuring memory safety looks good to me.

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


More information about the cfe-commits mailing list