Skip to content

mold 2.39.0: broken on darwin #1455

@ghost

Description

I don't know if mold officially supports darwin, but in case it does, the program does not work as expected after building:

(lldb) target create "/nix/store/zjn752vm9nf0dl4n7j8miqvsvg6mpsjj-mold-2.39.0/bin/mold"
Current executable set to '/nix/store/zjn752vm9nf0dl4n7j8miqvsvg6mpsjj-mold-2.39.0/bin/mold' (arm64).
(lldb) run --version
Process 50947 launched: '/nix/store/zjn752vm9nf0dl4n7j8miqvsvg6mpsjj-mold-2.39.0/bin/mold' (arm64)
mold 2.39.0 (compatible with GNU ld)
Process 50947 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x102fa04e4)
    frame #0: 0x0000000102fa04e4
error: memory read failed for 0x102fa0400
Target 0: (mold) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x102fa04e4)
  * frame #0: 0x0000000102fa04e4
    frame #1: 0x0000000102ed5330 libtbb.12.dylib`tbb::detail::r1::global_control_release() at global_control.cpp:157:9 [opt]
    frame #2: 0x0000000102ed6544 libtbb.12.dylib`tbb::detail::r1::__TBB_InitOnce::~__TBB_InitOnce() [inlined] tbb::detail::r1::__TBB_InitOnce::remove_ref() at main.cpp:90:9 [opt]
    frame #3: 0x0000000102ed6528 libtbb.12.dylib`tbb::detail::r1::__TBB_InitOnce::~__TBB_InitOnce() [inlined] tbb::detail::r1::__TBB_InitOnce::~__TBB_InitOnce(this=0x0000000102f08860) at main.h:79:9 [opt]
    frame #4: 0x0000000102ed6518 libtbb.12.dylib`tbb::detail::r1::__TBB_InitOnce::~__TBB_InitOnce(this=0x0000000102f08860) at main.h:77:23 [opt]
    frame #5: 0x00000001951042e8 libsystem_c.dylib`__cxa_finalize_ranges + 476
    frame #6: 0x0000000195104070 libsystem_c.dylib`exit + 44
    frame #7: 0x0000000100046cec mold`std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> mold::parse_nonpositional_args<mold::X86_64>(ctx=0x000000016fdfdc00) at cmdline.cc:0 [opt]
    frame #8: 0x00000001004f2d08 mold`int mold::mold_main<mold::X86_64>(argc=2, argv=0x000000016fdff220) at main.cc:283:40 [opt]
    frame #9: 0x0000000194ebe0e0 dyld`start + 2360
(lldb)

https://logs.ofborg.org/logfile/nixos/nixpkgs.402472/3a8671b3-6ce9-4e95-a9d2-f1fb588a9055

If darwin is not supported, please feel free to close this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions