diff options
author | Ciaran Woodward <ciaranwoodward@xmos.com> | 2024-06-10 16:52:37 +0100 |
---|---|---|
committer | Ciaran Woodward <ciaranwoodward@xmos.com> | 2024-06-11 11:28:51 +0100 |
commit | bb2981798f54e6eb30e46fb11cda2ca49561ffd3 (patch) | |
tree | f163508b03b410e64420c18e52adbc9a980b1bc9 /binutils/testsuite | |
parent | 60e221e9b7fae5ff40b79b93bdbff909989c2bae (diff) | |
download | binutils-bb2981798f54e6eb30e46fb11cda2ca49561ffd3.zip binutils-bb2981798f54e6eb30e46fb11cda2ca49561ffd3.tar.gz binutils-bb2981798f54e6eb30e46fb11cda2ca49561ffd3.tar.bz2 |
Fix printing strings on macOS Sonoma
On macOS sonoma, printing a string would only print the first
character. For instance, if there was a 'const char *s = "foobar"',
then the 'print s' command would print '$1 = "f"' rather than the
expected '$1 = "foobar"'.
It seems that this is due to Apple silently replacing the version
of libiconv they ship with the OS to one which silently fails to
handle the 'outbytesleft' parameter correctly when using 'wchar_t'
as a target encoding.
This specifically causes issues when using iterating through a
string as wchar_iterator does.
This bug is visible even if you build for an old version of macOS,
but then run on Sonoma. Therefore this fix in the code applies
generally to macOS, and not specific to building on Sonoma. Building
for an older version and expecting forwards compatibility is a
common situation on macOS.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31853
Diffstat (limited to 'binutils/testsuite')
0 files changed, 0 insertions, 0 deletions