http://d.puremagic.com/issues/show_bug.cgi?id=5936
Don <clugd...@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |clugd...@yahoo.com.au Summary|DMD Segfault when |Regression(2.050): Segfault |forward-referencing pure |when forward-referencing |auto-return member function |pure auto-return member |with parameter. |function with parameter. --- Comment #1 from Don <clugd...@yahoo.com.au> 2011-06-06 06:18:17 PDT --- 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; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------