Skip to content

Conversation

@rauhul
Copy link
Member

@rauhul rauhul commented Nov 13, 2025

Users frequently run into a missing runtime symbol for Cxx exceptions (_swift_exceptionPersonality) when mixing Embedded Swift and Cxx with exceptions enabled. This leads to a confusing an hard to debug linker error. This commit adds an implementation of this function to the Embedded Swift runtime which simply fatal errors if a cxx exception is caught in a Swift frame.

Issue: rdar://164423867
Issue: #85490

@rauhul rauhul requested a review from a team as a code owner November 13, 2025 18:16
@rauhul rauhul added the embedded Embedded Swift label Nov 13, 2025
@rauhul rauhul requested review from kubamracek and removed request for a team November 13, 2025 18:16
@rauhul rauhul linked an issue Nov 13, 2025 that may be closed by this pull request
@rauhul rauhul requested a review from DougGregor November 13, 2025 18:16
typealias _Unwind_Action = CInt
typealias _Unwind_Reason_Code = CInt

@_cdecl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use @c nowadays!

@rauhul rauhul force-pushed the rauhul/cxx-exception-personality branch 2 times, most recently from ee5198f to f3925af Compare November 13, 2025 19:07
Users frequently run into a missing runtime symbol for Cxx exceptions
(`_swift_exceptionPersonality`) when mixing Embedded Swift and Cxx with
exceptions enabled. This leads to a confusing an hard to debug linker
error. This commit adds an implementation of this function to the
Embedded Swift runtime which simply fatal errors if a cxx exception is
caught in a Swift frame.

Issue: rdar://164423867
Issue: #85490
@rauhul rauhul force-pushed the rauhul/cxx-exception-personality branch from f3925af to 0f508f6 Compare November 13, 2025 22:17
@rauhul
Copy link
Member Author

rauhul commented Nov 13, 2025

Missing delete message for function: $es27_swift_exceptionPersonality7version7actions0B5Class0B6Object7contexts5Int32VAH_AHs6UInt64VS2vtFTo
Assertion failed: (!foundError && "triggering standard assertion failure routine"), function verifyFull, file PassManagerVerifierAnalysis.cpp, line 124.

@rauhul
Copy link
Member Author

rauhul commented Nov 13, 2025

@eeckstein do you know what the above "Missing delete message for function " error means?

@rauhul rauhul requested a review from eeckstein November 13, 2025 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

embedded Embedded Swift

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Embedded] Implement _swift_exceptionPersonality

3 participants