www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 754] New: hex strings crash DMD when reporting syntax errors

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=754

           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
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: luismarques gmail.com


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.


-- 
Dec 27 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=754






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


-- 
Dec 31 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=754


bugzilla digitalmars.com changed:

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





Fixed DMD 1.00


-- 
Jan 03 2007