-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Whenever a failure happens, if a program is run with `RUST_LOG=std::rt::backtrace` a backtrace will be printed to the task's stderr handle. Stack traces are uncondtionally printed on double-failure and rtabort!(). This ended up having a nontrivial implementation, and here's some highlights of it: * We're bundling libbacktrace for everything but OSX and Windows * We use libgcc_s and its libunwind apis to get a backtrace of instruction pointers * On OSX we use dladdr() to go from an instruction pointer to a symbol * On unix that isn't OSX, we use libbacktrace to get symbols * Windows, as usual, has an entirely separate implementation Lots more fun details and comments can be found in the source itself. Closes #10128
- Loading branch information
1 parent
9a21b90
commit 829df69
Showing
9 changed files
with
1,094 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
829df69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from brson
at alexcrichton@829df69
829df69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/backtrace = 829df69 into auto
829df69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/backtrace = 829df69 merged ok, testing candidate = 12b2607
829df69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4719
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/3807
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3813
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4721
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/3807
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3812
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/3880
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4717
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/3819
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3825
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4480
829df69
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 12b2607