From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cyril Arnould Newsgroups: gmane.emacs.bugs Subject: bug#63752: AW: bug#63752: 28.2; GCC 13.1 breaks Emacs subprocess handling when built with -D_FORTIFY_SOURCE Date: Sat, 27 May 2023 14:32:16 +0000 Message-ID: References: <83353hki16.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_AS4PR10MB6110522B200DF954C6CC481EE3449AS4PR10MB6110EURP_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19082"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "63752@debbugs.gnu.org" <63752@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 27 16:33:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2uyq-0004kU-Ps for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 May 2023 16:33:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2uyd-000416-Vc; Sat, 27 May 2023 10:33:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2uyc-00040i-0O for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 10:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2uyb-0004Ps-Oi for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 10:33:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2uyb-0006iB-Jw for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 10:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Cyril Arnould Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 May 2023 14:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63752 X-GNU-PR-Package: emacs Original-Received: via spool by 63752-submit@debbugs.gnu.org id=B63752.168519794525747 (code B ref 63752); Sat, 27 May 2023 14:33:01 +0000 Original-Received: (at 63752) by debbugs.gnu.org; 27 May 2023 14:32:25 +0000 Original-Received: from localhost ([127.0.0.1]:52368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2uy1-0006hD-2x for submit@debbugs.gnu.org; Sat, 27 May 2023 10:32:25 -0400 Original-Received: from mail-db8eur05olkn2013.outbound.protection.outlook.com ([40.92.89.13]:14944 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2uxz-0006gx-4d for 63752@debbugs.gnu.org; Sat, 27 May 2023 10:32:23 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=El+Ll0MnrlLsuGfWo6imTEhku76PNlUb8jnLceusZkKr34ewAW4KTQ6vKCOKplHNJufQ2Emf690k9AqUfXKgNdvjb1jBONm+SUR6kEvfs5QwZJ7Ok98svHXLUMFTenXGVd+phXFjjWTLSpMYlulb8BZyuGFa4jQOgCN23fOWi/JiSwTkow0Uh6uIC2BHWUHfcuRPCnfUEJ9Nd1gBVSXdJpYTT/lY2YIYv6HUTy+JP6mAHSYf2JXZmvK/uF7WrozW6DtBvv1GAytSmj8TslagWiCfRkFeOADGk6ImRpQb80Bp/G2S2oKUFZSQekwdC0i3wMXd25mR26jpVTKesdYcsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/6ZLqiq5cJ3myN/3o0NrGvqv6b4TBmt6/yhUaU9hel8=; b=akkOebLZOHNVa0u/vRmMEkH0f0lvv4LoV+aqdKcMBwrszwu7aiEXr/IfGzwGmAKsIIoavrbHNtw5inaoj2Jkv9czgV4uYPU7JsTlKr8ykqVOtruv3TNDDFzvwdqhX8GuF2QpO459ERGb/str90bViTSLOYKUwYQus0ckz2fONnzp+W0g1J6WZsXqRxSQJ/KhIgj/VmnzHZFGr0GpmlwWLB6wl6iYPiIsbgGzZ7Xodd+NIL6JCqTycjpsXddG75Q+CcSnTIRnWrS52HuyrEIxy2/EUEcxH/flgeT9VkkJfgwQiqckgymLqLhDZapkFcPX8cYKeKqZZwLTFz809ROlWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/6ZLqiq5cJ3myN/3o0NrGvqv6b4TBmt6/yhUaU9hel8=; b=VZaEg4/W2Pf0pXZ4JLcX1CYLFTV7ldTRuczABPLaVGq9iZ3MCxwQ8o9nPU+8e4wBJJqcluxMmypqqqLoNRD+tkp67T8jh8NWeQoWe+ggz8ccFTUexlkr5YM1Zl3BOkT2kvaJuCDvWrIYKBaKSgeGhhOkMuVdn8IuNDAWKyNpGNSqcUZAzJKjFW6MPtVqF5qYkblGI5k0/+2tZSGCRtHJj26QhxkS19oOEA7YyhbtBq9gA9o3LmfuVjMlchdA+XI6MWWsDrQhpoXheDtRxzfSFWLEEPTF7WPCwCyYu73bmGFYPcG3nP/9KL/uMxUCLk/nTV2C+BF6sx9Xr+aOjgrr0w== Original-Received: from AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:582::17) by DB9PR10MB6739.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:3d1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.19; Sat, 27 May 2023 14:32:16 +0000 Original-Received: from AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM ([fe80::7a2:effb:6bb7:ada1]) by AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM ([fe80::7a2:effb:6bb7:ada1%7]) with mapi id 15.20.6433.018; Sat, 27 May 2023 14:32:16 +0000 Thread-Topic: bug#63752: 28.2; GCC 13.1 breaks Emacs subprocess handling when built with -D_FORTIFY_SOURCE Thread-Index: AQHZkKD49n2L+rH6nUSPFwndjiuc6K9uK53x In-Reply-To: <83353hki16.fsf@gnu.org> Accept-Language: de-CH, en-US Content-Language: de-CH x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [5TfNfA8A8nQil1SfyVQ/mULVbWaOTnp0] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS4PR10MB6110:EE_|DB9PR10MB6739:EE_ x-ms-office365-filtering-correlation-id: 58c08642-d2a2-4820-8be5-08db5ebf2bb4 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CJiorx6fJlR2D4KzS5fwk8a8YgR3Ff7bkMS1qAmW6Pf7VqnjfKL+AO9P0DT3seZB+V70bTZlAkFuICScEHPApOWPyXFWBQn2O8c4KSadKZvvp+4Ob8aM05PIpvGvbmCvOsS3w6gZMqGCpx2KQ/1vST0vdYVYwsNCzBpCA4JneldmwW1iM0qz7LVPvtosGH8WpdcdDTWhaubNXFnx+j2132EqGMkfRppzZyobzCCc1MMuDW7Gd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h6dMP97tbat8ZcbbX1xhsTPharpUCsc8/0qzO0Q4G6FsvJCkx05b9HQSgumNrc mtVrhlBKaGakGILVZ9O84K2WhEti1qbO3Mz/d65zKHUXSuYixG72siDsRRBIxmiPuK9eBHt5QSxX4azc7XwfsKmHOsbCbGc6Bo X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 58c08642-d2a2-4820-8be5-08db5ebf2bb4 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 May 2023 14:32:16.7850 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR10MB6739 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262477 Archived-At: --_000_AS4PR10MB6110522B200DF954C6CC481EE3449AS4PR10MB6110EURP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > What happens if you don't use -D_FORTIFY_SOURCE=3D at all? I have no problems when not using -D_FORTIFY_SOURCE. It's set to 2 by default in the MSYS2 builds, I figured lowering it to 1 might work better but neither seem to work. > I see nothing in these issues that would point out some upstream > problem. The issues are all related to the Emacs builds produced by > the MSYS2 folks. So I think the initial investigation should be > theirs, until they identify the code in Emacs which misbehaves. I understand. I'll reach out to see how they want to proceed on their side. I've also just noticed that the -D_FORTIFY_SOURCE option seems to have been a rather recent addition to the MSYS2 build options and it seems like this was only recently even made possible. And the last successful MSYS2 build of Emacs was before that change. > Which version of GCC is this, btw? If it's the latest GCC 13, did you > try downgrading to GCC 12? It's GCC 13.1, yes, I haven't tested GCC 12. I don't know how easy it is to downgrade GCC on MSYS2 though, I assume there's a lot of dependencies that can go wrong. > FWIW, Emacs 28 and 29 (and also Emacs 30) builds fine for me with > MinGW, both with and without native-compilation, but I don't use > _FORTIFY_SOURCE (and don't plan on using it any time soon). This makes me wonder if GCC 13.1 Emacs builds with _FORTIFY_SOURCE are working fine in other operating systems? It's not something I can easily test, however. --_000_AS4PR10MB6110522B200DF954C6CC481EE3449AS4PR10MB6110EURP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

