https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288334

            Bug ID: 288334
           Summary: rtld: executing "/libexec/ld-elf.so.1 /usr/bin/ld.lld"
                    results in a crash
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: [email protected]
          Reporter: [email protected]

/libexec/ld-elf.so.1 supports something called Direct Execution Mode, described
in the man page rtld(1).

Executing the command
    /libexec/ld-elf.so.1 /usr/bin/ld.lld
on 14.3-RELEASE results in a "Segmentation fault (core dumped)" error. Observed
on both arm64 and amd64.

When executing the same command on 15.0-CURRENT, there is no crash. Tested on
arm64 only.

However, if I execute the command on 15.0-CURRENT with the ld.lld binary from
14.3-RELEASE, there is again a crash. Tested on arm64 only.

A backtrace from the crash on 15.0-CURRENT:
(lldb) thread backtrace
* thread #1, name = 'ld-elf.so.1', stop reason = signal SIGSEGV: address not
mapped to object (fault address: 0x39c0fe3)
  * frame #0: 0x0000441925c39448 ld-elf.so.1`memcpy(dst0=0x0000643137440020,
src0=0x00000000039c0fe0, length=4) at bcopy.c:122:4
    frame #1: 0x0000441925c2c9f8 ld-elf.so.1`allocate_tls(objs=<unavailable>,
oldtcb=0x00004419a624f460, tcbsize=<unavailable>, tcbalign=16) at rtld.c:5563:5
    frame #2: 0x0000441925c26ec0
ld-elf.so.1`allocate_initial_tls(objs=<unavailable>) at reloc.c:619:11
    frame #3: 0x0000441925c28d40 ld-elf.so.1`_rtld(sp=<unavailable>,
exit_proc=<unavailable>, objp=<unavailable>) at rtld.c:977:2
    frame #4: 0x0000441925c26064 ld-elf.so.1`.rtld_start at rtld_start.S:41

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to