llvm-6502/lib
Dario Domizioli 2a6c6e914a Fix PR22750: non-determinism causes assertion failure in DWARF generation
The cause of the issue is the interaction of two factors:
1) When generating a DW_TAG_imported_declaration DIE which imports another 
   imported declaration, the code in AsmPrinter/DwarfCompileUnit.cpp 
   asserts that the second imported declaration must already have a DIE.
2) There is a non-determinism in the order in which imported declarations
   within the same scope are processed.
Because of the non-determinism (2), it is possible that an imported 
declaration is processed before another one it depends on, breaking the 
assumption in (1).

The source of the non-determinism is that the imported declaration 
DIDescriptors are sorted by scope in DwarfDebug::beginModule(); however that
sort is not a stable_sort, therefore the order of the declarations within 
the same scope is not preserved. The attached patch changes the std::sort to
a std::stable_sort and it fixes the problem.

Test omitted due to it being non-deterministic and depending on the
implementation of std::sort.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231100 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 18:40:53 +00:00
..
Analysis DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
AsmParser Cleanup after r230934 per Dave's suggestions. 2015-03-03 05:39:27 +00:00
Bitcode Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
CodeGen Fix PR22750: non-determinism causes assertion failure in DWARF generation 2015-03-03 18:40:53 +00:00
DebugInfo [llvm-pdbdump] Many minor fixes and improvements 2015-03-02 04:39:56 +00:00
ExecutionEngine Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Fuzzer [fuzzer] one more experimental search mode: -use_coverage_pairs=1 2015-02-20 03:02:37 +00:00
IR DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker Restore LLVMLinkModules C API until it is properly deprecated. 2015-03-02 18:59:38 +00:00
LTO [LTO API] fix memory leakage introduced at r230290. 2015-02-25 21:20:53 +00:00
MC Remove useless .debug_macinfo section setup. 2015-03-02 19:52:42 +00:00
Object Use read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>(). 2015-03-02 21:19:12 +00:00
Option Prefer SmallVector::append/insert over push_back loops. 2015-02-17 15:29:18 +00:00
ProfileData Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Support Make Triple::getOSVersion make sense for Android. 2015-03-03 18:23:51 +00:00
TableGen Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Target 80-column fixup. 2015-03-03 17:54:39 +00:00
Transforms LowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets. 2015-03-03 00:49:28 +00:00
CMakeLists.txt Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. 2015-01-29 16:58:29 +00:00
LLVMBuild.txt
Makefile Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00