[Mono-list] Runtime segfault on amd64

Marek Habersack grendel at caudium.net
Thu Dec 29 08:54:18 EST 2005

* Paul F. Johnson <paul at all-the-johnsons.co.uk> [051229 13:27], scribbled:
> Hi,
> > .
> > Before I do that, though, I'd like to ask whether anybody is observing
> > similar behavior.
> Can't say I've seen it.
I think I know what might be causing the trouble. The
Assembly.GetExecutingAssembly() API seems to break on amd64 for some reason.
Currently, I've recompiled the runtime without any optimizations, full debug
information and I do not get the segfault anymore, but instead I'm getting
managed code that works on a 32-bit platform to break on the 64-bit machine.
The code uses the following:

ResourceManager manager = new ResourceManager("Evolve.Web.UI.Toolbar.JavaScript", Assembly.GetExecutingAssembly());
String script = manager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true).GetString("LibraryScript");

(code comes from http://www.codeproject.com/aspnet/CrossBrowserToolbar.asp)
The 2nd line is where it breaks (btw, mono backtrace on the web reports the
line after it as the place where the break actually occurs - a bug?). The
difference between the 32 bit and the 64 bit platform is that
GetExecutingAssembly() returns different results above. I've added some
debug output to the code and here are the results:

1. 32 bit platform

2005-12-29 14:47:01,816 DEBUG Evolve.Web.UI.Toolbar.RollOverHandler -
Executing assembly: Evolve.Web.UI.Toolbar, Version=,Culture=neutral, PublicKeyToken=2aaacce8fc9b2419; manager:System.Resources.ResourceManager

2. 32 bit platform

2005-12-29 14:38:02,389 DEBUG Evolve.Web.UI.Toolbar.RollOverHandler -
Executing assembly: mscorlib, Version=1.0.5000.0, Culture=neutral,PublicKeyToken=b77a5c561934e089; manager: System.Resources.ResourceManager

Given that earlier (with mono compiled with optimizations) the segfault has
been occurring in the GetExecutingAssembly API and led down to libpthread -
might it be a problem with the 64-bit TLS/nptl?



More information about the Mono-list mailing list