> What happens if you don't use -D_FORTIFY_SOURCE= =3D at all?

 

I have no problems when not using -D_FORTIFY_SOURCE.= It's set to

2 by default in the MSYS2 builds, I figured lowering= it to 1

might work better but neither seem to work.

 

> I see nothing in these issues that would point = out some upstream

> problem.  The issues are all related to th= e Emacs builds produced by

> the MSYS2 folks.  So I think the initial i= nvestigation should be

> theirs, until they identify the code in Emacs w= hich misbehaves.

 

I understand. I'll reach out to see how they want to= proceed on

their side.

 

I've also just noticed that the -D_FORTIFY_SOURCE op= tion seems to

have been a rather recent addition to the MSYS2 buil= d options and

it seems like this was only recently even made possi= ble. And the

last successful MSYS2 build of Emacs was before that= change.

 

> Which version of GCC is this, btw?  If it'= s the latest GCC 13, did you

> try downgrading to GCC 12?

 

It's GCC 13.1, yes, I haven't tested GCC 12. I don't= know how

easy it is to downgrade GCC on MSYS2 though, I assum= e there's a

lot of dependencies that can go wrong.

 

> FWIW, Emacs 28 and 29 (and also Emacs 30) build= s fine for me with

> MinGW, both with and without native-compilation= , but I don't use

> _FORTIFY_SOURCE (and don't plan on using it any= time soon).

 

This makes me wonder if GCC 13.1 Emacs builds with

_FORTIFY_SOURCE are working fine in other operating = systems? It's

not something I can easily test, however.=

--_000_AS4PR10MB6110522B200DF954C6CC481EE3449AS4PR10MB6110EURP_--