diff options
| author | Alex Brainman <alex.brainman@gmail.com> | 2019-01-25 18:56:22 +1100 |
|---|---|---|
| committer | Emmanuel Odeke <emm.odeke@gmail.com> | 2019-02-26 20:22:39 +0000 |
| commit | 5cf4e442a5dc1f4a1d6f3fd04b1083bc192e648e (patch) | |
| tree | b3359d1f13c559facf644f2e3e1b0595b440b221 /src/runtime/sys_windows_amd64.s | |
| parent | c97e57657643de69bf1dc58f3ffde75d31eda0c8 (diff) | |
| download | go-5cf4e442a5dc1f4a1d6f3fd04b1083bc192e648e.tar.xz | |
runtime: fix syscall.NewCallback to return all bits for uintptr values
syscall.NewCallback mistakenly used MOVL even for windows/amd64,
which only returned the lower 32 bits regardless of the architecture.
This was due to a copy and paste after porting from windows/386.
The code now uses MOVQ, which will return all the available bits.
Also adjust TestReturnAfterStackGrowInCallback to ensure we never
regress.
Fixes #29331
Change-Id: I4f5c8021c33f234c2bb7baa9ef7a6b4870172509
Reviewed-on: https://go-review.googlesource.com/c/159579
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/sys_windows_amd64.s')
| -rw-r--r-- | src/runtime/sys_windows_amd64.s | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/sys_windows_amd64.s b/src/runtime/sys_windows_amd64.s index 612f0a474d..43a26497ad 100644 --- a/src/runtime/sys_windows_amd64.s +++ b/src/runtime/sys_windows_amd64.s @@ -351,7 +351,7 @@ TEXT runtime·callbackasm1(SB),NOSPLIT,$0 ADDQ $64, SP POPFQ - MOVL -8(CX)(DX*1), AX // return value + MOVQ -8(CX)(DX*1), AX // return value POPQ -8(CX)(DX*1) // restore bytes just after the args RET |
