[Issue 3769] Segfault(constfold.c) using invalid case (D1 only)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 4 13:41:50 PST 2010


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Segfault using invalid case |Segfault(constfold.c) using
                   |(D1 only)                   |invalid case (D1 only)


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-02-04 13:41:49 PST ---
This is a terrible one. It only happens when DMD is compiled with the optimizer
on, so it doesn't happen in the debug version of DMD.

It's crashing inside constfold.c Index(), around line 1206; it's called from
IndexExp::optimize() The code is:

    else if (e1->op == TOKarrayliteral && !e1->checkSideEffect(2))
    {   ArrayLiteralExp *ale = (ArrayLiteralExp *)e1;
        e = (Expression *)ale->elements->data[i];
        e->type = type;
    }
It crashes on the first mention of ale->elements. I wonder if this could be a
DMC bug?

-- 
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