Bug 317532 (MONO74073) - amd casting regression
Summary: amd casting regression
Status: RESOLVED FIXED
Alias: MONO74073
Product: Mono: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Blocker
Target Milestone: ---
Assignee: Forgotten User vxPDddArjq
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: build
Depends on:
Blocks:
 
Reported: 2005-03-24 21:48 UTC by Michal Pryczek
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:11:32 UTC


---- Reported by plahcim@o2.pl 2005-03-24 14:48:42 MST ----

Description of Problem:
Gtk# don't want to build.


make[3]: Entering directory `/root/komp/mono/gtk-sharp/pango'
cp ./pango-api.raw pango-api.xml
chmod u+w pango-api.xml
/opt/bin/mono ../parser/gapi-fixup.exe --api=pango-api.xml
--metadata=./Pango.metadata 
rm -f generated/* &&	\
/opt/bin/mono ../generator/gapi_codegen.exe --generate pango-api.xml \
	\
--outdir=generated --customdir=. --assembly-name=pango-sharp	\
--gluelib-name=pangosharpglue --glue-filename=glue/generated.c			\
&& touch generated-stamp

Unhandled Exception: System.InvalidCastException: Cannot cast from source
type to destination type.
in <0x003e6> GtkSharp.Generation.Parser:Parse (System.String filename)
in <0x0030b> GtkSharp.Generation.CodeGenerator:Main (System.String[] args)
make[3]: *** [generated-stamp] Error 1
make[3]: Leaving directory `/root/komp/mono/gtk-sharp/pango'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/komp/mono/gtk-sharp/pango'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/komp/mono/gtk-sharp'
make: *** [all] Error 2



---- Additional Comments From mkestner@ximian.com 2005-03-24 17:22:14 MST ----

Started seeing this on my amd64 machine when I updated to trunk as of
this afternoon.  I was about 2 weeks behind before the update.  The
failure is bogus.  The failing line is:

 return (IGeneratable[]) gens.ToArray (typeof (IGeneratable));

and I split it up and C.WL'd the returned value from ToArray and it
printed GtkSharp.Generation.IGeneratable[], so the cast should work.



---- Additional Comments From bmaurer@users.sf.net 2005-03-24 20:17:38 MST ----

I can repro on this amd box with:
using System.Collections;

interface IBlah {}

class X : IBlah {
	static void Main ()
	{
		ArrayList ar = new ArrayList ();

		for (int i = 0; i < 100; i ++)
			ar.Add (new X ());

		IBlah [] zzz = (IBlah []) ar.ToArray (typeof (IBlah));
	}
}

This does *not* happen on x86.



---- Additional Comments From bmaurer@users.sf.net 2005-03-24 20:17:57 MST ----

mkestner apparently it krept in since 1.1.5
mkestner cause 1.1.5 works like butter



---- Additional Comments From bmaurer@users.sf.net 2005-03-24 20:20:24 MST ----

Even easier:

interface IBlah {}

class X : IBlah {
	static void Main ()
	{
		object [] a = new IBlah [5];
		IBlah  [] b = (IBlah []) a;
	}
}



---- Additional Comments From vargaz@gmail.com 2005-03-27 11:58:09 MST ----

Dunno why this only happens on amd64, but it started happening
after this patch:

http://lists.ximian.com/archives/public/mono-patches/2005-March/056131.html




---- Additional Comments From vargaz@gmail.com 2005-03-29 17:26:46 MST ----

Fixed in SVN.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>amd64</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".