digitalmars.D.bugs - [Issue 1533] New: Crash unknown symbol with std.signals
- d-bugmail puremagic.com (32/32) Sep 26 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1533
- d-bugmail puremagic.com (19/19) Sep 26 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1533
- d-bugmail puremagic.com (11/11) Sep 26 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1533
- d-bugmail puremagic.com (12/22) Sep 26 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1533
- d-bugmail puremagic.com (27/27) Sep 30 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1533
- d-bugmail puremagic.com (18/18) Apr 20 2009 http://d.puremagic.com/issues/show_bug.cgi?id=1533
- d-bugmail puremagic.com (10/10) Apr 20 2009 http://d.puremagic.com/issues/show_bug.cgi?id=1533
http://d.puremagic.com/issues/show_bug.cgi?id=1533
Summary: Crash unknown symbol with std.signals
Product: D
Version: 2.004
Platform: PC
OS/Version: Windows
Status: NEW
Severity: critical
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: regan netmail.co.nz
Crashes on compile:
import std.c.windows.windows;
import std.signals;
class ChildProcesses
{
void foobar()
{
void delegate(int) retCodeCall;
PHandle p;
foo(); //trigger
p.retCodeSignal.connect(retCodeCall);
}
class PHandle
{
mixin Signal!(int) retCodeSignal;
}
}
Compile with "dmd file.d".
Remove line marked trigger and there is no crash.
--
Sep 26 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1533
matti.niemenmaa+dbugzilla iki.fi changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
Version|2.004 |1.021
-------
Confirmed on 1.021 as well. A shorter version:
import std.signals;
class ChildProcesses
{
void foobar()
{
foo(); //trigger
this.retCodeSignal;
}
mixin Signal!(int) retCodeSignal;
}
--
Sep 26 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1533 The error message printed just before the compiler crashes is amusing: sigbug.d(7): Error: undefined identifier foo sigbug.d(7): Error: function expected before (), not foo of type int sigbug.d(236): function sigbug.ChildProcesses.foobar.Signal!(int)._dtor destruct ors only are for class definitions line 236.. of a 13 line program. But should an ice-on-invalid really be marked Severity:critical? --
Sep 26 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1533
matti.niemenmaa+dbugzilla iki.fi changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |major
-------
The error message printed just before the compiler crashes is amusing:
sigbug.d(7): Error: undefined identifier foo
sigbug.d(7): Error: function expected before (), not foo of type int
sigbug.d(236): function sigbug.ChildProcesses.foobar.Signal!(int)._dtor
destruct
ors only are for class definitions
line 236.. of a 13 line program.
The mixin pulls in a bunch of stuff. DMD isn't smart enough to point to the
actual line where the code is, pointing only to the mixin-expanded code (which
you can't even ever see since there's nothing like C compilers' -E).
But should an ice-on-invalid really be marked Severity:critical?
I don't think so. Changing to major.
--
Sep 26 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1533
thomas-dloop kuehne.cn changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Windows |All
The below condensed invalid code also triggers this ICE:
Added to DStress as
http://dstress.kuehne.cn/run/t/this_16_A.d
http://dstress.kuehne.cn/nocompile/t/this_16_B.d
http://dstress.kuehne.cn/nocompile/t/this_16_C.d
http://dstress.kuehne.cn/nocompile/t/this_16_D.d
--
Sep 30 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1533
clugdbug yahoo.com.au changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
DMD2.028. func.c, line 954. Don't try to call the invariant if earlier errors
have meant we don't have a 'this'.
---------
// Postcondition invariant
if (addPostInvariant())
{
if (!ad) return; // <--- add this line
Expression *e = NULL;
if (isCtorDeclaration()){
// Call invariant directly only if it exists
--------
--
Apr 20 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1533
clugdbug yahoo.com.au changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
Same as bug 642, case 14G.
*** This bug has been marked as a duplicate of 642 ***
--
Apr 20 2009









d-bugmail puremagic.com 