From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector objects Date: Thu, 28 May 2020 09:30:20 -0400 Message-ID: References: <83zha8cgpi.fsf@gnu.org> <83y2phwb9x.fsf@gnu.org> <83r1v9w9vi.fsf@gnu.org> <83mu5xw50d.fsf@gnu.org> <83k110wxte.fsf@gnu.org> <4bab5f55-95fe-cf34-e490-1d4319728395@cs.ucla.edu> <837dwyvi74.fsf@gnu.org> <1484f569-c260-9fb0-bfe1-67897de289d3@cs.ucla.edu> <83blm9tn4j.fsf@gnu.org> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@cs.ucla.edu> <83r1v5s2p1.fsf@gnu.org> <5351703b-1780-561b-7f68-cdd4ed45e599@cs.ucla.edu> <838shcseng.fsf@gnu.org> <309544a0-d857-13f3-e211-41a40966dcc5@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="11826"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41321@debbugs.gnu.org, pipcet@gmail.com To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 28 15:36:16 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 1jeIhj-0002z0-VI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 May 2020 15:36:15 +0200 Original-Received: from localhost ([::1]:36648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeIhi-0006Wt-Ux for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 May 2020 09:36:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeIcg-0008La-OR for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 09:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jeIcg-0001ah-CJ for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 09:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jeIcg-0000nf-6x for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 09:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 May 2020 13:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41321 X-GNU-PR-Package: emacs Original-Received: via spool by 41321-submit@debbugs.gnu.org id=B41321.15906726323029 (code B ref 41321); Thu, 28 May 2020 13:31:02 +0000 Original-Received: (at 41321) by debbugs.gnu.org; 28 May 2020 13:30:32 +0000 Original-Received: from localhost ([127.0.0.1]:51274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeIcB-0000mm-SL for submit@debbugs.gnu.org; Thu, 28 May 2020 09:30:32 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeIc9-0000mX-4h for 41321@debbugs.gnu.org; Thu, 28 May 2020 09:30:31 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id BC69F80408; Thu, 28 May 2020 09:30:23 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id F315080159; Thu, 28 May 2020 09:30:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1590672621; bh=h519vPoz5Fbxr84uySHt49N0iGKNgCB7mEOUz92I0ac=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=VKWGb3o5XwcuTexRsI+6nVDx1h2qCWWVzIc07SAbn/ouxR0pJHXXU9CtoQGUZYAbQ +itTQoCZ9gr0+DX3jtCD2JVewSUyJ1la6rdyUvh+wp3Srt0VQgw3ULupgrAn+do5i6 vIYkGXT+Xg6baZilg5Sh5ofWuOc9d1yD4c20Xc5AIGhk1gjD439ZhEDm+WE94Qv+MI MZlXJeDvGVrkxjRBJ9XGmlNgaON3M9sVov3HhwV7cGcqMJpjvVIWdChobUDec7LOPS yUI8rcy1vp0ZLcpU1t9CerwlOhAuM06SgAI6Iad2rN8/gjumes0jHjouT5sFZ/IIds oWcKXEIUPAL0w== Original-Received: from alfajor (unknown [216.154.27.250]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4AC561201F1; Thu, 28 May 2020 09:30:21 -0400 (EDT) In-Reply-To: <309544a0-d857-13f3-e211-41a40966dcc5@cs.ucla.edu> (Paul Eggert's message of "Thu, 28 May 2020 00:41:33 -0700") 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:181139 Archived-At: >> You are suggesting that we go back to using live_string_p? > I think he's saying just the opposite: namely, that maybe_lisp_pointer is a > mistake, in that it goes against the (solid) reasons we've replaced some calls > to live_string_p with calls to live_string_holding. > After looking into it I agree. I'll propose a patch shortly that does away with > maybe_lisp_pointer. Exactly. More specifically, `maybe_lisp_pointer` tries to filter out false positives but does it based on the assumption that we should only accept numbers that look like pointers to the beginning of a Lisp_Object. If we still want to try and filter out false positives we need to do it more carefully by considering what is the smallest alignment possible for a pointer to an internal field of a Lisp_Object. And if this least alignment is not the same for all Lisp_Objects, then this test should likely be moved to the respective `live__holding`. I suspect that for vectorlike objects, the least alignement is 1 because of some `char` or `bool` fields in some of the pseudovectors. Of course, we could do better by checking for "false positives" after checking the specific kind of vectorlike object (so as to use a different least-alignment-check for those objects that contains `char`s than for those who only contain `int`s, for example). Stefan