November 06, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5180

           Summary: ICE(arrayop.c) in-place array operation on
                    incompatible types
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice-on-invalid-code, patch
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: rsinfu@gmail.com


--- Comment #0 from Shin Fujishiro <rsinfu@gmail.com> 2010-11-06 12:32:31 PDT ---
Created an attachment (id=803)
Patch against dmd r737, handles typeCombine errors

In-place array operation "x[] op= y" causes a segfault if the types of x and y are incompatible for that array op.
----------
void main()
{
    int[] arr;
    arr[] *= 1.5;       // (4)
}
----------
% dmd -o- -c test.d
test.d(4): Error: incompatible types for ((arr[]) *= (1.5)): 'int[]' and
'double'
zsh: segmentation fault (core dumped)  dmd -o- -c test.d
----------

The segfault happens in BinExp::arrayOp() when its type is TypeError because of
the incompatible types.  The proposed patch makes it sure that the error
condition is handled before arrayOp().

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 14, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5180


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2010-11-13 23:30:26 PST ---
http://www.dsource.org/projects/dmd/changeset/753

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