www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7859] New: Crash on invalid alias template parameter type

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

           Summary: Crash on invalid alias template parameter type
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code klickverbot.at



---
Consider the following (invalid) snippet:
---
template A(alias B) {}

mixin template C(alias B = cast(NonExistent)null) {
  alias A!B D;
}

mixin C!();
---

DMD 2.058 just gave an error message, DMD 2.059 Git (5e7362a) prints the error
message as well, but then crashes:
---
(gdb) r
test.d(3): Error: undefined identifier NonExistent

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff83eb04f0 in strlen ()
(gdb) bt


string=0x0) at root.c:1603

args=0x100580260) at template.c:5401

sc=0x100580be0, fargs=0x0) at template.c:4585

sc=0x100580be0) at template.c:4323

loc={filename = 0x10051d470 "test.d", linnum = 4}, sc=0x100580be0,
pe=0x7fff5fbff248, pt=0x7fff5fbff250, ps=0x7fff5fbff240) at mtype.c:6693

sc=0x100580be0) at mtype.c:6748

sc=0x100580be0) at declaration.c:461

sc=0x10051e280) at template.c:6112



---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 08 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7859




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/53f0c9bc2308afe7cd360a28a2cee0f11e388f31
fix Issue 7859 - Crash on invalid alias template parameter type

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 08 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7859


Walter Bright <bugzilla digitalmars.com> changed:

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


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 08 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7859


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |siegelords_abode yahoo.com



*** Issue 7860 has been marked as a duplicate of this issue. ***

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