From: Sung-hun Kim Date: Wed, 22 Jan 2025 05:35:58 +0000 (+0900) Subject: livedumper: Catch an uncatched exception X-Git-Tag: accepted/tizen/unified/20250124.105414^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e09b463d8adec57a18e7c27ec716a30aab30a55f;p=platform%2Fcore%2Fsystem%2Fcrash-worker.git livedumper: Catch an uncatched exception Class Guardian can raise std::bad_function_call exception if wrong functions provided. In this case, the caller should catch the exception (coverity issue number: 1836347). Change-Id: Ia5ed46fb3d44ff40149a5dc719814b147b405972 Signed-off-by: Sung-hun Kim --- diff --git a/src/livedumper/livedumper.hpp b/src/livedumper/livedumper.hpp index abda9e36..a5909596 100644 --- a/src/livedumper/livedumper.hpp +++ b/src/livedumper/livedumper.hpp @@ -227,6 +227,9 @@ class LiveDumper { m_core.SaveStacks(mem_fd, m_core_file, m_tpids, m_registers); } close(mem_fd); + } catch (std::bad_function_call &e) { + logger.log_error("DumpCore: %s", e.what()); + result = false; } catch (std::system_error &e) { logger.log_error("DumpCore: %s", e.what()); result = false;