aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/syscall_windows.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2019-06-08 17:20:57 +0000
committerKeith Randall <khr@golang.org>2019-06-10 16:19:39 +0000
commit8f296f59de0703b0559474beb434a265e277bdca (patch)
tree4ffd97168a989aa958ef2055f07759f29a09210b /src/runtime/syscall_windows.go
parentdaf944a531fecf2431b60da608e70680f4927412 (diff)
downloadgo-8f296f59de0703b0559474beb434a265e277bdca.tar.gz
go-8f296f59de0703b0559474beb434a265e277bdca.zip
Revert "Revert "cmd/compile,runtime: allocate defer records on the stack""
This reverts CL 180761 Reason for revert: Reinstate the stack-allocated defer CL. There was nothing wrong with the CL proper, but stack allocation of defers exposed two other issues. Issue #32477: Fix has been submitted as CL 181258. Issue #32498: Possible fix is CL 181377 (not submitted yet). Change-Id: I32b3365d5026600069291b068bbba6cb15295eb3 Reviewed-on: https://go-review.googlesource.com/c/go/+/181378 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/syscall_windows.go')
-rw-r--r--src/runtime/syscall_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/syscall_windows.go b/src/runtime/syscall_windows.go
index 36ad7511af..722a73d108 100644
--- a/src/runtime/syscall_windows.go
+++ b/src/runtime/syscall_windows.go
@@ -112,7 +112,6 @@ const _LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
//go:nosplit
func syscall_loadsystemlibrary(filename *uint16, absoluteFilepath *uint16) (handle, err uintptr) {
lockOSThread()
- defer unlockOSThread()
c := &getg().m.syscall
if useLoadLibraryEx {
@@ -135,6 +134,7 @@ func syscall_loadsystemlibrary(filename *uint16, absoluteFilepath *uint16) (hand
if handle == 0 {
err = c.err
}
+ unlockOSThread() // not defer'd after the lockOSThread above to save stack frame size.
return
}