1
0
mirror of https://github.com/golang/go synced 2024-11-26 00:57:56 -07:00

runtime: add missing if(raceenabled)

R=0xe2.0x9a.0x9b, minux.ma, iant, dave
CC=golang-dev
https://golang.org/cl/6654052
This commit is contained in:
Dmitriy Vyukov 2012-10-15 13:54:31 +04:00
parent 1f31598e86
commit 6273c7324f

View File

@ -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);