Bug 754 – hex strings crash DMD when reporting syntax errors

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-12-27T11:18:00Z
Last change time
2014-02-15T13:21:07Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
luis

Comments

Comment #0 by luis — 2006-12-27T11:18:36Z
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.
Comment #1 by thomas-dloop — 2006-12-31T08:47:42Z
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 http://dstress.kuehne.cn/nocompile/h/escape_hex_string_05_A.d
Comment #2 by bugzilla — 2007-01-03T22:13:39Z
Fixed DMD 1.00