From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id A0E6A3947C02 for ; Mon, 19 Apr 2021 18:38:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A0E6A3947C02 Received: by mail-ot1-x334.google.com with SMTP id 101-20020a9d0d6e0000b02902816815ff62so27602155oti.9 for ; Mon, 19 Apr 2021 11:38:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=FfwCKpFu+KZSiZGRhLsDEaWnJCMxD66Q3cGmOFACWNo=; b=mX6YanZqlvX5C2GP/2vkf2ut9MxSeIRFvVT1kSsNBCUBMxAN7jNdq+YqAfBWiU+1BB vGWsTRXeSDvsEBZYT0MwPR5Kf/dXH0sj6n+JyNdzMBTT50ACd+1Vg8CUUSaPauh3/L+u ibTZ8+g5eTpNkCLRmi6zPyhKkcGpjBynIlh/fBpcgylqw6XNVZpy9kQtwlMjG+FD15Y0 A4GXGnadqVH46A00OzvAexdjEIxREs8ln4Okf7XRetGwQyamlc6fyS2/rIQxxXIjxdmW 8gDj43mQmSRyBYGoULJcDMOmWnW18yobsHeRbaxVYYMB4TXbsUsZi+njvEDyohmOW47G bYVg== X-Gm-Message-State: AOAM530X45dW5pbpU/H4bD9+VaGXiePl4+2TewRVcp1nfqjJkca6ArsM y7dwa/Jdr70pknkFSDeZlr4xt+OtxufDz/rr4+M= X-Google-Smtp-Source: ABdhPJx2CALHMdl0YTYheEWUOspDwJAYIiUnXjQC1cHydsMuDCE23XQKA+W65BYcjCq7gm4tbCWTdvidw9HXnc7VGLI= X-Received: by 2002:a9d:12e:: with SMTP id 43mr16342012otu.90.1618857523078; Mon, 19 Apr 2021 11:38:43 -0700 (PDT) MIME-Version: 1.0 References: <20210413150319.764600-1-stefanha@redhat.com> In-Reply-To: From: "H.J. Lu" Date: Mon, 19 Apr 2021 11:38:07 -0700 Message-ID: Subject: Re: [PATCH liburing] examples/ucontext-cp.c: cope with variable SIGSTKSZ To: Stefan Hajnoczi Cc: libc-alpha@sourceware.org, Jens Axboe , linux-block@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3028.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2021 18:38:47 -0000 On Mon, Apr 19, 2021 at 7:35 AM Stefan Hajnoczi 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 =E2=80=98stack_buf=E2= =80=99 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 > > 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 fil= e > > scope. > > > > Cc: H.J. Lu > > Signed-off-by: Stefan Hajnoczi > > --- > > Perhaps the glibc change needs to be revised before releasing glibc 2.3= 4 > > 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. --=20 H.J.