[Issue 3687] New: Array operation "slice times scalar" tramples over memory

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 7 13:16:39 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3687

           Summary: Array operation "slice times scalar" tramples over
                    memory
           Product: D
           Version: 1.053
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: eriatarka84 at gmail.com


--- Comment #0 from Clemens <eriatarka84 at gmail.com> 2010-01-07 13:16:38 PST ---
The following code fails with an assertion failure when it clearly shouldn't:

====================================================

void main()
{
    float[64] array;
    int i = 42;

    auto slice = array[];
    slice[] *= 2f;

    assert(i == 42);
}

====================================================

Array bounds checking doesn't catch this. I presume that the code in the
runtime to execute this array operation is buggy.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list