diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index aeb26b84..d57e5166 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -49,6 +49,8 @@ FMT_BEGIN_NAMESPACE namespace detail { FMT_FUNC void assert_fail(const char* file, int line, const char* message) { + // Use unchecked std::fprintf to avoid triggering another assertion when + // writing to stderr fails std::fprintf(stderr, "%s:%d: assertion failed: %s", file, line, message); // Chosen instead of std::abort to satisfy Clang in CUDA mode during device // code pass.