From cf38ac1c6c32b4c514bb56fc70073788835f3766 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Tue, 18 Aug 2020 18:50:24 -0700 Subject: Add more information to panic when device ID don't match PiperOrigin-RevId: 327351357 --- pkg/sentry/device/device.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') 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. -- cgit v1.2.3