Bug 7072 – [2.057 Beta] Assertion failure: '0' on line 145 in file 'mtype.c'
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-12-06T06:26:00Z
Last change time
2011-12-07T13:19:49Z
Keywords
ice-on-valid-code
Assigned to
nobody
Creator
dsimcha
Comments
Comment #0 by dsimcha — 2011-12-06T06:26:07Z
I get this error message when trying to build SciD with 2.057 beta.
Assertion failure: '0' on line 145 in file 'mtype.c'
This doesn't happen with 2.056. I haven't had a chance to reduce this yet, but I will try tonight if the assertion failure isn't enough of a hint. (I don't imagine reducing this one will be easy.)
Comment #1 by dsimcha — 2011-12-06T15:56:46Z
I didn't realize the significance of this until I looked at the source code to mtype.c, but there's actually a line before the assertion failure line. The full error message is:
ty = 41
Assertion failure: '0' on line 145 in file 'mtype.c'
Comment #2 by dsimcha — 2011-12-06T17:33:24Z
Unbelievably simple test case after about 1.5 hours of recursively reducing SciD code:
struct S
{
this(A)(A args) { }
}
void main() {
auto s = S( null );
}
Comment #3 by bugzilla — 2011-12-06T20:54:20Z
Thanks for your hard work, David. I found the problem, and am testing the fix.
(In reply to comment #2)
> Unbelievably simple test case after about 1.5 hours of recursively reducing
> SciD code:
Have you come cross this tool? It helps tremendously with reducing test cases: https://github.com/cybershadow/dustmite
Comment #6 by dsimcha — 2011-12-07T13:19:49Z
I'm aware of DustMite. I just never got around to setting it up/learning how it works because it doesn't look easy. Usually reducing stuff like this doesn't take very long. It's just that this one had to (unexpectedly) follow a whole chain of template instantiations.