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

           Summary: Segfault when struct with three or more ulongs with a
                    toString is passed to format with at least two
                    substitution clauses.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: blood.of.l...@gmail.com


--- Comment #0 from Bernard Helyer <blood.of.l...@gmail.com> 2011-05-23 
05:01:35 PDT ---
import std.string;

struct A { ulong a, b, c; string toString() { return ""; } }

void main()
{
    A a;
    format("%s%s", a, "");
}



There has to be at least 24 bytes (or so) of declarations, so at least three
ulongs. The toString has to be there. That second parameter to format has to be
there.

Somewhere, there is stack corruption happening. This is preventing SDC's 64 bit
build from working correctly (it crashes when it errors, as the Location struct
is passed to format, manifesting this when its size_t decls are 64 bits wide).

This could be from DMD or Phobos. I'm not sure.

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

Reply via email to