[Mono-dev] Patch sgen-stw.c update_current_thread_stack windows mono 3.2.1

Vardar Sahin sakirsoft at gmail.com
Sun Aug 25 14:02:39 UTC 2013


Hello Mono Team,

i found a bug which i want to submit a patch for.

The bug is in update_current_thread_stack in sgen-stw.c.

This line does not work as intended.

ARCH_STORE_REGS (reg_ptr);
memcpy (&info->regs, reg_ptr, sizeof (info->regs));

for some reason the pointer address gets the content of ebi register of the
cpu. So after
ARCH_STORE_REGS (reg_ptr);

reg_ptr directs to the content of ebi an loses its orginal pointer address.

Before that line reg_ptr  is defined as fallows:
void *reg_ptr = cur_thread_regs;

In theory it should work that way. But it does not.

The fix is pretty simple use cur_thread_regs instand of reg_ptr  and it
works.

Best regards
Sahin Vardar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130825/041f750b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 1382 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130825/041f750b/attachment.obj>


More information about the Mono-devel-list mailing list