GNU bug report logs - #63752
28.2; GCC 13.1 breaks Emacs subprocess handling when built with -D_FORTIFY_SOURCE

Previous Next

Package: emacs;

Reported by: Cyril Arnould <cyril.arnould <at> outlook.com>

Date: Sat, 27 May 2023 13:03:02 UTC

Severity: normal

Merged with 73444

Found in versions 28.2, 30.0.50

Done: Óscar Fuentes <ofv <at> wanadoo.es>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Cyril Arnould <cyril.arnould <at> outlook.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "63752 <at> debbugs.gnu.org" <63752 <at> debbugs.gnu.org>
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 part 1 (text/plain, inline)]
> What happens if you don't use -D_FORTIFY_SOURCE= 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.
[Message part 2 (text/html, inline)]

This bug report was last modified 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.