public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Stefano Garzarella <sgarzare@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: io-uring@vger.kernel.org, "H.J. Lu" <hjl.tools@gmail.com>,
	libc-alpha@sourceware.org, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ
Date: Fri, 23 Apr 2021 15:13:21 +0100	[thread overview]
Message-ID: <89aaba8e-9a39-5269-201f-83d1f96e1ec0@gmail.com> (raw)
In-Reply-To: <20210422142245.evlxjvfw3emh7ivw@steredhat>

On 4/22/21 3:22 PM, Stefano Garzarella wrote:
> +Cc: io-uring@vger.kernel.org
> +Cc: Pavel Begunkov <asml.silence@gmail.com>
> 
> Original message: https://www.spinics.net/lists/linux-block/msg67077.html
> 
> On Thu, Apr 22, 2021 at 10:59:42AM +0100, Stefan Hajnoczi wrote:
>> On Mon, Apr 19, 2021 at 11:38:07AM -0700, H.J. Lu wrote:
>>> On Mon, Apr 19, 2021 at 7:35 AM Stefan Hajnoczi <stefanha@redhat.com> wrote:
>>> >
>>> > On Tue, Apr 13, 2021 at 04:03:19PM +0100, Stefan Hajnoczi wrote:
>>> > > The size of C arrays at file scope must be constant. The following
>>> > > compiler error occurs with recent upstream glibc (2.33.9000):
>>> > >
>>> > >   CC ucontext-cp
>>> > >   ucontext-cp.c:31:23: error: variably modified ‘stack_buf’ at file scope
>>> > >   31 |         unsigned char stack_buf[SIGSTKSZ];
>>> > >      |                       ^~~~~~~~~
>>> > >   make[1]: *** [Makefile:26: ucontext-cp] Error 1
>>> > >
>>> > > The following glibc commit changed SIGSTKSZ from a constant value to a
>>> > > variable:
>>> > >
>>> > >   commit 6c57d320484988e87e446e2e60ce42816bf51d53
>>> > >   Author: H.J. Lu <hjl.tools@gmail.com>
>>> > >   Date:   Mon Feb 1 11:00:38 2021 -0800
>>> > >
>>> > >     sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305]
>>> > >   ...
>>> > >   +# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
>>> > >
>>> > > Allocate the stack buffer explicitly to avoid declaring an array at file
>>> > > scope.
>>> > >
>>> > > Cc: H.J. Lu <hjl.tools@gmail.com>
>>> > > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>>> > > ---
>>> > > Perhaps the glibc change needs to be revised before releasing glibc 2.34
>>> > > since it might break applications. That's up to the glibc folks. It
>>> > > doesn't hurt for liburing to take a safer approach that copes with the
>>> > > SIGSTKSZ change in any case.
>>> >
>>> > glibc folks, please take a look. The commit referenced above broke
>>> > compilation of liburing's tests. It's possible that applications will
>>> > hit similar issues. Can you check whether the SIGSTKSZ change needs to
>>> > be reverted/fixed before releasing glibc 2.34?
>>> >
>>>
>>> It won't be changed for glibc 2.34.
>>
>> Thanks for the response, H.J. and Paul.
>>
>> In that case liburing needs this patch.
>>
> 
> I think so:
> 
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

Right, and there are already people complaining
https://github.com/axboe/liburing/issues/320


-- 
Pavel Begunkov

  reply	other threads:[~2021-04-23 14:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 15:03 Stefan Hajnoczi
2021-04-19 14:34 ` Stefan Hajnoczi
2021-04-19 18:38   ` H.J. Lu
2021-04-22  9:59     ` Stefan Hajnoczi
2021-04-22 14:22       ` Stefano Garzarella
2021-04-23 14:13         ` Pavel Begunkov [this message]
2021-04-20  0:05   ` Paul Eggert

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=89aaba8e-9a39-5269-201f-83d1f96e1ec0@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hjl.tools@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-block@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.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).