You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/linkage.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -279,7 +279,7 @@ r[link.unwinding]
279
279
### Prohibited linkage and unwinding
280
280
281
281
r[link.unwinding.intro]
282
-
Panic unwinding must be supported consistently across the binary per the following rules.
282
+
Panic unwinding can only be used if the binary is built consistently according to the following rules.
283
283
284
284
r[link.unwinding.potential]
285
285
A Rust artifact is called *potentially unwinding* if any of the following conditions is met:
@@ -296,8 +296,10 @@ A Rust artifact is called *potentially unwinding* if any of the following condit
296
296
297
297
r[link.unwinding.prohibited]
298
298
If a Rust artifact is potentially unwinding, then all its crates must be built with the `unwind`[panic strategy].
299
+
Otherwise, unwinding can cause undefined behavior.
299
300
300
301
> [!NOTE]
302
+
> If you are using `rustc` to link, these rules are enforced automatically.
301
303
> If you are *not* using `rustc` to link, you must take care to ensure that unwinding is handled consistently across the entire binary. Linking without `rustc` includes using `dlopen` or similar facilities where linking is done by the system runtime without `rustc` being involved.
302
304
>
303
305
> This can only happen when mixing code with different [`-C panic`] flags, so most users do not have to be concerned about this.
0 commit comments