[Mono-devel-list] Assertion failed when compiling Cuyahoga on amd64

Willibald Krenn Willibald.Krenn at gmx.at
Fri Mar 11 09:19:34 EST 2005

Marek Habersack schrieb:
> ** ERROR **: file tramp-amd64.c: line 98 (amd64_magic_trampoline): assertion
> failed: (*vtable_slot)
> aborting...
> lenghty output of gdb bt and bt full is attached. 

Interesting, your vtable_slot addr is identical with &regs[RAX]..

Please let me know if I
> can do anything to help further diagnose the problem,

Don't know if Zoltan has already fixed the problem, but it would be 
interesting to see the output of following code (add it after the 
"vtable_slot = mono_arch_get_vcall_slot_addr (code, (gpointer*)regs);" line)

	if (vtable_slot && !*vtable_slot) {
		char* mn = mono_method_full_name (m, TRUE);
		g_print ("MAGIC: FATAL  SLOT == NULL when compiling %s\n",mn);
		/*do a disasm of the caller*/
		g_print ("MAGIC: CODE %p\n",(gpointer) code);
		mono_disassemble_code (code - 20, 20, "CODE-20..0");
		if ((tramp != (guint8*)-1) && tramp)
			mono_disassemble_code (tramp, 34, "STUB");
			g_print ("MAGIC: Stub invalid %p\n", (gpointer) tramp);

		MonoJitInfo *ji = mono_jit_info_table_find (mono_domain_get (), addr);
		if (ji) {
			g_print ("MAGIC: JI: (start: %p,  len: %i , neutr: %i) %s\n", 
				ji->code_size, ji->domain_neutral);
			mono_disassemble_code (ji->code_start, ji->code_size, mn);
		g_free (mn);
		/*see if we can get the object: Potentially this can SIGSEGV*/
		int this_reg = AMD64_RDI;
		if (!mono_method_signature (m)->ret->byref && MONO_TYPE_ISSTRUCT 
(mono_method_signature (m)->ret))
			this_reg = AMD64_RSI;
		MonoObject *obj = (MonoObject *) regs [this_reg];
		MonoVTable *table = obj->vtable;
		g_print ("MAGIC: 'this' object of class: %s\n", table->klass->name);
		g_print ("       MaxIntf: %i  Rank: %i  Remote: %i Init: 
			(int) table->rank, (int) table->remote, (int) table->initialized);
		g_print ("MAGIC: Slots %i VT: %i\n", (int) table->klass->vtable_size,
			(int) table->klass->valuetype);

		g_assert_not_reached ();


More information about the Mono-devel-list mailing list