diff options
author | Ian Gudger <igudger@google.com> | 2019-06-28 20:06:33 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-28 20:07:52 -0700 |
commit | 45566fa4e4bc55e870ae1d7f80778be8432bdef5 (patch) | |
tree | 9b9064ef22a6f34ade4714cc90ad0573440c3e1c /runsc/boot/loader.go | |
parent | 7dae043fecc109d7a0ae1d5d6274e48b1bf04d13 (diff) |
Add finalizer on AtomicRefCount to check for leaks.
PiperOrigin-RevId: 255711454
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r-- | runsc/boot/loader.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 41027416d..89f7d9f94 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -32,6 +32,7 @@ import ( "gvisor.dev/gvisor/pkg/log" "gvisor.dev/gvisor/pkg/memutil" "gvisor.dev/gvisor/pkg/rand" + "gvisor.dev/gvisor/pkg/refs" "gvisor.dev/gvisor/pkg/sentry/arch" "gvisor.dev/gvisor/pkg/sentry/control" "gvisor.dev/gvisor/pkg/sentry/fs/host" @@ -1006,3 +1007,8 @@ func (l *Loader) threadGroupFromIDLocked(key execID) (*kernel.ThreadGroup, *host } return ep.tg, ep.tty, nil } + +func init() { + // TODO(gvisor.dev/issue/365): Make this configurable. + refs.SetLeakMode(refs.NoLeakChecking) +} |