Commit f59a6056 authored by Rémy Oudompheng's avatar Rémy Oudompheng

runtime: use runtime·callers when racefuncenter's pc is on the heap.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6821069
parent e08008e8
......@@ -89,7 +89,10 @@ runtime·racefuncenter(uintptr pc)
{
// If the caller PC is lessstack, use slower runtime·callers
// to walk across the stack split to find the real caller.
if(pc == (uintptr)runtime·lessstack)
// Same thing if the PC is on the heap, which should be a
// closure trampoline.
if(pc == (uintptr)runtime·lessstack ||
(pc >= (uintptr)runtime·mheap.arena_start && pc < (uintptr)runtime·mheap.arena_used))
runtime·callers(2, &pc, 1);
m->racecall = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment