Thread overview
[Issue 6395] New: Multiple-at-a-time bug breaking e.g. DustMite
Jul 28, 2011
klickverbot
Jul 28, 2011
kennytm@gmail.com
Jul 28, 2011
klickverbot
[Issue 6395] ICE(glue.c) Multiple-at-a-time bug breaking e.g. DustMite
Sep 07, 2011
Don
Sep 07, 2011
klickverbot
Aug 05, 2012
Vladimir Panteleev
Aug 05, 2012
Dmitry Olshansky
Dec 12, 2012
Walter Bright
July 28, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6395

           Summary: Multiple-at-a-time bug breaking e.g. DustMite
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: code@klickverbot.at


--- Comment #0 from klickverbot <code@klickverbot.at> 2011-07-28 10:55:29 PDT ---
The test case, reduced as much as I easily could achieve (I spent too much time on this already, maybe I've missed something obvious):

a.d:
---
import c;
---

b.d:
---
import c;

int regex(string pattern)
{
  return 0;
}

bool match(string r)
{
  return true;
}

void applyNoRemoveRegex()
{
  void scan(string[] noRemoveStr, string e)
  {
    auto a = find!((a){return match(e);})(map!regex(noRemoveStr));
  }
}
---

c.d:
---
template map(alias fun) {
  auto map(Range)(Range r) {
    struct Result
    {
      @property auto ref front()
      {
        return fun("a");
      }
    }
    return Result();
  }
}

Range find(alias pred, Range)(Range haystack) {
  pred(haystack.front);
  return haystack;
}
---

$ dmd -c a.d b.d
Assertion failed: (!vthis->csym), function toObjFile, file glue.c, line 719.
Abort trap: 6

If you reverse the source files in the dmd parameter list, the example compiles fine.

The bug was found by trying to compile DustMite with DMD 2.054 (https://github.com/CyberShadow/DustMite/wiki/Building-DustMite).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 28, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6395



--- Comment #1 from kennytm@gmail.com 2011-07-28 11:27:13 PDT ---
Bug 5754?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 28, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6395



--- Comment #2 from klickverbot <code@klickverbot.at> 2011-07-28 11:29:40 PDT ---
Probably related, yes, but I don't know if it is really the same bug, as it depends on multiple modules, etc.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6395


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au
            Summary|Multiple-at-a-time bug      |ICE(glue.c)
                   |breaking e.g. DustMite      |Multiple-at-a-time bug
                   |                            |breaking e.g. DustMite


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2011-09-07 15:22:07 PDT ---
Looks like bug 2962 to me.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6395



--- Comment #4 from klickverbot <code@klickverbot.at> 2011-09-07 15:33:10 PDT ---
@Don: I don't have time to dig into the issue right now, feel free to close this bug as a duplicate if you think it is one.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6395


Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com


--- Comment #5 from Vladimir Panteleev <thecybershadow@gmail.com> 2012-08-04 22:11:10 PDT ---
DMD 2.060 now prints:

dmd: glue.c:558: virtual void FuncDeclaration::toObjFile(int): Assertion `semanticRun == PASSsemantic3done' failed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6395


Dmitry Olshansky <dmitry.olsh@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh@gmail.com


--- Comment #6 from Dmitry Olshansky <dmitry.olsh@gmail.com> 2012-08-05 06:49:22 PDT ---
(In reply to comment #5)

> dmd: glue.c:558: virtual void FuncDeclaration::toObjFile(int): Assertion `semanticRun == PASSsemantic3done' failed.

Same result but with different test case in issue 8348.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 12, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6395


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
           Platform|Other                       |All
         Resolution|                            |FIXED
         OS/Version|Mac OS X                    |All


--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> 2012-12-12 00:23:24 PST ---
https://github.com/D-Programming-Language/dmd/commit/c4e23a5a470aa981b268d56f22b15ef17e09aa72

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 12, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6395



--- Comment #8 from jens.k.mueller@gmx.de 2012-12-12 05:55:50 PST ---
*** Issue 8348 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: -------