https://issues.dlang.org/show_bug.cgi?id=15948

          Issue ID: 15948
           Summary: wrong line numbers in stack traces
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: ga...@mail.ru

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:
core.exception.AssertError@some.d(3): Assertion failure
<...>
0x00402054 in main
<...>

And here is the error message in 2.069.0 and up:
core.exception.AssertError@some.d(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.

--

Reply via email to