mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix nogo analysis.
Ignore calls to atomic functions in case there is no analysis information. It is unclear why this has broken in some cases, perhaps these functions have been replaced by intrinsics as an optimization? PiperOrigin-RevId: 374682441
This commit is contained in:
committed by
gVisor bot
parent
52394c34af
commit
2f3eda37a4
@@ -709,8 +709,13 @@ func run(pass *analysis.Pass, localEscapes bool) (interface{}, error) {
|
||||
return
|
||||
}
|
||||
|
||||
// Recursively collect information from
|
||||
// the other analyzers.
|
||||
// If this package is the atomic package, the implementation
|
||||
// may be replaced by instrinsics that don't have analysis.
|
||||
if x.Pkg.Pkg.Path() == "sync/atomic" {
|
||||
return
|
||||
}
|
||||
|
||||
// Recursively collect information.
|
||||
var imp packageEscapeFacts
|
||||
if !pass.ImportPackageFact(x.Pkg.Pkg, &imp) {
|
||||
// Unable to import the dependency; we must
|
||||
|
||||
Reference in New Issue
Block a user