clang-3.8 crashes dsymutil with -gdwarf-4 on 10.9

Mihai Moldovan ionic at macports.org
Sun Feb 26 10:34:20 UTC 2017


Hi all
Hi Jeremy

Minimal testcase:

<-----snip----->
#include <cstdlib>
#include <iostream>
#include <unordered_set>
#include <type_traits>
#include <string>

int main (int argc, char **argv) {
  if (argc <= 1) {
    std::cerr << "Provide a string." << std::endl;

    return (EXIT_FAILURE);
  }

  std::string input (argv[1]);

  std::unordered_set<std::remove_reference<decltype (input)>::type::value_type> set;

  return (EXIT_SUCCESS);
}
<-----snip----->


Result when compiled with clang++-mp-3.8 -std=c++11 -gdwarf-4 test.cpp -o test -v:

<-----snip----->
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-3.8/bin
 "/opt/local/libexec/llvm-3.8/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name test.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 274.1 -v -dwarf-column-info -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -resource-dir /opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.1 -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/ionic/src/clang-test -ferror-limit 19 -fmessage-length 228 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/f_/z3_y3gd96td15z4rnkymd5hc0000gn/T/test-439d50.o -x c++ test.cpp
clang -cc1 version 3.8.1 based upon LLVM 3.8.1 default target x86_64-apple-darwin13.4.0
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
 /opt/local/libexec/llvm-3.8/bin/../include/c++/v1
 /usr/local/include
 /opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.1/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
 "/opt/local/libexec/llvm-3.8/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.9.0 -o test /var/folders/f_/z3_y3gd96td15z4rnkymd5hc0000gn/T/test-439d50.o -lc++ -lSystem /opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.1/lib/darwin/libclang_rt.osx.a
 "/usr/bin/dsymutil" -o test.dSYM test
warning: {0x0000920a} TAG_formal_parameter:  AT_location( 0x001f0c11 ) didn't have valid function low pc, the location list will be incorrect.
warning: {0x00009218} TAG_formal_parameter:  AT_location( 0x001f0811 ) didn't have valid function low pc, the location list will be incorrect.
warning: {0x00009226} TAG_variable:  AT_location( 0x001efc11 ) didn't have valid function low pc, the location list will be incorrect.
warning: {0x00009234} TAG_variable:  AT_location( 0x001ee811 ) didn't have valid function low pc, the location list will be incorrect.
Assertion failed: (pos->hi_pc >= cu_base_addr), function AppendDebugRanges, file /SourceCache/dwarf_utilities/dwarf_utilities-119/source/DWARFDebugAranges.cpp, line 197.
clang: error: unable to execute command: Abort trap: 6 (core dumped)
clang: error: dsymutil command failed due to signal (use -v to see invocation)
<-----snip----->

Is it worthwhile to report that to LLVM upstream? Or not really, since it's a bug in dsymutil, which is Apple's creation?

Xcode's clang doesn't make dsymutil choke, though.



Mihai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170226/d5ef748f/attachment.sig>


More information about the macports-dev mailing list