From 6273c7324fa671f8e8e43c0113e842d2ab5fe8b9 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Mon, 15 Oct 2012 13:54:31 +0400 Subject: [PATCH] runtime: add missing if(raceenabled) R=0xe2.0x9a.0x9b, minux.ma, iant, dave CC=golang-dev https://golang.org/cl/6654052 --- src/pkg/runtime/malloc.goc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.48.1