<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/153940>153940</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libcxx] `libcxx/gdb/gdb_pretty_printer_test.sh.cpp` failure
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mgorny
</td>
</tr>
</table>
<pre>
On top of 1d73b2c10d3bb1a2caf91f44847b9759ed252b21, I'm seeing the following test failure:
```
AIL: llvm-libc++-shared.cfg.in :: libcxx/gdb/gdb_pretty_printer_test.sh.cpp (2053 of 10792)
******************** TEST 'llvm-libc++-shared.cfg.in :: libcxx/gdb/gdb_pretty_printer_test.sh.cpp' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 27
/usr/lib/ccache/bin/i686-pc-linux-gnu-clang++ -pthread --target=i686-pc-linux-gnu /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp -o /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test/libcxx/gdb/Output/gdb_pretty_printer_test.sh.cpp.dir/t.tmp.exe -nostdinc++ -I /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/include/c++/v1 -I /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/include/c++/v1 -I /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wshift-negative-value -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Wno-nullability-completeness -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Wuser-defined-warnings -g -lc++experimental -nostdlib++ -L /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/lib -Wl,-rpath,/var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/lib -lc++ -latomic
# executed command: /usr/lib/ccache/bin/i686-pc-linux-gnu-clang++ -pthread --target=i686-pc-linux-gnu /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp -o /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test/libcxx/gdb/Output/gdb_pretty_printer_test.sh.cpp.dir/t.tmp.exe -nostdinc++ -I /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/include/c++/v1 -I /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/include/c++/v1 -I /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wshift-negative-value -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Wno-nullability-completeness -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Wuser-defined-warnings -g -lc++experimental -nostdlib++ -L /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/lib -Wl,-rpath,/var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/lib -lc++ -latomic
# RUN: at line 29
env LANG=en_US.UTF-8 /usr/bin/gdb -nx -batch -iex "set autoload off" -ex "source /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/../../../utils/gdb/libcxx/printers.py" -ex "python register_libcxx_printer_loader()" -ex "source /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py" /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test/libcxx/gdb/Output/gdb_pretty_printer_test.sh.cpp.dir/t.tmp.exe
# executed command: env LANG=en_US.UTF-8 /usr/bin/gdb -nx -batch -iex 'set autoload off' -ex 'source /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/../../../utils/gdb/libcxx/printers.py' -ex 'python register_libcxx_printer_loader()' -ex 'source /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py' /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/runtimes_build-abi_x86_32.x86/libcxx/test/libcxx/gdb/Output/gdb_pretty_printer_test.sh.cpp.dir/t.tmp.exe
# .---command stdout------------
# | Breakpoint 1 at 0x23f9: file /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp, line 80.
# | Loading libc++ pretty-printers.
# | [Thread debugging using libthread_db enabled]
# | Using host libthread_db library "/usr/lib64/libthread_db.so.1".
[...]
# | FAIL: /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:686
# | GDB printed:
# | '[{"key": 1, "value": "one"}, {"key": 2, "value": "two"}, {"key": 3, "value": "three"}]'
# | Value should match:
# | '[{"key": 3, "value": "three"}, {"key": 2, "value": "two"}, {"key": 1, "value": "one"}]'
# | PASS: /var/tmp/portage/llvm-runtimes/libcxx-22.0.0.9999/work/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:690
# | [Inferior 1 (process 8949) exited normally]
# | FAILED 1 cases
# `-----------------------------
# .---command stderr------------
# | No symbol table is loaded. Use the "file" command.
# | warning: opening /proc/self/mem file failed: Permission denied (13)
# | warning: opening /proc/PID/mem file for lwp 8949.8949 failed: Permission denied (13)
# `-----------------------------
# error: command failed with exit status: 1
--
********************
```
FWICS that test is printing `std::unordered_map`, so should it really be relying on any particular ordering? CC @AngryLoki
This is Gentoo amd64; gdb 16.3, Python 3.14.0rc2 (presumably).
Full log: [llvm-runtimes:libcxx-22.0.0.9999:20250816-082039.log.gz](https://github.com/user-attachments/files/21811062/llvm-runtimes.libcxx-22.0.0.9999.20250816-082039.log.gz)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsWm9zmzwS_zTKG40YEMY2L_wC_-uTmTTNNOnl7pVHoAV0FRIjicR-Pv2NAKdO-qRNr51r7i4Zjwlod7X729XuCpl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