emaxx-google wrote:

> It is not clear to me why this is a specifically a problem when called from 
> `Profile(...)` can you elaborate a bit more in the summary.

I've added a bit more details - it's basically the fact that the "get most 
recent" operation triggered the load of new nodes from the PCM file. If all 
this happens while a hash for another node is calculated in `Profile()`, it 
means we're modifying the hash map while doing another operation with it.

At least that's the current theory, based on debugging the "deviating" 
executions of the compiler and seeing the `getMostRecentNonInjectedDecl()` call 
and the deserialization all during the `FoldingSet::NodeEquals()` function call.

> Does `getMostRecentCXXRecordDecl(...)` require a comment that documents this 
> behavior so that future users do not fall into the same issue?

Sure, I've added a comment.

https://github.com/llvm/llvm-project/pull/137910
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to