Skip to content

Commit c4a56f7

Browse files
committed
Commit the trap-failure hack to the runtime, since I keep using it in my workspace anyways.
1 parent b7dfbc9 commit c4a56f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rt/rust_upcall.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ upcall_fail(rust_task *task,
253253
task->log(rust_log::UPCALL | rust_log::ERR,
254254
"upcall fail '%s', %s:%" PRIdPTR, expr, file, line);
255255
task->fail(4);
256+
if (getenv("RUST_TRAP_FAILURE")) {
257+
// FIXME: x86-ism.
258+
__asm__("int3");
259+
}
256260
}
257261

258262
/**

0 commit comments

Comments
 (0)