Fix wrong offset in msys2 x64 libcontext implementation not saving fiber data pointer

This should have/may have been causing random crashes on calls into win32 api. fiber data is located at offset 0x20 of the stack not 0x18.
This commit is contained in:
Marek Roszko 2021-03-07 15:55:23 -05:00
parent ad505e29c0
commit 204e615b49
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ __asm (
" push %rax\n"
" mov 0x1478(%r10),%rax\n"
" push %rax\n"
" mov 0x18(%r10),%rax\n"
" mov 0x20(%r10),%rax\n"
" push %rax\n"
" lea -0xa8(%rsp),%rsp\n"
" test %r9,%r9\n"
@ -199,7 +199,7 @@ __asm (
" lea (%rsp,%rcx,1),%rsp\n"
" mov %gs:0x30,%r10\n"
" pop %rax\n"
" mov %rax,0x18(%r10)\n"
" mov %rax,0x20(%r10)\n"
" pop %rax\n"
" mov %rax,0x1478(%r10)\n"
" pop %rax\n"