From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#26047: 26.0.50; emacs crash by cl-caff2 Date: Tue, 14 Mar 2017 19:07:58 +0100 Message-ID: <87pohju3y9.fsf@luca> References: <87wpbwyho2.fsf@luca> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489514966 16803 195.159.176.226 (14 Mar 2017 18:09:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2017 18:09:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 26047@debbugs.gnu.org, vibhavp@gmail.com To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 14 19:09:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnqsk-0003Mm-3V for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Mar 2017 19:09:14 +0100 Original-Received: from localhost ([::1]:32859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnqsp-0001FB-PR for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Mar 2017 14:09:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnqsf-0001DF-NE for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 14:09:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnqsZ-0006XW-0s for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 14:09:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57720) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnqsY-0006XM-NZ for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 14:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cnqsY-0000IF-Ev for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 14:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Mar 2017 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 26047-submit@debbugs.gnu.org id=B26047.14895149021080 (code B ref 26047); Tue, 14 Mar 2017 18:09:02 +0000 Original-Received: (at 26047) by debbugs.gnu.org; 14 Mar 2017 18:08:22 +0000 Original-Received: from localhost ([127.0.0.1]:55919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnqrt-0000HL-Td for submit@debbugs.gnu.org; Tue, 14 Mar 2017 14:08:22 -0400 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:40780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnqrr-0000H7-ET for 26047@debbugs.gnu.org; Tue, 14 Mar 2017 14:08:20 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (ip5f5bdecf.dynamic.kabel-deutschland.de [95.91.222.207]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 520E2179AC28; Tue, 14 Mar 2017 19:07:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1489514879; bh=Gc1CelNWBLzqM2MFa9oy9tpoJVE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=oVcmuAgVJuI6Mm9U7KbSgFyvZr1tZw5W8ZSJZASjKVE5BGoRsRpcm4Op0+qF0W1Eo zcD0SwQLYX5gvW+PZtfTcbw1llye+x5g+17AuYuwO2IF3RWA9fjL/geLkE5U6DIwsd wmtVyGDMQHl9K7yQBXxvpmwm8GW8X1haPYC1pxL8= In-Reply-To: <87wpbwyho2.fsf@luca> (Andreas Politz's message of "Fri, 10 Mar 2017 21:56:45 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130583 Archived-At: Using git bisect, I narrowed the cause of this down to the following list of commits, all of which deal with handling byte-code and have a single author. ---- commit 19cb3985a3795539b51d70625904e95a6e581eef Author: Vibhav Pant Date: Thu Jan 26 01:00:41 2017 +0530 * lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table commit 4e6140b28324a9a63d54084c920206d00aed094e Author: Vibhav Pant Date: Thu Jan 26 01:02:16 2017 +0530 * lisp/emacs-lisp/disass.el: Display jump tables for switch. commit c52a9b6ddd9166571e6bc8bb9426b0267874f9fa Author: Vibhav Pant Date: Thu Jan 26 00:58:36 2017 +0530 * lisp/emacs-lisp/bytecomp.el: Simplify b-c-cond-valid-obj2-p commit 6a82d19db18f8480342cc4c1a0ad76c75df41941 Author: Vibhav Pant Date: Thu Jan 26 14:28:23 2017 +0530 * lisp/emacs-lisp/disass.el: Fix spacing while showing jump tables commit 8189b97e5ca12aff8ea34617431a868010643b5b Author: Vibhav Pant Date: Thu Jan 26 00:57:10 2017 +0530 * lisp/emacs-lisp/bytecomp.el: Fix byte-switch codegen with symbols. commit 0d3c57dcf3187864c0b6fd6115ee80ad33faf553 Author: Vibhav Pant Date: Thu Jan 26 00:54:59 2017 +0530 * lisp/emacs-lisp/byte-opt.el: Add support for decompiling switch * lisp/emacs-lisp/byte-opt.el: (byte-decompile-bytecode-1) When the constant encountered precedes a byte-switch op, replace all the addresses in the jump table with tags. commit a7e4870f165e9fd36d5cfcabb19b215b94373602 Author: Vibhav Pant Date: Thu Jan 26 14:31:16 2017 +0530 * lisp/emacs-lisp/bytecomp.el: Use correct function to push nil * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table) Use byte-compile-constant instead of byte-compile-form to push nil. commit 23a130ee0d61fc39cee157921679809017a02b39 Author: Vibhav Pant Date: Sat Jan 21 11:37:20 2017 +0530 * lisp/emacs-lisp/bytecomp.el: Remove unused debugging statements. commit 25d38a06eceb0853190a2d9acf53d85686f524bd Author: Vibhav Pant Date: Thu Jan 26 23:03:02 2017 +0530 * lisp/emacs-lisp/bytecomp.el:(bc-cond-jump-table-info)add docstring commit bf7f7c0d82a56ed1b76358657e74ca2833b19fe2 Merge: 25d38a06ec 9c4dfdd1af Author: Vibhav Pant Date: Mon Jan 30 18:35:43 2017 +0530 Merge remote-tracking branch 'origin/master' into feature/byte-switch commit fbe6b90b0ced594cf74d5fd0dc9a32666f0d7d38 Author: Vibhav Pant Date: Thu Jan 19 23:13:53 2017 +0530 * lisp/emacs-lisp/bytecomp.el: Fix errors with matching quoted forms * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table-info) eval obj2 to avoid quoted forms being stored as is. commit 5f3379b33866ff7dc16856b6c29712eae860af0e Author: Vibhav Pant Date: Thu Jan 19 23:13:13 2017 +0530 lisp/emacs-lisp/bytecomp.el: Use byte-switch only for quoted symbols commit f441451658ecb8d0d8ba386d9fd3eebf3b17d549 Author: Vibhav Pant Date: Mon Jan 30 19:22:09 2017 +0530 * lisp/emacs-lisp/bytecomp.el: Create jump tables with :purecopy t commit 46193d5209780d21b848374d8c377fb6c8896d1b Author: Vibhav Pant Date: Thu Jan 19 23:12:09 2017 +0530 * lisp/emacs-lisp/bytecomp.el: Add default-case for last cond clause. * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table) Add default-case for last cond clause. commit bfa88520136dd6b187ba101e6db5a5f8f0d5e874 Author: Vibhav Pant Date: Wed Feb 1 18:15:59 2017 +0530 Use maphash instead of cl-loop. * lisp/emacs-lisp/bytecomp.el: (byte-compile-lapcode) Use maphash instead of cl-loop commit 522f16dac945eee351cefb066af40f0d1a683f38 Author: Vibhav Pant Date: Thu Jan 19 18:35:46 2017 +0530 Add type checking for Bswitch, when enabled at compile time. * src/bytecode.c: (exec_byte_code) If BYTE_CODE_SAFE is enabled at compile time, use CHECK_TYPE to verify that the jump table is a hash table. commit de456d1e4a1d7e34be6d040e0d8a04c42b14e62e Author: Vibhav Pant Date: Fri Feb 3 23:23:28 2017 +0530 Revert "Use maphash instead of cl-loop." This reverts commit bfa88520136dd6b187ba101e6db5a5f8f0d5e874. commit 1fcbd352f8116aca1ecdb62e84f3d86b89bc446f Author: Vibhav Pant Date: Thu Jan 19 18:02:40 2017 +0530 Use byte-switch for all symbols. * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-valid-obj2-p) Return t for all symbols (instead for just keywords) commit 44c95c58b26b7b9d75965a83930ec3d77ffae28f Author: Vibhav Pant Date: Sun Feb 5 15:37:43 2017 +0530 bytecomp.el: Don't store non-keyword symbols in jump-tables. * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-valid-obj2-p) return nil when OBJ is a non-keyword symbol (i.e a variable), as the jump table can only be used when comparing variables with constant values. commit 086c4eaf9d4ecc5074088115fa01c0b2fb061246 Author: Vibhav Pant Date: Wed Jan 18 22:40:50 2017 +0530 * src/bytecode.c: (exec_byte_code) Use hash_lookup for Bswitch Fgethash type checks the provided table object, which is unnecessary for compiled bytecode. commit 84eef501554324b22c7a838aabed77aa79315121 Author: Vibhav Pant Date: Sun Feb 5 18:49:24 2017 +0530 byte-opt.el: Replace jump tables while decompiling correctly. * lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1): Don't make a copy of the constant vector, as it isn't used with the decompiled lapcode. Make sure that the correct lapcode pair/list is being modified while replacing the jump table. commit 37956463d67795819fe7d8fe02d6249388364783 Merge: 309b46420e fd6b829d91 Author: Vibhav Pant Date: Mon Jan 16 19:49:24 2017 +0530 update branch commit fea1ad36a0f7b1538984ab0f077095a53c570aa4 Author: Vibhav Pant Date: Sun Feb 5 18:55:45 2017 +0530 ; * byte-opt.el (byte-decompile-bytecode-1): Add more documentation. commit 309b46420e83826ed1e0b947f98a47e8525e3c36 Author: Vibhav Pant Date: Sun Jan 15 21:38:31 2017 +0530 * lisp/emacs-lisp/byte-opt.el: Optimize how tags are checked for use. * byte-opt.el: (byte-optimize-lapcode): Return nil instantly on finding the tag in a jump table. commit cadb044fc2e69266308cdcabe6181be0f624b484 Author: Vibhav Pant Date: Sun Feb 5 19:23:53 2017 +0530 bytecomp.el: Inline lapcode containing `byte-switch' correctly. * lisp/emacs-lisp/bytecomp.el (byte-compile-inline-lapcode): Restore value of byte-compile-depth after emitting a jump to a tag in a jump table, or default/done tags. Set the depth of final tags for byte-switch to nil after emitting any jumps to them. commit 490fc5a5029c0d8e527a0c7f423ba83fd6afda60 Author: Vibhav Pant Date: Sun Feb 5 21:48:27 2017 +0530 ; bytecomp.el (-inline-lapcode): Fix incorrect parenthesis, refactor commit 8c0f326ea237e8acd03c51c1b3a44d237c044562 Author: Vibhav Pant Date: Sun Jan 15 19:36:26 2017 +0530 * lisp/emacs-lisp/bytecomp.el: Add documentation, remove code duplication commit 382f6603ad4ba2a69b3961bdc68580ce77d222f9 Author: Vibhav Pant Date: Sun Feb 5 21:51:05 2017 +0530 ; Fix typo. * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info): Fix typo in docstring. commit 88549ec38e9bb30e338a9985d0de4e6263b40fb7 Author: Vibhav Pant Date: Sun Jan 15 01:26:04 2017 +0530 Add new 'switch' byte-code. 'switch' takes two arguments from the stack: the variable to test, and a jump table (implemented as a hash-table with the appropriate :test function). By looking up the value of the variable in the hash table, the interpreter can jump to the label pointed to by the value, if any. This implementation can only be used for `cond' forms of the type `(cond ((test x 'foo) 'bar) ...)`, such that the function `test` and variable `x` is same for all clauses. * lisp/emacs-lisp/bytecomp.el: * Add (byte-compile-cond-valid-obj2-p), (byte-compile-cond-vars), (byte-compile-cond-jump-table-info), (byte-compile-jump-table-add-tag), (byte-compile-cond-jump-table), byte-compile-jump-tables. * Add defcustom `byte-compile-cond-use-jump-table'. * (byte-compile-cond): Use them. * (byte-compile-lapcode): Patch tags present in jump tables, if any. * lisp/emacs-lisp//byte-opt.el: (byte-optimize-lapcode): Add checks to some peephole optimizations to prevent them from messing up any code involving `byte-switch`. * src/bytecode.c: (exec_byte_code): Add bytecode Bswitch. commit 74a3423b0b92b80d84f6de62d1f2d61c21e4bd90 Author: Vibhav Pant Date: Sun Feb 5 22:10:22 2017 +0530 * byte-opt.el (byte-decompile-bytecode-1): Use eq instead of =. ---- -ap