aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cgocheck.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/cgocheck.go')
-rw-r--r--src/runtime/cgocheck.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/cgocheck.go b/src/runtime/cgocheck.go
index 74a2ec09bc..6b492093ea 100644
--- a/src/runtime/cgocheck.go
+++ b/src/runtime/cgocheck.go
@@ -32,14 +32,14 @@ func cgoCheckWriteBarrier(dst *uintptr, src uintptr) {
// If we are running on the system stack then dst might be an
// address on the stack, which is OK.
- g := getg()
- if g == g.m.g0 || g == g.m.gsignal {
+ gp := getg()
+ if gp == gp.m.g0 || gp == gp.m.gsignal {
return
}
// Allocating memory can write to various mfixalloc structs
// that look like they are non-Go memory.
- if g.m.mallocing != 0 {
+ if gp.m.mallocing != 0 {
return
}