Fields

hardware None
os None

Parameters

Fields

NameValue

Parameters

NameValue
git_commit commit 479f9922912e3385655f0ca6e6238aaf09e6320d
Author: A. Jiang <de34@live.cn>
Date: Thu Jun 5 07:23:49 2025 +0800

[libc++] Fix `basic_string::shrink_to_fit` for constant evaluation (#142712)

Currently, when the string shrink into the SSO buffer, the `__rep_.__s`
member isn't activated before the `traits_type::copy` call
yet, so internal `__builtin_memmove` call writing to the buffer causes
constant evaluation failure. The existing test coverage seems a bit
defective and doesn't cover this case - `shrink_to_fit` is called on the
copy of string after erasure, not the original string object.

This PR reorders the `__set_short_size` call, which starts the lifetime
of the SSO buffer, before the copy operation. Test coverage is achieved
by calling `shrink_to_fit` on the original erased string.
Filter

ldionne-old-macbook-results test results

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


Tests Summary

Status Group # # (B)
Performance Regressions 1 0
Added Tests 1 18
Unchanged Tests 88 72
Total Tests 90

Performance Regressions - execution_time Δ Previous Current σ Δ (B) σ (B)
748_flightdm_r 1.49% 8.829 8.961 0.011 0.00% 0.011

Added Tests - execution_time
735_gem5_r

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
735_gem5_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.14s