jmorse wrote:

Hi,

We're seeing a crash with this reproducer 
https://gist.github.com/jmorse/b0248c3c9f9195487ffd7c7431a8d15e

llc: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2338: virtual void 
llvm::DwarfDebug::endFunctionImpl(const llvm::MachineFunction *): Assertion 
`LScopes.getAbstractScopesList().size() == NumAbstractSubprograms && 
"getOrCreateAbstractScope() inserted an abstract subprogram scope"' failed.

I'd previously posted the reproducer on 
https://reviews.llvm.org/D144006#4656728 , however I'd anonymised the IR too 
much to the point where it was broken in unrelated ways. Revision 2 of the 
gist, as linked, should produce the crash. I suspect the extra lexical scopes 
reachable through the retained-nodes list also need to be explored when the 
LexicalScopes object gets constructed, to avoid scopes being added late and 
causing containers to invalidate iterators. (Which is what that assertion is 
there to detect).

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

Reply via email to