[Mono-dev] Segfault using Mono.Tasklets on x86 -- Patch
Tristan Caulfield
t.j.caulfield at cs.bath.ac.uk
Wed Jan 11 17:10:40 UTC 2012
Hello,
I've added a patch to http://bugzilla.xamarin.com/show_bug.cgi?id=2759
for this issue.
In mono_tasklets_arch_restore() in mono/mini/exceptions-x86.c the
returned function was overwriting the stack before moving the return
value to $eax, sometimes resulting in the wrong value being returned.
The fix just copies the return value to $eax before overwriting the
stack.
In contination_store() in mono/mini/tasklets.c there was one case where
the value of cont->stack_used_size would be incorrect, the patch fixes
this too.
Tristan
On Fri, 2012-01-06 at 14:18 +0000, Tristan Caulfield wrote:
> Hello,
>
> I'm getting a segfault with Mono.Tasklets on mono 2.10.8 x86.
>
> Running this test program (mono --debug TestContinuation.exe)
>
> using Mono.Tasklets;
> namespace TestContinuation
> {
> class MainClass
> {
> public static void Main (string[] args)
> {
> var c = new Continuation();
> c.Mark();
> System.Console.WriteLine("Done");
> }
> }
> }
>
> results in an segfault in mono_unwind_frame, unwind.c:401.
>
> It runs correctly on amd64, and on x86 on mono 2.10.2.
> It also runs correctly when --no-x86-stack-align is used.
>
> I have reported the bug at:
> http://bugzilla.xamarin.com/show_bug.cgi?id=2759
>
> Thanks,
>
> Tristan
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
More information about the Mono-devel-list
mailing list