From: Dmitriy Vyukov Date: Mon, 15 Oct 2012 09:54:31 +0000 (+0400) Subject: runtime: add missing if(raceenabled) X-Git-Tag: go1.1rc2~2130 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6273c7324fa671f8e8e43c0113e842d2ab5fe8b9;p=gostls13.git runtime: add missing if(raceenabled) R=0xe2.0x9a.0x9b, minux.ma, iant, dave CC=golang-dev https://golang.org/cl/6654052 --- diff --git a/src/pkg/runtime/malloc.goc b/src/pkg/runtime/malloc.goc index 92bc4aa234..9b74b1040e 100644 --- a/src/pkg/runtime/malloc.goc +++ b/src/pkg/runtime/malloc.goc @@ -693,7 +693,8 @@ runtime·new(Type *typ, uint8 *ret) { uint32 flag; - m->racepc = runtime·getcallerpc(&typ); + if(raceenabled) + m->racepc = runtime·getcallerpc(&typ); flag = typ->kind&KindNoPointers ? FlagNoPointers : 0; ret = runtime·mallocgc(typ->size, flag, 1, 1);