D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6353 - No stacktraces on x86_64
Summary: No stacktraces on x86_64
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: x86_64 Linux
: P2 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 00:46 UTC by Jonathan M Davis
Modified: 2015-06-09 05:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jonathan M Davis 2011-07-20 00:46:20 UTC
This program

void main()
{
    assert(0);
}

prints this on x86_64:

core.exception.AssertError@w(3): Assertion failure
----------------
----------------

_All_ stack traces look like that on x86_64. For this one, if I were to compile with -m32, I'd get this:

core.exception.AssertError@w(3): Assertion failure
----------------
./w(onAssertError+0x2e) [0x806111e]
./w(_d_assertm+0x16) [0x805f096]
./w() [0x805ca76]
./w(_Dmain+0xd) [0x805ca61]
./w(_D2rt6dmain24mainUiPPaZi7runMainMFZv+0x1a) [0x805f53e]
./w(_D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv+0x20) [0x805f1d8]
./w(_D2rt6dmain24mainUiPPaZi6runAllMFZv+0x32) [0x805f582]
./w(_D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv+0x20) [0x805f1d8]
./w(main+0x94) [0x805f184]
/usr/lib32/libc.so.6(__libc_start_main+0xf3) [0xf75aa233]
----------------

So, this is purely a 64-bit issue. But the lack of stacktraces on x86_64 is a definite impedement to debugging, and it really needs to get fixed.
Comment 1 Brad Roberts 2011-08-12 02:18:48 UTC
Something that's never worked isn't a regression.  I agree it's a major feature gap for x86-64 though.
Comment 2 Jonathan M Davis 2011-08-12 02:26:30 UTC
I'm pretty darn sure that this was working before - hence why I changed it to regression. I'd have to go try older versions of dmd to be 100% sure though. But I have no problem with it being labeled critical instead of regression even if it is a regression. It's making my life _much_ harder when it comes to debugging.
Comment 3 Jonathan M Davis 2012-01-20 23:23:07 UTC
This works now and has for a couple of releases, I believe.