@@ -98,6 +98,16 @@ upcall_fail(char const *expr,
98
98
UPCALL_SWITCH_STACK (task, &args, upcall_s_fail);
99
99
}
100
100
101
+ // FIXME (#2861): Alias used by libcore/rt.rs to avoid naming conflicts with
102
+ // autogenerated wrappers for upcall_fail. Remove this when we fully move away
103
+ // away from the C upcall path.
104
+ extern " C" CDECL void
105
+ rust_upcall_fail (char const *expr,
106
+ char const *file,
107
+ size_t line) {
108
+ upcall_fail (expr, file, line);
109
+ }
110
+
101
111
struct s_trace_args {
102
112
rust_task *task;
103
113
char const *msg;
@@ -160,6 +170,14 @@ upcall_exchange_malloc(type_desc *td, uintptr_t size) {
160
170
return args.retval ;
161
171
}
162
172
173
+ // FIXME (#2861): Alias used by libcore/rt.rs to avoid naming conflicts with
174
+ // autogenerated wrappers for upcall_exchange_malloc. Remove this when we
175
+ // fully move away away from the C upcall path.
176
+ extern " C" CDECL uintptr_t
177
+ rust_upcall_exchange_malloc (type_desc *td, uintptr_t size) {
178
+ return upcall_exchange_malloc (td, size);
179
+ }
180
+
163
181
struct s_exchange_free_args {
164
182
rust_task *task;
165
183
void *ptr;
@@ -179,6 +197,14 @@ upcall_exchange_free(void *ptr) {
179
197
UPCALL_SWITCH_STACK (task, &args, upcall_s_exchange_free);
180
198
}
181
199
200
+ // FIXME (#2861): Alias used by libcore/rt.rs to avoid naming conflicts with
201
+ // autogenerated wrappers for upcall_exchange_free. Remove this when we fully
202
+ // move away away from the C upcall path.
203
+ extern " C" CDECL void
204
+ rust_upcall_exchange_free (void *ptr) {
205
+ return upcall_exchange_free (ptr);
206
+ }
207
+
182
208
/* *********************************************************************
183
209
* Allocate an object in the task-local heap.
184
210
*/
@@ -220,6 +246,14 @@ upcall_malloc(type_desc *td, uintptr_t size) {
220
246
return args.retval ;
221
247
}
222
248
249
+ // FIXME (#2861): Alias used by libcore/rt.rs to avoid naming conflicts with
250
+ // autogenerated wrappers for upcall_malloc. Remove this when we fully move
251
+ // away away from the C upcall path.
252
+ extern " C" CDECL uintptr_t
253
+ rust_upcall_malloc (type_desc *td, uintptr_t size) {
254
+ return upcall_malloc (td, size);
255
+ }
256
+
223
257
/* *********************************************************************
224
258
* Called whenever an object in the task-local heap is freed.
225
259
*/
@@ -252,6 +286,14 @@ upcall_free(void* ptr) {
252
286
UPCALL_SWITCH_STACK (task, &args, upcall_s_free);
253
287
}
254
288
289
+ // FIXME (#2861): Alias used by libcore/rt.rs to avoid naming conflicts with
290
+ // autogenerated wrappers for upcall_free. Remove this when we fully move away
291
+ // away from the C upcall path.
292
+ extern " C" CDECL void
293
+ rust_upcall_free (void * ptr) {
294
+ upcall_free (ptr);
295
+ }
296
+
255
297
/* *********************************************************************
256
298
* Sanity checks on boxes, insert when debugging possible
257
299
* use-after-free bugs. See maybe_validate_box() in trans.rs.
0 commit comments