Commit the trap-failure hack to the runtime, since I keep using it in my workspace anyways.

This commit is contained in:
Graydon Hoare 2011-02-10 11:29:47 -08:00
parent b7dfbc9db0
commit c4a56f7368

View File

@ -253,6 +253,10 @@ upcall_fail(rust_task *task,
task->log(rust_log::UPCALL | rust_log::ERR,
"upcall fail '%s', %s:%" PRIdPTR, expr, file, line);
task->fail(4);
if (getenv("RUST_TRAP_FAILURE")) {
// FIXME: x86-ism.
__asm__("int3");
}
}
/**