[Bug 91] New: String literals not always properly zero-terminated
    gdc-bugzilla at gdcproject.org 
    gdc-bugzilla at gdcproject.org
       
    Sun Jan 12 05:44:04 PST 2014
    
    
  
http://bugzilla.gdcproject.org/show_bug.cgi?id=91
             Bug #: 91
           Summary: String literals not always properly zero-terminated
    Classification: Unclassified
           Product: GDC
           Version: development
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: Normal
         Component: gdc
        AssignedTo: ibuclaw at gdcproject.org
        ReportedBy: johannespfau at gmail.com
test.d:
-------------
void main()
{
    string s = "0x1.FFFFFFFFFFFFFFFEp-16382";
    s = "abcde";//Breakpoint here
}
-------------
gdc -g test.d
gdb a.out
break test.d:4
run
print s.ptr
$2 = 0x433964 "0x1.", 'F' <repeats 15 times>, "Ep-16382abcde"
(Note that the first string isn't zero-terminated)
Seems to be GDC specific, I can't reproduce this with DMD.
-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
    
    
More information about the D.gnu
mailing list