diff options
| author | Russ Cox <rsc@golang.org> | 2010-01-12 10:03:02 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-01-12 10:03:02 -0800 |
| commit | dd59eab8850ac380a2e85cb0d1613c6b7eecce54 (patch) | |
| tree | 762a957e90aaf79de9c529a3f2018f97573d1a3d /src/pkg/runtime/malloc.cgo | |
| parent | 71156986095f0bebbc900f0eaf0a1da3724579e6 (diff) | |
| download | golang-dd59eab8850ac380a2e85cb0d1613c6b7eecce54.tar.gz | |
runtime: fix bug in preemption checks; was causing "lock count" panics
R=r
CC=golang-dev
http://codereview.appspot.com/186078
Diffstat (limited to 'src/pkg/runtime/malloc.cgo')
| -rw-r--r-- | src/pkg/runtime/malloc.cgo | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/malloc.cgo b/src/pkg/runtime/malloc.cgo index 948257973..a85c39d83 100644 --- a/src/pkg/runtime/malloc.cgo +++ b/src/pkg/runtime/malloc.cgo @@ -27,7 +27,7 @@ mallocgc(uintptr size, uint32 refflag, int32 dogc) void *v; uint32 *ref; - if(gcwaiting && g != m->g0) + if(gcwaiting && g != m->g0 && m->locks == 0) gosched(); if(m->mallocing) throw("malloc/free - deadlock"); |
