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.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,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 076661F953 for ; Tue, 2 Nov 2021 01:13:28 +0000 (UTC) Received: from localhost ([::1]:43148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhiMg-0007Hd-PX for normalperson@yhbt.net; Mon, 01 Nov 2021 21:13:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhiMa-0007GC-GO for bug-gnulib@gnu.org; Mon, 01 Nov 2021 21:13:20 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:57538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhiMX-0005TQ-Ai for bug-gnulib@gnu.org; Mon, 01 Nov 2021 21:13:19 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C38DE1600C4; Mon, 1 Nov 2021 18:13:14 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id OWBgRLPAsJer; Mon, 1 Nov 2021 18:13:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 229AC1600CE; Mon, 1 Nov 2021 18:13:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dsOv4gP-8YJm; Mon, 1 Nov 2021 18:13:14 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 04C3B1600C4; Mon, 1 Nov 2021 18:13:14 -0700 (PDT) Message-ID: Date: Mon, 1 Nov 2021 18:13:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: gl_array_list.c:452:29: runtime error: applying zero offset to null pointer Content-Language: en-US To: noloader@gmail.com References: <20211021193836.299618017A0@smtp.hushmail.com> <9ddce3aa-26de-3e4e-a586-e55bf6918457@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -52 X-Spam_score: -5.3 X-Spam_bar: ----- X-Spam_report: (-5.3 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-1.14, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "bug-gnulib@gnu.org List" Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On 11/1/21 17:46, Jeffrey Walton wrote: > I believe that's undefined behavior. Yes, of course it is. But the Gnulib code works on all practical=20 platforms, so it's OK. Gnulib is a practical project not a theoretical=20 one, and it uses undefined behavior in several ways other than this one.=20 As long as the code works on real systems there's no real problem. Most likely Pawe=C5=82 can configure his testing environment to suppress=20 these false alarms. If not, I suggest firing off a bug report to the=20 Clang developers, asking for an easy way to suppress them. In practice=20 these particular diagnostics are more trouble than they're worth.