mirror of
https://github.com/golang/go
synced 2024-11-26 07:57:57 -07:00
runtime: fix race detector handling of stackalloc()
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6632051
This commit is contained in:
parent
f04ae1373e
commit
27e93fbd00
@ -92,8 +92,11 @@ runtime·racefuncexit(void)
|
||||
void
|
||||
runtime·racemalloc(void *p, uintptr sz, void *pc)
|
||||
{
|
||||
// use m->curg because runtime·stackalloc() is called from g0
|
||||
if(m->curg == nil)
|
||||
return;
|
||||
m->racecall = true;
|
||||
runtime∕race·Malloc(g->goid-1, p, sz, pc);
|
||||
runtime∕race·Malloc(m->curg->goid-1, p, sz, pc);
|
||||
m->racecall = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user