Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Runtime crash with ` DYLD, [0x4] Symbol missing` #51531

Open Quuxplusone opened 2 years ago

Quuxplusone commented 2 years ago
Bugzilla Link PR52564
Status NEW
Importance P enhancement
Reported by Vy Nguyen (vyng@google.com)
Reported on 2021-11-19 13:01:19 -0800
Last modified on 2021-11-20 11:05:58 -0800
Version unspecified
Hardware PC All
CC gkm@fb.com, jezreel@gmail.com, llvm-bugs@lists.llvm.org, smeenai@fb.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also

Part of crash log:

`` Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: DYLD, [0x4] Symbol missing



(Platform macOS 11.6)

I'm working on making a small repro - but wondering if anyone has seen this ... 
any idea on how to narrowing this down?
Quuxplusone commented 2 years ago
More crash log:

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x4] Symbol missing

Application Specific Information:
Symbol not found: _OBJC_CLASS_$_XCTestObservationCenter
  Referenced from: /<xxxxxx removed xxxxx>
  Expected in: unknown

Dyld Error Message:
  Symbol not found: _OBJC_CLASS_$_XCTestObservationCenter
  Referenced from: /<xxxxx removed xxxxx>
  Expected in: unknown

---------------------

comparing the LD64-produced binary vs LLD-produced binary:

llvm-objdump-11 --macho --bind <xxxx>-LD64 | grep
'_OBJC_CLASS_$_XCTestObservationCenter'
__DATA   __objc_classrefs   0x10364D448 pointer         0 XCTest
_OBJC_CLASS_$_XCTestObservationCenter (weak_import)

llvm-objdump-11 --macho --bind <xxxx>-LLD | grep
'_OBJC_CLASS_$_XCTestObservationCenter'
__DATA   __objc_classrefs   0x10364D448 pointer         0 XCTest
_OBJC_CLASS_$_XCTestObservationCenter

(note that the "missing" symbol isn't weak-import in the LLD-binary)