From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#42660: emacs-27.1-rc1 and UBsan findings Date: Mon, 10 Aug 2020 01:00:40 +0200 Message-ID: <87zh738lwn.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35855"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 42660@debbugs.gnu.org To: Jeffrey Walton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 10 01:02:08 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1k4uKO-0009E1-LH for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Aug 2020 01:02:08 +0200 Original-Received: from localhost ([::1]:36638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4uKN-0006tW-Mn for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Aug 2020 19:02:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4uKH-0006tH-V3 for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 19:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4uKH-0006Xp-Li for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 19:02:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4uKH-0001aq-Jc for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 19:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Aug 2020 23:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42660 X-GNU-PR-Package: emacs Original-Received: via spool by 42660-submit@debbugs.gnu.org id=B42660.15970140676066 (code B ref 42660); Sun, 09 Aug 2020 23:02:01 +0000 Original-Received: (at 42660) by debbugs.gnu.org; 9 Aug 2020 23:01:07 +0000 Original-Received: from localhost ([127.0.0.1]:33676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4uJO-0001Zm-Vs for submit@debbugs.gnu.org; Sun, 09 Aug 2020 19:01:07 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:40772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4uJK-0001Z4-Be for 42660@debbugs.gnu.org; Sun, 09 Aug 2020 19:01:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ddboi0qtBg82JGkLYVSbxiaRBer0pPt/MWUpYRkq8cw=; b=RTdpzIdm7uQ/Jmq7zksQZBLiFf SVaBqFAzkDYIwOP1ZCJM+9HDymOK5jdKg9jX2c237+FceLISC356yjq4BWPbY9RYvfEeBgQrhdNDL ptJgYO8YbXrxVFyrRqu93b36CA8LV0+WBtqZTLF4U0hKnoMmD8ZDuBYfouYfXT0uh144=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4uJ5-0004zt-6p; Mon, 10 Aug 2020 01:00:55 +0200 In-Reply-To: (Jeffrey Walton's message of "Sat, 1 Aug 2020 16:34:22 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:184461 Archived-At: Jeffrey Walton writes: > $ cat emacs-27.1/test/lisp/international/ccl-tests.log > Running 7 tests (2020-08-01 16:28:12-0400, selector `(not (or (tag > :expensive-test) (tag :unstable)))') > passed 1/7 ccl-compile-midi (0.000181 sec) > passed 2/7 ccl-compile-pgg (0.000093 sec) > passed 3/7 ccl-dump-midi (0.005956 sec) > passed 4/7 ccl-dump-pgg (0.000111 sec) > Package pgg-def is deprecated > Package pgg-parse is deprecated > Package pgg is deprecated > ccl.c:1146:29: runtime error: left shift of 1246883553 by 1 places > cannot be represented in type 'int' I get the same, basically: Running 7 tests (2020-08-10 00:55:35+0200, selector `(not (tag :unstable))') passed 1/7 ccl-compile-midi (0.000614 sec) passed 2/7 ccl-compile-pgg (0.000371 sec) passed 3/7 ccl-dump-midi (0.001032 sec) passed 4/7 ccl-dump-pgg (0.000531 sec) Package pgg-def is deprecated Package pgg-parse is deprecated Package pgg is deprecated ccl.c:1153:29: runtime error: left shift of 1239426054 by 1 places cannot be represented in type 'int' make[1]: *** [Makefile:183: lisp/international/ccl-tests.log] Error 1 This is the test that fails: (ert-deftest pgg-parse-crc24 () ;; Compiler (require 'pgg) (should (equal pgg-parse-crc24 prog-pgg-code)) ;; Interpreter (should (equal (pgg-parse-crc24-string "foo") (concat [#x4f #xc2 #x55]))) (should (equal (pgg-parse-crc24-string "bar") (concat [#x51 #xd9 #x53]))) (should (equal (pgg-parse-crc24-string "baz") (concat [#xf0 #x58 #x6a])))) All three of those pgg-parse calls make Emacs signal a runtime error with this checking turned on. So this is with: CFLAGS="-fsanitize=undefined -fno-sanitize-recover=all" ./configure && make Now, pgg is obsolete, so that's a test that probably should go away. So is this a bug? The thing that fails is this: case CCL_LSH: reg[rrr] <<= i; break; So it's doing a left shift on a too-high number... which is something that pgg does, but since that's obsolete, do we care? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no