]> Cypherpunks repositories - gostls13.git/commit
runtime: store syscall parameters in m not on stack
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 22 May 2015 00:58:57 +0000 (10:58 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Mon, 29 Jun 2015 02:45:45 +0000 (02:45 +0000)
commit85d4d46f3cefceb87924ad1b0acec9f753413736
tree30455427e19e41a0b87893ebbdd6cf0f05252dd1
parent3b7841b3aff9204f054ffabbe4dd39d3e3dd3e91
runtime: store syscall parameters in m not on stack

Stack can move during callback, so libcall struct cannot be stored on stack.
asmstdcall updates return values and errno in libcall struct parameter, but
these could be at different location when callback returns.
Store these in m, so they are not affected by GC.

Fixes #10406

Change-Id: Id01c9d2b4b44530494e6d9e9e1c875261ce477cd
Reviewed-on: https://go-review.googlesource.com/10370
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/cgocall.go
src/runtime/runtime2.go
src/runtime/syscall_windows.go
src/runtime/syscall_windows_test.go