Regression (segfault) with std::print and __int128 using libstdc++6 17.0.0+20260802-0.1
kikairoya
kikairoya@gmail.com
Sat Oct 3 03:46:33 GMT 2026
Hi Achim,
2026年9月27日 17:30:35 (+09:00) で、ASSI via Cygwin さんが書きました:
> kikairoya via Cygwin writes:
> > GCC 17 changed the x86_64 Windows ABI used for returning __int128 and
> > __uint128 values. Previously, GCC and Clang both returned such values
> > via %xmm0. GCC now returns them indirectly instead.
> >
> > https://github.com/gcc-mirror/gcc/commit/e63a873f1df7493b8b657acafb451bf40166044e
>
> I don't see any activity on getting this backported to earlier GCC
> versions… I think it's so clearly a bug that if practically possible it
> should be backported. Which gets me back to the earlier question of how
> to detect libraries that have this defect in order to get them rebuilt.
I found that the breakage in the original report is due to libgcc's
int128 support routines (e.g., __divti3), not libstdc++ itself.
Therefore, any binaries that import these routines from
cyggcc_s-seh-1.dll will be affected.
I also searched through the *-devel packages and found that only
postgresql-devel and libc++-devel appear to expose functions that
return a __{u,}int128 value (assuming I grepped correctly).
Since I think few packages rely on those two, I believe we can focus on
how to mitigate the libgcc's ABI change.
One way to minimize the rebuild storm might be to provide
cyggcc_s-seh-2.dll additively (i.e., a new libgcc2 package).
However, I'm not sure how to share the emutls state between
cyggcc_s-seh-{1,2}.dll.
Thanks,
--
Tomohiro Kashiwada (@kikairoya)
More information about the Cygwin
mailing list