Bug 15948 – wrong line numbers in stack traces

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2016-04-21T16:10:03Z
Last change time
2024-12-13T18:47:35Z
Assigned to
No Owner
Creator
Ivan Kazmenko
See also
https://issues.dlang.org/show_bug.cgi?id=15706
Moved to GitHub: dmd#19118 →

Comments

Comment #0 by gassa — 2016-04-21T16:10:03Z
Release 2.069.0 introduced line numbers in stack traces, but they are often wrong. Consider the trivial example: -----some.d----- void main () { assert (false); } ----- Compile as "dmd -g some.d" to 32-bit Windows executable. Here is the error message up to 2.068.2 release: [email protected](3): Assertion failure <...> 0x00402054 in main <...> And here is the error message in 2.069.0 and up: [email protected](3): Assertion failure <...> 0x00402054 in main at <...>\some.d(7) <...> Here, "some.d(7)" is file and line number. Obviously, it is wrong, and the line should be 3.
Comment #1 by gassa — 2016-04-21T16:13:23Z
Perhaps my older report, https://issues.dlang.org/show_bug.cgi?id=15706, has the same root cause. This issue is more general since the example does not use any imports at all.
Comment #2 by robert.schadek — 2024-12-13T18:47:35Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19118 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB