https://bugs.llvm.org/show_bug.cgi?id=52480

            Bug ID: 52480
           Summary: KERN_INVALID_ADDRESS crash with lld but not ld64
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedb...@nondot.org
          Reporter: keithbsmi...@gmail.com
                CC: g...@fb.com, jezr...@gmail.com,
                    llvm-bugs@lists.llvm.org, smee...@fb.com

Here is an iOS sample project
https://drive.google.com/file/d/1H1P5BsnfC_Q5Ebd1ddBVMqQ2OWuCAvlH/view

Where the app crashes when exercising some specific codepaths.

Repro steps:

1. The attached project currently links with ld64 and should build + run on the
simulator out of the box
2. Launch the app on the simulator and click "Basic map", the map should load
fine
3. Change OTHER_LD_FLAGS to point to lld, I was using
`--ld-path=/Users/ksmiley/dev/llvm-project/build-dylibs/bin/ld64.lld` for this
4. Repeat 2, but this time it will crash.

Here's a snippet from the crash log:

```
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000030
Exception Codes: 0x0000000000000001, 0x0000000000000030
VM Region Info: 0x30 is not in any region.  Bytes before following region:
4377145296
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX
SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      104e5f000-1053e5000    [ 5656K] r-x/r-x
SM=COW  ...ogleMapsDemos
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [58739]
```

This could likely be reduced more if needed

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to