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



--- Comment #3 from kenn...@gmail.com 2011-06-30 11:27:04 PDT ---
(In reply to comment #1)
> The segfault is a simple null pointer dereference which can easily be patched.
> 
> mtype.c, TypeFunction::parameterEscapes, line 5369
> 
>     if (purity)
>     {   /* With pure functions, we need only be concerned if p escapes
>          * via any return statement.
>          */
> -        Type* tret = nextOf()->toBasetype();
> -        if (!isref && !tret->hasPointers())
> +        Type* tret = nextOf() ? nextOf()->toBasetype() : NULL;
> +        if (!isref && tret && !tret->hasPointers())
>         {   /* The result has no references, so p could not be escaping
>              * that way.
>              */
>             return FALSE;
>         }

This patch only fixes 5844. In git master this becomes

   Internal error: toir.c 190

with or without your patch.

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

Reply via email to