|
Bugzilla – Full Text Bug Listing |
| Summary: | Segmentation fault when executing .netZ packed app | ||
|---|---|---|---|
| Product: | [Mono] Mono: Runtime | Reporter: | Yvan Janssens <yvan> |
| Component: | debug | Assignee: | Mono Bugs <mono-bugs> |
| Status: | NEW --- | QA Contact: | Mono Bugs <mono-bugs> |
| Severity: | Critical | ||
| Priority: | P5 - None | CC: | forgotten_vxPDddArjq |
| Version: | 2.8.x | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | Mac OS X 10.6 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Yvan Janssens
2010-11-20 14:58:20 UTC
Here's my packed exe: http://www.filesonic.com/file/33887747/module.exe (sorry, it's filesonic... My hosting doesn't handle .EXE files properly :-( ) It has the same behavior under Linux. (centos 5.4, x86) Mono JIT compiler version 1.2.4 (tarball) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: normal Architecture: x86 Disabled: none -Y This looks like a stack overflow with the following stack trace:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) <IL 0x0001c, 0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x000d0] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:226
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /home/zovarga/git/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:96
at netz.NetzStarter.InvokeApp (System.Reflection.Assembly,string[]) <IL 0x0002a, 0x000a3>
at netz.NetzStarter.StartApp (string[]) <IL 0x00025, 0x00047>
at netz.NetzStarter.Main (string[]) <IL 0x0001e, 0x0009b>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
So the problem is that the packed assembly is also called 'module', so Assembly.Load(byte[]) returns the main assembly, not the packed one, leading to the infinite recursion above. Hi, Thank you for your help. I still got a few questions: * How did you manage to get that stacktrace? * Why does it work on MS.net, and not under Mono? Is mono stricter following the standard or something? -y Here's another packed app: http://yvansoftware.be/HelloWorld.zip This time, it is called "HelloWorld", and not "Module". Or am I wrong here? >>* Why does it work on MS.net, and not under Mono? Is mono stricter following
the standard or something?
This is still a bug in mono.
So basically, I found the following: * If I load an assembly with the same name, and call the entry point, the executing assembly is loaded, instead of the loaded assembly. * If I "fix" .netz to output the assembly in another name, it works :-). Changing the output name to "packed_" + assemblyName solved the problem. Do you need a working PE file, generated by .netz under mono/os x? -y |