Open
Bug 753759
Opened 12 years ago
Updated 2 years ago
MOZ_ASSERT should dump a stack whenever NS_ASSERTION would
Categories
(Core :: MFBT, enhancement)
Core
MFBT
Tracking
()
NEW
People
(Reporter: ayg, Unassigned)
Details
In my debug builds, NS_ASSERTION prints a stack trace. MOZ_ASSERT does not. This is annoying -- usually all I need to fix the problem is a stack trace, and it's extra effort (and slower) to run in a debugger. It's not obvious how to run in a debugger at all when running tests, although I'm sure it's simple enough if I knew how. Could we just have MOZ_ASSERT print a backtrace?
Comment 1•12 years ago
|
||
Ted is of the opinion we shouldn't do this; I'm kind of thinking about the same -- lots of code, hard to get right, often easy to spin up again with a debugger.
Comment 2•12 years ago
|
||
Debug builds by default should still have the ah_crap_handler which gives you time to attach a debugger, no?
Reporter | ||
Comment 3•12 years ago
|
||
That doesn't seem to work properly when running mochitests, at least in my experience. It just exits with no further info. I wouldn't mind so much if I could easily detach a debugger after the fact if MOZ_ASSERT is hit during a test run -- i.e., I don't want to have to run it in a debugger to start with. I don't see why MOZ_ASSERT shouldn't have feature parity with NS_ASSERTION, though, if the idea is to replace it. Stack trace on a fatal assertion is a pretty reasonable feature to want, and will only become more useful as MOZ_ASSERT is used more.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•