From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D19D21F5AE for ; Mon, 7 Jun 2021 01:23:27 +0000 (UTC) Received: from localhost ([::1]:42848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lq3zC-0000uI-P8 for normalperson@yhbt.net; Sun, 06 Jun 2021 21:23:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq3vn-00042x-W7 for bug-gnulib@gnu.org; Sun, 06 Jun 2021 21:19:57 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.25]:20531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq3vf-0008Mt-Gz for bug-gnulib@gnu.org; Sun, 06 Jun 2021 21:19:51 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623026976; cv=none; d=strato.com; s=strato-dkim-0002; b=bId+04j+GX8/JZsyQKyR2b0Sm2c1rc0mLlwUgvOrc+u2iGzACsH2JV6KH9qZZ6oI5H VyS31wy9WFKNOnL7oTJUM95yGCF1hWC0fQn3v7eQxxoU9tlm2D33LpQGpFh2VQLTW7mK bCku+c5d8nbo8MTSU2SLBhxti/sHvY2y0wNATVdvoPomzRc5UJ09d5/+SfYCChi4fXxT +MMLy2vregs2i9bbKnh2eWavXY7Q5THPJ2A2wStfVQ/iypcSNshKbFYOJdtEZhW1+Dpo q+J8uJ+W3AgpaPwjESSdwDX2KBSdFlXureKPN6uK4I5mb8rM3P87rrUGdnGxhnlj54jb 5dsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623026976; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=BeGDyPDW+MsEw4dDJRox9gmJAKo/H7Vl6EpDDPbN6rU=; b=IItxTIDLdxQ4VhfoamZ+nYAoo4airhBG1QCuxghRLy64fOatS2yk3odq6Mhts2wLPf FKb5dXWK30gyhQrRHdQG66b6bHyESVQnw5vStnaL6bMvYrO3M4SshOyXXT7jYJ+02qsA ij2M14kS1d8CNiB3/FXA6yKGSFn2np53rXxPWLSJCtnmU/m+5yM+lMUT2+DKJPFcoAWa cbMYadwz6Sevgn79YlwGRwqXMskyj5dAeKU4bwf9CDl/oTtbWs+vUTT7l6r7c4pcRB8v A/YCWhpnIzY5+yY1oSCBaqIB4Qzs+enFl+ITiY4MkimN0RNfY2eXxUHmHYDmFUmrlMHw mUdw== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623026976; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=BeGDyPDW+MsEw4dDJRox9gmJAKo/H7Vl6EpDDPbN6rU=; b=D7HQywUINw3gWDmXH1uGh8GUIIeMRwYzn5BkwLIkOoB8zsDG1ZymlOl/6gufSfuqSO D2aQezB3z2vYPHYBZKEbQikbKyvLSC2XPtbsPaAnsg95+NDs5odOoSY5D3WrlTorXbsb 0Xq82twSxRkV0iVjYYN1mUFTY1zVT/GjvXxAzlFdr6b/UPWdpo1zLptgmDPC41yXV6Bi 32X01rBGneBQeup4zQF1TH3rvwVkqlK7J7T4Z3H01BJoYdBMuNDUXN1MwEq4MdnzwjOJ ydiDI1iUKEZrw7zjlmRn1Tf5oQBZ/l/bnbKKWSNPdVLQbBfSSbFXp2W5dLStm01XPLk8 qY7Q== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqf3z5NW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id q0869dx570naJqj (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Mon, 7 Jun 2021 02:49:36 +0200 (CEST) From: Bruno Haible To: "Dmitry V. Levin" Subject: Re: new module 'sigsegv' Date: Mon, 07 Jun 2021 02:49:35 +0200 Message-ID: <2263638.MxO8Z3q26L@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20210606232756.GA17371@altlinux.org> References: <15897619.AQZsorJ5YP@omega> <20210606232756.GA17371@altlinux.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.25; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Dmitry, > I've tried to rebuild the latest GNU grep with the latest gnulib > and got a few build issues: > ... > The following gnulib patch makes the compiler happy again: > > diff --git a/lib/sigsegv.c b/lib/sigsegv.c > index 312f132b8..b0b406685 100644 > --- a/lib/sigsegv.c > +++ b/lib/sigsegv.c > @@ -1056,7 +1056,7 @@ sigsegv_handler (SIGSEGV_FAULT_HANDLER_ARGLIST) > /* Handler declined responsibility for real. */ > > /* Remove ourselves and dump core. */ > - SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);) > + SIGSEGV_FOR_ALL_SIGNALS (signo, signal (signo, SIG_DFL);) > } > > # if HAVE_STACK_OVERFLOW_RECOVERY Thanks for the report. This patch is good, but needs to be applied also to the other sigsegv_handler, and also to libsigsegv (to be kept in sync when possible). I'm doing that now. > > -volatile int * > +static volatile int * > recurse_1 (int n, volatile int *p) > { > if (n < INT_MAX) > @@ -80,7 +80,7 @@ recurse_1 (int n, volatile int *p) > return p; > } > > -int > +static int > recurse (volatile int n) > { > return *recurse_1 (n, &n); This part should better not be applied. It may enable compiler optimizations (now or in the future) that, in the end, turn an endless recursion into an endless loop. > @@ -183,6 +183,9 @@ main () > *(volatile int *) (page + 0x678) = 42; > break; > case 3: > +#if 6 < __GNUC__ > +# pragma GCC diagnostic ignored "-Wnull-dereference" > +#endif > *(volatile int *) 0 = 42; > break; > case 4: We shouldn't spend time eliminating warnings from test code. The goal is to have a good coverage of the lib/* code with unit tests. That means, we need to - make it easy to write unit tests, - not make it time-consuming to maintain them. Eliminating warnings from lib/* code is useful, to avoid bugs in the programs. But eliminating warnings from tests/* code goes against the goal of increasing test coverage. I think the right fix would be that gnulib-tool's --import/--update option, when creating a tests directory, adds a $(CFLAG_ALLOW_WARNING) to tests/Makefile.am, where CFLAG_ALLOW_WARNING is defined as -Wno-error when the compiler is GCC or clang, empty otherwise Will that work in GNU grep? Bruno