[Issue 17994] New: [Reg 2.077] Token.isKeyword() segfaults

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 19 21:16:36 UTC 2017


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

          Issue ID: 17994
           Summary: [Reg 2.077] Token.isKeyword() segfaults
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: code at dawg.eu

https://github.com/dlang/dmd/blob/9b8eba2787f766e00079810e7a080b989101d8a6/src/ddmd/tokens.d#L879

Seems like the `private immutable TOK[] keywords` array is loaded with a
nullptr and a weird length.
This has broken nightly builds since 2017-11-02
(http://nightlies.dlang.org/dmd-master-2017-11-02/build.html), likely because
2.077.0 got released.
The bug only occurs when compiling dmd with dmd-2.077.0, but not when using
dmd-2.076.1 as host compiler.

0x005D06D9 in Token at C:\Code\D\DPL\dmd\src\ddmd\tokens.d(884)
0x0044E3A4 in highlightCode2 at C:\Code\D\DPL\dmd\src\ddmd\doc.d(2696)
0x0044D70D in highlightText at C:\Code\D\DPL\dmd\src\ddmd\doc.d(2399)
0x00449378 in gendocfile at C:\Code\D\DPL\dmd\src\ddmd\doc.d(433)
0x004BDFA0 in int ddmd.mars.tryMain(uint, const(char)**) at
C:\Code\D\DPL\dmd\sr
c\ddmd\mars.d(788)

--


More information about the Digitalmars-d-bugs mailing list