Fields

hardware None
os None

Parameters

Fields

NameValue

Parameters

NameValue
git_commit commit ab60910e01eaa8bcf993cdb59a95f882b3859fd1
Author: A. Jiang <de34@live.cn>
Date: Tue May 13 04:49:25 2025 +0800

[libc++][format] Discard contents since null-terminator in character arrays in formatting (#116571)

Currently, built-in `char`/`wchar_t` arrays are assumed to be
null-terminated sequence with the terminator being the last element in
formatting. This doesn't conform to [format.arg]/6.9.

> otherwise, if `decay_t<TD>` is `char_type*` or `const char_type*`,
> initializes value with `static_cast<const char_type*>(v)`;

The standard wording specifies that character arrays are decayed to
pointers. When the null terminator is not the last element or there's no
null terminator (the latter case is UB), libc++ currently produces
different results.

Also fixes and hardens `formatter<CharT[N], CharT>::format` in
`<__format/formatter_string.h>`. These specializations are rarely used.

Fixes #115935. Also checks the preconditions in this case, which fixes
#116570.
Filter

ldionne-old-macbook-results test results

Run Order Start Time Duration
Current 537247 2025-12-16T16:40:01 0:00:00
Previous 537247 2025-12-16T16:40:01 0:00:00
Baseline 485288 2025-12-16T16:40:01 0:00:00


Tests Summary

Status Group # # (B)
Added Tests 0 17
Unchanged Tests 85 68
Total Tests 85

Added Tests - execution_time
706_stockfish_r
707_ntest_r
709_cactus_r
710_omnetpp_r
721_gcc_r
723_llvm_r
727_cppcheck_r
729_abc_r
731_astcenc_r
734_vpr_r
736_ocio_r
737_gmsh_r
748_flightdm_r
750_sealcrypto_r
753_ns3_r
766_femflow_r
767_nest_r


Report Time: 0.08s