From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Development Speed Date: Fri, 24 Dec 2021 15:39:51 +0100 Message-ID: <87zgoqrrrc.fsf@telefonica.net> References: <83r1a4yfpt.fsf@gnu.org> <8335mky4rl.fsf@gnu.org> <87czlm3hyf.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25651"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:M4lELzNKJOs2/meyoqsX5SLQwNI= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 24 15:41:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0llC-0006Tz-5H for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Dec 2021 15:41:30 +0100 Original-Received: from localhost ([::1]:58846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0ll9-0005I5-6T for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Dec 2021 09:41:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0ljl-0004Oh-DD for emacs-devel@gnu.org; Fri, 24 Dec 2021 09:40:01 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:59726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0ljj-0004u9-5C for emacs-devel@gnu.org; Fri, 24 Dec 2021 09:40:01 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1n0ljh-0004eb-EC for emacs-devel@gnu.org; Fri, 24 Dec 2021 15:39:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:283154 Archived-At: Stefan Monnier writes: >>> According to any of the C standards, Emacs is just one large undefined >>> behavior. >> Would you mind expanding on this remark briefly? What sort of undefined >> behaviour do you have in mind? > > Scanning the stack and playing with the lowest 3 bits of pointers come > to mind. These are UB, and in C as soon as one UB is encountered during > execution, everything else from now on is potentially UB (more > specifically, the C standard allows the interpretation that a UB > operation does literally anything, including never terminating and > behaving eerily like your program). Yes, and in recent years a new breed of compiler engineers apply the rule that if UB is found: 1. they are not in the obligation to tell you. 2. from there on the compiler is free to do the most bizarre things you can't imagine on its optimization passes, generating machine code that in no way corresponds to your intent. This is causing much pain and chagrin on every major compiler release. To be fair, it is also helping to educate many programmers and improve their respective code bases.