Skip to content

Commit 0c59b0e

Browse files
committed
---
yaml --- r: 77679 b: refs/heads/master c: 63e53b8 h: refs/heads/master i: 77677: 596e15c 77675: 9e86b1c 77671: f32b6c8 77663: 222de70 v: v3
1 parent e0ef5f8 commit 0c59b0e

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ef20bd44bdf3a500700604c3b3c8f8969233fd9a
2+
refs/heads/master: 63e53b8af2f37f9eb8eda0087b02f8deba252c2f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
55
refs/heads/try: ebfe63cd1c0b5d23f7ea60c69b4fde2e30cfd42a

trunk/src/rt/rust_upcall.cpp

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,18 @@ upcall_call_shim_on_rust_stack(void *args, void *fn_ptr) {
5454

5555
/**********************************************************************/
5656

57+
#ifdef __SEH__
58+
# define PERSONALITY_FUNC __gxx_personality_seh0
59+
#else
60+
# ifdef __USING_SJLJ_EXCEPTIONS__
61+
# define PERSONALITY_FUNC __gxx_personality_sjlj
62+
# else
63+
# define PERSONALITY_FUNC __gxx_personality_v0
64+
# endif
65+
#endif
66+
5767
extern "C" _Unwind_Reason_Code
58-
__gxx_personality_v0(int version,
68+
PERSONALITY_FUNC(int version,
5969
_Unwind_Action actions,
6070
uint64_t exception_class,
6171
_Unwind_Exception *ue_header,
@@ -72,11 +82,11 @@ struct s_rust_personality_args {
7282

7383
extern "C" void
7484
upcall_s_rust_personality(s_rust_personality_args *args) {
75-
args->retval = __gxx_personality_v0(args->version,
76-
args->actions,
77-
args->exception_class,
78-
args->ue_header,
79-
args->context);
85+
args->retval = PERSONALITY_FUNC(args->version,
86+
args->actions,
87+
args->exception_class,
88+
args->ue_header,
89+
args->context);
8090
}
8191

8292
/**

0 commit comments

Comments
 (0)