delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/08/24/08:10:40

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 67OCAeQ81560905
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 67OCAeQ81560905
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=htCEOlAx
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 716DF4BA2E25
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1787573438;
bh=VaQM8yM13XvdDtKr0HdIdoVsSWknrfZiDeQeYZpwpXo=;
h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=htCEOlAxmfo5LoOD7cHLN/LaU8YBGc0w4J2cyIRRSw7z4Q8Kf48/F0XLm0QUv/Jl1
ACRteWz5XP3CXBZxAMHLmF5fJJjXqyey6RNwZOBikixnejo3h1JOnJr1elOZa+SJjE
34kH4TVKmDZdo+08JUGXIAg2n1pPzykwMLb9jSbw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 83A814BA79BB
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 83A814BA79BB
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787573419; cv=none;
b=Wy8BPg5Iwr1gZ/FQAV6M4S7DiEShoHCZnI6dtboVeSR/yYZwaJSkSEl3WQSzJ7L9EUYno4Nl24xUOHA1S6hpuLwno3iVPT0VLTwEH14bSKum+DnNtDXPuzq720SKbm0SbA6qYGIPXJ0qCJCFFGuN6MO8jqUY3D9TMPJAF90nNtU=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1787573419; c=relaxed/simple;
bh=YYhZBPXMQEvrlo8wE84/Edo5rDIFI2V1fIMkYDwoMxA=;
h=DKIM-Signature:Message-Id:From:To:Subject:Date:MIME-Version;
b=td6sV9U1tS2MSyq0v0K7h8pOsPst8W4DuM9Tyn9kYSJAGvRx61dp5LAg0/mRd3TNtSvAqmUBJjP4wDSjf6Z97l9B+3v3clfxtQIDRgHQvqdNc61ZSPLWtxfyktMuatmBTxZ78jpGpl1pDT9cG0zaTpOT2223vYF3tM+P1UOI7Ek=
ARC-Authentication-Results: i=1; sourceware.org;
dkim=pass (2048-bit key, unprotected)
header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104
header.b=Ou03BtRW
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83A814BA79BB
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1787573418; x=1788178218;
h=mime-version:content-transfer-encoding:user-agent:references
:in-reply-to:date:subject:to:from:message-id:content-type:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=gKL9WgasV7D0r0qaA7jr/40sMydn65t4DqKGl65dL6I=;
b=BRqg9Dyy6oEqW2TkuVRiVFJC4o3d+fxBszWtba8TK3tyctIAwLdX08copGuF1TMAqJ
TO11/iqi3Eyh/0FEuJAZEsaxlMZfn4UaDaz7JL5lrsjqKvX7v6+7zpLd1KgjNTO1G0DG
Z4dBT/YdqzwV9NXluHf/191BeeI4UbyxPnkrZA43w9BS/Ncko/1Y7RljcA2dlNCpzZB/
kIEgIaeu+HN/z+G+HIgHXHFhuv2xOlcsccgPQe6S9URj1UtvdpYV+HZVTqRUo+We+qbJ
rejX6PZnWO5P3slj0ybt6vMLTAXjcHz6rOOv8oyz55YpyEZblGkEqgonpeIFfw5kx6eC
bHTQ==
X-Gm-Message-State: AFuF++lV7i6kN09Y7e94VdG4WYpApKWe7gFBhLiAfqPKMC9KKJvo73Va
H4fJIf1g21tnBK2AWJM9pGxI8HPRojurECe0NvR2Y3/C/t56JMdBPB1Xtp/Itw==
X-Gm-Gg: AR+sD13Cku62fDVkMHJaHvxkcLCTnH7CGY6w4sIwF0UCI7YFtb9LbI2s3VwKRNQL2wT
y99b05c7EoxDpdmyUdflWIBbwA9LmOFGAbOC+xrz7dfPflsiQ6+ysWsCChjyZ3FI9kTcdhOR7dc
9tpV7BGV9gO9shiIJkhb704ip13/iYtlHOHu3QQMP/nQNUFXAkbXOU7qSj7t103ysQJbz+xu+/F
kxUfjzRV9BapA1mKaiYO3lQQj9Ln09zisDQezxrWlKSaoSXrJT7lGaG+QsvzqEgvyzAI58POvZ1
jxaBVxr8HLcNi+Uw0hHBjKJ5zcZhS0ZmfHITIbKmYPOQmwVMl76GiG1gQfEnn3K54m8Ixsm2vtg
wItsvCjJCbtaiDSRKnVjKerdLTlrAK4qNFCRZC7lPDbW9Zp4oTsNHMHrJoTw+pMsYealxGBGADv
iRGDI4Y8zK5Bl03Nx44fhIct+uX1vPf3QbpCalgH6ljrX4QVHdbwOJ/dQXXnCTbc8phJQFcP2OH
A==
X-Received: by 2002:a17:90b:164e:b0:38e:57a3:f218 with SMTP id
98e67ed59e1d1-395c3733afdmr41848289a91.13.1787573418391;
Mon, 24 Aug 2026 05:10:18 -0700 (PDT)
Message-Id: <1787571787960.3115723432.3313826199@gmail.com>
To: cygwin AT cygwin DOT com
Subject: Re: Regression (segfault) with std::print and __int128 using
libstdc++6 17.0.0+20260802-0.1
Date: Mon, 24 Aug 2026 12:10:11 +0000
In-Reply-To: <1b671c18.22188.1a02c50a8d0.Webtop.55@btinternet.com>
References: <1b671c18 DOT 22188 DOT 1a02c50a8d0 DOT Webtop DOT 55 AT btinternet DOT com>
X-Mailer: Vivaldi Mail
User-Agent: Vivaldi Mail/8.1.4087.64
MIME-Version: 1.0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: kikairoya via Cygwin <cygwin AT cygwin DOT com>
Reply-To: kikairoya <kikairoya AT gmail DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 67OCAeQ81560905

Hi Martin,

2026年8月23日 10:51:18 (+09:00) で、martin_n_fuller via Cygwin さんが書きました:

> The following test program compiles and runs successfully with clang 20.1.8-2 and libstdc++6 16.1.1+20260801-0.1.
> The same program compiled and run with libstdc++6 17.0.0+20260802-0.1 exits with a segmentation fault.
> 
> #include <print>
> int main(int argc, char *argv[]) {
>   std::println("{}", static_cast<__int128>(argc) << 100);
> }
> 
> $ clang++ -std=c++23 -g test.cpp -o test
> $ ./test
> 1267650600228229401496703205376 (with 16.1.1)
> Segmentation fault (with 17.0.0)

This is caused by a recent ABI change in GCC, rather than by a change in
std::println itself.

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

As a result, Clang and pre-17 GCC are ABI-incompatible with libstdc++ built by
GCC 17 when a __int128 value is returned across the library boundary.

A change to make Clang compatible with GCC is under review:

https://github.com/llvm/llvm-project/pull/210358

From a Clang perspective, I hope that Cygwin will adopt the new
upstream ABI, since it's difficult to maintain an ABI divergence for Cygwin
alone, given that all of the calling conventions are shared across all targets.
Please note that Clang is always a cross-compiler; /usr/bin/clang can emit
non-Cygwin binaries (mingw or msvc), and /usr/bin/x86_64-w64-mingw32-clang
can also emit Cygwin binaries.

Regards,

-- 
Tomohiro Kashiwada (@kikairoya)

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2026   by DJ Delorie     Updated Sep 20 2026