[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)
    Volodymyr Sapsai via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Jun 27 20:44:50 PDT 2024
    
    
  
vsapsai wrote:
Non-representative check for changes in the memory consumption doesn't show anything interesting for the added test case. Maximum resident set size and peak memory footprint with the change and without it are pretty close to each other, no statistic, just eyeballing.
My main concern with this approach is I'm not sure that after fixing the memory issue we don't have a remaining logic bug. Because we are still modifying `ModuleMap::Headers` during `ASTWriter::WriteHeaderSearch` iteration and that looks suspicious. Need to think how to make sure the discovered unexpected modification isn't causing other problems.
https://github.com/llvm/llvm-project/pull/96356
    
    
More information about the cfe-commits
mailing list