[Mono-dev] sgen crash on x86_64 (when using libmono from Wine)

Paul Gofman gofmanp at gmail.com
Tue Feb 9 17:08:21 UTC 2016


Hi,

while working with 64-bit mono under Wine (using libmono x64 dll) I came
through a problem with SGen garbage collector crashing on either from
finalizer thread or seemingly every time some garbage collection already
happened before. Finally I found the problem in sgen-marksweep.c:
bitcount(mword) implementation. I am attaching a patch which fixes it
for me.
    The problem is only in libmono, mono 64 bit standalone executable
does not have it. I am attaching a trivial test case which I finally
used to isolate the problem (testprint.cs). If compile it with: 'mcs
gccollect.cs -platform:x64', and then run with wine64 on a 64-bit
wineprefix, there is a native SIGSEGV in second GC collect. I used
vanilla wine 1.9.3 to reproduce the issue. Compiling test case with
-platform:x64 is important as otherwise it will be run as 32-bit process
for which the problem does not exist.
    Could you please advice if this (or similar) patch can somehow be
pushed upstream?

Thanks,
    Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sgen-fix-bit-counting-in-mword.patch
Type: text/x-patch
Size: 800 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20160209/45c8f069/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gccollect.cs
Type: text/x-csharp
Size: 117 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20160209/45c8f069/attachment-0001.bin>


More information about the Mono-devel-list mailing list