From bd302502d39b6172bf3db6abfa49fdcaa124ee50 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 14 Jul 2022 17:36:59 -0400 Subject: runtime: convert panicking to atomic type For #53821. Change-Id: I93409f377881a3c029b41b0f1fbcef5e21091f2f Reviewed-on: https://go-review.googlesource.com/c/go/+/419438 Reviewed-by: Austin Clements Run-TryBot: Michael Pratt TryBot-Result: Gopher Robot --- src/runtime/symtab.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/symtab.go') diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go index 4a2d1d90ed..69190233a2 100644 --- a/src/runtime/symtab.go +++ b/src/runtime/symtab.go @@ -902,7 +902,7 @@ func pcvalue(f funcInfo, off uint32, targetpc uintptr, cache *pcvalueCache, stri } if !f.valid() { - if strict && panicking == 0 { + if strict && panicking.Load() == 0 { println("runtime: no module data for", hex(f.entry())) throw("no module data") } @@ -945,7 +945,7 @@ func pcvalue(f funcInfo, off uint32, targetpc uintptr, cache *pcvalueCache, stri // If there was a table, it should have covered all program counters. // If not, something is wrong. - if panicking != 0 || !strict { + if panicking.Load() != 0 || !strict { return -1, 0 } -- cgit v1.3