From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vibhav Pant Newsgroups: gmane.emacs.bugs Subject: bug#26047: 26.0.50; emacs crash by cl-caff2 Date: Tue, 14 Mar 2017 23:48:44 +0530 Message-ID: References: <87wpbwyho2.fsf@luca> <87pohju3y9.fsf@luca> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1489515618 30086 195.159.176.226 (14 Mar 2017 18:20:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2017 18:20:18 +0000 (UTC) Cc: 26047@debbugs.gnu.org, Leo Liu To: Andreas Politz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 14 19:20:13 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 1cnr3I-0006pP-BN for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Mar 2017 19:20:08 +0100 Original-Received: from localhost ([::1]:32903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnr3M-0003w6-UV for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Mar 2017 14:20:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnr3G-0003tq-6D for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 14:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnr3C-0006az-5P for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 14:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57730) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnr3C-0006as-28 for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 14:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cnr3B-0000YY-TJ for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 14:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vibhav Pant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Mar 2017 18:20:01 +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.14895155532078 (code B ref 26047); Tue, 14 Mar 2017 18:20:01 +0000 Original-Received: (at 26047) by debbugs.gnu.org; 14 Mar 2017 18:19:13 +0000 Original-Received: from localhost ([127.0.0.1]:55929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnr2O-0000XR-NK for submit@debbugs.gnu.org; Tue, 14 Mar 2017 14:19:13 -0400 Original-Received: from mail-yw0-f178.google.com ([209.85.161.178]:33635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnr2M-0000XF-PA for 26047@debbugs.gnu.org; Tue, 14 Mar 2017 14:19:11 -0400 Original-Received: by mail-yw0-f178.google.com with SMTP id v76so84693929ywg.0 for <26047@debbugs.gnu.org>; Tue, 14 Mar 2017 11:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I+oUiPua8m/8BHg+zAcqmlHZW4U+E86teapPK7ot7EM=; b=FZadIuY994ppktSPS/9w9l3dNUgJHc2KLanfvN66NcrFAtrnjDJnEMWby5KnnZQHjC mPfDEdB5q2v7lHqltcK4V3thdGo26JALzq6fmgAZKphrzEiQ2aTbnTt/c8x/03R0S3dc liRVBg6T8pKu1AM14HrKPhePMXv5+SdloLHo9nMQkhPJPPvBhENP1LZrrJFSN7JYG0y6 /jv4Lprw5SBt4quzm9uAtSgjOlDjKPWb/s5MUQ9PVLo9uIFgyuqUWBjvlu8+TVdQOEz+ gPuILuXV2GfCrRJMwtqfCjJkPDhyXRe0SBvv2ipKoNTORVVchao5l+RYXqByHeMM8eAY VdNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I+oUiPua8m/8BHg+zAcqmlHZW4U+E86teapPK7ot7EM=; b=aLoBnrLYQT5wGyOX6u3wRzhNDcLMO/wtHLHO+lpWPePRWC2QxbrouTBJYyop8akayD Qvr2mqlZnezpJ9J5I+5pFXii9R2uTbLeXXF1fjeBSiw5Pqot6ExudP3AuM9Idr6RZHjM hNitK8p/UeHAo5jFy9Y+95dTgxHOJafoec2XxsIlP3s9uXbPNA5hmRha6532g0K/3z6N uo5efddY7dAySXV5WMZz88VN4fWCSGXE30UW8vDMBLBkfgnpios85DOnycT3+cnZLHD2 srmjVzu0SV1F7Gyrt2ZQ94I3jKYuq0gj37zAUbMn7bl6I44N4o2JvvgzQIDjVZq3KZPs BnCQ== X-Gm-Message-State: AMke39nyzU5koi9ISlsq1IeqGrzU+JHtYn60yrm4EEQe5muT4ru8VwDn6YhH/iF+4qA4+GDUdKG/14/s+DRRYA== X-Received: by 10.129.174.81 with SMTP id g17mr25673977ywk.25.1489515544877; Tue, 14 Mar 2017 11:19:04 -0700 (PDT) Original-Received: by 10.129.37.3 with HTTP; Tue, 14 Mar 2017 11:18:44 -0700 (PDT) In-Reply-To: <87pohju3y9.fsf@luca> 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:130584 Archived-At: Yes, I've been investigating for some time. For now, a workaround would be to set byte-compile-cond-use-jump-table to nil before compiling. Thanks, Vibhav On Tue, Mar 14, 2017 at 11:37 PM, Andreas Politz wrote: > > 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 -- Vibhav Pant vibhavp@gmail.com