From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector objects Date: Wed, 27 May 2020 17:57:31 +0000 Message-ID: References: <83zha8cgpi.fsf@gnu.org> <83r1vibmyj.fsf@gnu.org> <83imgublku.fsf@gnu.org> <831rncjuwf.fsf@gnu.org> <83h7w5xvfa.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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="3569"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41321@debbugs.gnu.org, Stefan Monnier To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 27 20:00:07 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 1je0LW-0000pi-Ur for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 May 2020 20:00:06 +0200 Original-Received: from localhost ([::1]:49102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1je0LV-0004XW-W7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 May 2020 14:00:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1je0KV-0003oX-3G for bug-gnu-emacs@gnu.org; Wed, 27 May 2020 13:59:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1je0KU-0000CZ-QO for bug-gnu-emacs@gnu.org; Wed, 27 May 2020 13:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1je0KU-0000j9-NO for bug-gnu-emacs@gnu.org; Wed, 27 May 2020 13:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 May 2020 17:59: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.15906022952735 (code B ref 41321); Wed, 27 May 2020 17:59:02 +0000 Original-Received: (at 41321) by debbugs.gnu.org; 27 May 2020 17:58:15 +0000 Original-Received: from localhost ([127.0.0.1]:49961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1je0Ji-0000i2-JM for submit@debbugs.gnu.org; Wed, 27 May 2020 13:58:14 -0400 Original-Received: from mail-oo1-f47.google.com ([209.85.161.47]:34370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1je0Jh-0000hq-Ig for 41321@debbugs.gnu.org; Wed, 27 May 2020 13:58:13 -0400 Original-Received: by mail-oo1-f47.google.com with SMTP id v3so533329oot.1 for <41321@debbugs.gnu.org>; Wed, 27 May 2020 10:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QzzElGIKF4Fd8wqC6DlI3+vLnglAX6L1VrubVwXvGDw=; b=Qzjm3BMfBb+svYoL7MqxumzZ63WeZkK4S85KJRRGVtf6vvxTmIJ30AU20P568AW3PX feg5G/UVB5cT7ZPQvbBkGEY1rwqa4rPUFa/bLcOzSgypCu2ildK2KMajeendyXlAhRvI 6M/B4JGhIv6FDYd9xM/lI3AZO6vm8d3xv8Xmmeze+LLDIpth2BZIXnYLRE7ppE2Q0Tmf EbpGev9wBplisDnvMf9734FWSGFBy/v0BnNCCDA6xXZKRQI/amO6l4UXlhirbJ8zSCnK +BzYvvzVhdcTMblCTOEJujl4mhBpEsXemy7cf96RA/FeRpaUFHfpjtmiZBQPyyHdWMuU HQwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QzzElGIKF4Fd8wqC6DlI3+vLnglAX6L1VrubVwXvGDw=; b=pUdkY1oOjBMeE+YjxkOy7HyS5YNpgK6L7iDn9lcAzRjxjUq4bIx1i/CIiZvr6EFSgR f6uwFp90v6ahma3i2wtYr2z1Y5TBb/4f9OnnrkrW1SIdywAkTUEYV1SMYkbFQWI5JyL2 A4zMqZz7UMpk5/3bsBEAx3r7jvRixCPjqrVdSYuvyhcP5RhiUN9R5iT9vmJN3OSetYpy zCa1dIEz8Z2NTielFs0KdUCrLH3yBhsUP5gbaFLC0lCe5BiGDn8QcycXTyDQrhHbvbxU PJVx0WmxWvLljwf/yEGJXs6y9n/XMZeVrUBMrHb5QES881kYa4ZpmYK/EMPbJU3D30nU AinA== X-Gm-Message-State: AOAM532zup2oxTx/yw/lxnvCZ+gA75CwHw+uT5Jwi31WLWfUbDcLCHSi 2p+wYd00AxtH1hieZKU5lkOJi80GKyrBBqcuLZ4= X-Google-Smtp-Source: ABdhPJzcJ7tTEvDET9IcNajXGYm+hFG4Z751pacJzlQlixFtxZDD2B3HV78FX5oVVK2WAFuiCLrHGQUMflQboTuWgtM= X-Received: by 2002:a4a:e702:: with SMTP id y2mr4044726oou.44.1590602287711; Wed, 27 May 2020 10:58:07 -0700 (PDT) In-Reply-To: <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@cs.ucla.edu> 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:181100 Archived-At: On Wed, May 27, 2020 at 4:58 PM Paul Eggert wrote: > On 5/27/20 8:26 AM, Eli Zaretskii wrote: > > We used to rely on 8-byte alignment on those systems, and I don't see > > any reason not to continue relying on that and punishing those > > systems' performance. What would we gain? > > In looking into this more, it appears that the maybe_lisp_pointer idea is wrong, > in that compilers can make pointers into a Lisp object while losing the address > of the original object (and we've seen them do this) and there's no guarantee > that these sub-pointers are GCALIGNED. Do you know of anything like this happening on 64-bit systems? Because I think it doesn't; Emacs GC does rely, and has always relied since GCPRO was removed, on compilers being sensible about what they put on the stack. There's no guarantee in the C standard that that's true, but there never will be. > This sort of failure should be quite rare > but can cause crashes such as the one you observed. I'm pretty sure we figured out the crash that Eli observed. It's not anything that involved, just a Lisp_Object being stored non-consecutively and simultaneously being misaligned for the purposes of maybe_lisp_pointer. > I am looking into a fix and > plan to apply it to master (I've already installed some minor glitches I > observed on the way); we can then talk about what to do with emacs-27. I may be out of line, but I think it's rash to change things like that, even on master, with no opportunity for prior discussion. This isn't a minor bug, or a spelling fix: it's a fundamental change in what we expect from our C compiler and how GC works. In particular, I don't see how you plan to solve it without treating any pointer that points even in the vicinity of a valid lisp object as keeping that object alive.