[Mono-dev] malloc error executing OBS-built mono
Miguel González
mgonzalez at codicesoftware.com
Thu Oct 22 08:49:03 UTC 2015
Hi Miguel,
Thanks for the update :-) I had also an e-mail from Zoltan Varga yesterday telling me that the change had been applied. I updated my code accordingly to see if that could be the fix for my issue, too… But it didn’t :-(
I’ll try using gdb as you suggested. I hadn’t considered it before since this crash only happens inside the automated build of the OBS worker virtual machine and I’ve not been able to reproduce in any other environment. However, any additional info is always appreciated! There are also chances of ditching this build and relying on other distros to build our packages, since our OpenSUSE packages seem to be highly compatible between versions.
Thank you,
Miguel
From: Miguel de Icaza [mailto:miguel at xamarin.com]
Sent: 21 October 2015 20:44
To: Miguel González <mgonzalez at codicesoftware.com>
Cc: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] malloc error executing OBS-built mono
Hello Miguel,
I also had to apply this change in order to avoid an unallowed warning message:
I: Statement might be overflowing a buffer in strncat. Common mistake:
BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the
left over size as 3rd argument
GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1)
We replaced that code with the glib string operations just yesterday:
042ddd504c09977682bb48010c5642390826d1da
But thanks for sharing.
At this point I’m able to build mono RPM packages and they’re working as I install them using a test OpenSUSE 12.3 virtual machine. However, when the GTK# builds are started –which use the mono packages as build requirement–, the worker is unable to run the mono executable: apparently, malloc is corrupting the heap or something. This is a sample execution as extracted from the OBS build logs:
[ 101s] + /opt/plasticscm5/mono/bin/mono /opt/plasticscm5/mono/lib/mono/4.5/gacutil.exe -l
[ 101s] *** Error in `/opt/plasticscm5/mono/bin/mono': malloc: top chunk is corrupt: 0x08ab9230 ***
What you want to do at this point in time is to run the process under gdb, as this will show where malloc detected the error, and then you should get both the unmanaged stack trace, and if possible the managed one (with the mono_stack gdb macro)
Miguel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20151022/5c7f8298/attachment.html>
More information about the Mono-devel-list
mailing list