public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Simon Chopin <simon.chopin@canonical.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libquadmath: printf: fix misaligned access on args
Date: Tue, 02 Apr 2024 14:38:38 +0200	[thread overview]
Message-ID: <87a5mcx7ld.fsf@oldenburg3.str.redhat.com> (raw)
In-Reply-To: <20240312190352.3455451-1-simon.chopin@canonical.com> (Simon Chopin's message of "Tue, 12 Mar 2024 20:03:52 +0100")

* Simon Chopin:

> On x86, this compiles into movdqa which segfaults on unaligned access.
>
> This kind of failure has been seen when running against glibc 2.39,
> which incidentally changed the printf implementation to move away from
> alloca() for this data to instead append it at the end of an existing
> "scratch buffer", with arbitrary alignement, whereas alloca() was
> probably more likely to be naturally aligned.

This glibc change appears to be incorrect.  I think we need to preserve
ABI alignment for types than can be passed through the vararg interface.
I'm not sure if this easily possible, though.  Certainly needs a
discussion on libc-alpha.

Thanks,
Florian


  reply	other threads:[~2024-04-02 12:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 19:03 Simon Chopin
2024-04-02 12:38 ` Florian Weimer [this message]
2024-04-03  8:16 ` [committed] libquadmath: Don't assume the storage for __float128 arguments is aligned [PR114533] Jakub Jelinek

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=87a5mcx7ld.fsf@oldenburg3.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=simon.chopin@canonical.com \
    /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).