[PATCH] D85179: [DebugInfo][unittest] Use YAML to generate the .debug_loclists section.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 08:57:47 PDT 2020
RKSimon added a comment.
@Higuoxing There's undef sanitizer warnings after this patch: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/44524/
I haven't been able to repro but by inspection it looks like DI.Is64BitAddrSize has an undefined value:
Error DWARFYAML::emitDebugLoclists(raw_ostream &OS, const Data &DI) {
assert(DI.DebugLoclists && "unexpected emitDebugRnglists() call");
return writeDWARFLists<DWARFYAML::LoclistEntry>(
OS, *DI.DebugLoclists, DI.IsLittleEndian, DI.Is64BitAddrSize);
}
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/ObjectYAML/DWARFEmitter.cpp:900:52: runtime error: load of value 200, which is not a valid value for type 'bool'
#0 0x1951b19 in llvm::DWARFYAML::emitDebugLoclists(llvm::raw_ostream&, llvm::DWARFYAML::Data const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/ObjectYAML/DWARFEmitter.cpp:900:52
#1 0x1956ff3 in std::_Function_handler<llvm::Error (llvm::raw_ostream&, llvm::DWARFYAML::Data const&), llvm::Error (*)(llvm::raw_ostream&, llvm::DWARFYAML::Data const&)>::_M_invoke(std::_Any_data const&, llvm::raw_ostream&, llvm::DWARFYAML::Data const&) /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:282:9
#2 0x1954f91 in std::function<llvm::Error (llvm::raw_ostream&, llvm::DWARFYAML::Data const&)>::operator()(llvm::raw_ostream&, llvm::DWARFYAML::Data const&) const /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:687:14
#3 0x1953465 in emitDebugSectionImpl /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/ObjectYAML/DWARFEmitter.cpp:938:19
#4 0x1953465 in llvm::DWARFYAML::emitDebugSections(llvm::StringRef, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/ObjectYAML/DWARFEmitter.cpp:969:22
#5 0x541abd in (anonymous namespace)::DWARFDie_getLocations_Test::TestBody() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp:67:7
#6 0x1af4529 in testing::Test::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2474:5
#7 0x1af5481 in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2656:11
#8 0x1af5dd2 in testing::TestCase::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2774:28
#9 0x1afc443 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4649:43
#10 0x1afbed5 in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4257:10
#11 0x1aedfc3 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:2233:46
#12 0x1aedfc3 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/UnitTestMain/TestMain.cpp:50:10
#13 0x7f47dc44a09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
#14 0x455839 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/unittests/DebugInfo/DWARF/DebugInfoDWARFTests+0x455839)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/ObjectYAML/DWARFEmitter.cpp:900:52 in
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85179/new/
https://reviews.llvm.org/D85179
More information about the llvm-commits
mailing list