configure.ac: build with `-DFMT_EXCEPTIONS=0`
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 27 Mar 2024 19:14:24 +0000 (19:14 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 28 Mar 2024 17:52:05 +0000 (13:52 -0400)
commitb80bfc6208b6257ba7b51c6ef3eeece7377e7696
treed58cfa9a784d57e7b8a9b71924409c6ad58729e7
parent385ef9f1227c3cc2aaddf7abdbdc69f89a0272cb
configure.ac: build with `-DFMT_EXCEPTIONS=0`

Coverity flags some functions marked `noexcept` that call `fmt::format`,
since `fmt::format` can throw `fmt::format_error` exceptions.  We're not
interested in handling format errors at runtime, we'd rather just get a
crash and fix it.  Build the entire project (including `libfmt.la`) with
`-DFMT_EXCEPTIONS=0` to make {fmt} crash instead of throw, should a
format error occur.

Tested by introducing a format error somewhere and running to it.  The
result is very pretty:

    $ tests/plugins/flt.utils.muxer/test-clock-compatibility
    1..150
    /home/smarchi/src/babeltrace/src/cpp-common/vendor/fmt/format-inl.h:40: assertion failed: invalid format stringterminate called without an active exception
    [1]    1189949 IOT instruction  tests/plugins/flt.utils.muxer/test-clock-compatibility

Change-Id: Ibcb0104a6bf644b025112d0b35e4fbe622c20be9
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12194
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
configure.ac
This page took 0.024225 seconds and 4 git commands to generate.