-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
ld64.lld: error: too many personalities (4) for compact unwind to encode #102754
Copy link
Copy link
Open
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.O-iosOperating system: iOSOperating system: iOSO-macosOperating system: macOSOperating system: macOSP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.relnotesMarks issues that should be documented in the release notes of the next release.Marks issues that should be documented in the release notes of the next release.
Milestone
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.O-iosOperating system: iOSOperating system: iOSO-macosOperating system: macOSOperating system: macOSP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.relnotesMarks issues that should be documented in the release notes of the next release.Marks issues that should be documented in the release notes of the next release.
Type
Fields
Give feedbackNo fields configured for issues without a type.
When mixing ObjC, C++ and Rust in the same binary on aarch64-apple-darwin targets (e.g. like in Firefox), lld from LLVM 15 complains about "too many personalities". This is a regression from #92845 and affects beta.
For some reason, since #92845, this code in lld is hit: https://github.com/llvm/llvm-project/blob/d30dccd21f2c3bc1ed6cd054c131436a1af548e1/lld/MachO/UnwindInfoSection.cpp#L300
Ultimately, this leads to https://github.com/llvm/llvm-project/blob/d30dccd21f2c3bc1ed6cd054c131436a1af548e1/lld/MachO/UnwindInfoSection.cpp#L378
where there are 4 personalities instead of 3:
___objc_personality_v0,___gxx_personality_v0,_rust_eh_personality<internal>With previous rust versions, only the first three ones would be there. It looks like the relocation that triggers the
<internal>is related to therust_eh_personalityfunction inlibrary/std/src/personality/gcc.rsitself.STR:
bar.ccfile with content:foo.mfile with content:qux.rsfile with content:Makefilefile with content:$PATH.SDKROOTto point to a macOS SDKmakeThis does not happen on x86_64-apple-darwin, but interestingly the list of personalities there is:
___objc_personality_v0,___gxx_personality_v0,<internal>(no
_rust_eh_personality).With rust 1.64, the list of personalities was:
___objc_personality_v0,___gxx_personality_v0,_rust_eh_personality