[Issue 18403] [REG2.078.2] Access violation when dmd tries to print highlighted code

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18403

ag0ae...@gmail.com changed:

   What|Removed |Added

   Keywords||ice
 CC||ag0ae...@gmail.com
Summary|Access violation when   |[REG2.078.2] Access
   |deprecated feature  |violation when dmd tries to
   |encountered |print highlighted code

--- Comment #1 from ag0ae...@gmail.com ---
Also happens on other errors. Seems to be related to code highlighting via
backticks in the error message.

For example, a source file that's just "foo" also fails. But this works as
expected even though it prints a deprecation message (but it doesn't have
highlighted code):


void main() { shared int x; ++x; }


Never fails when dmd is invoked with `-color=off`.

The diff between 2.078.1 and 2.078.2 is really small [1], and I can't spot
anything that's related to code highlighting.


[1] https://github.com/dlang/dmd/compare/v2.078.1...v2.078.2

--


[Issue 18403] [REG2.078.2] Access violation when dmd tries to print highlighted code

2018-02-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18403

ag0ae...@gmail.com changed:

   What|Removed |Added

   Keywords||pull

--


[Issue 18403] [REG2.078.2] Access violation when dmd tries to print highlighted code

2018-02-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18403

--- Comment #2 from ag0ae...@gmail.com ---
Investigated further. This seems to be a case of dmd miscompiling itself.

The access violation happens in `dmd.tokens.Token.isKeyword` when it accesses
`keywords`. This is because of issue 18412.

Pull request to work around that issue:
https://github.com/dlang/dmd/pull/7859

--


[Issue 18403] [REG2.078.2] Access violation when dmd tries to print highlighted code

2018-02-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18403

Jonathan Marler  changed:

   What|Removed |Added

 CC||johnnymar...@gmail.com

--


[Issue 18403] [REG2.078.2] Access violation when dmd tries to print highlighted code

2018-02-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18403

--- Comment #3 from Jonathan Marler  ---
Thanks for looking into this.  I noticed this as well a little while ago when I
was trying out dmd-nightly.

--


[Issue 18403] [REG2.078.2] Access violation when dmd tries to print highlighted code

2018-02-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18403

ag0ae...@gmail.com changed:

   What|Removed |Added

 CC||do.m...@foxmail.com

--- Comment #4 from ag0ae...@gmail.com ---
*** Issue 18431 has been marked as a duplicate of this issue. ***

--


[Issue 18403] [REG2.078.2] Access violation when dmd tries to print highlighted code

2018-02-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18403

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 18403] [REG2.078.2] Access violation when dmd tries to print highlighted code

2018-02-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18403

--- Comment #5 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/af5694e44f574008b00a2eb8ccb79d46ca3f9485
fix issue 18403 - [REG2.078.2] Access violation when dmd tries to print
highlighted code (#7859)

... by moving the array declaration before the static constructor. This
is a workaround for issue 18412 - [REG2.077.0] immutable array in library
becomes null when referenced in static constructor.

--