llvm-6502/lib/CodeGen/AsmPrinter
Chandler Carruth d15717170f Fix a DenseMap iterator invalidation bug causing lots of crashes when
type units were enabled. The crux of the issue is that the
addDwarfTypeUnitType routine can end up being indirectly recursive. In
this case, the reference into the dense map (TU) became invalid by the
time we popped all the way back and used it to add the DIE type
signature.

Instead, use early return in the case where we can bypass the recursive
step and creating a type unit. Then use the pointer to the new type unit
to set up the DIE type signature in the case where we have to.

I tried really hard to reduce a testcase for this, but it's really
annoying. You have to get this to be mid-recursion when the densemap
grows. Even if we got a test case for this today, it'd be very unlikely
to continue exercising this pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199630 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-20 08:07:07 +00:00
..
ARMException.cpp Make getTargetStreamer return a possibly null pointer. 2014-01-14 01:21:46 +00:00
AsmPrinter.cpp Add an emitRawComment function and use it to simplify some uses of EmitRawText. 2014-01-16 16:28:37 +00:00
AsmPrinterDwarf.cpp Simplify check. 2013-12-04 22:29:02 +00:00
AsmPrinterHandler.h Remove weak vtables. No functional change. 2013-12-14 12:23:14 +00:00
AsmPrinterInlineAsm.cpp Add an emitRawComment function and use it to simplify some uses of EmitRawText. 2014-01-16 16:28:37 +00:00
CMakeLists.txt DebugInfo: Rename DwarfCompileUnit.* to DwarfUnit.* to match their contents. 2013-12-02 19:33:15 +00:00
DIE.cpp Use a slightly smaller hack. 2014-01-16 07:36:00 +00:00
DIE.h Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
DIEHash.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
DIEHash.h Formatting and 80-col. 2013-11-19 09:28:34 +00:00
DwarfAccelTable.cpp Rename DwarfUnits to DwarfFile to help avoid some naming confusion. 2013-12-05 18:06:10 +00:00
DwarfAccelTable.h Rename DwarfUnits to DwarfFile to help avoid some naming confusion. 2013-12-05 18:06:10 +00:00
DwarfCFIException.cpp Move the llvm mangler to lib/IR. 2014-01-07 21:19:40 +00:00
DwarfDebug.cpp Fix a DenseMap iterator invalidation bug causing lots of crashes when 2014-01-20 08:07:07 +00:00
DwarfDebug.h Make sure we emit a relocation to the debug_ranges section in the 2014-01-15 00:04:29 +00:00
DwarfException.cpp Move the llvm mangler to lib/IR. 2014-01-07 21:19:40 +00:00
DwarfException.h Reland 196270 "Generalize debug info / EH emission in AsmPrinter" 2013-12-03 15:10:23 +00:00
DwarfUnit.cpp Debug info (LTO): Move the creation of accessibility flags to 2014-01-18 02:12:00 +00:00
DwarfUnit.h DwarfUnit: Rename "Node" to "CUNode" and propagate it through DwarfTypeUnit as well. 2014-01-09 03:23:41 +00:00
ErlangGCPrinter.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
LLVMBuild.txt Add proper dependencies to LLVMBuild.txt in llvm/lib. 2013-12-10 05:39:34 +00:00
Makefile
OcamlGCPrinter.cpp Move the llvm mangler to lib/IR. 2014-01-07 21:19:40 +00:00
Win64Exception.cpp Move the llvm mangler to lib/IR. 2014-01-07 21:19:40 +00:00