December 27, 2006

           Summary: hex strings crash DMD when reporting syntax errors
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD

The following invalid source crashes DMD 0.178

void main()
    x"EF BB BF";

But the following does not:

1) valid source compiles with success:
void main()
    char[] x = x"EF BB BF";

2) variant of invalid gives error with success:
void main()
    x"00 BB BF";

You may have different results, as it seems to be a stray pointer problem.


December 31, 2006

------- Comment #1 from  2006-12-31 08:47 -------
I can't reproduce this on Linux - considering the nature of the bug that isn't surprising at all - however there is definitely something wrong with the error reporting:

x"AA BB 00 CC DD";

results in the incomplete error message:
a.d(1): Declaration expected, not '"\u00aa\u00bb"'

Added to DStress as


January 04, 2007 changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

------- Comment #2 from  2007-01-03 22:13 -------
Fixed DMD 1.00


Top | Discussion index | About this forum | D home