[Mono-dev] Embedding problem - Unable to label tree

Clay Fowler CFowler at brightspotmedia.com
Fri Dec 29 11:06:11 EST 2006


Hello all! We're trying to embed Mono in our cross-platform
applications, so we need a libmono that works with Visual Studio for the
Windows side. We followed these instructions to build on Visual Studio
2005:

http://www.mono-project.com/Compiling_Mono_VSNET

which eventually worked with the latest mono from SVN. However, whenever
we try to run any of the samples (test-invoke, test-metadata, etc.) we
hit an assertion in mini.c (the g_assert_not_reached inside of
mini_select_instructions shown below):

if (!(mbstate = mono_burg_label (tree, cfg))) {
	g_warning ("unable to label tree %p", tree);
	mono_print_tree (tree);
	g_print ("\n");				
	g_assert_not_reached ();
}

The output for the assertion says: "unable to label tree 00CEB9B8
(stind.ref (ldind.i regoffset[0x10(%ebp)]) iconst[0])"

It happens as soon as we try to call mono_jit_init() from our program
(or from the tests).

This sounds like some ominous, mysterious, monoburg code-generator
problem? Maybe we just need to configure something? Any help or advice
is *greatly* appreciated!

Here's the stack trace leading up to this failure:

>	test-metadata.exe!mini_select_instructions(MonoCompile *
cfg=0x00cea910)  Line 9828 + 0x18 bytes	C
 	test-metadata.exe!mini_method_compile(_MonoMethod *
method=0x00ce9280, unsigned int opts=5335551, _MonoDomain *
domain=0x00ec0f00, int run_cctors=1, int compile_aot=0, int parts=0)
Line 10392 + 0x9 bytes	C
 	test-metadata.exe!mono_jit_compile_method_inner(_MonoMethod *
method=0x00ce9280, _MonoDomain * target_domain=0x00ec0f00, int
opt=5335551)  Line 10559 + 0x17 bytes	C
 	test-metadata.exe!mono_jit_compile_method_with_opt(_MonoMethod *
method=0x00ce9280, unsigned int opt=5335551)  Line 10701 + 0x11 bytes
C
 	test-metadata.exe!mono_jit_compile_method(_MonoMethod *
method=0x00ce9280)  Line 10719 + 0xf bytes	C
 	test-metadata.exe!mono_jit_runtime_invoke(_MonoMethod *
method=0x00ce9180, void * obj=0x01251f88, void * * params=0x0012fea0,
MonoObject * * exc=0x00000000)  Line 10831 + 0x9 bytes	C
 	test-metadata.exe!mono_runtime_invoke(_MonoMethod *
method=0x00ce9180, void * obj=0x01251f88, void * * params=0x0012fea0,
MonoObject * * exc=0x00000000)  Line 1643 + 0x18 bytes	C
 
test-metadata.exe!mono_exception_from_name_two_strings(_MonoImage *
image=0x00368db8, const char * name_space=0x00661568, const char *
name=0x00661550, MonoString * a1=0x01252fc0, MonoString * a2=0x00000000)
Line 142 + 0x13 bytes	C
 	test-metadata.exe!mono_runtime_init(_MonoDomain *
domain=0x00ec0f00, void (unsigned int, void *, void *)*
start_cb=0x004c5fc0, void (unsigned int, void *)* attach_cb=0x004c6010)
Line 128 + 0x1c bytes	C
 	test-metadata.exe!mini_init(const char * filename=0x00643110,
const char * runtime_version=0x00000000)  Line 11700 + 0x13 bytes
C
 	test-metadata.exe!mono_jit_init(const char * file=0x00643110)
Line 1145 + 0xb bytes	C
 	test-metadata.exe!main(int argc=3, char * * argv=0x00b93760)
Line 105 + 0xa bytes	C
 	test-metadata.exe!__tmainCRTStartup()  Line 318 + 0x19 bytes
C
 	test-metadata.exe!mainCRTStartup()  Line 187	C




More information about the Mono-devel-list mailing list