www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6062] New: segv in dmd/64 with assoc array literals

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6062

           Summary: segv in dmd/64 with assoc array literals
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: braddr puremagic.com



---
module bug;

void blah(int[char] as)
{
    //auto k = as;
    auto k = [6: as];
}

$ dmd -v -m64 -c bug.d

The first auto line, if enabled, compiles just fine.  The second doesn't.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000568525 in TemplateInstance::semantic (this=0x8cca90, sc=0x0,
fargs=0x0) at template.c:3764
3764        tinst = sc->tinst;
(gdb) bt

fargs=0x0) at template.c:3764

template.c:3734


(this=0x8cc320, pdt=0x866270) at typinf.c:428

multiobj=0) at typinf.c:750

typinf.c:147

(this=0x8cc090, pdt=0x865a80) at typinf.c:421

multiobj=0) at typinf.c:750

typinf.c:147

irs=0x7fffffffda00) at e2ir.c:4843

op=54) at e2ir.c:2076

at e2ir.c:2989

e2ir.c:1170

irs=0x7fffffffda00) at e2ir.c:1234

irs=0x7fffffffda00) at e2ir.c:700

irs=0x7fffffffda00) at s2ir.c:1314

irs=0x7fffffffda00) at s2ir.c:1330

multiobj=0) at glue.c:928

glue.c:279


When fixed, the block in dmd's compilable/interpret3.d that's versioned out to
just run on x86/32 should be changed to run on all platforms.  See also this
commit:

https://github.com/D-Programming-Language/dmd/commit/2f85bab42d4b6d5c90e2a6d0d0b3b88ae0563f9a

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 26 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6062


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |yebblies gmail.com
           Platform|x86_64                      |All



Not specific to x86-64, caused by the new druntime interface's use of
ExpressionsToStaticArray, and re-calling TypeAArray::semantic with no scope.

https://github.com/D-Programming-Language/dmd/pull/381

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 14 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6062


Walter Bright <bugzilla digitalmars.com> changed:

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



16:47:57 PDT ---
https://github.com/D-Programming-Language/dmd/commit/52757742186b775f7cc0d0e74ac9742c1c0b89ff

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