digitalmars.D.bugs - [Issue 4252] New: [CTFE]: No array bounds checking in assignment to char[] array
- d-bugmail puremagic.com (27/27) May 30 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4252
- d-bugmail puremagic.com (12/12) May 30 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4252
- d-bugmail puremagic.com (14/14) May 30 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4252
http://d.puremagic.com/issues/show_bug.cgi?id=4252 Summary: [CTFE]: No array bounds checking in assignment to char[] array Product: D Version: 2.041 Platform: Other OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: clugdbug yahoo.com.au This code shouldn't compile, due to the array bounds error. But instead, compiler memory corruption occurs. int bug4252() { char [] s = "abc".dup; s[5] = 'd'; return 3; } static assert(bug4252()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 30 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4252 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED 16:31:20 PDT --- http://www.dsource.org/projects/dmd/changeset/507 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 30 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4252 BCS <shro8822 vandals.uidaho.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |shro8822 vandals.uidaho.edu --- The revision that fixed this also fixed a missing line number bug. Looking at the source, it did so by calling a error function with a Loc value rather than without it. My question is why the original function even exists? When would the compiler ever need to dump an error message and not have a line number to attach to it? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 30 2010