Skip to content

Commit

Permalink
fix: capture var for goroutine
Browse files Browse the repository at this point in the history
Signed-off-by: Zxilly <[email protected]>
  • Loading branch information
Zxilly committed Jul 19, 2024
1 parent 26ae978 commit 1e5436a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/knowninfo/disasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (k *KnownInfo) Disasm() error {
break
}

go func() {
go func(fn *entity.Function) {
defer sem.Release(1)
candidates := e.Extract(fn.Addr, fn.Addr+fn.CodeSize)

Expand All @@ -73,7 +73,7 @@ func (k *KnownInfo) Disasm() error {
fn: fn,
}
})
}()
}(fn)
}

if err = sem.Acquire(resultProcess, int64(maxWorkers)); err != nil {
Expand Down

0 comments on commit 1e5436a

Please sign in to comment.