From: Nicholas Vinson <nvinson234@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] build: fix clang+glibc snprintf substitution error
Date: Wed, 15 Jun 2022 07:35:10 -0400 [thread overview]
Message-ID: <e9fd763b-7057-c563-5908-2b4e9ca7af60@gmail.com> (raw)
In-Reply-To: <YqmH3LgnZGUSahNa@salvia>
> On Tue, Jun 14, 2022 at 06:59:41PM -0400, Nicholas Vinson wrote:
>> When building with clang and glibc and -D_FORTIFY_SOURCE=2 is passed to
>> clang, the snprintf member of the expr_ops and obj_ops structures will
>> be incorrectly replaced with __builtin_snprintf_chk() which results in
>> "error: no member named '__builtin___snprintf_chk'" errors at build
>> time.
>
> Please, report this to upstream compiler devel list too.
It's been reported upstream a few times already. Relevant links below.
https://github.com/llvm/llvm-project/issues/7591
https://github.com/llvm/llvm-project/issues/12053
https://github.com/llvm/llvm-project/issues/17831
>
>> This patch changes the member name from 'snprintf' to 'nftnl_snprintf'
>> to prevent the replacement.
>>
>> This bug can be emulated using GCC by undefining the __va_arg_pack macro
>> before stdio.h is included.
>>
>> This patch is based on the notes provided in
>> https://bugs.gentoo.org/807766.
>
> Please, rename it to .output instead, I'd suggest.
Renamed from nftnl_snprintf to .output.
Thanks,
Nicholas Vinson
prev parent reply other threads:[~2022-06-15 11:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 22:59 [PATCH] build: fix clang+glibc snprintf substitution error Nicholas Vinson
2022-06-15 7:18 ` Pablo Neira Ayuso
2022-06-15 11:35 ` Nicholas Vinson [this message]
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=e9fd763b-7057-c563-5908-2b4e9ca7af60@gmail.com \
--to=nvinson234@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 NNTP newsgroup(s).