go-symbols
go-symbols copied to clipboard
Race condition: some symbols not returned
defer func() {
mutex.Lock()
syms = append(syms, v.syms...)
mutex.Unlock()
}()
defer wg.Done()
The wait group is unblocked by the deferred Done(). Since that is deferred after the deferred append of of the result, it is run first, meaning the group is unblocked before the result is ready.