D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3808 - Assertion Failure : Assertion failure: 'classinfo->structsize == CLASSINFO_SIZE' on line 870 in file 'toobj.c'
Summary: Assertion Failure : Assertion failure: 'classinfo->structsize == CLASSINFO_SI...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 blocker
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code, patch
Depends on:
Blocks:
 
Reported: 2010-02-16 14:23 UTC by Petit Vincent
Modified: 2015-06-09 05:15 UTC (History)
2 users (show)

See Also:


Attachments
sc.ini, makefile, binding, screen (729.97 KB, application/x-zip-compressed)
2010-02-16 14:23 UTC, Petit Vincent
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Petit Vincent 2010-02-16 14:23:36 UTC
Created attachment 568 [details]
sc.ini, makefile, binding, screen

Well, I found this bug when I was trying to make the win32lib from the binding
available on Dsource.org.

I'll try to explain the environment with lot of details :

1. DMD Compiler : Version 1.033, 1.056 ; 2.040, dmd2beta have been "tested".
Each one returned the bug. So, the version of the compiler don't play a role to
have this bug.

2. Libraries :

- Standard Library : tango 0.98 and tango 0.99.9 kai have been tried too. Same
result.

- Others : tried with and without these ones : tangobos (latest), DFL (latest),
INI (from dprogramming.com). Nothing changed the result.

3. Binding :

- Win32 from DSource - the latest one from trunk version (trunk-r337)


4. Attachement :

- The makefile for the binding (and the binding itself)
- A screen from my dmd\lib directory
- sc.ini file I'm using (there's lot of comments cause of tests I made for this
bug or other things ...)
Comment 1 Petit Vincent 2010-02-16 14:25:18 UTC
Well, I found this bug when I was trying to make the win32lib from the binding available on Dsource.org.

I'll try to explain the environment with lot of details :

1. DMD Compiler : Version 1.033, 1.056 ; 2.040, dmd2beta have been "tested". Each one returned the bug. So, the version of the compiler don't play a role to have this bug.

2. Libraries :

- Standard Library : tango 0.98 and tango 0.99.9 kai have been tried too. Same result.

- Others : tried with and without these ones : tangobos (latest), DFL (latest), INI (from dprogramming.com). Nothing changed the result.

3. Binding :

- Win32 from DSource - the latest one from trunk version (trunk-r337)


4. Attachement :

- The makefile for the binding (and the binding itself)
- A screen from my dmd\lib directory
- sc.ini file I'm using (there's lot of comments cause of tests I made for this bug or other things ...)
Comment 2 Don 2010-03-11 08:18:50 UTC
This is caused by an incorrectly installed DMD (wrong phobos.lib). However, the compiler should say that, instead of failing with an assert).
Comment 3 Don 2010-03-15 14:02:16 UTC
The error message should be improved. I suggest something like this:

toobj, line 995:

    if (vtblInterfaces->dim)
    {
-      if (classinfo)
-	    assert(classinfo->structsize == CLASSINFO_SIZE);
+    	if (classinfo && classinfo->structsize != CLASSINFO_SIZE)
+	    error("Incorrect installation. D compiler and phobos' typeinfo are mismatched");
	offset = CLASSINFO_SIZE;
	dtxoff(&dt, csym, offset, TYnptr);	// (*)
Comment 4 Walter Bright 2010-03-28 14:13:34 UTC
changeset 425
Comment 5 Don 2010-04-09 13:41:54 UTC
Fixed DMD1.058 and 2.043.