- Package:
- src:taskflow
- Source:
- src:taskflow
- Submitter:
- Emanuele Rocca
- Date:
- 2026-08-04 19:57:02 UTC
- Severity:
- normal
- Tags:
Hi, taskflow fails to build in a test rebuild on at least amd64 and arm64 with gcc-16/g++-16, but builds properly with gcc-15/g++-15. The severity of this report will be raised before the forky release. The full build log can be found at: https://people.debian.org/~ema/gcc-16-rebuilds/output-1/taskflow_arm64.build.xz The last lines of the build log are at the end of this report. To build with GCC 16, either set CC=gcc-16 CXX=g++-16 explicitly, or install the gcc, g++, gfortran, ... packages from experimental. apt-get -t=experimental install g++ Common build failures include unused (but set) variables, array subscripts partly outside array bounds, and new/dropped symbols in Debian symbols files. For other C/C++ related build failures see the porting guide at http://gcc.gnu.org/gcc-16/porting_to.html Please only close this issue after double-checking that the package can be built correctly with GCC 16. Please do not reassign this bug to another package. If a fix in another package is required, then file a bug for the other package (or clone), and mark this bug as blocked by the bug in the other package. [...] [doctest] test cases: 1 | 0 passed | 1 failed | 83 skipped [doctest] assertions: 3 | 2 passed | 1 failed | [doctest] Status: FAILURE! Start 954: InclusiveScan.string.4threads 4/6 Test #954: InclusiveScan.string.4threads ....***Failed 0.00 sec [doctest] doctest version is "2.4.12" [doctest] run with "--help" for options =============================================================================== ./unittests/test_scan.cpp:129: TEST CASE: InclusiveScan.string.4threads ./unittests/test_scan.cpp:61: FATAL ERROR: REQUIRE( input == golden ) is NOT correct! values: REQUIRE( {?} == {?} ) =============================================================================== [doctest] test cases: 1 | 0 passed | 1 failed | 83 skipped [doctest] assertions: 3 | 2 passed | 1 failed | [doctest] Status: FAILURE! Start 955: InclusiveScan.string.8threads 5/6 Test #955: InclusiveScan.string.8threads ....***Failed 0.01 sec [doctest] doctest version is "2.4.12" [doctest] run with "--help" for options =============================================================================== ./unittests/test_scan.cpp:133: TEST CASE: InclusiveScan.string.8threads ./unittests/test_scan.cpp:61: FATAL ERROR: REQUIRE( input == golden ) is NOT correct! values: REQUIRE( {?} == {?} ) =============================================================================== [doctest] test cases: 1 | 0 passed | 1 failed | 83 skipped [doctest] assertions: 3 | 2 passed | 1 failed | [doctest] Status: FAILURE! Start 956: InclusiveScan.string.12threads 6/6 Test #956: InclusiveScan.string.12threads ...***Failed 0.01 sec [doctest] doctest version is "2.4.12" [doctest] run with "--help" for options =============================================================================== ./unittests/test_scan.cpp:137: TEST CASE: InclusiveScan.string.12threads ./unittests/test_scan.cpp:61: FATAL ERROR: REQUIRE( input == golden ) is NOT correct! values: REQUIRE( {?} == {?} ) =============================================================================== [doctest] test cases: 1 | 0 passed | 1 failed | 83 skipped [doctest] assertions: 3 | 2 passed | 1 failed | [doctest] Status: FAILURE! 0% tests passed, 6 tests failed out of 6 Total Test time (real) = 0.07 sec The following tests FAILED: 951 - InclusiveScan.string.1thread (Failed) 952 - InclusiveScan.string.2threads (Failed) 953 - InclusiveScan.string.3threads (Failed) 954 - InclusiveScan.string.4threads (Failed) 955 - InclusiveScan.string.8threads (Failed) 956 - InclusiveScan.string.12threads (Failed) Errors while running CTest make[2]: *** [Makefile:74: test] Error 8 make[2]: Leaving directory '/build/reproducible-path/taskflow-3.9.0+ds/buildtest' make[1]: *** [debian/rules:67: override_dh_auto_test-arch] Error 2 make[1]: Leaving directory '/build/reproducible-path/taskflow-3.9.0+ds' make: *** [debian/rules:15: binary] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
Hi Emanuele,
packages and I saw no one has replied so thought I'd take a look.
I've tracked this down and it isn't a bug in taskflow; it appears to be a
regression in libstdc++ 16.
Now I am no compiler expert so please take what I say with a pinch of salt.
The no-init overload std::inclusive_scan(first, last, result, binary_op)
initialises its accumulator by moving out of the first element of the
input range:
auto __init = _GLIBCXX_ITER_MOVE(__first); // was: auto __init = *__first;
That happens unconditionally, so a plain out-of-place scan silently destroys
the caller's input. For a value type with a destructive move (e.g. std::string)
the first element is left empty.
A reduced testcase, which fails with g++ 16 and passes with g++ 15 in both
-std=c++17 and -std=c++20:
#include <numeric>
#include <string>
#include <vector>
#include <functional>
#include <cassert>
int main()
{
std::vector<std::string> in{"a", "b"}, out(2);
std::inclusive_scan(in.begin(), in.end(), out.begin(),
std::plus<std::string>{});
assert(out[1] == "ab"); // ok
assert(in[0] == "a"); // fails: in[0] is an empty moved-from string
}
Passing in.cbegin()/in.cend() instead leaves the input intact, so the
behaviour depends on the constness of the iterators handed in which is a
good sign it wasn't intended.
I believe it's non-conforming: [inclusive.scan]/6 specifies the effects
purely as assignments through result + K, and /9 permits result == first as
an aliasing allowance rather than as licence to modify the input when
result != first.
The move came in with gcc commit df1d436 ("libstdc++: Fix <numeric>
parallel algos for move-only values [PR117905]"), which relaxed the
requirement on the value type from CopyConstructible to MoveConstructible;
gcc 15 is unaffected. I've reported it upstream as GCC Bug 126604:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126604
Gentoo hit the same six failures with taskflow 3.10.0
(https://bugs.gentoo.org/961562) so updating to a newer upstream release won't
help.
This explains the failure set exactly: only the six InclusiveScan.string.*
cases fail, because the overloads taking an init value never touch the
input and the TransformInclusiveScan tests are int-only (a moved-from int
keeps its value). The test itself is correct: it computes its golden vector
with a perfectly ordinary out-of-place std::inclusive_scan and that call alone
is enough to corrupt the input, so no change to the test source can make it
pass legitimately while linked against libstdc++ 16.
So my plan to resolve this bug is to skip those six tests in debian/rules, via
ctest -E 'InclusiveScan\.string\.', with a comment pointing to the GCC bug,
and to file a separate Debian bug against taskflow to track enabling those tests
once libstdc++ 16 is fixed.
I guess I need to open a separate Debian bug on gcc-16 where I can link to
the upstream GCC bug report.
What do you think?
Cheers!
Christopher Obbard
debian-gcc@lists.debian.org was listed as recipient. Members of debian-gcc@lists.debian.org: Please read on below. Best, Sven
We believe that the bug you reported is fixed in the latest version of
taskflow, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1133642@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Anton Gladky <gladk@debian.org> (supplier of updated taskflow package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 04 Aug 2026 20:28:37 +0200
Source: taskflow
Architecture: source
Version: 3.9.0+ds-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Anton Gladky <gladk@debian.org>
Closes: 1133642
Changes:
taskflow (3.9.0+ds-2) unstable; urgency=medium
.
* Team upload.
* [7721360] Add basic salsa-ci-yml
* [370a211] Fix debian/copyright license mismatches found by licenserecon
* [6610798] Fix data corruption in InclusiveScan with gcc-16/libstdc++-16.
(Closes: #1133642)
* [6aa691a] Make Doxygen search index generation reproducible
Checksums-Sha1:
1a3ebac0757253208359927e68f1502f7bd30f5c 3687 taskflow_3.9.0+ds-2.dsc
0e67e6e4920698d4d8b61557e513b3dcda8a463a 12024 taskflow_3.9.0+ds-2.debian.tar.xz
c63105c9b2e05047d6a88f96b3b5d593db1eda22 27316968 taskflow_3.9.0+ds-2.git.tar.xz
48e9785e175158530193bacb34b3ff71443005a6 17568 taskflow_3.9.0+ds-2_source.buildinfo
Checksums-Sha256:
859359ef11434acb2ab9ef8d7a680787f892c0ade35a88f498acf5b3041f44ae 3687 taskflow_3.9.0+ds-2.dsc
7180ac0f74dac12ac6c288d7ed30d5f265fc00f85cbe3491980fb9ed4737ad34 12024 taskflow_3.9.0+ds-2.debian.tar.xz
e6a2d478b2c0723d571e577521fccac7d125ab4224b7603f47f857eadcbc1017 27316968 taskflow_3.9.0+ds-2.git.tar.xz
4c7237122575c325907882b0cbf1c811fdb15d0088efcc877c02ff8e37856fa4 17568 taskflow_3.9.0+ds-2_source.buildinfo
Files:
54ed85b89540175c542b2828bba02c54 3687 libs optional taskflow_3.9.0+ds-2.dsc
d02eeb84c2b49a41f8e04ef18aa5d5e7 12024 libs optional taskflow_3.9.0+ds-2.debian.tar.xz
27d861b0afc43aff2b1a11bf3699cbd5 27316968 libs optional taskflow_3.9.0+ds-2.git.tar.xz
dd5c92063c9d985a041a7b518d13b72d 17568 libs optional taskflow_3.9.0+ds-2_source.buildinfo
Git-Tag-Info: tag=9103f1f145ed7f94de4deb119f3f8a1eec68cdaf fp=bbbd45ea818ab86ff67e7285d3e17383cfa7ff06
Git-Tag-Tagger: Anton Gladky <gladk@debian.org>
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmpyPLkACgkQYG0ITkaD
wHnvig/8CSpNpe0WDPZH3z4QK/q28OJr4pu6NeOL6CdoPwDhrbYZJNRaSHNIywv1
t7KmMhTCmjACUJ+EeJOPoASqY+OfH3c/7nF7IpyCky72N7Kbt/py5UnEbyovkx4P
Gvho6omJAlcVD8KBBTfqeNx2fRY6zTN0dmAKh/7/u93uTKaiz8iAKp2u1v0v59U1
mVr8ZCCrm8bwZeF8ay9Y/NhlB51tlN40z1HIYI4RLbyQeQ9JRPKvfN4j4LSc09wW
3CG378NJ/R3CyfqRqrOohQsjHQOYEfsGdJWIQoALseZjeRT5NhoqXvQg885caL3e
fXGLnyV2OnzHDG6SC4fG84MfpzK49j/KY68iUdrwYeq4DA9ksxI78CsJc9kezoih
4CQI2xIiJrmTLuPmNWrKd/qzgYIw8Ijyl4qobb0AvTK2IV07oS2hjXdw1e0E+VV4
BugdmjxD4pcNM3H7dWQIQC3VAnLmR/Thuzn/Yh+5r+C3dqOhBUXwaBFjYFmXKloR
W4qDKhkT93bsaD5yxrCfHXcqgRMaG5aoXNnm1PU4MaiGUM5vCRvGi7ETavNKNL2z
6DRNGi4SQCB8mveqWC/c2CtErb5+jiLayCU39sj333sD0IXF5jsqDmIaLx9Y0mN1
//Eh++n8yOxCUPZza4CrIo1j3hMMCwjPZTU+VNobX44olHURNaE=
=BruC
-----END PGP SIGNATURE-----