Build fix: missing error_get_str on non-glibc builds
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 18 Apr 2023 15:29:21 +0000 (11:29 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Apr 2023 15:43:51 +0000 (11:43 -0400)
commit2441eac381265b25aac9eb2cf4e4e793a3ffab5a
treeccfa5fabe857d03f6af0c775e8f47cc35e9a87b1
parent78ac4667aa7e7d4b5b73d6a0c20d00eb476ef092
Build fix: missing error_get_str on non-glibc builds

The function declaration was erroneously moved inside this ifdef. This
breaks non glibc builds.

Introduced in :

  commit 003f455dab0204dd3f066ecdbea0470035f8181f
  Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  Date:   Thu Apr 13 14:31:33 2023 -0400

    Fix: logging: unhandled error in *_FMT macros

    Coverity reports:

    1508779 Uncaught exception
    If the exception is ever thrown, the program will crash.

    In lttng::​sessiond::​rotation_thread::​_thread_function(): A C++ exception
    is thrown but never caught (CWE-248)

    The *_FMT macros, which use fmtlib, don't handle the case where
    fmt::format throws. This can happen, in particular, when an invalid
    format string is used.

    The macros are modified to log the exception and abort.

Change-Id: I5eb3b2a673e224f3c99cae7faece31175084db9d
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/error.hpp
This page took 0.024627 seconds and 4 git commands to generate.