public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* glibc build failure for Hurd with mainline GCC
@ 2021-10-14 21:15 Joseph Myers
  2021-10-17 22:52 ` Samuel Thibault
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2021-10-14 21:15 UTC (permalink / raw)
  To: libc-alpha, samuel.thibault

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: glibc build failure for Hurd with mainline GCC
  2021-10-14 21:15 glibc build failure for Hurd with mainline GCC Joseph Myers
@ 2021-10-17 22:52 ` Samuel Thibault
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2021-10-17 22:52 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

Hello,

Joseph Myers, le jeu. 14 oct. 2021 21:15:59 +0000, a ecrit:
> 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.

Yep, that was an old hack to pass parameters over.  I have now reworked
it, it should be much safer now.

Samuel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-17 22:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 21:15 glibc build failure for Hurd with mainline GCC Joseph Myers
2021-10-17 22:52 ` Samuel Thibault

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).