diff options
author | Keith Randall <khr@golang.org> | 2018-08-15 16:21:00 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2018-08-16 15:51:23 +0000 |
commit | a68b713ef600a14e15b59f5bac424be73e1acaf5 (patch) | |
tree | dd35935213e4f6213e4e9ceb94b17c569a070296 /src/runtime/sys_darwin_amd64.s | |
parent | 6502c112863bda754ca3a52ead739f7d6c259117 (diff) | |
download | go-a68b713ef600a14e15b59f5bac424be73e1acaf5.tar.gz go-a68b713ef600a14e15b59f5bac424be73e1acaf5.zip |
runtime: load errno as signed 32-bit
the function libc_errno returns a pointer to a signed-32 bit quantity,
not a 64-bit quantity.
Fixes #27004
Change-Id: I0623835ee34fd9655532251f096022a5accb58cd
Reviewed-on: https://go-review.googlesource.com/129475
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/sys_darwin_amd64.s')
-rw-r--r-- | src/runtime/sys_darwin_amd64.s | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s index 2a2e7379ca..db74352613 100644 --- a/src/runtime/sys_darwin_amd64.s +++ b/src/runtime/sys_darwin_amd64.s @@ -306,7 +306,7 @@ TEXT runtime·mmap_trampoline(SB),NOSPLIT,$0 CMPQ AX, $-1 JNE ok CALL libc_error(SB) - MOVQ (AX), DX // errno + MOVLQSX (AX), DX // errno XORL AX, AX ok: MOVQ AX, 32(BX) @@ -371,7 +371,7 @@ TEXT runtime·kevent_trampoline(SB),NOSPLIT,$0 CMPQ AX, $-1 JNE ok CALL libc_error(SB) - MOVQ (AX), AX // errno + MOVLQSX (AX), AX // errno NEGQ AX // caller wants it as a negative error code ok: POPQ BP |