summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-08-18 18:50:24 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-18 18:52:24 -0700
commitafe7303c3cdcf04c9e4491004b3ef2d229bafc74 (patch)
tree01415445bd2b22383752a96e17a632c9c66a2fe2
parentf6d24904829d71574821cce5515c5777e0837aff (diff)
Add more information to panic when device ID don't match
PiperOrigin-RevId: 327351357
-rw-r--r--pkg/sentry/device/device.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/device/device.go b/pkg/sentry/device/device.go
index f45b2bd2b..6ca9dc79f 100644
--- a/pkg/sentry/device/device.go
+++ b/pkg/sentry/device/device.go
@@ -256,7 +256,7 @@ func (m *MultiDevice) Load(key MultiDeviceKey, value uint64) bool {
}
if k, exists := m.rcache[value]; exists && k != key {
// Should never happen.
- panic("MultiDevice's caches are inconsistent")
+ panic(fmt.Sprintf("MultiDevice's caches are inconsistent, current: %+v, previous: %+v", key, k))
}
// Cache value at key.