From f866f37cdc772a668901d9c59e3d3cef23a1e5f0 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 29 Jul 2020 18:02:05 -0700 Subject: [PATCH] kern: panic on failure-to-open auto object in debug config --- .../libmesosphere/include/mesosphere/kern_k_auto_object.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object.hpp index a9c4239fe..e0000ad53 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object.hpp @@ -127,6 +127,7 @@ namespace ams::kern { u32 cur_ref_count = this->ref_count.load(std::memory_order_acquire); do { if (AMS_UNLIKELY(cur_ref_count == 0)) { + MESOSPHERE_AUDIT(cur_ref_count != 0); return false; } MESOSPHERE_ABORT_UNLESS(cur_ref_count < cur_ref_count + 1);