diff options
| author | Graydon Hoare <[email protected]> | 2011-02-10 11:29:47 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-02-10 11:29:47 -0800 |
| commit | c4a56f7368404265a1189d3f3202f4dedfd5d0f1 (patch) | |
| tree | 46c9048bdb5bb6b0dd0fa3f0186ff4a63b5d9978 /src/rt | |
| parent | Fix bug in test and un-XFAIL 4 tests now passing on rustc. (diff) | |
| download | rust-c4a56f7368404265a1189d3f3202f4dedfd5d0f1.tar.xz rust-c4a56f7368404265a1189d3f3202f4dedfd5d0f1.zip | |
Commit the trap-failure hack to the runtime, since I keep using it in my workspace anyways.
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 7e2fac10..46e53048 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -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"); + } } /** |