go/pointer: disable analysis of runtime package
It has few interesting effects on aliasing and it contains a lot of unsafe code that we can't analyze. Change-Id: I66d3592ea7797802c6be36eb30fd17e2ee307e50 Reviewed-on: https://go-review.googlesource.com/21260 Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
681404b4b2
commit
0d7417cc02
|
@ -108,32 +108,8 @@ func init() {
|
||||||
"net.runtime_pollWait": ext۰NoEffect,
|
"net.runtime_pollWait": ext۰NoEffect,
|
||||||
"net.runtime_pollWaitCanceled": ext۰NoEffect,
|
"net.runtime_pollWaitCanceled": ext۰NoEffect,
|
||||||
"os.epipecheck": ext۰NoEffect,
|
"os.epipecheck": ext۰NoEffect,
|
||||||
"runtime.BlockProfile": ext۰NoEffect,
|
// All other runtime functions are treated as NoEffect.
|
||||||
"runtime.Breakpoint": ext۰NoEffect,
|
|
||||||
"runtime.CPUProfile": ext۰NoEffect, // good enough
|
|
||||||
"runtime.Caller": ext۰NoEffect,
|
|
||||||
"runtime.Callers": ext۰NoEffect, // good enough
|
|
||||||
"runtime.FuncForPC": ext۰NoEffect,
|
|
||||||
"runtime.GC": ext۰NoEffect,
|
|
||||||
"runtime.GOMAXPROCS": ext۰NoEffect,
|
|
||||||
"runtime.Goexit": ext۰NoEffect,
|
|
||||||
"runtime.GoroutineProfile": ext۰NoEffect,
|
|
||||||
"runtime.Gosched": ext۰NoEffect,
|
|
||||||
"runtime.MemProfile": ext۰NoEffect,
|
|
||||||
"runtime.NumCPU": ext۰NoEffect,
|
|
||||||
"runtime.NumGoroutine": ext۰NoEffect,
|
|
||||||
"runtime.ReadMemStats": ext۰NoEffect,
|
|
||||||
"runtime.SetBlockProfileRate": ext۰NoEffect,
|
|
||||||
"runtime.SetCPUProfileRate": ext۰NoEffect,
|
|
||||||
"runtime.SetFinalizer": ext۰runtime۰SetFinalizer,
|
"runtime.SetFinalizer": ext۰runtime۰SetFinalizer,
|
||||||
"runtime.Stack": ext۰NoEffect,
|
|
||||||
"runtime.ThreadCreateProfile": ext۰NoEffect,
|
|
||||||
"runtime.cstringToGo": ext۰NoEffect,
|
|
||||||
"runtime.funcentry_go": ext۰NoEffect,
|
|
||||||
"runtime.funcline_go": ext۰NoEffect,
|
|
||||||
"runtime.funcname_go": ext۰NoEffect,
|
|
||||||
"runtime.getgoroot": ext۰NoEffect,
|
|
||||||
"runtime/pprof.runtime_cyclesPerSecond": ext۰NoEffect,
|
|
||||||
"strings.IndexByte": ext۰NoEffect,
|
"strings.IndexByte": ext۰NoEffect,
|
||||||
"sync.runtime_Semacquire": ext۰NoEffect,
|
"sync.runtime_Semacquire": ext۰NoEffect,
|
||||||
"sync.runtime_Semrelease": ext۰NoEffect,
|
"sync.runtime_Semrelease": ext۰NoEffect,
|
||||||
|
@ -200,6 +176,11 @@ func (a *analysis) findIntrinsic(fn *ssa.Function) intrinsic {
|
||||||
// Ensure all "reflect" code is treated intrinsically.
|
// Ensure all "reflect" code is treated intrinsically.
|
||||||
impl = ext۰NotYetImplemented
|
impl = ext۰NotYetImplemented
|
||||||
}
|
}
|
||||||
|
} else if impl == nil && fn.Pkg != nil && fn.Pkg.Pkg.Path() == "runtime" {
|
||||||
|
// Ignore "runtime" (except SetFinalizer):
|
||||||
|
// it has few interesting effects on aliasing
|
||||||
|
// and is full of unsafe code we can't analyze.
|
||||||
|
impl = ext۰NoEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
a.intrinsics[fn] = impl
|
a.intrinsics[fn] = impl
|
||||||
|
|
Loading…
Reference in New Issue