public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: <libc-alpha@sourceware.org>, <samuel.thibault@ens-lyon.org>
Subject: glibc build failure for Hurd with mainline GCC
Date: Thu, 14 Oct 2021 21:15:59 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2110142111050.4143528@digraph.polyomino.org.uk> (raw)

The build failures in the compilers stage of a build-many-glibcs.py build 
are now down to just a failure for i686-gnu, which I hope the Hurd 
maintainers might look at.

The error reported is:

In file included from intr-msg.c:25:
intr-msg.c: In function '_hurd_intr_rpc_mach_msg':
../sysdeps/mach/hurd/i386/intr-msg.h:48:21: error: array subscript -1 is outside array bounds of 'mach_msg_header_t[0]' [-Werror=array-bounds]
   48 |        : "m" ((&msg)[-1]), "m" (*cancel_p), "i" (EINTR)                       \
      |               ~~~~~~^~~~
intr-msg.c:118:9: note: in expansion of macro 'INTR_MSG_TRAP'
  118 |   err = INTR_MSG_TRAP (msg, option, send_size,
      |         ^~~~~~~~~~~~~
intr-msg.c:32:45: note: at offset -4 into object 'msg' of size 4
   32 | _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
      |                          ~~~~~~~~~~~~~~~~~~~^~~

As far as I can tell, this seems to be reporting a genuine issue.  The asm 
in INTR_MSG_TRAP has inputs saying it accesses ((&msg)[-1]).  And in the 
call to that macro from _hurd_intr_rpc_mach_msg, msg is a function 
parameter.  That is, this code seems to be taking the address of a 
function parameter, then looking at whatever comes before that function 
parameter in memory, which doesn't make much sense.

-- 
Joseph S. Myers
joseph@codesourcery.com

             reply	other threads:[~2021-10-14 21:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 21:15 Joseph Myers [this message]
2021-10-17 22:52 ` Samuel Thibault

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=alpine.DEB.2.22.394.2110142111050.4143528@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=samuel.thibault@ens-lyon.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).