public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] debug: Increase tst-fortify checks for compiler without __va_arg_pack support
Date: Fri, 29 Dec 2023 14:36:34 +0000 (GMT) [thread overview]
Message-ID: <20231229143634.3E8983858D39@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bf320000b47ce46aa6dbe1b7068e6539bf2df9bb
commit bf320000b47ce46aa6dbe1b7068e6539bf2df9bb
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Dec 21 15:59:16 2023 -0300
debug: Increase tst-fortify checks for compiler without __va_arg_pack support
The fortify wrappers for varargs functions already add fallbacks to
builtins calls if __va_arg_pack is not supported.
Checked on aarch64, armhf, x86_64, and i686.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diff:
---
debug/tst-fortify.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/debug/tst-fortify.c b/debug/tst-fortify.c
index 20e926751a..5cd9d22feb 100644
--- a/debug/tst-fortify.c
+++ b/debug/tst-fortify.c
@@ -130,7 +130,7 @@ static int num2 = 987654;
chk_fail_ok = 0; \
FAIL (); \
}
-#if __USE_FORTIFY_LEVEL >= 2 && (!defined __cplusplus || defined __va_arg_pack)
+#if __USE_FORTIFY_LEVEL >= 2
# define CHK_FAIL2_START CHK_FAIL_START
# define CHK_FAIL2_END CHK_FAIL_END
#else
@@ -419,7 +419,6 @@ do_test (void)
stpncpy (buf + 6, "cd", l0 + 5);
CHK_FAIL_END
-# if !defined __cplusplus || defined __va_arg_pack
CHK_FAIL_START
sprintf (buf + 8, "%d", num1);
CHK_FAIL_END
@@ -439,7 +438,6 @@ do_test (void)
CHK_FAIL_START
swprintf (wbuf + 8, l0 + 3, L"%d", num1);
CHK_FAIL_END
-# endif
memcpy (buf, str1 + 2, 9);
CHK_FAIL_START
@@ -550,7 +548,6 @@ do_test (void)
FAIL ();
}
-# if !defined __cplusplus || defined __va_arg_pack
CHK_FAIL_START
sprintf (a.buf1 + (O + 7), "%d", num1);
CHK_FAIL_END
@@ -562,7 +559,6 @@ do_test (void)
CHK_FAIL_START
snprintf (a.buf1 + (O + 7), l0 + 3, "%d", num2);
CHK_FAIL_END
-# endif
memcpy (a.buf1, str1 + (3 - O), 8 + O);
CHK_FAIL_START
reply other threads:[~2023-12-29 14:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231229143634.3E8983858D39@sourceware.org \
--to=azanella@sourceware.org \
--cc=glibc-cvs@sourceware.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).