public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: Siddhesh Poyarekar <siddhesh@gotplt.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] stdlib: tests: don't double-define _FORTIFY_SOURCE
Date: Wed, 10 Aug 2022 16:06:13 +0100	[thread overview]
Message-ID: <1205C8B0-F1DD-4858-9329-FAB30F40E58E@gentoo.org> (raw)
In-Reply-To: <59f7bd6f-8e8d-20d9-b59b-f8907b915cbc@gotplt.org>

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]



> On 10 Aug 2022, at 15:29, Siddhesh Poyarekar <siddhesh@gotplt.org> wrote:
> 
> On 2022-08-08 18:30, Sam James wrote:
>> This is a fair point, although I now see we've actually got libc_cv_predef_fortify_source
>> which sets CPPUNDEFS for exactly this sort of problem anyway.
>> I don't see the warning with gcc-11 + -Werror + F_S=3 on a test program. I can build some
>> older GCCs as I should probably keep them around anyway though.
> 
> Interesting, because you should have seen the warning about _FORTIFY_SOURCE=3 not being supported; I'm surprised that it doesn't fail due to that warning.

... and I see it now. I don't know what I did the other day. Oops.

> 
>>> Alternatively, some magic here to determine the maximum fortification level wouldn't hurt, but I won't gate your patch on that :)  I can work on that bit.
>> I started looking at that and I'm not sure there's a point. includes/features.h downgrades us appropriately. I think we can unconditionally
>> set F_S=3 if I'm right about GCC not caring, as all the logic is on the glibc side, right?
> 
> It's the warning I'm thinking about avoiding.
> 
>> We can always split this into two if you want:
>> 1. The original commit (I can convert it to use libc_cv_predef_fortify_source's result) & backport it to 2.36
> 
> Sounds good to me.
> 
>> 2. Another to crank to =3 and don't backport it in case I'm missing something.
> 

Okay, sounds like a plan, cheers. I'll get on it.

> Thanks,
> Sid


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

  reply	other threads:[~2022-08-10 15:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 20:13 Sam James
2022-08-08 13:26 ` Siddhesh Poyarekar
2022-08-08 22:30   ` Sam James
2022-08-10 14:29     ` Siddhesh Poyarekar
2022-08-10 15:06       ` Sam James [this message]
2023-02-02 18:21         ` Sam James
2023-02-03  4:01           ` Siddhesh Poyarekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1205C8B0-F1DD-4858-9329-FAB30F40E58E@gentoo.org \
    --to=sam@gentoo.org \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@gotplt.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).