diff --git a/GetRuntimeAddresses/symbolyze/gdb_test.go b/GetRuntimeAddresses/symbolyze/gdb_test.go index 0f2a1cf..720403f 100644 --- a/GetRuntimeAddresses/symbolyze/gdb_test.go +++ b/GetRuntimeAddresses/symbolyze/gdb_test.go @@ -7,6 +7,7 @@ import ( "os/exec" "regexp" "strconv" + "sync" "testing" ) @@ -35,9 +36,12 @@ func TestSimpleGDB(t *testing.T) { } scanner := NewScanner("_PyRuntime", "*python3*") + var m sync.Mutex scanner.OnFound(func(pid int, offset uint64) error { t.Logf("scanner setting pid %d to offset %x", pid, offset) + m.Lock() ourResults[pid] = offset + m.Unlock() return nil })