Bug 18536 – Bad stack traces when building with -m32mscoff

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2018-02-28T09:39:37Z
Last change time
2018-02-28T22:43:24Z
Keywords
pull
Assigned to
No Owner
Creator
Rainer Schuetze

Comments

Comment #0 by r.sagitario — 2018-02-28T09:39:37Z
module stack; void foo() { throw new Exception("hi"); } void main() { foo(); } compiled with "dmd -g -m32mscoff stack.d" and running the executable yields [email protected](5): hi ---------------- 0x002C1061 in stack 0x002C1078 in D at c:\tmp\d\stack.d(10) 0x002C161B in void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll().__lambda1() 0x002C1599 in void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() 0x002C1430 in _d_run_main 0x002C1094 in __entrypoint 0x002F21EE in __tmainCRTStartup at f:\dd\vctools\crt\crtw32\startup\crt0.c(255) 0x770D8654 in BaseThreadInitThunk 0x77634A77 in RtlGetAppContainerNamedObjectPath 0x77634A47 in RtlGetAppContainerNamedObjectPath Notice that the first entries just show the module name and "D" instead of "D main".
Comment #1 by r.sagitario — 2018-02-28T09:41:17Z
When running the dmd test suite with -m32mscoff, test17599 fails because of this issue.
Comment #2 by r.sagitario — 2018-02-28T09:46:28Z
Comment #3 by github-bugzilla — 2018-02-28T22:43:23Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/f5ec46e0f7b8060e1abebe96e4197abaf2c7515d fix issue 18536 - Bad stack traces when building with -m32mscoff dmdDecodeString is harmful for non-mangled names, disable it for anything but OMF https://github.com/dlang/druntime/commit/4d6650c8cb467842f15b672b83e24cc6f65b8d82 Merge pull request #2119 from rainers/issue18536 fix issue 18536 - Bad stack traces when building with -m32mscoff merged-on-behalf-of: Petar Kirov <[email protected]>