+ // GetUnitDIEPtrOnly() needs to return pointer to the first DIE. + // But the first element of m_die_array after ExtractDIEsIfNeeded(true) + // may move in memory after later ExtractDIEsIfNeeded(false).
I haven't tried to reproduce it. DWARFDebugInfoEntry::collection m_die_array is std::vector, its data may move during its expansion.
I would not mind but I have found I cannot make the code thread-safe for D40470 when it looks already incorrect to me.