From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id CB718385840F for ; Thu, 29 Dec 2022 22:20:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CB718385840F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nefkom.net Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4NjjWN6tVsz1r0P9; Thu, 29 Dec 2022 23:20:16 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4NjjWN5MShz1qqlR; Thu, 29 Dec 2022 23:20:16 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id NsDyduaUoC_U; Thu, 29 Dec 2022 23:20:16 +0100 (CET) X-Auth-Info: gtb8XBuTeLjGFhP74JREd1G3ocXXye86P/p4TSAUr9QkeSM4vZzmc9Gn3itjhJRA Received: from igel.home (aftr-62-216-205-97.dynamic.mnet-online.de [62.216.205.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 29 Dec 2022 23:20:16 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id D9F9C2C146F; Thu, 29 Dec 2022 23:20:15 +0100 (CET) From: Andreas Schwab To: Zack Weinberg via Libc-alpha Cc: Carlos O'Donell , Zack Weinberg Subject: Re: =?utf-8?Q?=E2=80=9CUndefined_behavior=E2=80=9D?= considered harmful (was Re: Bug 29863 - Segmentation fault in =?utf-8?Q?memcmp-sse2=2ES=E2=80=A6=29?= References: <0a1f01d90f1f$96c7ce60$c4576b20$@yottadb.com> <0b2901d90f26$f82b4720$e881d560$@yottadb.com> <38450ca5-599d-4e5d-b2db-be01856680cb@app.fastmail.com> <736bb5b6-f9d5-b541-f983-1e5026aaacfa@redhat.com> X-Yow: Could I have a drug overdose? Date: Thu, 29 Dec 2022 23:20:15 +0100 In-Reply-To: (Zack Weinberg via Libc-alpha's message of "Thu, 29 Dec 2022 14:32:50 -0500") Message-ID: <87y1qp97j4.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Dez 29 2022, Zack Weinberg via Libc-alpha wrote: > 1. The C standard uses “undefined behavior” far more liberally than it > ought to. In many cases of existing UB the committee could define > the behavior (possibly as implementation-defined or unspecified) > without any actual negative consequences. It seems the committee > *is* moving in this direction as of C2x, for instance by dropping > the allowances for non-twos-complement signed arithmetic, but they > could and should go a lot farther down that road. That's not removing an undefined behavior, it's removing an implementation choice. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."