GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
libstdc++

libstdc++: Reduce iterations in PSTL test for Debug Mode to avoid timeouts.

The number of iterations in a libstdc++ test for the Parallel STL (PSTL) is reduced when Debug Mode is enabled to prevent timeouts.

A libstdc++ test for the Parallel STL (PSTL) was timing out, especially on multi-core machines when running in Debug Mode. The test’s excessive thread creation combined with slower execution in Debug Mode was overloading the system. To address this, the number of iterations performed by the test has been reduced when Debug Mode is active, preventing timeouts.

In Details

This commit addresses timeouts in testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc. The issue arises due to excessive thread creation by TBB when std::hardware_concurrency() returns a large number, combined with the slowdown of Debug Mode. Reducing iterations in Debug Mode resolves the timeouts.

For Context

This commit fixes a problem in the C++ standard library's test suite. The test suite includes tests for the Parallel STL, which provides parallel implementations of common algorithms. One of these tests was timing out, especially when the library was compiled in Debug Mode (which adds extra checks and slows down execution). To fix this, the test now performs fewer iterations when running in Debug Mode.

Filed Under: libstdc++testsuitePSTLdebugging