www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12460] New: Crash with goto and static if

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

           Summary: Crash with goto and static if
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code benjamin-thaut.de



PDT ---
The following will create a access violation by accessing a null pointer in
statement.c line 5212 (LabelStatement::syntaxCopy)

void func(T)()
{
  static if(is(T == int))
  {
    goto end;
  }
  end:
}

void main(string[] args)
{
  func!int();
}

I tested this with dmd 2.065

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 25 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12460


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12460




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

https://github.com/D-Programming-Language/dmd/commit/15fa38b9238c1bfb56214dc6ac76963843c011c6
fix Issue 12460 - Crash with goto and static if

By implementing issue 10199, LabelStatement::statement may be NULL. So
LabelStatement::syntaxCopy should consider the case.

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


Issue 12460 - Crash with goto and static if

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 07 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12460


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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