diff options
author | Ian Lance Taylor <iant@golang.org> | 2016-04-01 15:06:25 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2016-04-01 22:23:13 +0000 |
commit | 59fc42b230671d083feb68925d9cadc1da1d2616 (patch) | |
tree | 98afc4a58a8fca04b36cbd812fceaf4a2aa3a08d /src/runtime/cgocall.go | |
parent | 5cab01698a782b28933ac16fdc4c43634b1331d6 (diff) | |
download | go-59fc42b230671d083feb68925d9cadc1da1d2616.tar.gz go-59fc42b230671d083feb68925d9cadc1da1d2616.zip |
runtime: allocate mp.cgocallers earlier
Fixes #15061.
Change-Id: I71f69f398d1c5f3a884bbd044786f1a5600d0fae
Reviewed-on: https://go-review.googlesource.com/21398
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/cgocall.go')
-rw-r--r-- | src/runtime/cgocall.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/runtime/cgocall.go b/src/runtime/cgocall.go index 7cffa83617..d5248803a4 100644 --- a/src/runtime/cgocall.go +++ b/src/runtime/cgocall.go @@ -113,11 +113,6 @@ func cgocall(fn, arg unsafe.Pointer) int32 { mp.ncgo++ defer endcgo(mp) - // Allocate memory to hold a cgo traceback if the cgo call crashes. - if mp.cgoCallers == nil { - mp.cgoCallers = new(cgoCallers) - } - // Reset traceback. mp.cgoCallers[0] = 0 |