From 34655223ef9b26e40cc22a0ab355a991ed177cf4 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 21 Jul 2014 17:38:30 -0400 Subject: [PATCH] runtime: round gohash stack frame to multiple of 8 on amd64p32 Even though pointers are 4 bytes the stack frame should be kept a multiple of 8 bytes so that return addresses pushed on the stack are properly aligned. Fixes #8379. LGTM=dvyukov, minux R=minux, bradfitz, dvyukov, dave CC=golang-codereviews https://golang.org/cl/115840048 --- src/pkg/runtime/asm_amd64p32.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/runtime/asm_amd64p32.s b/src/pkg/runtime/asm_amd64p32.s index 7facd10b38..097cacb607 100644 --- a/src/pkg/runtime/asm_amd64p32.s +++ b/src/pkg/runtime/asm_amd64p32.s @@ -1139,7 +1139,7 @@ TEXT runtime·fastrand2(SB), NOSPLIT, $0-4 // func (alg unsafe.Pointer, p unsafe.Pointer, size uintpr, seed uintptr) uintptr // to: // func (hash *uintptr, size uintptr, p unsafe.Pointer) -TEXT runtime·gohash(SB), NOSPLIT, $12-20 +TEXT runtime·gohash(SB), NOSPLIT, $16-20 FUNCDATA $FUNCDATA_ArgsPointerMaps,gcargs_gohash<>(SB) FUNCDATA $FUNCDATA_LocalsPointerMaps,gclocals_gohash<>(SB) MOVL a+0(FP), AX -- 2.50.0