[Mono-devel-list] Re: Alpha corlib mismatched sizes. (64-bit issues)

Paolo Molaro lupus at ximian.com
Wed Jul 2 07:35:33 EDT 2003

On 07/01/03 Laramie Leavitt wrote:
> Laramie Leavitt said:
> > One of the problems is verify.c, around line 2560
> > change to:
> > 			if( klass->valuetype )
> > 				struct_offset = 2 * sizeof( void * );

I used sizeof (MonoObject) for this change.

> 	gint32     *remote_stack_index;
> 	gint32      hresult;
> 	MonoString *source;
> } MonoException;
> We see that for some reason the remote_stack_index appears to
> be only 4 bytes, and then 4 bytes for the hresult.

I think the '*' is a typo, removing it is the correct fix.

> And on to the other case:
> typedef struct {
> 	MonoObject	obj;
> 	MonoImage  *image;
> 	MonoReflectionAssembly *assembly;
> 	MonoString *fqname;
> 	MonoString *name;
> 	MonoString *scopename;
> 	gboolean is_resource;

This should be MonoBoolean: I committed the fix, though I'm not sure
it solves your issue: MonoBoolean is 8 bits, gboolean is an int, so I
guess 32 bits on your alpha, but either way the structure should still
be padded to the next 8 bytes.
Are you using a current corlib (like from the 0.25 release)?
Check that the following command returns a line:
	monodis --fields corlib.dll |grep is_resource
If it return nothing you have an old corlib, if it returns a line I
guess the bug is in the field layout code (class.c).

On 07/01/03 Laramie Leavitt wrote:
> The verify.c change prints out all mismatched values instead of only the
> first one, which I find helpful.  Someone will probably want to use
> g_printf( ... ) there,
> though.

I made it use a GString and concat all the results. Thanks for the


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list