From: Stian Halseth <stian@itx.no>
To: libc-alpha@sourceware.org
Cc: schwab@suse.de, adhemerval.zanella@linaro.org, fweimer@redhat.com
Subject: Re: [PATCH] string: Drop always_inline from tst-xbzero-opt [BZ #23130]
Date: Fri, 25 Sep 2026 12:43:37 +0200 [thread overview]
Message-ID: <65f858649abfb43006cf8a498714d71092e6a815.camel@itx.no> (raw)
In-Reply-To: <20260921203913.1446104-1-stian@itx.no>
[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]
Hi,
This fixes the tst-xbzero-opt build break on RISC-V from a066c5d7d; no
comments since it went out on Monday.
Adhemerval, could you push it? I do not have commit access. Andreas, if
you can confirm it builds on RISC-V, that would be good to have on the
record.
Best regards,
Stian
On Mon, 2026-09-21 at 22:39 +0200, Stian Halseth wrote:
> Commit a066c5d7d keeps always_inline on prepare_test_buffer unless
> the
> compiler lacks indirect_return, as a proxy for swapcontext not being
> returns_twice. GCC has indirect_return on RISC-V, which uses the
> generic bits/indirect-return.h, so the test asks to inline a caller
> of
> a returns_twice function and fails to build:
>
> tst-xbzero-opt.c:122:1: error: function 'prepare_test_buffer' can
> never be inlined because it uses setjmp
>
> Remove the attribute and the condition around it.
>
> Tested on x86_64 and sparc64.
>
> Reported-by: Andreas Schwab <schwab@suse.de>
> Signed-off-by: Stian Halseth <stian@itx.no>
> ---
> string/tst-xbzero-opt.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
> index 26e2ec1c13..dfe0d39879 100644
> --- a/string/tst-xbzero-opt.c
> +++ b/string/tst-xbzero-opt.c
> @@ -111,14 +111,7 @@ use_test_buffer (unsigned char *buf)
> /* Always check the test buffer immediately after filling it; this
> makes externally visible side effects depend on the buffer
> existing
> and having been filled in. */
> -#if !__glibc_has_attribute (__indirect_return__)
> -/* Without indirect_return, swapcontext is marked returns_twice,
> which
> - prevents always_inline from working. */
> -# define ALWAYS_INLINE
> -#else
> -# define ALWAYS_INLINE __attribute__ ((always_inline))
> -#endif
> -static inline ALWAYS_INLINE void
> +static inline void
> prepare_test_buffer (unsigned char *buf)
> {
> for (unsigned int i = 0; i < PATTERN_REPS; i++)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-09-25 10:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 12:43 [PATCH] Mark swapcontext returns_twice without indirect_return " Stian Halseth
2026-09-04 14:20 ` Adhemerval Zanella Netto
2026-09-04 15:29 ` [PATCH v2] Mark swapcontext returns_twice by default " Stian Halseth
2026-09-04 18:32 ` Adhemerval Zanella Netto
2026-09-15 21:00 ` Stian Halseth
2026-09-16 12:02 ` Adhemerval Zanella Netto
2026-09-16 12:33 ` Stian Halseth
2026-09-21 12:33 ` Andreas Schwab
2026-09-21 13:05 ` Stian Halseth
2026-09-21 13:14 ` Andreas Schwab
2026-09-21 20:36 ` Stian Halseth
2026-09-21 20:39 ` [PATCH] string: Drop always_inline from tst-xbzero-opt " Stian Halseth
2026-09-25 10:43 ` Stian Halseth [this message]
2026-09-25 13:03 ` Adhemerval Zanella Netto
2026-09-25 11:11 ` Adhemerval Zanella Netto
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=65f858649abfb43006cf8a498714d71092e6a815.camel@itx.no \
--to=stian@itx.no \
--cc=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=schwab@suse.de \
/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).