GNU bug report logs - #41321
27.0.91; Emacs aborts due to invalid pseudovector objects

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Eli Zaretskii <eliz@HIDDEN>; dated Sat, 16 May 2020 10:34:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 19:33:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 15:33:37 2020
Received: from localhost ([127.0.0.1]:59244 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf7Ef-0004Ve-AD
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 15:33:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41458)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jf7Ec-0004VP-Op
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 15:33:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43159)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jf7EX-0002q8-8V; Sat, 30 May 2020 15:33:29 -0400
Received: from [176.228.60.248] (port=2533 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jf7EW-0008Jk-Pw; Sat, 30 May 2020 15:33:29 -0400
Date: Sat, 30 May 2020 22:33:27 +0300
Message-Id: <83imgdkyk8.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <5c746672-9f07-0314-500c-dc46e0c5b764@HIDDEN> (message from
 Paul Eggert on Sat, 30 May 2020 12:14:14 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN> <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN> <83tuzxl6gu.fsf@HIDDEN>
 <782f3b14-ff24-fa26-5bd1-fa0db013bf8c@HIDDEN> <83r1v1l4ls.fsf@HIDDEN>
 <3399f152-27aa-3854-d741-e9dfaaa00fc7@HIDDEN> <83mu5pl1wk.fsf@HIDDEN>
 <5c746672-9f07-0314-500c-dc46e0c5b764@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Sat, 30 May 2020 12:14:14 -0700
> 
> On 5/30/20 11:21 AM, Eli Zaretskii wrote:
> 
> > on current emacs-27, both LISP_ALIGNMENT
> > and alignof(max_align_t) are 16 in my builds.  And I still don't
> > understand why using LISP_ALIGNMENT of 8 is not right in this case (on
> > emacs-27).
> 
> You're right that LISP_ALIGNMENT is 16 on your host on the emacs-27 
> branch, because alignof (max_align_t) is 16 there. And you're also right 
> that setting LISP_ALIGNMENT to be 8 on your host would fix the marker 
> bug you observed there, because it would work around your host's bug 
> where malloc returns a pointer that is not a multiple of 
> alignof(max_align_t). However, C and POSIX allow platforms where 
> LISP_ALIGNMENT should be greater than 8, or (if !USE_LSB_TAG) should be 
> less than 8, so I'd be leery about changing LISP_ALIGNMENT on any host 
> that doesn't have your host's idiosyncrasies.

Posix may require it, but do we actually know of any supported
important platforms where this happens?  If not, let's worry about the
more general fix on master, where we still have time to try various
solutions, and settle for a simpler and easier fix on emacs-27.

> And that specific workaround should not be needed anyway if we
> install the emacs-27 patch that I have most-recently suggested (or
> Pip Cet's very-similar recent patch), since this patch solves the
> problem in a more-general way that should help to prevent more bugs
> like this one.

But your proposal is also less efficient, isn't it?   If so, its more
general nature comes at a price.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 19:14:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 15:14:25 2020
Received: from localhost ([127.0.0.1]:59239 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf6w4-000431-O4
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 15:14:24 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40146)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf6w2-00042n-T7
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 15:14:23 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0443C1600D9;
 Sat, 30 May 2020 12:14:17 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id qDTtAHgV4k23; Sat, 30 May 2020 12:14:16 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4868F1600DA;
 Sat, 30 May 2020 12:14:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id gfyJuqVPj1r3; Sat, 30 May 2020 12:14:16 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EEE401600D9;
 Sat, 30 May 2020 12:14:15 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN> <83tuzxl6gu.fsf@HIDDEN>
 <782f3b14-ff24-fa26-5bd1-fa0db013bf8c@HIDDEN> <83r1v1l4ls.fsf@HIDDEN>
 <3399f152-27aa-3854-d741-e9dfaaa00fc7@HIDDEN> <83mu5pl1wk.fsf@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <5c746672-9f07-0314-500c-dc46e0c5b764@HIDDEN>
Date: Sat, 30 May 2020 12:14:14 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83mu5pl1wk.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/30/20 11:21 AM, Eli Zaretskii wrote:

> on current emacs-27, both LISP_ALIGNMENT
> and alignof(max_align_t) are 16 in my builds.  And I still don't
> understand why using LISP_ALIGNMENT of 8 is not right in this case (on
> emacs-27).

You're right that LISP_ALIGNMENT is 16 on your host on the emacs-27 
branch, because alignof (max_align_t) is 16 there. And you're also right 
that setting LISP_ALIGNMENT to be 8 on your host would fix the marker 
bug you observed there, because it would work around your host's bug 
where malloc returns a pointer that is not a multiple of 
alignof(max_align_t). However, C and POSIX allow platforms where 
LISP_ALIGNMENT should be greater than 8, or (if !USE_LSB_TAG) should be 
less than 8, so I'd be leery about changing LISP_ALIGNMENT on any host 
that doesn't have your host's idiosyncrasies. And that specific 
workaround should not be needed anyway if we install the emacs-27 patch 
that I have most-recently suggested (or Pip Cet's very-similar recent 
patch), since this patch solves the problem in a more-general way that 
should help to prevent more bugs like this one.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 19:07:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 15:07:13 2020
Received: from localhost ([127.0.0.1]:59234 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf6p6-0003t0-UW
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 15:07:13 -0400
Received: from mail-oi1-f173.google.com ([209.85.167.173]:38398)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jf6p5-0003sm-Ue
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 15:07:12 -0400
Received: by mail-oi1-f173.google.com with SMTP id c194so862908oig.5
 for <41321 <at> debbugs.gnu.org>; Sat, 30 May 2020 12:07:11 -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=gpfIBgtFnndXmA7qmyWUPFeQQGhVIFjEVWW4WclXTnc=;
 b=ulYPSfRfT30JeQ9aYlaZUO7fD5zfAAtOQHWorYg3zenp+S9INToCclfUQAeqs4/RrU
 trc2H5NN8sr0ONONXvSXQcoikGGk0HgESEuBe9flqXbZWz6Qj/gsd906sww21NYV+odF
 eTN4dMq0em3VqsycZJencItttOLOVICyOHCqkjLrm3l0wZcY6EM+aGP054RQUxU4kP4y
 78uA/KgF7ADuUoPHkPzzvQ39/b3wrNowTWqNlyc/kUcw3p1uZlPGhhscuWIQl+mozv3J
 V/lNqP1renXOPEP+gT3yjiy1Y2ZbivswIpy+82uecHaXZ0Q6UOaV/Rf9UiDrdLaip/xa
 rJZA==
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=gpfIBgtFnndXmA7qmyWUPFeQQGhVIFjEVWW4WclXTnc=;
 b=iw3IoHKuWW17fQoMgXFSsXKY53AIloQADj3qLbXDzhy0e65z9TZgEU4+6uG9z1wa1D
 1ZT8vzTvCN2XqA2PzPomw/nD1lL4Hf9weplELI9zKX6ObRBn3y6p6Lh01SaDMNH+LXcW
 gzD+5e2evhnpo4c7PA4MpKp7tCPbEiJPum7p3okA9tjdcuHfM0YP6dUjw10AZRTgonAv
 Kr11ehKBAleZ50TySd4VG5wVWx+2W+BrGsVnmkLWNIq9roz6XlEzC7jW6VdXHCEMIFVZ
 xoYCm3UmOOAh2OAHEQy+SjD/n+xyNP7YgsQcgrcCOvUqMS1FKONXeP6DgbY29nCFy0WG
 OXiQ==
X-Gm-Message-State: AOAM5318n1+8/Djm0xoG9nRCOHaco7vR/RSv4aIO1DdJLKkTPIXpDSOc
 7iIsfZXb78s9WKYp6YqburYfysca84+CU1InvDI=
X-Google-Smtp-Source: ABdhPJw32oUcRFAXv7TT30rkiIL3vjDEEaDoqFi2iB1lM+jV/oZw3H6IWEyzvd+8jyIpFq/futV67jzw6md4wsd3bxQ=
X-Received: by 2002:a05:6808:1c8:: with SMTP id
 x8mr9869927oic.30.1590865626264; 
 Sat, 30 May 2020 12:07:06 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN>
 <CAOqdjBfiJfab7RDXtahi83FXcGB0qOsyMkGA1JARB8wRxk-LdA@HIDDEN>
 <8cc638f5-9df2-903f-7fc0-84919c6d872f@HIDDEN>
In-Reply-To: <8cc638f5-9df2-903f-7fc0-84919c6d872f@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 30 May 2020 19:06:29 +0000
Message-ID: <CAOqdjBcPSYjXFyqqE5OAdpgL4zChFVygBdriiskE+R6o6+_eDg@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, May 30, 2020 at 6:57 PM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/30/20 11:39 AM, Pip Cet wrote:
> > I fail to see the problem
> > with my patch. mark_maybe_object is unnecessary on x86
> > --with-wide-int, and mark_maybe_pointer (off + lispsym) is unnecessary
> > on platforms that don't rip apart our precious Lisp_Objects. The other
> > call to mark_maybe_pointer isn't skipped.
>
> The other alloc.c code is inconsistent with respect to the
> live_*_holding versus live_*_p functions. There is no live_float_holding
> function,

Indeed. There's just live_float_p.

> which means we're relying entirely on mark_maybe_object to
> find roots that contain Lisp floats.

No, we're not. There's code in mark_maybe_pointer to handle the float
case, by calling live_float_p.

Is it misaligned pointers into floats you're worried about?

> So it's dicey that your earlier
> (Bug#41321#299) patch skips the call to mark_maybe_object on some platforms.

I still fail to see how.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:58:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:58:04 2020
Received: from localhost ([127.0.0.1]:59225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf6gF-0003el-Qc
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:58:04 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37820)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf6gD-0003eG-C6
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:58:01 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id C6CD61600D9;
 Sat, 30 May 2020 11:57:55 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id Ie4Hh_ZhvwhL; Sat, 30 May 2020 11:57:54 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5F2C21600DA;
 Sat, 30 May 2020 11:57:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id BMS04QTJwjjY; Sat, 30 May 2020 11:57:54 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3FF961600D9;
 Sat, 30 May 2020 11:57:54 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN>
 <CAOqdjBfiJfab7RDXtahi83FXcGB0qOsyMkGA1JARB8wRxk-LdA@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <8cc638f5-9df2-903f-7fc0-84919c6d872f@HIDDEN>
Date: Sat, 30 May 2020 11:57:52 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBfiJfab7RDXtahi83FXcGB0qOsyMkGA1JARB8wRxk-LdA@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/30/20 11:39 AM, Pip Cet wrote:
> I fail to see the problem
> with my patch. mark_maybe_object is unnecessary on x86
> --with-wide-int, and mark_maybe_pointer (off + lispsym) is unnecessary
> on platforms that don't rip apart our precious Lisp_Objects. The other
> call to mark_maybe_pointer isn't skipped.

The other alloc.c code is inconsistent with respect to the 
live_*_holding versus live_*_p functions. There is no live_float_holding 
function, which means we're relying entirely on mark_maybe_object to 
find roots that contain Lisp floats. So it's dicey that your earlier 
(Bug#41321#299) patch skips the call to mark_maybe_object on some platforms.

I've been working on improving this for master.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:45:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:45:27 2020
Received: from localhost ([127.0.0.1]:59217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf6Tr-0003Mu-JK
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:45:27 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36528)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf6Tp-0003Mg-Fh
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:45:14 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 78C901600D9;
 Sat, 30 May 2020 11:45:07 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id qamk-WGZghmS; Sat, 30 May 2020 11:45:06 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1BB661600DA;
 Sat, 30 May 2020 11:45:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id Yu0X1J99kBja; Sat, 30 May 2020 11:45:05 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A70741600D9;
 Sat, 30 May 2020 11:45:05 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN> <83o8q5l23v.fsf@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <e1ccc6df-ff10-a515-026e-f8aad92eef65@HIDDEN>
Date: Sat, 30 May 2020 11:45:04 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83o8q5l23v.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------87741426664B7D359E67C68C"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------87741426664B7D359E67C68C
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

On 5/30/20 11:16 AM, Eli Zaretskii wrote:

> Please explain in comments why we are marking one more pointer in the
> loop.

Sure. I'm attaching the revised patch proposed for emacs-27. This is 
very similar to what Pip Cet just proposed in Bug#41321#353, but the 
code is simpler with fewer casts (and I like my comment better :-).

> I don't think I understand why this solves all of the
> problems we were discussing; is this in addition to another patch that
> you propose for emacs-27?

This replaces all the patches that I proposed for emacs-27 in this 
thread. Although this patch doesn't solve all the problems we have been 
discussing, it does solve the urgent ones:

* The problem you observed on MinGW for markers; it can also occur for 
many other object types. This problem can cause the GC to incorrectly 
reclaim storage for objects, causing the usual disasters.

* The similar problem that Pip Cet noted for symbols.

The patch does not solve less-urgent problems we've talked about, such 
as over-alignment of Lisp objects on MinGW (this is a relatively minor 
performance issue), or the more-obscure and unlikely GC bugs that we've 
been living with for a while (which I haven't had the time to think 
through entirely).

--------------87741426664B7D359E67C68C
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Be-more-aggressive-in-marking-objects-during-GC.patch"
Content-Disposition: attachment;
 filename*0="0001-Be-more-aggressive-in-marking-objects-during-GC.patch"
Content-Transfer-Encoding: quoted-printable

From 6a474a55e68a2bada13db69d4099a4b2de7b1271 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Sat, 30 May 2020 10:10:02 -0700
Subject: [PATCH] Be more aggressive in marking objects during GC
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

Simplified version of a patch from Pip Cet (Bug#41321#299).
* src/alloc.c (maybe_lisp_pointer): Remove.  All uses removed.
(mark_memory): Also look at the pointer offset by =E2=80=98lispsym=E2=80=99=
,
for symbols.
---
 src/alloc.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 1c6b664b22..568fee666f 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4585,18 +4585,6 @@ mark_maybe_objects (Lisp_Object const *array, ptrd=
iff_t nelts)
     mark_maybe_object (*array);
 }
=20
-/* Return true if P might point to Lisp data that can be garbage
-   collected, and false otherwise (i.e., false if it is easy to see
-   that P cannot point to Lisp data that can be garbage collected).
-   Symbols are implemented via offsets not pointers, but the offsets
-   are also multiples of LISP_ALIGNMENT.  */
-
-static bool
-maybe_lisp_pointer (void *p)
-{
-  return (uintptr_t) p % LISP_ALIGNMENT =3D=3D 0;
-}
-
 /* If P points to Lisp data, mark that as live if it isn't already
    marked.  */
=20
@@ -4609,9 +4597,6 @@ mark_maybe_pointer (void *p)
   VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p));
 #endif
=20
-  if (!maybe_lisp_pointer (p))
-    return;
-
   if (pdumper_object_p (p))
     {
       int type =3D pdumper_find_object_type (p);
@@ -4715,7 +4700,16 @@ mark_memory (void const *start, void const *end)
=20
   for (pp =3D start; (void const *) pp < end; pp +=3D GC_POINTER_ALIGNME=
NT)
     {
-      mark_maybe_pointer (*(void *const *) pp);
+      char *p =3D *(char *const *) pp;
+      mark_maybe_pointer (p);
+
+      /* Unmask any struct Lisp_Symbol pointer that make_lisp_symbol
+	 previously disguised by adding the address of 'lispsym'.
+	 On a host with 32-bit pointers and 64-bit Lisp_Objects,
+	 a Lisp_Object might be split into registers saved into
+	 non-adjacent words and P might be the low-order word's value.  */
+      p +=3D (intptr_t) lispsym;
+      mark_maybe_pointer (p);
=20
       verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT =3D=3D 0);
       if (alignof (Lisp_Object) =3D=3D GC_POINTER_ALIGNMENT
--=20
2.17.1


--------------87741426664B7D359E67C68C--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:40:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:40:20 2020
Received: from localhost ([127.0.0.1]:59213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf6P5-0003Ea-Th
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:40:20 -0400
Received: from mail-ot1-f50.google.com ([209.85.210.50]:35644)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jf6P4-0003EJ-QI
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:40:19 -0400
Received: by mail-ot1-f50.google.com with SMTP id 69so4650219otv.2
 for <41321 <at> debbugs.gnu.org>; Sat, 30 May 2020 11:40:18 -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=1QABPw0WT9R6QOV9iXfuw18zQHP2iuI/X7cqwYaRDIM=;
 b=q2oK3fvBByI42t2u/733gysXvfy/xs2namlhYpBjtUBzWDu+3Pt77CgXMmHzISlJMm
 N8PlmQwZNnVMVw/v/X30NTM4b+jtfOl4xvTCeHfwF/wPBMjJfB6MDjPQKbU3qmbJDAfu
 ZeujjQXzEAhY+x2hiLM8gCKosMLqFx+UTRwvIdBW5CBud6N7RNc9lxsW+MAoz3RtMX8I
 WtF9MQwTgyRT2Z63exNJlx/8m6U9xFj/doVCSUVifSCWOhOpsfJuu/tJH3dfLxvZtLRT
 xFRA/gkga6XZbxvbcolwrQ0W+yezOWnG/tSdNUIGrqMXN9nQKjQTqMw4B7f9gWwynDSW
 PyWg==
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=1QABPw0WT9R6QOV9iXfuw18zQHP2iuI/X7cqwYaRDIM=;
 b=rtadvKWyWDzqiZ+uQvAhrZSa/q9eJlqzdEzBMqLprQi5o0RCnvnAg+78pve+XunmmB
 ngEpCaX4Z47tMaZQrPIfQg7IrYsvB159ZqRxrgddd+AkiYG6eiWNLVIDMQcXATDmHp8Q
 fhyGiHdnkea8z1esr7vAj3yP4Xpaetj7u2sRHHb8gMPmatslAPEWJSa1Cz1Fwtar9yPA
 4nh+a7nqig+nEyjL9HX9n+0mTBxtcLtraVTcpdbSEqxCiWe6u0gsOK+q8oqnNDQgAaLx
 adRuJSRf3+25/dt8kqRfOGiAYoBHEsouXhd0lodWkBMBAmXAEK9AKKlIDdMFEzJRuyJm
 HEOw==
X-Gm-Message-State: AOAM533qYNz5Yfr/aYX3EoLG5gYKhni04YalQ5Zx0KU2O6EbZDg/TAkt
 zkFyHT4EPkIwmI+YwIfUgT18mB1P0fYuizWR/aI=
X-Google-Smtp-Source: ABdhPJxt+EBAp1cSa5oJA3Sk91Hr/vLXgd4sENgcz3cVZ5vEcu2em7N2U51WS1FHnufjup0Or+Yl9RRIrjM2D0FNtEg=
X-Received: by 2002:a9d:4c97:: with SMTP id m23mr7393303otf.154.1590864013156; 
 Sat, 30 May 2020 11:40:13 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN>
In-Reply-To: <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 30 May 2020 18:39:36 +0000
Message-ID: <CAOqdjBfiJfab7RDXtahi83FXcGB0qOsyMkGA1JARB8wRxk-LdA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000642ec805a6e1e484"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000642ec805a6e1e484
Content-Type: text/plain; charset="UTF-8"

On Sat, May 30, 2020 at 6:04 PM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/30/20 6:29 AM, Pip Cet wrote:
> > I'm surprised, but glad that you think so. Patch for emacs-27 attached.
> That patch is on the right track but it's not clear whether it will
> cause GC to fail to mark some objects that it should, both because it
> omits mark_maybe_object on platforms like x86 --with-wide-int where
> alignof (void *) < sizeof (Lisp_Object), and because it skips
> mark_maybe_pointer on more-typical platforms where alignof (void *) ==
> sizeof (Lisp_Object).

I've thought about this for a while, but I fail to see the problem
with my patch. mark_maybe_object is unnecessary on x86
--with-wide-int, and mark_maybe_pointer (off + lispsym) is unnecessary
on platforms that don't rip apart our precious Lisp_Objects. The other
call to mark_maybe_pointer isn't skipped.

I still think we ought to use yours (and accept a ~25% performance
penalty in this particular loop on Eli's platform), but include a
comment like the one I had in mine. It might hide further bugs, but
that's probably what we want to do on emacs-27.

Proposed patch attached.

--000000000000642ec805a6e1e484
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Be-more-aggressive-in-marking-objects-during-GC-bug-.patch"
Content-Disposition: attachment; 
	filename="0001-Be-more-aggressive-in-marking-objects-during-GC-bug-.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_katzbzyk0>
X-Attachment-Id: f_katzbzyk0

RnJvbSAwNDdmYzA0YWY4ZjlkNmI2ZTQ1ODdlZTg4ZDU3M2RhYzQyOTJlZWIwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBTYXQs
IDMwIE1heSAyMDIwIDEzOjIzOjI0ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gQmUgbW9yZSBhZ2dy
ZXNzaXZlIGluIG1hcmtpbmcgb2JqZWN0cyBkdXJpbmcgR0MgKGJ1ZyM0MTMyMSkKCiogc3JjL2Fs
bG9jLmMgKG1heWJlX2xpc3BfcG9pbnRlcik6IFJlbW92ZS4KICAobWFya19tZW1vcnkpOiBNYXJr
IDMyLWJpdCB3b3JkcyB0aGF0IG1pZ2h0IGJlIHRoZSBvbmx5IHJlZmVyZW5jZQogIHRvIGEgTGlz
cF9TeW1ib2wuCi0tLQogc3JjL2FsbG9jLmMgfCAyNCArKysrKysrKy0tLS0tLS0tLS0tLS0tLS0K
IDEgZmlsZSBjaGFuZ2VkLCA4IGluc2VydGlvbnMoKyksIDE2IGRlbGV0aW9ucygtKQoKZGlmZiAt
LWdpdCBhL3NyYy9hbGxvYy5jIGIvc3JjL2FsbG9jLmMKaW5kZXggMWM2YjY2NGIyMi4uMTRmNzVh
MjI1OSAxMDA2NDQKLS0tIGEvc3JjL2FsbG9jLmMKKysrIGIvc3JjL2FsbG9jLmMKQE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YWxpZ25v
ZiAoTGlzcF9PYmplY3QpID09IEdDX1BPSU5URVJfQUxJR05NRU5UCi0tIAoyLjI3LjAucmMwCgo=
--000000000000642ec805a6e1e484--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:21:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:21:25 2020
Received: from localhost ([127.0.0.1]:59198 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf66n-0002l4-21
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:21:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59960)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jf66m-0002kp-58
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:21:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40123)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jf66g-0008TR-MH; Sat, 30 May 2020 14:21:18 -0400
Received: from [176.228.60.248] (port=2025 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jf66f-00007m-QF; Sat, 30 May 2020 14:21:18 -0400
Date: Sat, 30 May 2020 21:21:15 +0300
Message-Id: <83mu5pl1wk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <3399f152-27aa-3854-d741-e9dfaaa00fc7@HIDDEN> (message from
 Paul Eggert on Sat, 30 May 2020 11:12:49 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN> <83tuzxl6gu.fsf@HIDDEN>
 <782f3b14-ff24-fa26-5bd1-fa0db013bf8c@HIDDEN> <83r1v1l4ls.fsf@HIDDEN>
 <3399f152-27aa-3854-d741-e9dfaaa00fc7@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Sat, 30 May 2020 11:12:49 -0700
> 
> On 5/30/20 10:22 AM, Eli Zaretskii wrote:
> >>>> That's not correct for !USE_LSB_TAG, where LISP_ALIGNMENT is merely the native
> >>>> alignment (there's no need to align objects to 8 because the tags are at the
> >>>> high end).
> >>> I'm using a !USE_LSB_TAG build, but LISP_ALIGNMENT is 8 nonetheless.
> >> That's true for your platform, since alignof (max_align_t) == 8 on your
> >> platform.
> > No, it's 16.  And I don't understand what does that have to do with
> > LISP_ALIGNMENT on the master branch, since we all but removed
> > max_align_t from there.
> 
> Oh, I thought you were talking about the emacs-27 branch which is still 
> using max_align_t.
> 
> You're right that LISP_ALIGNMENT is 8 on your platform on the master 
> branch. However, my comment "That's not correct for !USE_LSB_TAG ..." 
> (Bug#41321#305) was responding to Pip Cet's earlier comment "I would 
> prefer simply defining LISP_ALIGNMENT to be 8" (Bug#41321#272) which was 
> talking about the emacs-27 branch.

I'm still confused, because on current emacs-27, both LISP_ALIGNMENT
and alignof(max_align_t) are 16 in my builds.  And I still don't
understand why using LISP_ALIGNMENT of 8 is not right in this case (on
emacs-27).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:17:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:17:54 2020
Received: from localhost ([127.0.0.1]:59193 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf63O-0002fB-HS
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:17:54 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34200)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf638-0002em-Rz
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:17:52 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 61D7B1600D9;
 Sat, 30 May 2020 11:17:33 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id GrPM_6S1QBze; Sat, 30 May 2020 11:17:32 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8E0001600DA;
 Sat, 30 May 2020 11:17:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id XQDAlqyvzEyK; Sat, 30 May 2020 11:17:32 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2DD6E1600D9;
 Sat, 30 May 2020 11:17:32 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
 <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN>
 <cc3030ac-1e6f-ca75-8e5f-20bd69967565@HIDDEN> <83ftbim0ha.fsf@HIDDEN>
 <137b759b-f8e0-3c8f-ca53-488559f3c29f@HIDDEN> <83pnall2ck.fsf@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <66ec1c3c-1d2a-7e3e-5fc3-fd668687c719@HIDDEN>
Date: Sat, 30 May 2020 11:17:31 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83pnall2ck.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/30/20 11:11 AM, Eli Zaretskii wrote:
> So any pointer whose alignment is the same as 'struct Lisp_Symbol'
> will pass the test, regardless of the tag bits?  That's basically most
> of the struct pointers on those architectures, no?

Yes, pretty much.

This is an inevitable consequence of the problem at hand. For aligned 
pointers we must consult the red-black tree no matter what solution we 
pick, because the compiler may have aligned a pointer for us.

Just to make sure we're on the same page here. This stuff is only about 
how to improve performance (compared to the patch proposed for emacs-27 
in Bug#41321#332) by doing fast checks on words before giving them to 
the red-black search.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:17:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:17:03 2020
Received: from localhost ([127.0.0.1]:59190 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf62Z-0002e7-3C
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:17:03 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59260)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jf62W-0002da-OU
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:17:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39940)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jf62R-0007Az-FE; Sat, 30 May 2020 14:16:55 -0400
Received: from [176.228.60.248] (port=1753 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jf62Q-0008Dq-OQ; Sat, 30 May 2020 14:16:55 -0400
Date: Sat, 30 May 2020 21:16:52 +0300
Message-Id: <83o8q5l23v.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN> (message from
 Paul Eggert on Sat, 30 May 2020 11:04:55 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN> <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> From: Paul Eggert <eggert@HIDDEN>
> Date: Sat, 30 May 2020 11:04:55 -0700
> 
> For emacs-27 I propose the attached, more-conservative patch instead. 
> This is a backport of part of a patch I've been working on for master. 
> As part of that effort I've found some other obscure GC-related bugs 
> that we've been lucky to avoid; this patch focuses only on the area Eli 
> encountered.

Please explain in comments why we are marking one more pointer in the
loop.  Also, I don't think I understand why this solves all of the
problems we were discussing; is this in addition to another patch that
you propose for emacs-27?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:12:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:12:58 2020
Received: from localhost ([127.0.0.1]:59184 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf5yc-0002XL-IK
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:12:58 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33804)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf5yb-0002X8-M7
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:12:57 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id AE9371600D9;
 Sat, 30 May 2020 11:12:51 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id V2PH5Y9QKJpG; Sat, 30 May 2020 11:12:51 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id DBB2A1600DA;
 Sat, 30 May 2020 11:12:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id QYtyA7WRBL2i; Sat, 30 May 2020 11:12:50 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7FB391600D9;
 Sat, 30 May 2020 11:12:50 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN> <83tuzxl6gu.fsf@HIDDEN>
 <782f3b14-ff24-fa26-5bd1-fa0db013bf8c@HIDDEN> <83r1v1l4ls.fsf@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <3399f152-27aa-3854-d741-e9dfaaa00fc7@HIDDEN>
Date: Sat, 30 May 2020 11:12:49 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83r1v1l4ls.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/30/20 10:22 AM, Eli Zaretskii wrote:
>>>> That's not correct for !USE_LSB_TAG, where LISP_ALIGNMENT is merely the native
>>>> alignment (there's no need to align objects to 8 because the tags are at the
>>>> high end).
>>> I'm using a !USE_LSB_TAG build, but LISP_ALIGNMENT is 8 nonetheless.
>> That's true for your platform, since alignof (max_align_t) == 8 on your
>> platform.
> No, it's 16.  And I don't understand what does that have to do with
> LISP_ALIGNMENT on the master branch, since we all but removed
> max_align_t from there.

Oh, I thought you were talking about the emacs-27 branch which is still 
using max_align_t.

You're right that LISP_ALIGNMENT is 8 on your platform on the master 
branch. However, my comment "That's not correct for !USE_LSB_TAG ..." 
(Bug#41321#305) was responding to Pip Cet's earlier comment "I would 
prefer simply defining LISP_ALIGNMENT to be 8" (Bug#41321#272) which was 
talking about the emacs-27 branch.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:12:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:12:47 2020
Received: from localhost ([127.0.0.1]:59181 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf5yR-0002Ww-Bu
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:12:47 -0400
Received: from mail-oi1-f172.google.com ([209.85.167.172]:37487)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jf5yP-0002Wj-PC
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:12:46 -0400
Received: by mail-oi1-f172.google.com with SMTP id m67so5570052oif.4
 for <41321 <at> debbugs.gnu.org>; Sat, 30 May 2020 11:12:45 -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=TnEDa+F3zJAJ0encHMt3q0NUk7qUPlDD00mdOdYZsQU=;
 b=KrrvIgKF5B4fwExOr9h2JjoBnXGbEFfCf3I0UAXrL83KrPEVGe0PFMpqKNFfAK4ctq
 yS2RwBfHItBWCwp7U/4ECcC+kW7uHssG6eX5/Nc1ApJ/jF4iUzfuyJMdzWPgZMSFvSu9
 MZxMt0LRp0iCv12tds2ocwywCvfxWhkmLrxA71YOvth5wk8qO3tNdjba8Je1qHDokRkh
 G9ox8/3mr35Yqk/U4TPtFZ5+B7rapJla4R9iWwI17US0gUcRGq1vSescF7SBnkISvElz
 GCG9oRZYEW9duQ1q82vCM0pxDU2RUQhgTnxpOcdt/mS2s0kPXvJwWcKve85TIPmZwUDM
 r0Wg==
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=TnEDa+F3zJAJ0encHMt3q0NUk7qUPlDD00mdOdYZsQU=;
 b=gH15Jb4kAlpsnK+evn6Aob1wRL99h5LvNA2UQ7tzvUt8n76Oqqwri9SDHRxvJ2rjmC
 toqhVcucUWKSEwS4G2SAkjNzSvWsWQvdvKtW3CCeld+p0MaE2lkD3Cqs5kxhxXfnuNo+
 I8EKdedRA/IDtaslA+fiKJTEy8i/M0tURqbKRXXBrgf2fehkgTM5mKoCKYo/nGLAoA64
 KlhyHsxZtciNj53jdWlslIuk7P3scK8GLCbA55bnaCu+nul956ngrrlby4WWiGejZdGI
 yIot+yFsx/GzV3fk6uWZaTGxiQ5JJrZ7DkZBgwogfVYDe4zFHFAz8+j/daSNlQ7gCgcJ
 tRSQ==
X-Gm-Message-State: AOAM531KrN/xAaNPaS3JvYxYqc9lpajnVOJvVGsrK8Z3j4FtdwKGROJH
 yIBrF6bnZYlRPmCCISZK8TkiqkR1GfSo6FVqVtg=
X-Google-Smtp-Source: ABdhPJzM/7AgWq+bdjoNFSvaKhvAOiaZIdF4eiRwBxLubeYoob5PUUHHRMZMoFBlY+sDkplZv7hZuuqE5snz4+c7bZE=
X-Received: by 2002:aca:c6d3:: with SMTP id w202mr10568037oif.44.1590862360130; 
 Sat, 30 May 2020 11:12:40 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN>
In-Reply-To: <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 30 May 2020 18:12:03 +0000
Message-ID: <CAOqdjBcQ9f9p=H5WvHP=AanTuUD9t1148uqiY7jpk1c-OYxHEw@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, May 30, 2020 at 6:04 PM Paul Eggert <eggert@HIDDEN> wrote:
> For emacs-27 I propose the attached, more-conservative patch instead.

More conservative is good! So, yes, I prefer your patch.

> This is a backport of part of a patch I've been working on for master.
> As part of that effort I've found some other obscure GC-related bugs
> that we've been lucky to avoid; this patch focuses only on the area Eli
> encountered.

Looking forward to hearing about those :-)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:11:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:11:50 2020
Received: from localhost ([127.0.0.1]:59177 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf5xW-0002VM-1U
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:11:50 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58716)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jf5xU-0002V9-29
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:11:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39669)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jf5xO-0005HU-79; Sat, 30 May 2020 14:11:42 -0400
Received: from [176.228.60.248] (port=1437 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jf5xN-0007on-LI; Sat, 30 May 2020 14:11:42 -0400
Date: Sat, 30 May 2020 21:11:39 +0300
Message-Id: <83pnall2ck.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <137b759b-f8e0-3c8f-ca53-488559f3c29f@HIDDEN> (message from
 Paul Eggert on Sat, 30 May 2020 10:52:07 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
 <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN>
 <cc3030ac-1e6f-ca75-8e5f-20bd69967565@HIDDEN> <83ftbim0ha.fsf@HIDDEN>
 <137b759b-f8e0-3c8f-ca53-488559f3c29f@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: monnier@HIDDEN, pipcet@HIDDEN, 41321 <at> debbugs.gnu.org
> From: Paul Eggert <eggert@HIDDEN>
> Date: Sat, 30 May 2020 10:52:07 -0700
> 
> On 5/29/20 10:54 PM, Eli Zaretskii wrote:
> >>    (USE_LSB_TAG
> >>     ? (uintptr_t) word % GCALIGNMENT == Lisp_Symbol
> >>     : (uintptr_t) word % alignof (struct Lisp_Symbol) == 0)
> > I don't understand how this will work, given that Lisp object on the
> > stack can be pushed as 2 non-contiguous 32-bit words.  Can you
> > explain?
> 
> On a --with-wide-int host where !USE_LSB_TAG, the above test will work 
> correctly on the low-order word of a Lisp object that is a symbol, 
> because ((uintptr_t) word % alignof (struct Lisp_Symbol) == 0) must be 
> true on such a word.
> 
> The test is only for symbols; it's not for other Lisp objects.

So any pointer whose alignment is the same as 'struct Lisp_Symbol'
will pass the test, regardless of the tag bits?  That's basically most
of the struct pointers on those architectures, no?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 18:05:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 14:05:06 2020
Received: from localhost ([127.0.0.1]:59173 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf5r0-0002M1-7j
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 14:05:06 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33058)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf5qy-0002LL-0E
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 14:05:04 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id C94BF1600D9;
 Sat, 30 May 2020 11:04:57 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id VrG-L_gTnkdH; Sat, 30 May 2020 11:04:56 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id C94251600DA;
 Sat, 30 May 2020 11:04:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id PxJiIPhQ1LDI; Sat, 30 May 2020 11:04:56 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 756C31600D9;
 Sat, 30 May 2020 11:04:56 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <c2c4be8d-89e5-592b-5830-e26514c2cd61@HIDDEN>
Date: Sat, 30 May 2020 11:04:55 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
Content-Type: multipart/mixed; boundary="------------0DEC8EB0B0F2826A6B50ECB6"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------0DEC8EB0B0F2826A6B50ECB6
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

On 5/30/20 6:29 AM, Pip Cet wrote:

> I'm surprised, but glad that you think so. Patch for emacs-27 attached.
> 

That patch is on the right track but it's not clear whether it will 
cause GC to fail to mark some objects that it should, both because it 
omits mark_maybe_object on platforms like x86 --with-wide-int where 
alignof (void *) < sizeof (Lisp_Object), and because it skips 
mark_maybe_pointer on more-typical platforms where alignof (void *) == 
sizeof (Lisp_Object).

For emacs-27 I propose the attached, more-conservative patch instead. 
This is a backport of part of a patch I've been working on for master. 
As part of that effort I've found some other obscure GC-related bugs 
that we've been lucky to avoid; this patch focuses only on the area Eli 
encountered.

--------------0DEC8EB0B0F2826A6B50ECB6
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Be-more-aggressive-in-marking-objects-during-GC.patch"
Content-Disposition: attachment;
 filename*0="0001-Be-more-aggressive-in-marking-objects-during-GC.patch"
Content-Transfer-Encoding: quoted-printable

From 55dbbc828346aa5aca8c56c2813baa66fdaf7e08 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Sat, 30 May 2020 10:10:02 -0700
Subject: [PATCH] Be more aggressive in marking objects during GC
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

Simplified version of a patch from Pip Cet (Bug#41321#299).
* src/alloc.c (maybe_lisp_pointer): Remove.  All uses removed.
(mark_memory): Also look at the pointer offset by =E2=80=98lispsym=E2=80=99=
,
for symbols.
---
 src/alloc.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 1c6b664b22..d5a0f0aa9d 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4585,18 +4585,6 @@ mark_maybe_objects (Lisp_Object const *array, ptrd=
iff_t nelts)
     mark_maybe_object (*array);
 }
=20
-/* Return true if P might point to Lisp data that can be garbage
-   collected, and false otherwise (i.e., false if it is easy to see
-   that P cannot point to Lisp data that can be garbage collected).
-   Symbols are implemented via offsets not pointers, but the offsets
-   are also multiples of LISP_ALIGNMENT.  */
-
-static bool
-maybe_lisp_pointer (void *p)
-{
-  return (uintptr_t) p % LISP_ALIGNMENT =3D=3D 0;
-}
-
 /* If P points to Lisp data, mark that as live if it isn't already
    marked.  */
=20
@@ -4609,9 +4597,6 @@ mark_maybe_pointer (void *p)
   VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p));
 #endif
=20
-  if (!maybe_lisp_pointer (p))
-    return;
-
   if (pdumper_object_p (p))
     {
       int type =3D pdumper_find_object_type (p);
@@ -4715,7 +4700,10 @@ mark_memory (void const *start, void const *end)
=20
   for (pp =3D start; (void const *) pp < end; pp +=3D GC_POINTER_ALIGNME=
NT)
     {
-      mark_maybe_pointer (*(void *const *) pp);
+      char *p =3D *(char *const *) pp;
+      mark_maybe_pointer (p);
+      p +=3D (intptr_t) lispsym;
+      mark_maybe_pointer (p);
=20
       verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT =3D=3D 0);
       if (alignof (Lisp_Object) =3D=3D GC_POINTER_ALIGNMENT
--=20
2.17.1


--------------0DEC8EB0B0F2826A6B50ECB6--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 17:52:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:52:23 2020
Received: from localhost ([127.0.0.1]:59153 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf5eh-00022B-85
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:52:23 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59990)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf5ea-00021t-6i
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 13:52:21 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 330DD1600D9;
 Sat, 30 May 2020 10:52:10 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id HxEBiP4Xe8Zh; Sat, 30 May 2020 10:52:09 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5ACD01600DA;
 Sat, 30 May 2020 10:52:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 3MQvFb1WtEmi; Sat, 30 May 2020 10:52:09 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 00C431600D9;
 Sat, 30 May 2020 10:52:08 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
 <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN>
 <cc3030ac-1e6f-ca75-8e5f-20bd69967565@HIDDEN> <83ftbim0ha.fsf@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <137b759b-f8e0-3c8f-ca53-488559f3c29f@HIDDEN>
Date: Sat, 30 May 2020 10:52:07 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83ftbim0ha.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/29/20 10:54 PM, Eli Zaretskii wrote:
>>    (USE_LSB_TAG
>>     ? (uintptr_t) word % GCALIGNMENT == Lisp_Symbol
>>     : (uintptr_t) word % alignof (struct Lisp_Symbol) == 0)
> I don't understand how this will work, given that Lisp object on the
> stack can be pushed as 2 non-contiguous 32-bit words.  Can you
> explain?

On a --with-wide-int host where !USE_LSB_TAG, the above test will work 
correctly on the low-order word of a Lisp object that is a symbol, 
because ((uintptr_t) word % alignof (struct Lisp_Symbol) == 0) must be 
true on such a word.

The test is only for symbols; it's not for other Lisp objects.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 17:23:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:23:08 2020
Received: from localhost ([127.0.0.1]:59119 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf5CN-0001KR-UP
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:23:08 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49404)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jf5CL-0001Jk-SV
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 13:23:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38543)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jf5CF-0006MJ-3C; Sat, 30 May 2020 13:22:59 -0400
Received: from [176.228.60.248] (port=2403 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jf5CE-0003dl-Jh; Sat, 30 May 2020 13:22:58 -0400
Date: Sat, 30 May 2020 20:22:55 +0300
Message-Id: <83r1v1l4ls.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <782f3b14-ff24-fa26-5bd1-fa0db013bf8c@HIDDEN> (message from
 Paul Eggert on Sat, 30 May 2020 10:06:35 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN> <83y2phwb9x.fsf@HIDDEN>
 <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN> <83tuzxl6gu.fsf@HIDDEN>
 <782f3b14-ff24-fa26-5bd1-fa0db013bf8c@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Sat, 30 May 2020 10:06:35 -0700
> 
> On 5/30/20 9:42 AM, Eli Zaretskii wrote:
> >> That's not correct for !USE_LSB_TAG, where LISP_ALIGNMENT is merely the native
> >> alignment (there's no need to align objects to 8 because the tags are at the
> >> high end).
> > I'm using a !USE_LSB_TAG build, but LISP_ALIGNMENT is 8 nonetheless.
> 
> That's true for your platform, since alignof (max_align_t) == 8 on your
> platform.

No, it's 16.  And I don't understand what does that have to do with
LISP_ALIGNMENT on the master branch, since we all but removed
max_align_t from there.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 17:06:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 13:06:43 2020
Received: from localhost ([127.0.0.1]:59051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4wV-0007AU-Jm
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 13:06:43 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56038)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf4wU-0007AG-54
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 13:06:42 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 50F3F1600D9;
 Sat, 30 May 2020 10:06:36 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id UBRQ6P__MYgb; Sat, 30 May 2020 10:06:35 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8E52A1600DA;
 Sat, 30 May 2020 10:06:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id sZ1hFCu-iRgz; Sat, 30 May 2020 10:06:35 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 5FB371600D9;
 Sat, 30 May 2020 10:06:35 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83y2phwb9x.fsf@HIDDEN>
 <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HI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
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <782f3b14-ff24-fa26-5bd1-fa0db013bf8c@HIDDEN>
Date: Sat, 30 May 2020 10:06:35 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83tuzxl6gu.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/30/20 9:42 AM, Eli Zaretskii wrote:
>> That's not correct for !USE_LSB_TAG, where LISP_ALIGNMENT is merely the native
>> alignment (there's no need to align objects to 8 because the tags are at the
>> high end).
> I'm using a !USE_LSB_TAG build, but LISP_ALIGNMENT is 8 nonetheless.

That's true for your platform, since alignof (max_align_t) == 8 on your
platform. But neither the C standard nor POSIX guarantee that alignof
(max_align_t) is 8. Admittedly these days one would have to look hard to find a
platform where alignof (max_align_t) is 4 or less.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 16:54:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:54:37 2020
Received: from localhost ([127.0.0.1]:59047 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4kn-0006s4-Ez
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:54:37 -0400
Received: from mail-ot1-f68.google.com ([209.85.210.68]:34955)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jf4kl-0006rp-Ki
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 12:54:35 -0400
Received: by mail-ot1-f68.google.com with SMTP id 69so4496549otv.2
 for <41321 <at> debbugs.gnu.org>; Sat, 30 May 2020 09:54:35 -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:content-transfer-encoding;
 bh=hwgV6Zj9AS//Cfmq4dy+SP3cZVMPr4NgQwlVq9deGJA=;
 b=A85UkTIVPVD2+NrupuS7Pl2on0sFe/Z+Zqm5+b/lmrzLWwpm7jDQyoZVDCyWAkIFOM
 NMOCmXSvztZO7ki8SaPlH+E1UDqOSGK/A40dr5/0B+aquwqNwH4Y39syruKQNGgZUO1Z
 A3MktIf4X4nC/RUBWvQwyYrviVDGYlTE6XzzVtEJFHkGJlx4BwI84MEKbP5RY7E4HJ3i
 GIF2doQX988BS/adK7IfH7fJPjoOFv47TSBSTOIaXLpqLLN4d23i1m7SP5kbp9AO3u3A
 4LwAhuzORBGyOGcVTe6uLPE001moFL0L/ZgtMNs0AmjkdJDtufEbn3wilQOLpzjA84LJ
 S+zA==
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:content-transfer-encoding;
 bh=hwgV6Zj9AS//Cfmq4dy+SP3cZVMPr4NgQwlVq9deGJA=;
 b=FXQKCsLcwtiLpXxRNpC2GMxt9YJGNllKNrvMLrwSwVlMQ9TwUEj8fcvRyK91l0LdMZ
 oAMFOmPGwwgHjxCvYTbqu/05lCW9O1rjkknLLh3lCsruNjufn9NEyJGP6yJcMT3SuVOW
 Gcpzawa8zYR1Nc3qw2w4Q9CLQNiO4rPsWjycht3UJOl9O/eD0I2XmrfGWIC6vMr5f2Z2
 6IgvsJjv1SzKV0gbTSqqPOv/c+m2UUK6ZmZtzeqENpUo84V2ZmbvamDbOSS6YYZ1VP+s
 EHXSBX0BBdkhQ+NkfArIJSeMlRqZMy4fEVCbgF1LltYOUOBFQxHoc5nhB8lS0AbRuk7M
 nelQ==
X-Gm-Message-State: AOAM531QsDEvbBScoUf4uCtwoUicLibYH9Hhe06IjMytiQDysK7LBLs4
 vixgP2hN8AvpdID6lE5TA0Q97apmfB7//n13ZdM=
X-Google-Smtp-Source: ABdhPJzsnhK+ANFxdWCEEf6W6V2YKuUcoGunEKlYBApJujp3ejASXWzoEZb9Ju+mDwqZk6qFDBZHRQxLt1kCUUXh7Ko=
X-Received: by 2002:a9d:7a50:: with SMTP id z16mr11231485otm.292.1590857669857; 
 Sat, 30 May 2020 09:54:29 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN>
In-Reply-To: <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 30 May 2020 16:53:53 +0000
Message-ID: <CAOqdjBe5uNsX9+4iOaT_yMHqg-Mp+6GXFueouoaazWjf6r=D_A@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, May 30, 2020 at 4:31 PM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/29/20 2:01 PM, Pip Cet wrote:
> > (1) says:
> > It=E2=80=99s an invalid optimization, since pointers can address the
> > middle of Lisp_Object data.
> >
> > That may be true (we still haven't observed it),
>
> I observed it earlier, in code that iterated through a Lisp vector;

Sorry, I must have missed that.

> at the
> machine level the only pointer was into the middle of that vector. Addres=
ses of
> Lisp_Vector elements are not GCALIGNED on x86 and other platforms.

True.

> > 1. malloc() % GCALIGNMENT !=3D 0. Never happens, as far as I can tell.
>
> Although that's true of all current Emacs porting targets as far as I kno=
w, I'd
> rather not hardwire this into the code, as neither POSIX nor the C standa=
rd
> require it. This is why the comment refers to platforms where malloc() % =
8 !=3D 0
> as "oddball hosts".

But we can't figure out what alignment malloc guarantees, on practical
hosts. To say we assume a malloc alignment of 8 is much better than to
say we assume one of alignof (max_align_t), which is false on many
systems.

> > 2. A Lisp object requires greater alignment than malloc() gives it.
> > IIRC, there was at least one RISC architecture whose specification
>
> We don't need anything that obscure. Just use __int128 on x86 with glibc =
2.24.
> On that platform __int128's alignment is 16, malloc's is 8.

Sorry, but I think a type that is actually used by Emacs is less
obscure than __float128 (which I think you mean; __int128 doesn't
exist on x86), nevermind the question of whether the alignment of that
should have been 16, since it works just fine misaligned (except when
AC is set, but that's no longer x86-as-we-know-and-hate-it).

> > I'm not saying it's the best solution, but I would prefer simply
> > defining LISP_ALIGNMENT to be 8 to either patch.
>
> That's not correct for !USE_LSB_TAG, where LISP_ALIGNMENT is merely the n=
ative
> alignment (there's no need to align objects to 8 because the tags are at =
the
> high end).

How is it incorrect? Suboptimal, maybe, though there's a performance
improvement keeping things you access together in the same cache line.

There's no need to align anything (non-SIMD) to anything on x86
without AC set, it's just good for performance; and that performance
improvement applies whether or not Lisp_Objects are natively 64-bit or
2x32-bit.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 16:45:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:45:44 2020
Received: from localhost ([127.0.0.1]:59026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4c4-0006dx-5D
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:45:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42770)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jf4c2-0006df-5N
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 12:45:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38082)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jf4bw-0006C9-LG; Sat, 30 May 2020 12:45:28 -0400
Received: from [176.228.60.248] (port=4019 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jf4bw-0000Nh-0k; Sat, 30 May 2020 12:45:28 -0400
Date: Sat, 30 May 2020 19:45:24 +0300
Message-Id: <83sgfhl6cb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBfjjujF-wCVJLdrYR-MZMYE3QNV200RZhP80z0pEwUX1w@HIDDEN>
 (message from Pip Cet on Sat, 30 May 2020 16:36:31 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 <83v9kdl6xd.fsf@HIDDEN>
 <CAOqdjBfjjujF-wCVJLdrYR-MZMYE3QNV200RZhP80z0pEwUX1w@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sat, 30 May 2020 16:36:31 +0000
> Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, 
> 	Stefan Monnier <monnier@HIDDEN>
> 
> On Sat, May 30, 2020 at 4:32 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> > > From: Pip Cet <pipcet@HIDDEN>
> > > Date: Sat, 30 May 2020 13:29:33 +0000
> > > Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
> > >       Stefan Monnier <monnier@HIDDEN>
> > > (The runtime stack isn't relevant, as far as I can tell, since we walk
> > > that in 4-byte steps on such systems anyway.)
> >
> > I think it might be relevant for stack-based Lisp objects (if we keep
> > requiring that Lisp objects are 8-byte aligned on 32-bit platforms).
> 
> We should never mark stack-based Lisp objects, no matter how
> well-aligned they are!

But we do require them to be aligned, at least in the current
codebase.  We actually had crashes in the past when the Windows build
didn't force GCC to align stack on 8-byte boundary in callback
functions.  I don't remember if this was related to GC or not, but the
requirement is definitely there.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 16:42:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:42:55 2020
Received: from localhost ([127.0.0.1]:59011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4ZS-0006Yg-Rx
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:42:55 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42242)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jf4ZR-0006YU-A3
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 12:42:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38040)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jf4ZL-0004Ph-4u; Sat, 30 May 2020 12:42:47 -0400
Received: from [176.228.60.248] (port=3852 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jf4ZJ-0008V8-JA; Sat, 30 May 2020 12:42:46 -0400
Date: Sat, 30 May 2020 19:42:41 +0300
Message-Id: <83tuzxl6gu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN> (message from
 Paul Eggert on Sat, 30 May 2020 09:31:49 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN> <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
>  Stefan Monnier <monnier@HIDDEN>
> From: Paul Eggert <eggert@HIDDEN>
> Date: Sat, 30 May 2020 09:31:49 -0700
> 
> > I'm not saying it's the best solution, but I would prefer simply
> > defining LISP_ALIGNMENT to be 8 to either patch.
> 
> That's not correct for !USE_LSB_TAG, where LISP_ALIGNMENT is merely the native
> alignment (there's no need to align objects to 8 because the tags are at the
> high end).

I'm using a !USE_LSB_TAG build, but LISP_ALIGNMENT is 8 nonetheless.
What am I missing?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 16:37:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:37:15 2020
Received: from localhost ([127.0.0.1]:58973 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4Tz-0006OK-6L
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:37:15 -0400
Received: from mail-ot1-f43.google.com ([209.85.210.43]:38592)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jf4Tx-0006O7-Hq
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 12:37:14 -0400
Received: by mail-ot1-f43.google.com with SMTP id o13so4448742otl.5
 for <41321 <at> debbugs.gnu.org>; Sat, 30 May 2020 09:37: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=9RRuUp5fFMvcpw0/r71wuzVj7oLRBUiVvNq8HOpytvE=;
 b=IOTSQHRiEou2/f7SbA7tF9eNbaBvuhwN1flE5sPSeODItoG+8O/BsjXoqkZKWkktRa
 IIbrTewHs2zUeUZJ6pF2990oNQKnSKEKU7yfdrEyZLxCz+S/pLBmsODn3SJ/8DRV3ntX
 4eXeuClHxnGp1Gkh17C2bci3OlXZAyBwP4oWe6lNQ57AEBvkv+/zW4RgTdE+4JypF/NO
 XFT0BuI04eeRx3MJ6jsfXvPDcWh3CEwM+MKJCszIwvoRwuM+pgC2KVGnpdG0iXy3bJTG
 CbvO1Ig0rmn9d5FeuOjaJT4NUhvkhvPCzaWYswjpKB8V4BlJxo8gQnJQoMbQXdONgUaM
 FxFQ==
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=9RRuUp5fFMvcpw0/r71wuzVj7oLRBUiVvNq8HOpytvE=;
 b=qbhrAqb5bS/OoE4YpAlypaPKxp97dewH2+LeXsdjSmWnJ8d3960MLY+OaT9y8Fjr+U
 p5MBzdAntYnAvcw41y07oVwitPWQuyzcjLYOK17Xqyb+5qP4aIdBOfBpCyX+05bvL85G
 mapeHZRNClSKATDZt5CmhlhIxTJuK6y5m3gkhayI1eZzVLe1pNFbRXN80UOWMIrYFwql
 /fXtGy7ne3UIOL8J4xGDUgAq4WRXmUVlT3ADtcaLGzfhIur2ZAPnxc/+4VZczWONPeYx
 xKmGokEET+DkQ/O7DLCEhVQLZsvYRTbanX6TQz4S4Yc+Jwy2ffuFOw6VBKdSnlt9kKun
 gBpQ==
X-Gm-Message-State: AOAM530YvMYTk0hGkoYvtbYiBKaCPnsEWdTm7Bf4JDUtokWEpcB4PAHo
 9q5BpW8Bg86GFOX1vNZHkrn++iAYNiR3bo6tnw8=
X-Google-Smtp-Source: ABdhPJwuW6IrkucS33Tl3QR5Z+7bQW/lxm2mjmc2Dm4XS2v5UFTBVMUCJjdRNF+TbaCo9EVASArHdwpwn2yB9/T3l8w=
X-Received: by 2002:a9d:7a50:: with SMTP id z16mr11192373otm.292.1590856627760; 
 Sat, 30 May 2020 09:37:07 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83imgubl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31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 <83v9kdl6xd.fsf@HIDDEN>
In-Reply-To: <83v9kdl6xd.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 30 May 2020 16:36:31 +0000
Message-ID: <CAOqdjBfjjujF-wCVJLdrYR-MZMYE3QNV200RZhP80z0pEwUX1w@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, May 30, 2020 at 4:32 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Sat, 30 May 2020 13:29:33 +0000
> > Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
> >       Stefan Monnier <monnier@HIDDEN>
> > (The runtime stack isn't relevant, as far as I can tell, since we walk
> > that in 4-byte steps on such systems anyway.)
>
> I think it might be relevant for stack-based Lisp objects (if we keep
> requiring that Lisp objects are 8-byte aligned on 32-bit platforms).

We should never mark stack-based Lisp objects, no matter how
well-aligned they are!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 16:32:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:32:57 2020
Received: from localhost ([127.0.0.1]:58969 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4Pp-0006IB-K9
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:32:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40782)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jf4Pn-0006Hy-FU
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 12:32:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:37856)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jf4Ph-0007mL-Nu; Sat, 30 May 2020 12:32:49 -0400
Received: from [176.228.60.248] (port=3247 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jf4Pg-0007nv-RV; Sat, 30 May 2020 12:32:49 -0400
Date: Sat, 30 May 2020 19:32:46 +0300
Message-Id: <83v9kdl6xd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
 (message from Pip Cet on Sat, 30 May 2020 13:29:33 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
 <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sat, 30 May 2020 13:29:33 +0000
> Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, 
> 	Stefan Monnier <monnier@HIDDEN>
> 
> > > > So this alignment requirement is only due to pthreads being used?
> > >
> > > I'm not sure what you're asking. Obviously there are systems on which
> > > unaligned accesses will fault or be very slow indeed, so we need to
> > > make sure, say, pure space allocations are aligned somehow. That
> > > requires a LISP_ALIGNMENT of 8. Everything beyond that is only for
> > > performance, pthreads, and SIMD types.
> >
> > If the system guarantees 4-byte alignment from malloc (and/or a
> > similar alignment of the runtime C stack), then using that doesn't
> > trigger problems related to unaligned accesses, right?  So let me
> > rephrase: why isn't 4-byte alignment "good enough" for us on systems
> > where malloc and the runtime stack are guaranteed to be thus aligned?
> 
> (The runtime stack isn't relevant, as far as I can tell, since we walk
> that in 4-byte steps on such systems anyway.)

I think it might be relevant for stack-based Lisp objects (if we keep
requiring that Lisp objects are 8-byte aligned on 32-bit platforms).

> You're correct that on such a system, we could get away with a
> LISP_ALIGNMENT of 4, but a LISP_ALIGNMENT of 8 wouldn't hurt either.

That's for sure.  I just wondered why did we start requiring 8-byte
alignment back when we did.  Perhaps someone still remembers the
reason.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 16:31:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 12:31:59 2020
Received: from localhost ([127.0.0.1]:58965 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf4Ot-0006GY-9J
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 12:31:59 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52576)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jf4Or-0006GK-10
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 12:31:57 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1ED6B1600D9;
 Sat, 30 May 2020 09:31:51 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id grDdBFN5dde2; Sat, 30 May 2020 09:31:50 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4164A1600DA;
 Sat, 30 May 2020 09:31:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id Mrkd8yux0Sra; Sat, 30 May 2020 09:31:50 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 083DD1600D9;
 Sat, 30 May 2020 09:31:50 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN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ZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <7c66e510-a8e6-17d0-94b1-793b49f87a37@HIDDEN>
Date: Sat, 30 May 2020 09:31:49 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/29/20 2:01 PM, Pip Cet wrote:

> (1) says:
> It=E2=80=99s an invalid optimization, since pointers can address the
> middle of Lisp_Object data.
>=20
> That may be true (we still haven't observed it),

I observed it earlier, in code that iterated through a Lisp vector; at th=
e
machine level the only pointer was into the middle of that vector. Addres=
ses of
Lisp_Vector elements are not GCALIGNED on x86 and other platforms.

> but it's not what
> happened in Eli's case:

Yes, that's right. That is, the patch for (1) fixed not only Eli's case, =
but
other plausible cases.

> 1. malloc() % GCALIGNMENT !=3D 0. Never happens, as far as I can tell.

Although that's true of all current Emacs porting targets as far as I kno=
w, I'd
rather not hardwire this into the code, as neither POSIX nor the C standa=
rd
require it. This is why the comment refers to platforms where malloc() % =
8 !=3D 0
as "oddball hosts".

> 2. A Lisp object requires greater alignment than malloc() gives it.
> IIRC, there was at least one RISC architecture whose specification

We don't need anything that obscure. Just use __int128 on x86 with glibc =
2.24.
On that platform __int128's alignment is 16, malloc's is 8.

> I'm not saying it's the best solution, but I would prefer simply
> defining LISP_ALIGNMENT to be 8 to either patch.

That's not correct for !USE_LSB_TAG, where LISP_ALIGNMENT is merely the n=
ative
alignment (there's no need to align objects to 8 because the tags are at =
the
high end).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 14:27:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 10:27:06 2020
Received: from localhost ([127.0.0.1]:58853 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf2S2-0003EA-LU
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 10:27:06 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64820)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1jf2S1-0003DZ-38
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 10:27:05 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BF9AC100275;
 Sat, 30 May 2020 10:26:59 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 00B63100240;
 Sat, 30 May 2020 10:26:54 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1590848814;
 bh=Njj52xDcjpKTBtwrL+mN1EOahpCNTJDlPy1/EuWQdkM=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=OLBgW4O54TY2H8YJ7rL9FnnvP4ZmqCwyWpReRuRlizyRek6/k3PM9XWGDtOjjMrTq
 FmUwIU+V4H+q7lF1XfnDM6CSec7y3iC8MtCsG9ZvOI/01SdWmx9TwGDGEtrPT9mXWi
 NQHZscl+aatbMKWjtQYrIxMvihGjjiyJAsA4CqqAWb2l3SoqqqS4GEniKzL7lsgPB+
 bALjqRqxbu7yoen1dQ/rGemPr4HoYhJ4BeeYB86icLQg2OvRtJGLH/2XvEDBiSTCqo
 rAvbpk7IdMaudPiB4HiQJdFCPLfRVyjhF0g9fbUTS7Hn/8VreCTdBWw4ne5NG2znY5
 QDCzrPfwzwiVQ==
Received: from alfajor (76-10-137-254.dsl.teksavvy.com [76.10.137.254])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A8F5812039E;
 Sat, 30 May 2020 10:26:53 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
Message-ID: <jwvlfl9a4cm.fsf-monnier+emacs@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
 <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN> <83h7vym0lm.fsf@HIDDEN>
Date: Sat, 30 May 2020 10:26:53 -0400
In-Reply-To: <83h7vym0lm.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 30 May
 2020 08:51:49 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.009 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>         Stefan "looking forward to bignums replacing wide-ints"
> Why? so that Emacs could be slower still?

Well, if performance is a serious problem, then maybe "bignums replacing
wide-ints" will never happen.  IOW the above assumes that we can make
them work as fast if not faster (more specifically, using bignums
should(!?) result is better performance in buffers <512MB, while it will
indeed likely result is worse performance in buffers bigger than that).


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 13:30:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 09:30:19 2020
Received: from localhost ([127.0.0.1]:57189 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jf1Z4-0001Pp-TC
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 09:30:19 -0400
Received: from mail-oi1-f176.google.com ([209.85.167.176]:34713)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jf1Z2-0001Pa-Mc
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 09:30:17 -0400
Received: by mail-oi1-f176.google.com with SMTP id w4so5195035oia.1
 for <41321 <at> debbugs.gnu.org>; Sat, 30 May 2020 06:30:16 -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=EC3o/4T3xhhG+sqFkOFW72c6bqHXbHb1/8OtQDCkBQg=;
 b=NSDvk3VR4Ez1avPAGZ9peRoIDg2SaXN+/Bl9ZhS5NaM95fpF7PnPPObAJ9M7idDVEk
 ZrhVurtsA+Ky0vMOg9Up4IgVT64wrxea53uM9zBvvNsrnbGVx5rRtkdegcmLLbhy3riV
 EYzgsfh2Vz2fULeoYMpVWmwBnMpePU7BqGcd8fJh/ot1Six4rn2hWwX3+zGSNDvjeFE6
 vb2XgtJgSmIK70FdWF0LriHb31aYgoeDREZN9hDVfqDaqtRKXHcPYvshK/xjBwAxhALs
 r5nhVgbeka+hAywVAz0QlyI9QCgc/8gHP8jSS2/rxJzRNsgvPi2gHFAcgd5UN2a8clHO
 5Tkg==
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=EC3o/4T3xhhG+sqFkOFW72c6bqHXbHb1/8OtQDCkBQg=;
 b=pVwu4gOtQ9HHmOOZYu6gFOBPCdpEkOXm3/PJkpBIP6qixT4x2670wHEN2TVBRNODje
 n5lITcnNJWkZ/6/c1BSG9w8wulenSdSBFQU5ijM/XMB0ARkFmsaLHHMqdUtmlT8bX+DL
 Y7E5Lu7FU6N7Y/lPCzKQzEfAvrV39KJikoLnFf7Kwb1Vvdk9E201qF4rOt1mKMqQRDPE
 RLwprmY4GOc6pycnpjhcpeyDlRGEsKZGevsxFqrI+0jRfbSmhlpQ9HRz0aPSIqPWSKDC
 +YZcj8qo+TCZWIVVN2JdOUFltuqUYHLWC7cwRNn/vWjcTDU8KdaMFj8mKevR6Zcwwby2
 fZEw==
X-Gm-Message-State: AOAM533iFAaugof41tdiR2my378Om0eLrgqpAbKyLRRvxyCkK/dCr8lp
 O7G93pVjf9uvnaTwcYzMuP+8xUy3Z5XywuvW4CNNeP8X
X-Google-Smtp-Source: ABdhPJwsstN6SJYnrBVnYARrhGWQdb7zWE9uPTqdMcMzg5sSngBjS2jvvgBD8Ov40gSAorPGv0iUo+tkpABAVE9W/0U=
X-Received: by 2002:aca:b708:: with SMTP id h8mr9088266oif.122.1590845410910; 
 Sat, 30 May 2020 06:30:10 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 <831rn1mzgp.fsf@HIDDEN>
In-Reply-To: <831rn1mzgp.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 30 May 2020 13:29:33 +0000
Message-ID: <CAOqdjBfee4rmzoxZTGb8Qpqn=zk+abewrXGWUw0inxG+_sntYg@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/mixed; boundary="0000000000009c4ae205a6dd8fca"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000009c4ae205a6dd8fca
Content-Type: text/plain; charset="UTF-8"

On Sat, May 30, 2020 at 11:31 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Sat, 30 May 2020 11:06:52 +0000
> > Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
> >       Stefan Monnier <monnier@HIDDEN>
> >
> > > I understand that part, but my question was why, even before the
> > > change in max_align_t, did we start requiring 8-byte alignment on
> > > systems where that is not automatically guaranteed?
> >
> > I don't know. As I said, I think that was always buggy on pdumper
> > systems, though the bug was very subtle. My guess is it predates
> > pdumper, at which time it was a valid optimization.
>
> How is pdumper involved here?

See the pdumper issue I described above. I can't imagine this being a
significant bug, because it needs the sole surviving reference to a
pdumper object to be on the stack, while simultaneously being the key
in a weak-key hash table cell...

> > > So this alignment requirement is only due to pthreads being used?
> >
> > I'm not sure what you're asking. Obviously there are systems on which
> > unaligned accesses will fault or be very slow indeed, so we need to
> > make sure, say, pure space allocations are aligned somehow. That
> > requires a LISP_ALIGNMENT of 8. Everything beyond that is only for
> > performance, pthreads, and SIMD types.
>
> If the system guarantees 4-byte alignment from malloc (and/or a
> similar alignment of the runtime C stack), then using that doesn't
> trigger problems related to unaligned accesses, right?  So let me
> rephrase: why isn't 4-byte alignment "good enough" for us on systems
> where malloc and the runtime stack are guaranteed to be thus aligned?

(The runtime stack isn't relevant, as far as I can tell, since we walk
that in 4-byte steps on such systems anyway.)

You're correct that on such a system, we could get away with a
LISP_ALIGNMENT of 4, but a LISP_ALIGNMENT of 8 wouldn't hurt either.

> > > If
> > > the two 32-bit parts of the object are non-contiguous, will we be able
> > > to recognize such an object, and will we be able to mark it correctly,
> > > and if so, how?  IOW, don't we need the upper 32-bit (which encodes
> > > the object type) for the purposes of marking it?
> >
> > For everything but symbols, we don't, mark_maybe_pointer called on the
> > low 32 bits suffices. For symbols, mark_maybe_pointer needs to be
> > changed to also check the pointer at <low 32-bit word> + &lispsym.
>
> Right, that's what I thought.  So this issue also has to be fixed on
> emacs-27 in order for us to provide a stable Emacs 27.

I'm surprised, but glad that you think so. Patch for emacs-27 attached.

--0000000000009c4ae205a6dd8fca
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Be-more-aggressive-in-marking-objects-during-GC-bug-.patch"
Content-Disposition: attachment; 
	filename="0001-Be-more-aggressive-in-marking-objects-during-GC-bug-.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_kato7yyy0>
X-Attachment-Id: f_kato7yyy0

RnJvbSAzNWQ1MGU2MTA4YzZlZGJhYzkzZTgwYWExYjk5OThkYzZhYzE5MDU0IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBTYXQs
IDMwIE1heSAyMDIwIDEzOjIzOjI0ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gQmUgbW9yZSBhZ2dy
ZXNzaXZlIGluIG1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jdCBjb25zdCAqKSBwcCk7CisJfQog
ICAgIH0KIH0KIAotLSAKMi4yNy4wLnJjMAoK
--0000000000009c4ae205a6dd8fca--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 11:31:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 07:31:21 2020
Received: from localhost ([127.0.0.1]:57003 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jezhw-00060C-Mm
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 07:31:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58626)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jezhu-0005sm-5w
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 07:31:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33073)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jezhj-0002I3-Id; Sat, 30 May 2020 07:31:10 -0400
Received: from [176.228.60.248] (port=4697 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jezhi-0000q0-Qz; Sat, 30 May 2020 07:31:07 -0400
Date: Sat, 30 May 2020 14:31:02 +0300
Message-Id: <831rn1mzgp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
 (message from Pip Cet on Sat, 30 May 2020 11:06:52 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
 <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sat, 30 May 2020 11:06:52 +0000
> Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, 
> 	Stefan Monnier <monnier@HIDDEN>
> 
> > I understand that part, but my question was why, even before the
> > change in max_align_t, did we start requiring 8-byte alignment on
> > systems where that is not automatically guaranteed?
> 
> I don't know. As I said, I think that was always buggy on pdumper
> systems, though the bug was very subtle. My guess is it predates
> pdumper, at which time it was a valid optimization.

How is pdumper involved here?

> > So this alignment requirement is only due to pthreads being used?
> 
> I'm not sure what you're asking. Obviously there are systems on which
> unaligned accesses will fault or be very slow indeed, so we need to
> make sure, say, pure space allocations are aligned somehow. That
> requires a LISP_ALIGNMENT of 8. Everything beyond that is only for
> performance, pthreads, and SIMD types.

If the system guarantees 4-byte alignment from malloc (and/or a
similar alignment of the runtime C stack), then using that doesn't
trigger problems related to unaligned accesses, right?  So let me
rephrase: why isn't 4-byte alignment "good enough" for us on systems
where malloc and the runtime stack are guaranteed to be thus aligned?

> > If
> > the two 32-bit parts of the object are non-contiguous, will we be able
> > to recognize such an object, and will we be able to mark it correctly,
> > and if so, how?  IOW, don't we need the upper 32-bit (which encodes
> > the object type) for the purposes of marking it?
> 
> For everything but symbols, we don't, mark_maybe_pointer called on the
> low 32 bits suffices. For symbols, mark_maybe_pointer needs to be
> changed to also check the pointer at <low 32-bit word> + &lispsym.

Right, that's what I thought.  So this issue also has to be fixed on
emacs-27 in order for us to provide a stable Emacs 27.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 11:07:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 07:07:38 2020
Received: from localhost ([127.0.0.1]:56997 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jezKz-0004FJ-Lk
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 07:07:37 -0400
Received: from mail-oo1-f42.google.com ([209.85.161.42]:35957)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jezKy-0004F6-7p
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 07:07:36 -0400
Received: by mail-oo1-f42.google.com with SMTP id 18so448359ooy.3
 for <41321 <at> debbugs.gnu.org>; Sat, 30 May 2020 04:07:36 -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=mramkGqhAjQklnj8OJi8MqfTpwb13g/63pO0UHig7WI=;
 b=Kgh5dKLmD85TVvusJglgDH8h2r1a4pAc9AR4GEszMdqMh/Ia8C4j6lknhdKe7JT508
 aeuF9Kg5tuuQ12ywMYma3XBE5iUp7u8kgNQJLgSGL8/svCNcXJ4a7rXyinuEvP5PQvk3
 9ZFatqFP0VscHc3BRwoPvWQMmp9/vFz7K4r7NYQQ3Lh18xLblGwqL+Yep2n/1CvyVx0e
 FhIUszw+97Oi4oSb9OuOhQwCu0ZxKAsawVA69POs7rYnOOXH3zarJeQ8m3u/qDq1FXN7
 TTpSZTY7D7XH1vi5GzcUz994bExYqFJSj3qo84ZG8UBunVXqgOnHAv5L7800B33iZtnF
 dy0Q==
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=mramkGqhAjQklnj8OJi8MqfTpwb13g/63pO0UHig7WI=;
 b=gfWgmxAdqm97/jL/3/EIvQCkPi4NVcJ2oZpZJoo4yzQCwMu8B2o/MjpSb3tbsXurZa
 qS+IKXJpJ851/COPzsWhqcttu/rZOZn/sbbmzUXQIlfP4Xl9Vpb5nVu90XMVkmMZ3ko2
 uLqeCJe78mNRi+h71e6VjSvaG6Ym18wTey/iZ2xkL3qndOwBpc2BRgUpq71TOwaWNXc/
 2SX9jmA4Q71Fs0pQJABtc6DdIY5+Bm8yJoGdfCPktGPU1rE/9rPyKEQEdCC3yWTlDya4
 4Z6ZtszWXu0bkewnJJZwBETWP2TD0BYMOsel0k34ic6xS9oYSzlhIEvxibiOCl6GLtPR
 LVlw==
X-Gm-Message-State: AOAM530M1AAXgtYxkm74aK/4JkR/zGfV3vv7/lut25NQfccbUh9xHQYY
 84SSYzjso1cCF3ru4SnBgAzFHfppVVSSAKV90eQ=
X-Google-Smtp-Source: ABdhPJy6nKVu52oMZoiD1BRpdrHKWzgcxkOKBCSByWajQAYCeGHyb6jLNZFUYPSTf2uwPjFNQ7Gh+Gc0HpXy/2mcUao=
X-Received: by 2002:a4a:cb0d:: with SMTP id r13mr10142944ooq.88.1590836850390; 
 Sat, 30 May 2020 04:07:30 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 <83367hn624.fsf@HIDDEN>
In-Reply-To: <83367hn624.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 30 May 2020 11:06:52 +0000
Message-ID: <CAOqdjBfJ68Z-VvHufd=TwKn2+hKsCbZ31WOYM6Jdr3KVptWCHQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, May 30, 2020 at 9:08 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Sat, 30 May 2020 07:19:18 +0000
> > Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
> >       Stefan Monnier <monnier@HIDDEN>
> >
> > > Btw, can someone remind me why we started requiring non-default
> > > alignment from Lisp objects?
> >
> > max_align_t was changed to include a float128 type, and
> > alignof(float128) == 16 on x86, even though virtually all x86 systems
> > are configured to allow unaligned accesses.
>
> I understand that part, but my question was why, even before the
> change in max_align_t, did we start requiring 8-byte alignment on
> systems where that is not automatically guaranteed?

I don't know. As I said, I think that was always buggy on pdumper
systems, though the bug was very subtle. My guess is it predates
pdumper, at which time it was a valid optimization.

> > If I understand Paul's concerns correctly, he believes it's possible a
> > system will once again come into use in which atomic accesses only
> > work for offsets aligned to, say, 32 bytes. Since pthread variables
> > require atomic accesses, such a platform would see weird crashes if a
> > pthread inside a Lisp_Vector wasn't aligned to 32 bytes.
>
> So this alignment requirement is only due to pthreads being used?

I'm not sure what you're asking. Obviously there are systems on which
unaligned accesses will fault or be very slow indeed, so we need to
make sure, say, pure space allocations are aligned somehow. That
requires a LISP_ALIGNMENT of 8. Everything beyond that is only for
performance, pthreads, and SIMD types.

> > > Also, given the fact that in the crashing case the 2 32-bit parts of a
> > > Lisp object were pushed onto the stack non-contiguously, will fixing
> > > the alignment alone cause those Lisp objects to be marked?
> >
> > Yes. The lower 32-bit part was ignored because its value wasn't
> > 16-byte aligned, not because its stack location wasn't 8-byte aligned.
>
> Right, but I'm talking about marking.  AFAIU, when scanning the stack
> finds a value that looks like a Lisp object, we mark that object.

And if we find a value that looks like a pointer to a Lisp structure,
as the lower half of a non-symbol Lisp_Object does, we mark the
corresponding Lisp object.

> If
> the two 32-bit parts of the object are non-contiguous, will we be able
> to recognize such an object, and will we be able to mark it correctly,
> and if so, how?  IOW, don't we need the upper 32-bit (which encodes
> the object type) for the purposes of marking it?

For everything but symbols, we don't, mark_maybe_pointer called on the
low 32 bits suffices. For symbols, mark_maybe_pointer needs to be
changed to also check the pointer at <low 32-bit word> + &lispsym.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 09:08:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 05:08:47 2020
Received: from localhost ([127.0.0.1]:56949 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jexTz-0001LA-J4
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 05:08:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jexTy-0001Kz-6Y
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 05:08:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59349)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jexTr-0008Qi-Rv; Sat, 30 May 2020 05:08:39 -0400
Received: from [176.228.60.248] (port=3517 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jexTr-0001Zm-Cm; Sat, 30 May 2020 05:08:39 -0400
Date: Sat, 30 May 2020 12:08:35 +0300
Message-Id: <83367hn624.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
 (message from Pip Cet on Sat, 30 May 2020 07:19:18 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
 <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sat, 30 May 2020 07:19:18 +0000
> Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, 
> 	Stefan Monnier <monnier@HIDDEN>
> 
> > Btw, can someone remind me why we started requiring non-default
> > alignment from Lisp objects?
> 
> max_align_t was changed to include a float128 type, and
> alignof(float128) == 16 on x86, even though virtually all x86 systems
> are configured to allow unaligned accesses.

I understand that part, but my question was why, even before the
change in max_align_t, did we start requiring 8-byte alignment on
systems where that is not automatically guaranteed?

> If I understand Paul's concerns correctly, he believes it's possible a
> system will once again come into use in which atomic accesses only
> work for offsets aligned to, say, 32 bytes. Since pthread variables
> require atomic accesses, such a platform would see weird crashes if a
> pthread inside a Lisp_Vector wasn't aligned to 32 bytes.

So this alignment requirement is only due to pthreads being used?  But
MinGW doesn't use pthreads.

> > Also, given the fact that in the crashing case the 2 32-bit parts of a
> > Lisp object were pushed onto the stack non-contiguously, will fixing
> > the alignment alone cause those Lisp objects to be marked?
> 
> Yes. The lower 32-bit part was ignored because its value wasn't
> 16-byte aligned, not because its stack location wasn't 8-byte aligned.

Right, but I'm talking about marking.  AFAIU, when scanning the stack
finds a value that looks like a Lisp object, we mark that object.  If
the two 32-bit parts of the object are non-contiguous, will we be able
to recognize such an object, and will we be able to mark it correctly,
and if so, how?  IOW, don't we need the upper 32-bit (which encodes
the object type) for the purposes of marking it?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 07:20:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 03:20:04 2020
Received: from localhost ([127.0.0.1]:56854 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jevmm-0007FT-0X
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 03:20:04 -0400
Received: from mail-oi1-f179.google.com ([209.85.167.179]:46111)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jevmj-0007Et-Ex
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 03:20:02 -0400
Received: by mail-oi1-f179.google.com with SMTP id b3so4680339oib.13
 for <41321 <at> debbugs.gnu.org>; Sat, 30 May 2020 00:20:01 -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=mkQpcZk6ZG6bMA9rW93/V0BtrHEKvMvFWwoILyvFSxY=;
 b=KOPLCrt8XjG76aP1ame1upLi+g6mYjeLJtZMQR6sxK0oU162gvDu+JQgG3+okVZUwu
 NABl/eKtzkJ/6JeeITuaqblTXLO7racY6BySJXMFdzEQxtQnK6tPGUGHQ0hu6PeDr3Rh
 wq5Kned83a/PhIAxg4pR1mzpH4y+gyTj6NAJCf6327Mk0EO75jW09iDvqttT/ui+bIZG
 B+/oj0rfPBgFUXGHyTZRQuX17fquBpOpM9/ldBEctUqamkfSZD+UiRWtC2vMol+H7xj2
 KeTZZEspwr6SRDM9qByAcD+JUSNIzpMDR+ooYb9uxvFPXPITo/GYV5HKcxkxuZoJQmX1
 cdBQ==
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=mkQpcZk6ZG6bMA9rW93/V0BtrHEKvMvFWwoILyvFSxY=;
 b=TGZ/PqbQgCLZfcQr/U364sB6A6PRcXMdsUk2pemzreBB08Fxm9ltIOaemq4czellXh
 qlHJvs68xM7bHyf7EGnM63KEH5jwMmWrnJIhv3wuvlyt8y8aCOCscaaREGZ+e4eJdcMa
 ZZgLgtAhAvVSxBGT3FfOVpVqUNTb3Dft1YYfKqLkSTKCHh+Zu/MvzrcXQVNqpl7ACX98
 WvL1RxpWRbWTAquqIWrSQD/D4WobNlkLr2KcAMtQ2a+5OEXG0DWMnInr5zuIo9M2PFRt
 846kTe10zVQRKctCoX2x0BfUlYhKsTSazxPckCL0ObgNoTCr4l3huE7mScUuI6wISfam
 zPkw==
X-Gm-Message-State: AOAM532zNdKllfn5edr1c3Q+Tu6DYrY8S6ciRt7fHCHmwHFCYWyh5tl2
 B36gqhjCWu3Wog0jG9+mbqSBI/o75oAc7f4uxcQ=
X-Google-Smtp-Source: ABdhPJx492+++hqz+fLqYBsBX4e8Q54N/eaLJG8Asd+IhFvbh4Vkf8bxU+jIqRbN9M6fP9gKt+xWiq6wBv4DBp/CzH4=
X-Received: by 2002:aca:b708:: with SMTP id h8mr8393981oif.122.1590823195830; 
 Sat, 30 May 2020 00:19:55 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 <83eer2m0b6.fsf@HIDDEN>
In-Reply-To: <83eer2m0b6.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 30 May 2020 07:19:18 +0000
Message-ID: <CAOqdjBdPD_F7GLBAFOLeULP0KbiCZd9WbyQhY=KCQb-2Y7iy0Q@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, May 30, 2020 at 5:58 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Fri, 29 May 2020 21:01:39 +0000
> > Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
> >       Stefan Monnier <monnier@HIDDEN>
> >
> > (2) has this comment:
> > +/* Alignment needed for memory blocks that are allocated via malloc
> > +   and that contain Lisp objects.  On typical hosts malloc already
> > +   aligns sufficiently, but extra work is needed on oddball hosts
> > +   where Emacs would crash if malloc returned a non-GCALIGNED pointer.  */
> >
> > I can't make sense of that comment. It describes two problems that
> > don't happen, and omits the problem that does happen.
> > 1. malloc() % GCALIGNMENT != 0. Never happens, as far as I can tell.
> > 2. A Lisp object requires greater alignment than malloc() gives it.
> > IIRC, there was at least one RISC architecture whose specification
> > supported atomic operations only on the first word in each
> > 32-byte-aligned block, but that's such a rare case (and wasn't true
> > for the silicon implementations, I seem to recall) that it seems silly
> > to worry about it today.
> >
> > I'm not saying it's the best solution, but I would prefer simply
> > defining LISP_ALIGNMENT to be 8 to either patch.
>
> I agree, but patch 2 basically does that, so I'm okay with saying "8"
> in so many words.

Okay.

> Btw, can someone remind me why we started requiring non-default
> alignment from Lisp objects?

max_align_t was changed to include a float128 type, and
alignof(float128) == 16 on x86, even though virtually all x86 systems
are configured to allow unaligned accesses.

If I understand Paul's concerns correctly, he believes it's possible a
system will once again come into use in which atomic accesses only
work for offsets aligned to, say, 32 bytes. Since pthread variables
require atomic accesses, such a platform would see weird crashes if a
pthread inside a Lisp_Vector wasn't aligned to 32 bytes.

Of course, it remains to be seen/checked whether any such system would
actually define max_align_t to have an alignment of 32, since it
covers only primitive types.

> Also, given the fact that in the crashing case the 2 32-bit parts of a
> Lisp object were pushed onto the stack non-contiguously, will fixing
> the alignment alone cause those Lisp objects to be marked?

Yes. The lower 32-bit part was ignored because its value wasn't
16-byte aligned, not because its stack location wasn't 8-byte aligned.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 05:58:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 01:58:19 2020
Received: from localhost ([127.0.0.1]:56793 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeuVf-0005KF-A7
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 01:58:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jeuVd-0005K2-VG
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 01:58:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56782)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jeuVX-000265-Vp; Sat, 30 May 2020 01:58:12 -0400
Received: from [176.228.60.248] (port=3197 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jeuVW-0002kA-Kp; Sat, 30 May 2020 01:58:11 -0400
Date: Sat, 30 May 2020 08:58:05 +0300
Message-Id: <83eer2m0b6.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
 (message from Pip Cet on Fri, 29 May 2020 21:01:39 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
 <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Fri, 29 May 2020 21:01:39 +0000
> Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org, 
> 	Stefan Monnier <monnier@HIDDEN>
> 
> (2) has this comment:
> +/* Alignment needed for memory blocks that are allocated via malloc
> +   and that contain Lisp objects.  On typical hosts malloc already
> +   aligns sufficiently, but extra work is needed on oddball hosts
> +   where Emacs would crash if malloc returned a non-GCALIGNED pointer.  */
> 
> I can't make sense of that comment. It describes two problems that
> don't happen, and omits the problem that does happen.
> 1. malloc() % GCALIGNMENT != 0. Never happens, as far as I can tell.
> 2. A Lisp object requires greater alignment than malloc() gives it.
> IIRC, there was at least one RISC architecture whose specification
> supported atomic operations only on the first word in each
> 32-byte-aligned block, but that's such a rare case (and wasn't true
> for the silicon implementations, I seem to recall) that it seems silly
> to worry about it today.
> 
> I'm not saying it's the best solution, but I would prefer simply
> defining LISP_ALIGNMENT to be 8 to either patch.

I agree, but patch 2 basically does that, so I'm okay with saying "8"
in so many words.

Btw, can someone remind me why we started requiring non-default
alignment from Lisp objects?

Also, given the fact that in the crashing case the 2 32-bit parts of a
Lisp object were pushed onto the stack non-contiguously, will fixing
the alignment alone cause those Lisp objects to be marked?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 05:54:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 01:54:51 2020
Received: from localhost ([127.0.0.1]:56789 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeuS4-0005F2-KY
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 01:54:51 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47676)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jeuS3-0005Ep-BO
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 01:54:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56749)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jeuRx-0005hu-OC; Sat, 30 May 2020 01:54:29 -0400
Received: from [176.228.60.248] (port=2974 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jeuRw-0000qZ-Re; Sat, 30 May 2020 01:54:29 -0400
Date: Sat, 30 May 2020 08:54:25 +0300
Message-Id: <83ftbim0ha.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <cc3030ac-1e6f-ca75-8e5f-20bd69967565@HIDDEN> (message from
 Paul Eggert on Fri, 29 May 2020 13:40:33 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
 <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN>
 <cc3030ac-1e6f-ca75-8e5f-20bd69967565@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Cc: Pip Cet <pipcet@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
>  41321 <at> debbugs.gnu.org
> From: Paul Eggert <eggert@HIDDEN>
> Date: Fri, 29 May 2020 13:40:33 -0700
> 
>   (USE_LSB_TAG
>    ? (uintptr_t) word % GCALIGNMENT == Lisp_Symbol
>    : (uintptr_t) word % alignof (struct Lisp_Symbol) == 0)

I don't understand how this will work, given that Lisp object on the
stack can be pushed as 2 non-contiguous 32-bit words.  Can you
explain?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 05:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 01:52:04 2020
Received: from localhost ([127.0.0.1]:56785 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeuPc-0005Bj-5Q
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 01:52:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jeuPZ-0005BF-U6
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 01:52:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56728)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jeuPT-0002g4-QV; Sat, 30 May 2020 01:51:55 -0400
Received: from [176.228.60.248] (port=2815 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jeuPS-0000i9-Lt; Sat, 30 May 2020 01:51:55 -0400
Date: Sat, 30 May 2020 08:51:49 +0300
Message-Id: <83h7vym0lm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Fri, 29 May 2020 16:26:59 -0400)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN> <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
 <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Pip Cet <pipcet@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>,
>   41321 <at> debbugs.gnu.org
> Date: Fri, 29 May 2020 16:26:59 -0400
> 
>         Stefan "looking forward to bignums replacing wide-ints"

Why? so that Emacs could be slower still?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 30 May 2020 05:50:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 30 01:50:45 2020
Received: from localhost ([127.0.0.1]:56781 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeuO8-00059M-RU
	for submit <at> debbugs.gnu.org; Sat, 30 May 2020 01:50:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jeuO7-000598-0i
 for 41321 <at> debbugs.gnu.org; Sat, 30 May 2020 01:50:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56716)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jeuO0-0001Wj-5n; Sat, 30 May 2020 01:50:24 -0400
Received: from [176.228.60.248] (port=2722 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jeuNz-0000dp-C8; Sat, 30 May 2020 01:50:23 -0400
Date: Sat, 30 May 2020 08:50:18 +0300
Message-Id: <83imgem0o5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN> (message from
 Paul Eggert on Fri, 29 May 2020 13:24:55 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> <83sgfjqn49.fsf@HIDDEN>
 <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Fri, 29 May 2020 13:24:55 -0700
> 
> There are really two bugs here.
> 
> 1. The idea of taking the address modulo LISP_ALIGNMENT is wrong, as a pointer
> can point into the middle of (say) a pseudovector and not be
> LISP_ALIGNMENT-aligned. Replacing LISP_ALIGNMENT with GCALIGNMENT does not fix
> this bug in general, because such a pointer might not be GCALIGNMENT-aligned
> either. This bug can cause crashes because it causes GC to think an object is
> garbage when it's not garbage.
> 
> 2. LISP_ALIGNMENT is too large on MinGW and some other platforms.
> 
> The patch I sent earlier attempted to be the simplest patch that would fix the
> bug you observed on MinGW, which is a special case of (1). It does not attempt
> to fix all plausible cases of (1), nor does it address (2).
> 
> We can fix these two bugs separately, by installing the attached patches into
> emacs-27. The first patch fixes (1) and thus fixes the crash along with other
> plausible crashes. The second one fixes (2), and this fixes the MinGW crash in a
> different way but does not fix the crash on other plausible platforms. (1)
> probably has better performance than (2), though I doubt whether users will notice.

Since (1) is for now purely theoretical (and rare even in that
theoretical case), I'd like to see (2) applied to emacs-27.  Let's do
that soon, as I'd like to have another pretest in the near future.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 21:02:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 17:02:38 2020
Received: from localhost ([127.0.0.1]:56346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jem91-00079o-3g
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 17:02:38 -0400
Received: from mail-ot1-f65.google.com ([209.85.210.65]:43687)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jem8z-00079c-E9
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 17:02:21 -0400
Received: by mail-ot1-f65.google.com with SMTP id u23so3009337otq.10
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 14:02:21 -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:content-transfer-encoding;
 bh=IFgmzDXjUfNXDDlpl7+TzZFefc0yRHlMWH3djKbPD8Q=;
 b=tbCdpg6WIdka9tcOV1hJjIfCZ3NjkfNfZVGwt2Rd0a4Z9f+Mms8lc82K7hdo5drWW1
 DkD3xSyA3O7sbBq4l1ZLGZgrAVbJ9sTgO+ZTw4U7CbUW+jJ2ntSD1oCAMqXF69OOpH53
 DKQhGMro8OpUUhyMqNQ4rT0L2pw3Ft/nbx+HzsdfyUYqcheaFilhcSvSlRcaCwr64vis
 NSGVDad737HN9j0tNAsFB2W7HcUnHVVnwAOtqX2BdT/VvMW+N0nDUjpLNuwOBFnWwZa3
 kM56tYqRiuVeCLNPIc0fJINVlLYjFIwaMuckDQvZG26bUufOvURi/s5qtMTqXNror/XN
 T3AQ==
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:content-transfer-encoding;
 bh=IFgmzDXjUfNXDDlpl7+TzZFefc0yRHlMWH3djKbPD8Q=;
 b=NHwwY903TUXDmFwPqWD4/NmW9uoVnmmyTmzyvtr8f85y3f9K5qMKx3c6daODytu0Hy
 XjrZLQ/kceb52+zUB5GI+ALOOyxjqL1NxyfDRwxedG3Rf4yGQUyJ47TxvSnRIzmSlwgh
 m8QQH/D7We+SOBnKObRqvWdkLLny5umLZrgqR0E/UGqID3whtJziqB+JOd9KY72sYJ69
 t6xmqajYKNYlVa5KWHBFctsTa8CzR4nhlj6bU4MaCdRpMBwsG8LoFEGn/qnrM4HYAEhX
 nlN/ae2/rkcJJtwC+cCaN6uvh9hzoR7X2mIFXd6st6M7PHgia735kY0ZmSY8t4ZB7Dgm
 wFSw==
X-Gm-Message-State: AOAM532RTFG9y/M+E/U/8WfrpH9ODL/fbkwzTN9bMuFVhZSFdF3tg86J
 6p8x3uw9JPj3goSTkrCSyEfF2C1n98YSd2uin5U=
X-Google-Smtp-Source: ABdhPJxsbH5U2jowYUP5sTDafTV/SwVZ5lTEmTuFNYsIZXwT1mx+5U16ArlhcqfFgTH5W1XumfL7ovOVx7f8gmT6lJs=
X-Received: by 2002:a9d:6a44:: with SMTP id h4mr7853955otn.287.1590786135685; 
 Fri, 29 May 2020 14:02:15 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
 <83sgfjqn49.fsf@HIDDEN> <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
In-Reply-To: <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 21:01:39 +0000
Message-ID: <CAOqdjBdc6=ThHR8k-jTiqZDd_aMQv3TLcFCbMvyanFJqLHeJxQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 29, 2020 at 8:24 PM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/28/20 11:19 PM, Eli Zaretskii wrote:
> >> -  return (uintptr_t) p % LISP_ALIGNMENT =3D=3D 0;
> >> +  return (uintptr_t) p % GCALIGNMENT =3D=3D 0;
> >>  }
> > ...replacing LISP_ALIGNMENT with GCALIGNMENT just here doesn't sound
> > right to me: by keeping the current value of LISP_ALIGNMENT, we
> > basically declare that Lisp objects shall be aligned on that boundary,
> > whereas that isn't really the case.  Why not change the value of
> > LISP_ALIGNMENT instead?
>
> There are really two bugs here.
>
> 1. The idea of taking the address modulo LISP_ALIGNMENT is wrong, as a po=
inter
> can point into the middle of (say) a pseudovector and not be
> LISP_ALIGNMENT-aligned. Replacing LISP_ALIGNMENT with GCALIGNMENT does no=
t fix
> this bug in general, because such a pointer might not be GCALIGNMENT-alig=
ned
> either. This bug can cause crashes because it causes GC to think an objec=
t is
> garbage when it's not garbage.
>
> 2. LISP_ALIGNMENT is too large on MinGW and some other platforms.
>
> The patch I sent earlier attempted to be the simplest patch that would fi=
x the
> bug you observed on MinGW, which is a special case of (1).

I'm not convinced. I think Eli only observed (2). There were no
pointers into the middle of pseudovectors in his backtrace or
disassembly...

> It does not attempt
> to fix all plausible cases of (1), nor does it address (2).

It does address (2). It doesn't address all cases of (1).

> We can fix these two bugs separately, by installing the attached patches =
into
> We can fix these two bugs separately, by installing the attached patches =
into
> emacs-27. The first patch fixes (1) and thus fixes the crash along with o=
ther
> plausible crashes. The second one fixes (2), and this fixes the MinGW cra=
sh in a
> different way but does not fix the crash on other plausible platforms. (1=
)
> probably has better performance than (2), though I doubt whether users wi=
ll notice.

(1) says:
It=E2=80=99s an invalid optimization, since pointers can address the
middle of Lisp_Object data.

That may be true (we still haven't observed it), but it's not what
happened in Eli's case: in that case, the "pointer" was actually the
lower half of a Lisp_Object, so it pointed at the beginning of a
struct Lisp_Vector. That just happened to be misaligned.

(2) has this comment:
+/* Alignment needed for memory blocks that are allocated via malloc
+   and that contain Lisp objects.  On typical hosts malloc already
+   aligns sufficiently, but extra work is needed on oddball hosts
+   where Emacs would crash if malloc returned a non-GCALIGNED pointer.  */

I can't make sense of that comment. It describes two problems that
don't happen, and omits the problem that does happen.
1. malloc() % GCALIGNMENT !=3D 0. Never happens, as far as I can tell.
2. A Lisp object requires greater alignment than malloc() gives it.
IIRC, there was at least one RISC architecture whose specification
supported atomic operations only on the first word in each
32-byte-aligned block, but that's such a rare case (and wasn't true
for the silicon implementations, I seem to recall) that it seems silly
to worry about it today.

I'm not saying it's the best solution, but I would prefer simply
defining LISP_ALIGNMENT to be 8 to either patch.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 20:40:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 16:40:43 2020
Received: from localhost ([127.0.0.1]:56315 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jelo3-0006dD-Lo
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 16:40:43 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:49484)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jelo2-0006cy-2X
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 16:40:42 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 458191600AF;
 Fri, 29 May 2020 13:40:35 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id 0Cv4qA_SWDUS; Fri, 29 May 2020 13:40:34 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 89B051600C3;
 Fri, 29 May 2020 13:40:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id PpkpN29J-dqG; Fri, 29 May 2020 13:40:34 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3AAE21600AF;
 Fri, 29 May 2020 13:40:34 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Stefan Monnier <monnier@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
 <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH
 ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL
 aFRZcDVibHRGM1dZRHo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MU9a
 UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G
 ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI
 UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD
 cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt
 SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2
 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <cc3030ac-1e6f-ca75-8e5f-20bd69967565@HIDDEN>
Date: Fri, 29 May 2020 13:40:33 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/29/20 1:26 PM, Stefan Monnier wrote:

> The original problematic case is for wide-int where a 64bit Lisp_Object
> containing a symbol is split into a 32bit tag saying "this is a symbol"
> and a 32bit pointer to which an offset has been added.
> 
> So when we encounter a 32bit word on the stack, it may be a "plain
> pointer" or it may be the 32bit of a pointer to a symbol with an
> offset applied but we can't tell which it is because we don't have the
> tag at that point.

Oh, you're right. Thanks, I was thinking only of the USE_LSB_TAG case.

For the !USE_LSB_TAG case, we should check whether the word is aligned for
'struct Lisp_Symbol', not whether it has the Lisp_Symbol tag, when deciding
quickly whether to add 'lispsym' and then do the second rbtree lookup. Something
like this:

  (USE_LSB_TAG
   ? (uintptr_t) word % GCALIGNMENT == Lisp_Symbol
   : (uintptr_t) word % alignof (struct Lisp_Symbol) == 0)

I'll fold this idea into the next iteration of the patch I'm working on.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 20:27:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 16:27:22 2020
Received: from localhost ([127.0.0.1]:56299 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jelb8-0006IN-6U
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 16:27:22 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9497)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1jelat-0006Hv-Va
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 16:27:20 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A48201002FA;
 Fri, 29 May 2020 16:27:02 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1691410027A;
 Fri, 29 May 2020 16:27:01 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1590784021;
 bh=LPVCq5nmqkGGdgLzvc2doWaNoFonwQoL3yAyIRWXJ+U=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=ahWkrwPJ8jjcH8aiBOAkXLtKzrkFIptfRbsTOz13R/d3gF3YSs18VEeSyPF9v2JXE
 RGjklmbOcjXkpcG8Zx9cVVbjvlRGosdV2zzfloCmBn0WbdCWxdMml0jJuTClMRATik
 VwaZ6QBctZ6Q6AIivYam6lUO+tue62rOcl51Dysgnt7TDNg9cIPUeG2mPUfsEHRtiB
 1rKa9LvYNewYbfB8ftW0TIdQRPRdivw08yWJ3aetV7kNKYEW2sxbNX6oFKKzcvTZd9
 WC2tN3O62MxgF1jtfegeNP80qYDpvK2gWpoqBhl+Y6UtAubtQuB0xRdiGyGPX9IlwG
 M0sKpQ6a5LryA==
Received: from alfajor (unknown [216.154.64.157])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6F7ED120846;
 Fri, 29 May 2020 16:27:00 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
Message-ID: <jwvzh9qcwyn.fsf-monnier+emacs@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
Date: Fri, 29 May 2020 16:26:59 -0400
In-Reply-To: <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN> (Paul Eggert's
 message of "Fri, 29 May 2020 12:32:05 -0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.089 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> What I was trying to say is that if a pointer lacks the symbol tag, then we
> needn't worry about it being offset by 'lispsym'. These pointers need to be
> looked up only once, even if they happen to be pointers into a struct
> Lisp_Symbol. We can safely assume that a compiler won't take a Lisp_Object that
> is a symbol, and add a small offset to it without also adding 'lispsym'.

I don't think that true.

The original problematic case is for wide-int where a 64bit Lisp_Object
containing a symbol is split into a 32bit tag saying "this is a symbol"
and a 32bit pointer to which an offset has been added.

So when we encounter a 32bit word on the stack, it may be a "plain
pointer" or it may be the 32bit of a pointer to a symbol with an
offset applied but we can't tell which it is because we don't have the
tag at that point.


        Stefan "looking forward to bignums replacing wide-ints"





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 20:25:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 16:25:09 2020
Received: from localhost ([127.0.0.1]:56294 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jelYv-0006Ep-Dw
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 16:25:08 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46782)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jelYt-0006EE-An
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 16:25:03 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id AC26E1600CC;
 Fri, 29 May 2020 13:24:57 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id GVfxDInY71S5; Fri, 29 May 2020 13:24:56 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 79D9F1600AF;
 Fri, 29 May 2020 13:24:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id s4d-SP0b8JR9; Fri, 29 May 2020 13:24:56 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3FB2A1600C3;
 Fri, 29 May 2020 13:24:56 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm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 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <a42ae7ed-8aa0-7540-77ba-91a9a44296dd@HIDDEN>
Date: Fri, 29 May 2020 13:24:55 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83sgfjqn49.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------00FF823AB9D0F52011EBB12D"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------00FF823AB9D0F52011EBB12D
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 5/28/20 11:19 PM, Eli Zaretskii wrote:
>> -  return (uintptr_t) p % LISP_ALIGNMENT == 0;
>> +  return (uintptr_t) p % GCALIGNMENT == 0;
>>  }
> ...replacing LISP_ALIGNMENT with GCALIGNMENT just here doesn't sound
> right to me: by keeping the current value of LISP_ALIGNMENT, we
> basically declare that Lisp objects shall be aligned on that boundary,
> whereas that isn't really the case.  Why not change the value of
> LISP_ALIGNMENT instead?

There are really two bugs here.

1. The idea of taking the address modulo LISP_ALIGNMENT is wrong, as a pointer
can point into the middle of (say) a pseudovector and not be
LISP_ALIGNMENT-aligned. Replacing LISP_ALIGNMENT with GCALIGNMENT does not fix
this bug in general, because such a pointer might not be GCALIGNMENT-aligned
either. This bug can cause crashes because it causes GC to think an object is
garbage when it's not garbage.

2. LISP_ALIGNMENT is too large on MinGW and some other platforms.

The patch I sent earlier attempted to be the simplest patch that would fix the
bug you observed on MinGW, which is a special case of (1). It does not attempt
to fix all plausible cases of (1), nor does it address (2).

We can fix these two bugs separately, by installing the attached patches into
emacs-27. The first patch fixes (1) and thus fixes the crash along with other
plausible crashes. The second one fixes (2), and this fixes the MinGW crash in a
different way but does not fix the crash on other plausible platforms. (1)
probably has better performance than (2), though I doubt whether users will notice.

--------------00FF823AB9D0F52011EBB12D
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Remove-maybe_lisp_pointer.patch"
Content-Disposition: attachment;
 filename="0001-Remove-maybe_lisp_pointer.patch"
Content-Transfer-Encoding: quoted-printable

From 2c0bac868a7aefe7dafd2362cce42a7d3738319f Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Fri, 29 May 2020 12:56:16 -0700
Subject: [PATCH 1/2] =3D?UTF-8?q?Remove=3D20=3DE2=3D80=3D98maybe=3D5Flisp=
=3D5Fpointer?=3D
 =3D?UTF-8?q?=3DE2=3D80=3D99?=3D
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

It=E2=80=99s an invalid optimization, since pointers can address the
middle of Lisp_Object data.
* src/alloc.c (maybe_lisp_pointer): Remove.  Only use removed.
Do not merge to master, as we=E2=80=99ll put in a better fix there.
---
 src/alloc.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 1c6b664b22..b8382aca5b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4585,18 +4585,6 @@ mark_maybe_objects (Lisp_Object const *array, ptrd=
iff_t nelts)
     mark_maybe_object (*array);
 }
=20
-/* Return true if P might point to Lisp data that can be garbage
-   collected, and false otherwise (i.e., false if it is easy to see
-   that P cannot point to Lisp data that can be garbage collected).
-   Symbols are implemented via offsets not pointers, but the offsets
-   are also multiples of LISP_ALIGNMENT.  */
-
-static bool
-maybe_lisp_pointer (void *p)
-{
-  return (uintptr_t) p % LISP_ALIGNMENT =3D=3D 0;
-}
-
 /* If P points to Lisp data, mark that as live if it isn't already
    marked.  */
=20
@@ -4609,9 +4597,6 @@ mark_maybe_pointer (void *p)
   VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p));
 #endif
=20
-  if (!maybe_lisp_pointer (p))
-    return;
-
   if (pdumper_object_p (p))
     {
       int type =3D pdumper_find_object_type (p);
--=20
2.17.1


--------------00FF823AB9D0F52011EBB12D
Content-Type: text/x-patch; charset=UTF-8;
 name="0002-Don-t-overalign-Lisp-objects.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0002-Don-t-overalign-Lisp-objects.patch"

From f620b5b802bf2afad033c7cc7856a71fd28b2c13 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Fri, 29 May 2020 13:02:32 -0700
Subject: [PATCH 2/2] =?UTF-8?q?Don=E2=80=99t=20overalign=20Lisp=20objects?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Backport from master.
* src/alloc.c (union emacs_align_type):
New type, used for LISP_ALIGNMENT.
(LISP_ALIGNMENT): Use it instead of max_align_t.
---
 src/alloc.c | 55 +++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 45 insertions(+), 10 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index b8382aca5b..48e96863db 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -104,6 +104,46 @@ Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2020 Free Software
 #include "w32heap.h"	/* for sbrk */
 #endif
 
+/* A type with alignment at least as large as any object that Emacs
+   allocates.  This is not max_align_t because some platforms (e.g.,
+   mingw) have buggy malloc implementations that do not align for
+   max_align_t.  This union contains types of all GCALIGNED_STRUCT
+   components visible here.  */
+union emacs_align_type
+{
+  struct frame frame;
+  struct Lisp_Bignum Lisp_Bignum;
+  struct Lisp_Bool_Vector Lisp_Bool_Vector;
+  struct Lisp_Char_Table Lisp_Char_Table;
+  struct Lisp_CondVar Lisp_CondVar;
+  struct Lisp_Finalizer Lisp_Finalizer;
+  struct Lisp_Float Lisp_Float;
+  struct Lisp_Hash_Table Lisp_Hash_Table;
+  struct Lisp_Marker Lisp_Marker;
+  struct Lisp_Misc_Ptr Lisp_Misc_Ptr;
+  struct Lisp_Mutex Lisp_Mutex;
+  struct Lisp_Overlay Lisp_Overlay;
+  struct Lisp_Sub_Char_Table Lisp_Sub_Char_Table;
+  struct Lisp_Subr Lisp_Subr;
+  struct Lisp_User_Ptr Lisp_User_Ptr;
+  struct Lisp_Vector Lisp_Vector;
+  struct terminal terminal;
+  struct thread_state thread_state;
+  struct window window;
+
+  /* Omit the following since they would require including process.h
+     etc.  In practice their alignments never exceed that of the
+     structs already listed.  */
+#if 0
+  struct Lisp_Module_Function Lisp_Module_Function;
+  struct Lisp_Process Lisp_Process;
+  struct save_window_data save_window_data;
+  struct scroll_bar scroll_bar;
+  struct xwidget_view xwidget_view;
+  struct xwidget xwidget;
+#endif
+};
+
 #ifdef DOUG_LEA_MALLOC
 
 /* Specify maximum number of areas to mmap.  It would be nice to use a
@@ -636,16 +676,11 @@ buffer_memory_full (ptrdiff_t nbytes)
 #define COMMON_MULTIPLE(a, b) \
   ((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b))
 
-/* LISP_ALIGNMENT is the alignment of Lisp objects.  It must be at
-   least GCALIGNMENT so that pointers can be tagged.  It also must be
-   at least as strict as the alignment of all the C types used to
-   implement Lisp objects; since pseudovectors can contain any C type,
-   this is max_align_t.  On recent GNU/Linux x86 and x86-64 this can
-   often waste up to 8 bytes, since alignof (max_align_t) is 16 but
-   typical vectors need only an alignment of 8.  Although shrinking
-   the alignment to 8 would save memory, it cost a 20% hit to Emacs
-   CPU performance on Fedora 28 x86-64 when compiled with gcc -m32.  */
-enum { LISP_ALIGNMENT = alignof (union { max_align_t x;
+/* Alignment needed for memory blocks that are allocated via malloc
+   and that contain Lisp objects.  On typical hosts malloc already
+   aligns sufficiently, but extra work is needed on oddball hosts
+   where Emacs would crash if malloc returned a non-GCALIGNED pointer.  */
+enum { LISP_ALIGNMENT = alignof (union { union emacs_align_type x;
 					 GCALIGNED_UNION_MEMBER }) };
 verify (LISP_ALIGNMENT % GCALIGNMENT == 0);
 
-- 
2.17.1


--------------00FF823AB9D0F52011EBB12D--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 19:38:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 15:38:18 2020
Received: from localhost ([127.0.0.1]:56267 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jekpZ-00054n-IP
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 15:38:18 -0400
Received: from mail-ot1-f42.google.com ([209.85.210.42]:34992)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jekpX-00054a-Sk
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 15:38:12 -0400
Received: by mail-ot1-f42.google.com with SMTP id 69so2865717otv.2
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 12:38:11 -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=mCqQs4gBkBu7+8czQbBwbZCDFVQyWoWIkA1d+8SjXzA=;
 b=dP9eA/BQTzEZ1dGMvgMCj+YC3f/bfIlZOFTY4MSAGl/0Nb0dPVgDs+ZvgbLVCWBPoJ
 ahXHqtDUkVLnXqak5trY7mDL1Mwh28EmXHL29JnRT+5flul/kwqwN8p/hxBu4Gk5T7xT
 DVv5ImaLagIvijnq7GDu0eM4Xc0gOhy6bn1j6ffmDlxh5JuaEwzj7oeFStx6kvzFWx4u
 olyS7atzk9L8GSA/1DHeGEWxuIPxU92ZH9qZNUG2GANIZDGrBYAPPBtx37nlaMN3QRiF
 9jHVUrLJHi6Z5uSujl/KSeU0/VqfYdoVdGdrAUdCAjV2UXbnpEtztovmnVZkXXWGlxF1
 b6tQ==
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=mCqQs4gBkBu7+8czQbBwbZCDFVQyWoWIkA1d+8SjXzA=;
 b=Z67738thv16z5Rr0LKKwbbvk2MOnJN4TeX7mgl1Yfri07lLQVI1OzU6rMip0E09WO2
 eR+Yz9AjThhjzgJMFFyj5RGntxPFXNLtsKVqVT3Zdwz7efEQOsjU4A8qKyTeP2LhyvdS
 OWPeZUD1vzH/G8KbGZoVDgJUwdJK74+uLhz7+TxwlQF3XtrOLwfq8N3B4DXPBxxrOX7J
 k9zlj3TlJ5Jew2MudFNK7YIKXJZyVmql2JEouDEmae6eOr5iLNAXF08KGMKMsboa8aXF
 8f+RFPS4xYp9J6UzUeQB69BFPf/vjDJol0SazjuNmUYaPLZHmaSjsvYylmBeQIEbHgNO
 0nng==
X-Gm-Message-State: AOAM532FSmS7Te3TMQB5YF8tS5vWs4hJTf8y2+a3exFQV6Qi0QW/Mm3/
 mBYU8neP4C92iwrEzTJwQwXkrRywY603WMNEQ/E=
X-Google-Smtp-Source: ABdhPJw2ctcEZYIaS9wzFZ6XDJDHgtsOK39aBfkJjGXE4AckLbwSN+ttFlYgfEkNXAhTdoeB7JnwFjIiKIgsAI90iFg=
X-Received: by 2002:a9d:6a44:: with SMTP id h4mr7612103otn.287.1590781086078; 
 Fri, 29 May 2020 12:38:06 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN> <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
 <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
 <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
In-Reply-To: <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 19:37:29 +0000
Message-ID: <CAOqdjBdaFS9tZExSGjpf9=enX3Sg0ggWpj+QW=eMzj1SSnOOcg@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 29, 2020 at 7:32 PM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/29/20 11:37 AM, Pip Cet wrote:
> > if you have a very large vector, and a symbol block
> > aliasing it as symbol offsets goes away, you have to search for other
> > symbol blocks with that property, which might take a long time.
>
> It shouldn't be that bad, because when you are worrying about symbols offset by
> 'lispsym', you need to look only for symbol blocks; it won't matter if these
> values appear to point into a vector because you won't follow them in that case.

You mean it shouldn't be that bad with the existing code? You're probably right.

It would have been very bad with the code I posted though, so best ignore that.

> > However, I wonder what you mean by "what appear to be symbol-tagged
> > pointers"? Surely we need to look up all pointers twice, no matter
> > what their tag is, since they might be a reference to something inside
> > the struct Lisp_Symbol.
>
> What I was trying to say is that if a pointer lacks the symbol tag, then we
> needn't worry about it being offset by 'lispsym'. These pointers need to be
> looked up only once, even if they happen to be pointers into a struct
> Lisp_Symbol. We can safely assume that a compiler won't take a Lisp_Object that
> is a symbol, and add a small offset to it without also adding 'lispsym'.

Oh! You're right, of course. How silly of me not to realize.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 19:32:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 15:32:15 2020
Received: from localhost ([127.0.0.1]:56254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jekjn-0004vK-5N
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 15:32:15 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36268)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jekjl-0004v3-01
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 15:32:13 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 03E981600AF;
 Fri, 29 May 2020 12:32:07 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id mfYnDYZDAKsb; Fri, 29 May 2020 12:32:06 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4305F1600EA;
 Fri, 29 May 2020 12:32:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id oeSwbAiZGTd5; Fri, 29 May 2020 12:32:06 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E777E1600D1;
 Fri, 29 May 2020 12:32:05 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5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00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <6fa1ac99-c972-881e-180b-e49d0513504c@HIDDEN>
Date: Fri, 29 May 2020 12:32:05 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/29/20 11:37 AM, Pip Cet wrote:
> if you have a very large vector, and a symbol block
> aliasing it as symbol offsets goes away, you have to search for other
> symbol blocks with that property, which might take a long time.

It shouldn't be that bad, because when you are worrying about symbols offset by
'lispsym', you need to look only for symbol blocks; it won't matter if these
values appear to point into a vector because you won't follow them in that case.

> However, I wonder what you mean by "what appear to be symbol-tagged
> pointers"? Surely we need to look up all pointers twice, no matter
> what their tag is, since they might be a reference to something inside
> the struct Lisp_Symbol.

What I was trying to say is that if a pointer lacks the symbol tag, then we
needn't worry about it being offset by 'lispsym'. These pointers need to be
looked up only once, even if they happen to be pointers into a struct
Lisp_Symbol. We can safely assume that a compiler won't take a Lisp_Object that
is a symbol, and add a small offset to it without also adding 'lispsym'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 18:38:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 14:38:34 2020
Received: from localhost ([127.0.0.1]:56228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jejtp-0003LY-PT
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 14:38:33 -0400
Received: from mail-oi1-f196.google.com ([209.85.167.196]:34021)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jejtn-0003LL-Ob
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 14:38:32 -0400
Received: by mail-oi1-f196.google.com with SMTP id w4so3501060oia.1
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 11:38:31 -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=SmqTcGCaio0W9RxMpoDh9RPN/TJ9XjATxqOPnNrsI0g=;
 b=C0dns8NkDRrTzIvgEcJoR1l0z20PCT5ylsDqAnLVwViafdhr/+3ERH60XrE0o7wWSl
 94z7H3Phqs0a22N/bEJABZRVxifYFc2RCm7/Ri5ZF/15CRpYKqMc+6kVb5fBsleAxNLW
 jVZj7RYu6bZdAEEN7JY5hzo59WismmFx2BB7oAGrSth9fvs0GRn3uMUKYYQTSP4+fuKR
 vzD0UGbXBh0uC9VRSx+qxG50x35cQBNMxcKwfTSubZbm7Pd98nrdJ2HCwRag8H3R1Sxu
 yjDVsx1AsH+wNgiwu2gzpZ1PQ7FWI1egt5MrVyO4cMlzLc4IryvdF7yAHqTWctEAfUTb
 BJKw==
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=SmqTcGCaio0W9RxMpoDh9RPN/TJ9XjATxqOPnNrsI0g=;
 b=d5JPwvr8ZKj56q0NZYFkSBRXi319YpXBSZdomP7ozqFzyusGPOKChEby6AW8XZ6oMg
 SpbXwSHECV9RAtqKq8WwDBQNViHnpoldIWDwZeQ73JdbWkPNqAzB5soizcBgf/+znj0A
 SX92AjRSygCSgbwOupqF7IbRmTnXwalhACzJF14E9HfxdQJWY8FW8UC3ZjgPYaMIqLn/
 iu0Rbd2/GvP+d5Z9XNyUfT22BoEr32uuYDGxlumnrUMsDOfvsOAYrOUT3BVGAKA/W+kf
 hifWbpY0z8dLUbDUm5Jau5942BWdGDL5LZGq2XZxX/fVXtsAP6eltehXYiKVVrGm99BG
 QvsQ==
X-Gm-Message-State: AOAM530pyDaAo+iao1Y9fZSJzkfAYduB1glDAv20Orc1x+yIT7+rRiLB
 LG/Ne0CjN+HHS5Q/lQ563nUMYjkSMkRnUTonAtk=
X-Google-Smtp-Source: ABdhPJxLLIOe8PikxeS9eX46GOAkJ7EI1Sx9wCqNx1Oq7H0HkhEx0ku21MhMN+6w1ZMOmPubaAxzZM30LVBsOtB4f1E=
X-Received: by 2002:aca:c6d3:: with SMTP id w202mr7391912oif.44.1590777500572; 
 Fri, 29 May 2020 11:38:20 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN> <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
 <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
In-Reply-To: <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 18:37:42 +0000
Message-ID: <CAOqdjBf0zQfznX7CpwHnG39P5kB_q2L+HNPjhj5LitjeE7HKOA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 29, 2020 at 6:31 PM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/29/20 2:43 AM, Pip Cet wrote:
> > As I said, the code is tricky (i.e. might contain bugs that can only
> > be discovered through extensive testing on 32-bit systems), and it
> > complicates what should be generic functions for the rbtree
> > implementation, so this is probably a 32-bit optimization that is too
> > late because 32-bit systems are no longer that relevant...
>
> At least at first, it may make more sense to keep the red-black trees as-is, and
> to look up what appear to be symbol-tagged pointers twice, once as-is (to find
> any kind of object) and once offset by '(char *) lispsym - Lisp_Symbol' (to find
> only symbols).

Having had some time to think about this, I agree. I'm certainly not
very confident in that code.

But the main reason is that it's not an optimization in all
circumstances: if you have a very large vector, and a symbol block
aliasing it as symbol offsets goes away, you have to search for other
symbol blocks with that property, which might take a long time.

However, I wonder what you mean by "what appear to be symbol-tagged
pointers"? Surely we need to look up all pointers twice, no matter
what their tag is, since they might be a reference to something inside
the struct Lisp_Symbol.

Of course, on 64-bit machines, this line of code would usually save us
the trouble:

  if (start < min_heap_address || start > max_heap_address)
    return MEM_NIL;

So that's another reason to leave the code as it is for now.

> Although a bit slower, this won't require any changes to the
> rbtree code so it's cleaner.

> We can then time the optimization you have in mind, to see whether it's worth doing.

... or something simpler that might actually work better :-)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 18:31:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 14:31:16 2020
Received: from localhost ([127.0.0.1]:56219 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jejmm-0003BN-AF
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 14:31:16 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53468)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jejmj-0003B8-Rx
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 14:31:14 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 69FA91600AF;
 Fri, 29 May 2020 11:31:08 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id WCaQ_8Oa4yqV; Fri, 29 May 2020 11:31:07 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2A0451600DA;
 Fri, 29 May 2020 11:31:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id NsPgRTPpUQ4f; Fri, 29 May 2020 11:31:06 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EC16C1600D1;
 Fri, 29 May 2020 11:31:05 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH
 ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL
 aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D
 UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT
 MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls
 QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3
 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZ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llHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2
 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <00884bff-c7ca-9f67-c3ec-cd3963ca1cb9@HIDDEN>
Date: Fri, 29 May 2020 11:31:05 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/29/20 2:43 AM, Pip Cet wrote:
> As I said, the code is tricky (i.e. might contain bugs that can only
> be discovered through extensive testing on 32-bit systems), and it
> complicates what should be generic functions for the rbtree
> implementation, so this is probably a 32-bit optimization that is too
> late because 32-bit systems are no longer that relevant...

At least at first, it may make more sense to keep the red-black trees as-is, and
to look up what appear to be symbol-tagged pointers twice, once as-is (to find
any kind of object) and once offset by '(char *) lispsym - Lisp_Symbol' (to find
only symbols). Although a bit slower, this won't require any changes to the
rbtree code so it's cleaner. We can then time the optimization you have in mind,
to see whether it's worth doing.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 14:20:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 10:20:03 2020
Received: from localhost ([127.0.0.1]:55733 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jefre-0000Xw-Nb
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 10:20:03 -0400
Received: from mail-ot1-f49.google.com ([209.85.210.49]:34151)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jefrP-0000X8-3I
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 10:20:01 -0400
Received: by mail-ot1-f49.google.com with SMTP id b18so2051430oti.1
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 07:19:47 -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=jUO7E32Mgtw/fWFvPtrVU5u94RjsWfy46qBmCcDjVl0=;
 b=md6C++VKKdY0A8rBmtUpAqcm1MH8z2dBuK2UJAs6g9lsB708kGIztqmrFaEmHTwFeP
 acKzInBIbgG16u22gkqLxinfGCmv4kWcMa/J0j8hLgVOODl9w98YyU6qSfGcIrEikitu
 HwmAMDUxV33qxPTvjcje3yNU3WnluDK/E1qrmpnrJEsbSetnZMn10vuSuxCCYNNEc/Rr
 ydIzOe2creW6Ggy3xTg4D0a4LQdiNoZIm7kpnbz1zA6758i0AARampPZkLdzmj0eGfM7
 Kg8kAEgaGJazaMk1/QDRzDm+u+qU/HT7GvvYBb7gPMwSLymqaHEtV46tY5jWEWiAhh9E
 n5hg==
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=jUO7E32Mgtw/fWFvPtrVU5u94RjsWfy46qBmCcDjVl0=;
 b=jZbkMMnOBX9vnlbKoHMNUZ4bhWU6/QnMrfyQ9bGYjy41JmJNHHhyfE6+oUpiOwph+F
 tYq06GEtrQsLLNdODGvId69pEmIUZ3W12RjGeCAQiSZUx8xwyFC5LYcIT+crUeOxg6fp
 5vW5SC/l3V3y9vT01wc9i8g8Vkqs89/NznkJibXsjhqL4i08Ihala/+lhxGQW/lCL4NW
 hSnykpwFqKmR2YbWs9+1Fb0CnhXZbcQQ8GW+ukGs7F2jzpcdVrO2SLJmyi8jXmMMu+2p
 iUbucryyEQD7ub3SzBmP+0sylWPjB6798/ww5tKwsmmTzaGmloRwLQp6zHFqgwmQLNLV
 prNg==
X-Gm-Message-State: AOAM532zfoN0nl6/Y92w9NED2+Gxpx9w7gb83j08Vx3EG1BDacLl5qfk
 +AHGU4oU44/UCBSqhJ/fu0yfWbZYDRGj6U8MXjw=
X-Google-Smtp-Source: ABdhPJyLyfpvNRtjy8GEea/nOtqJKOUiozocrNP0wsxgkgjj1FOhuH6mrNy5MXdKVX5F81TE743szWjhuZdSViNgdk0=
X-Received: by 2002:a9d:6a44:: with SMTP id h4mr6365502otn.287.1590761980974; 
 Fri, 29 May 2020 07:19:40 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <831rn3nj0u.fsf@HIDDEN>
 <CAOqdjBffUZF4h1U5tVJEJyVCdfUj6gT7_=qbFYrf-wfDFmTFgQ@HIDDEN>
 <83y2pbm2n9.fsf@HIDDEN>
 <CAOqdjBfQyMjDM2HMeqMf9+tXtqwKXFEgi5HOZ2N6gfG9ObmJzQ@HIDDEN>
 <83wo4un8zt.fsf@HIDDEN>
In-Reply-To: <83wo4un8zt.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 14:19:04 +0000
Message-ID: <CAOqdjBcdRSDX+QbXhu7Va9qNnN8Q0yzdJRno+9VFfLcBcj99qA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 29, 2020 at 1:53 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Fri, 29 May 2020 11:47:46 +0000
> > Cc: eggert@HIDDEN, Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> >
> > > There's no bug:
> >
> > I believe there is.
> >
> > > the $size variable was not updated inside pvectype
> > > because the 'set' command tried to access invalid memory.
> >
> > Why would pvectype be called at all? xtype should have said
> > "Lisp_Symbol", not "Lisp_Vectorlike", and never gotten to pvectype at
> > all.
>
> Look at what xtype does, and you will see.

So you think it's a bug in xtype?

The relevant definitions are:

define xtype
  xgettype $
  output $type
  echo \n
  if $type == Lisp_Vectorlike
    xvectype
  end
end

define xgettype
  if (CHECK_LISP_OBJECT_TYPE)
    set $bugfix = $arg0.i
  else
    set $bugfix = $arg0
  end
  set $type = (enum Lisp_Type) (USE_LSB_TAG ? (EMACS_INT) $bugfix & (1
<< GCTYPEBITS) - 1 : (EMACS_UINT) $bugfix >> VALBITS)
end

Both look fine to me: xtype calls xgettype (not xvectype), which sets
$type to the type bits, then outputs them. But the bug must have
happened by then, because what's output is "Lisp_Vectorlike" even
though $ is a Lisp_Symbol. I fail to see how xvectype and pvectype are
relevant at all...




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 13:53:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 09:53:11 2020
Received: from localhost ([127.0.0.1]:54201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jefRf-0003cH-3a
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 09:53:11 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43566)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jefRc-0003by-CX
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 09:53:09 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39184)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jefRV-00031G-QC; Fri, 29 May 2020 09:53:01 -0400
Received: from [176.228.60.248] (port=3853 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jefRV-0000rM-3E; Fri, 29 May 2020 09:53:01 -0400
Date: Fri, 29 May 2020 16:52:54 +0300
Message-Id: <83wo4un8zt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBfQyMjDM2HMeqMf9+tXtqwKXFEgi5HOZ2N6gfG9ObmJzQ@HIDDEN>
 (message from Pip Cet on Fri, 29 May 2020 11:47:46 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <831rn3nj0u.fsf@HIDDEN>
 <CAOqdjBffUZF4h1U5tVJEJyVCdfUj6gT7_=qbFYrf-wfDFmTFgQ@HIDDEN>
 <83y2pbm2n9.fsf@HIDDEN>
 <CAOqdjBfQyMjDM2HMeqMf9+tXtqwKXFEgi5HOZ2N6gfG9ObmJzQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Fri, 29 May 2020 11:47:46 +0000
> Cc: eggert@HIDDEN, Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> > There's no bug:
> 
> I believe there is.
> 
> > the $size variable was not updated inside pvectype
> > because the 'set' command tried to access invalid memory.
> 
> Why would pvectype be called at all? xtype should have said
> "Lisp_Symbol", not "Lisp_Vectorlike", and never gotten to pvectype at
> all.

Look at what xtype does, and you will see.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 11:48:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 07:48:45 2020
Received: from localhost ([127.0.0.1]:54007 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jedV2-0000Ud-5S
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 07:48:45 -0400
Received: from mail-oi1-f177.google.com ([209.85.167.177]:39883)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jedV0-0000UP-Mw
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 07:48:31 -0400
Received: by mail-oi1-f177.google.com with SMTP id a7so1923777oic.6
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 04:48:30 -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=ulwyNIjxxy/Hoj0CaIboLC8jP4zBI5AfIFBlMl20QUM=;
 b=jgcz2ompBIf/t+n4PWM2TB1gymbuAQ9fB6x73FuoCZUIVg7uzsfym/4A/bbQ86/C9t
 mIH7clfe95PsgQLxPEkcOttOgIPw4ttvnJtGJ4m/ZWP+UKG8Ml6rq01pTOEHCeVYLi83
 llX2uuOMo8PO1OQ/YFIVxFkYmptH+177kw17FVpM1HHY88iXrzj2sedB9qzWDRplrV7/
 sCa9/zJ9Z9p6gJMUiIM1FVCA81PGxDnXH8axgLJ2lRhB1NbG3rc8yCJ3JuD4ucowH7mf
 DMEObL191L/VYTqIjVcoh6D4tVzHDxwkCnAw0rdn7wvt2MLRiFdeADSOdbELXzxBkGRE
 wGtg==
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=ulwyNIjxxy/Hoj0CaIboLC8jP4zBI5AfIFBlMl20QUM=;
 b=FJp/vqMjHz/nYnvwHX/uvcxo/kUokUdOOAJjNBRLI2RM49ZGpA9zGsE3gBHmq/xCdn
 dVYvPt14OUwCnQ+mqTm5WoR8DDPeyxYtGqsfw/rPvLsNPsikS+03PbIl1Ai1/JCWm1Vv
 mKHfQFbs6FFeEKJjUiRjdklZcF8sjIZw5fuXtiond7uWp36qDRIZkgcQLlzMKli0uVGK
 oKYkh8DjJEdVCQshtXpqH2lPqWTVsgnJ1LmH3cWYTItzcavQFMlwQr//fSCglkrwIVmT
 iRE2mQ6iIb6o58DT45zgjG2qtneU7r1g2ZG9McOKaLDSPy7ZlVszTUhjuDIqRQrhPR0L
 i3pQ==
X-Gm-Message-State: AOAM5334MbyP1AbeLkWuqwavn806dHb4WrBUpdBYhTQ/U1MZXvV/RfWR
 o+CV4P44H3Vl9c8jEpuH+4WSmpyZw3I1oZcgwFE=
X-Google-Smtp-Source: ABdhPJysMR5ng0UmA7XFeJbjI2XF8r+9eshaehMBdy2HA4jUuMNKJohD4Px/GI2ZYEJxwyxmYN2bzxtUQj/ix8q0Fgk=
X-Received: by 2002:aca:b708:: with SMTP id h8mr5148633oif.122.1590752903684; 
 Fri, 29 May 2020 04:48:23 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <831rn3nj0u.fsf@HIDDEN>
 <CAOqdjBffUZF4h1U5tVJEJyVCdfUj6gT7_=qbFYrf-wfDFmTFgQ@HIDDEN>
 <83y2pbm2n9.fsf@HIDDEN>
In-Reply-To: <83y2pbm2n9.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 11:47:46 +0000
Message-ID: <CAOqdjBfQyMjDM2HMeqMf9+tXtqwKXFEgi5HOZ2N6gfG9ObmJzQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 29, 2020 at 10:55 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Fri, 29 May 2020 10:34:20 +0000
> > Cc: Paul Eggert <eggert@HIDDEN>, Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> >
> > > . There's nothing wrong with GDB's xtype command: it fails when a Lisp
> > >   object encodes a pointer to invalid memory:
> >
> > (gdb) p last_marked[497]
> > $100 = XIL(0x439c370)
> > (gdb) xtype
> > Lisp_Vectorlike
> > Cannot access memory at address 0x1ffac2a8
> >
> > Again, that can't be right. $100 is a Lisp_Symbol, not a vectorlike,
> > and it's not at address 0x1ffac2a8.
> >
> > So my suspicion remains that this is a gdb bug, and it appears to be a
> > reproducible one!
>
> There's no bug:

I believe there is.

> the $size variable was not updated inside pvectype
> because the 'set' command tried to access invalid memory.

Why would pvectype be called at all? xtype should have said
"Lisp_Symbol", not "Lisp_Vectorlike", and never gotten to pvectype at
all.

Feel free to try that, in a fresh GDB session:

p 0x439c370
xtype

> So the rest
> is using the stale value of $size.  Puff! no miracle and no bug.

Which rest? There's no message after "Cannot access memory at address
0x1ffac2a8"

> You just don't need to assign too much importance to the address the
> error message displays, it might not be the problematic address.

Or there might not be a problematic address, because xtype is somehow
using the value of $ which it used when it encountered the initial bug
even for subsequent calls. It doesn't do that here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 10:55:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 06:55:55 2020
Received: from localhost ([127.0.0.1]:53897 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jecfs-0005Rg-V4
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 06:55:55 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jecfp-0005RR-9q
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 06:55:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59473)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jecfi-0001Jr-Ka; Fri, 29 May 2020 06:55:30 -0400
Received: from [176.228.60.248] (port=4944 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jecfh-0002do-Jq; Fri, 29 May 2020 06:55:30 -0400
Date: Fri, 29 May 2020 13:55:22 +0300
Message-Id: <83y2pbm2n9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBffUZF4h1U5tVJEJyVCdfUj6gT7_=qbFYrf-wfDFmTFgQ@HIDDEN>
 (message from Pip Cet on Fri, 29 May 2020 10:34:20 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <831rn3nj0u.fsf@HIDDEN>
 <CAOqdjBffUZF4h1U5tVJEJyVCdfUj6gT7_=qbFYrf-wfDFmTFgQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Fri, 29 May 2020 10:34:20 +0000
> Cc: Paul Eggert <eggert@HIDDEN>, Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> > . There's nothing wrong with GDB's xtype command: it fails when a Lisp
> >   object encodes a pointer to invalid memory:
> 
> (gdb) p last_marked[497]
> $100 = XIL(0x439c370)
> (gdb) xtype
> Lisp_Vectorlike
> Cannot access memory at address 0x1ffac2a8
> 
> Again, that can't be right. $100 is a Lisp_Symbol, not a vectorlike,
> and it's not at address 0x1ffac2a8.
> 
> So my suspicion remains that this is a gdb bug, and it appears to be a
> reproducible one!

There's no bug: the $size variable was not updated inside pvectype
because the 'set' command tried to access invalid memory.  So the rest
is using the stale value of $size.  Puff! no miracle and no bug.

You just don't need to assign too much importance to the address the
error message displays, it might not be the problematic address.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 10:35:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 06:35:06 2020
Received: from localhost ([127.0.0.1]:53889 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jecLy-0004ye-Fq
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 06:35:06 -0400
Received: from mail-ot1-f67.google.com ([209.85.210.67]:42753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jecLw-0004y6-9W
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 06:35:04 -0400
Received: by mail-ot1-f67.google.com with SMTP id z3so1538616otp.9
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 03:35:04 -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=AEEX/FmaYtxYOLr99urkeBod9+KrtKkBDECm3EyOSvk=;
 b=hg/mzHTTl1a6+iwwbpfd6+iyoAYfXRM9PdZrNjZLcp3C4/ZiTBMqJAgYTTfZ6LBeci
 BnAurXEp8tb+p2m6z4vwv16I7bTESJhBAZR4gZGsb+O+m59dPBnRnCzcYPi2JcUaOAgd
 9e2IRhQ4Ux9nP048yv2Gr5Ko9s7VM/ZdXeKNtcPL2+ijpCux8SNmmdzOL2e7S3NpcY6Q
 ZvaaW3jXswFnfYXdxR75JalWk1abVWwEAQ8JLYY18OQKE6mehiNHxe4Rn4W/JPngAfuY
 qIx97k0wKwvFGdHHUi8aDQdgIl5VMvuGRvx9IixXt535WYSb4xQV4xLhYXDhseDUqNp8
 EkcA==
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=AEEX/FmaYtxYOLr99urkeBod9+KrtKkBDECm3EyOSvk=;
 b=khehrMQZdSa7xYkpxg8r38yjTD7ehr9LJqlbHmj5DNDqYQ8UwdYgXAMZ1XSgoDHSW5
 HtCkGUBUiHj4iDF7hbtLelHOOfS6/H1dEWwc4z7N5welqnnZJvb1krKku4ScTzM7Rpn2
 hnGUykfN9rdfWpDNl19lYkMV3B789FSjJ1XdD+AZhmOo5C/3RFYsb1FSV7jpGwDFBM/V
 JQ8Bync9SphrCixVS15zan4BrhVpS/vcMQvo7ddN+fF8qG5lCGXn69zlRa9Yo25ZJdRV
 s+iLf+B+zBOI80Y5OokqngJykUHUJmg767twpVpIiOq80pAZ7M1R+vMY8tcV3GRAs/Rk
 4iBw==
X-Gm-Message-State: AOAM531pLtkmF8Vhggbnh1XfwX8wwXRXVnJ+PMx0BvQJIj/ErqDyyVJE
 tQu3cUzxWCUjT3GCoFnwJdUKlC+dwbKupe7t+Yc=
X-Google-Smtp-Source: ABdhPJyT17TWVxqHzoudK8SgnSMJZ13d8km4GHlmX3Ai/v5vTtMdf9KKTgz5vbZXnctNuxHmjb1sFi4gWExLuzo+Crc=
X-Received: by 2002:a9d:7a50:: with SMTP id z16mr5789294otm.292.1590748498587; 
 Fri, 29 May 2020 03:34:58 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <831rn3nj0u.fsf@HIDDEN>
In-Reply-To: <831rn3nj0u.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 10:34:20 +0000
Message-ID: <CAOqdjBffUZF4h1U5tVJEJyVCdfUj6gT7_=qbFYrf-wfDFmTFgQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Paul Eggert <eggert@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 29, 2020 at 10:16 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> > Date: Fri, 22 May 2020 10:22:56 +0300
> > From: Eli Zaretskii <eliz@HIDDEN>
> > Cc: 41321 <at> debbugs.gnu.org
> >
> > > > I'm already running with such a breakpoint, let's how it will catch
> > > > something.                                        ^^^
> > >
> > > Should have been "hope".  Sorry.
> >
> > It happened again, and now insert-file-contents wasn't involved, so I
> > guess it's off the hook.  The command which triggered the problem was
> > self-insert-command, as shown in the backtrace below.  The problem
> > seems to be with handling overlays when buffer text changes.
>
> One more segfault very similar to the last one I reported: it happened
> when calling report_overlay_modification due to text being inserted
> into a buffer.

Everything looks consistent with the bug I described.

> . There's nothing wrong with GDB's xtype command: it fails when a Lisp
>   object encodes a pointer to invalid memory:

(gdb) p last_marked[497]
$100 = XIL(0x439c370)
(gdb) xtype
Lisp_Vectorlike
Cannot access memory at address 0x1ffac2a8

Again, that can't be right. $100 is a Lisp_Symbol, not a vectorlike,
and it's not at address 0x1ffac2a8.

So my suspicion remains that this is a gdb bug, and it appears to be a
reproducible one!

> . So we should
>   see whether fixing the LISP_ALIGNMENT vs GCALIGNMENT discrepancy
>   fixes this problem.

I concur.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 10:16:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 06:16:34 2020
Received: from localhost ([127.0.0.1]:53878 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jec42-0004RX-21
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 06:16:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47986)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jec3z-0004R9-ND
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 06:16:32 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56826)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jec3t-00053A-J8; Fri, 29 May 2020 06:16:25 -0400
Received: from [176.228.60.248] (port=2563 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jec3s-0007eh-C6; Fri, 29 May 2020 06:16:25 -0400
Date: Fri, 29 May 2020 13:16:17 +0300
Message-Id: <831rn3nj0u.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <831rncjuwf.fsf@HIDDEN> (message from Eli Zaretskii on Fri, 22
 May 2020 10:22:56 +0300)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 22 May 2020 10:22:56 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 41321 <at> debbugs.gnu.org
> 
> > > I'm already running with such a breakpoint, let's how it will catch
> > > something.                                        ^^^
> > 
> > Should have been "hope".  Sorry.
> 
> It happened again, and now insert-file-contents wasn't involved, so I
> guess it's off the hook.  The command which triggered the problem was
> self-insert-command, as shown in the backtrace below.  The problem
> seems to be with handling overlays when buffer text changes.

One more segfault very similar to the last one I reported: it happened
when calling report_overlay_modification due to text being inserted
into a buffer.

The backtrace and the debugging session are below.  Noteworthy
observations:

. The buffer's overlay chain and the buffer's marker chain are both
  intact and valid.

. The two markers, start_marker and end_marker, which are created by
  PRESERVE_START_END before calling before-change-functions, are NOT
  in the buffer's marker chain after run-hook-with-args returns.  This
  most probably means GC was invoked while run-hook-with-args ran and
  decided to GC those 2 markers, which then unchains them via
  unchain_dead_markers.

. last_marked[] doesn't seem to mention start_marker or end_marker, at
  least not in its last 470 slots:

    (gdb) find /g1 &last_marked[0], last_marked[last_marked_index-1], 0xa00000001ffac2c8
    Pattern not found.

  This seems to be a supporting evidence that those two markers were
  GC'ed.

. start_marker and end_marker encode pointers which are 8-byte
  aligned, not 16-byte aligned.  The values of the pointers are
  0x1ffac2a8 and 0x1ffac2c8, as can be seen from the debug session.

. There's nothing wrong with rvoe_arg.location; in the previous
  sessions we forgot to dereference it (it's a pointer to a Lisp
  object).  Here's how it looks when shown correctly:

    (gdb) p rvoe_arg.location
    $14 = (Lisp_Object *) 0x15c9298 <globals+120>
    (gdb) p *rvoe_arg.location
    $15 = XIL(0xc00000001646b9b0)
    (gdb) xtype
    Lisp_Cons
    (gdb) xcar
    $16 = 0x30
    (gdb) xsymbol
    $17 = (struct Lisp_Symbol *) 0x15ca210 <lispsym+48>
    "t"
    (gdb) p *rvoe_arg.location
    $18 = XIL(0xc00000001646b9b0)
    (gdb) xcdr
    $19 = 0xc00000001646b9d0
    (gdb) xtype
    Lisp_Cons
    (gdb) xcar
    $20 = 0xd5c0
    (gdb) xtype
    Lisp_Symbol
    (gdb) xsymbol
    $21 = (struct Lisp_Symbol *) 0x15d77a0 <lispsym+54720>
    "syntax-ppss-flush-cache"
    (gdb) p *rvoe_arg.location
    $22 = XIL(0xc00000001646b9b0)
    (gdb) xcdr
    $23 = 0xc00000001646b9d0
    (gdb) xcdr
    $24 = 0x0
    [...]
    (gdb) pp *rvoe_arg.location
    (t syntax-ppss-flush-cache)

. There's nothing wrong with GDB's xtype command: it fails when a Lisp
  object encodes a pointer to invalid memory:

    (gdb) p start_marker
    $25 = XIL(0xa00000001ffac2a8)
    (gdb) xtype
    Lisp_Vectorlike
    Cannot access memory at address 0x1ffac2a8
    (gdb) p/x start_marker
    $26 = 0xa00000001ffac2a8
    (gdb) xgettype $26
    (gdb) p $type
    $27 = Lisp_Vectorlike
    (gdb) xvectype $26
    Cannot access memory at address 0x1ffac2a8
    (gdb) p/x ((struct Lisp_Vector *) $26)->header.size
    warning: value truncated
    Cannot access memory at address 0x1ffac2a8
    (gdb) p/x ((struct Lisp_Vector *) $26)->header
    warning: value truncated
    Cannot access memory at address 0x1ffac2a8
    (gdb) p/x ((struct Lisp_Vector *) $26)
    warning: value truncated
    $35 = 0x1ffac2a8
    (gdb) p/x end_marker
    $38 = 0xa00000001ffac2c8
    (gdb) xtype
    Lisp_Vectorlike
    Cannot access memory at address 0x1ffac2a8
    (gdb) p/x ((struct Lisp_Vector *)0x1ffac2c8)->header
    Cannot access memory at address 0x1ffac2c8

. Provisional conclusion: the two temporary markers created by
  signal_before_change were on the stack (see my other message with
  code disassembly), and were GC'ed as side effect or running
  syntax-ppss-flush-cache via before-change-functions.  So we should
  see whether fixing the LISP_ALIGNMENT vs GCALIGNMENT discrepancy
  fixes this problem.

Here's the backtrace and the full debug session after the crash, with
some omissions:

Thread 1 received signal SIGSEGV, Segmentation fault.
PSEUDOVECTORP (code=<optimized out>, a=<optimized out>) at lisp.h:1720
1720          return PSEUDOVECTOR_TYPEP (XUNTAG (a, Lisp_Vectorlike,
(gdb) bt
#0  PSEUDOVECTORP (code=<optimized out>, a=<optimized out>) at lisp.h:1720
#1  MARKERP (x=<optimized out>) at lisp.h:2618
#2  CHECK_MARKER (x=XIL(0xa00000001ffac2c8)) at marker.c:133
#3  0x010f073c in Fmarker_position (marker=XIL(0xa00000001ffac2c8))
    at marker.c:452
#4  0x010edd34 in signal_before_change (preserve_ptr=0x0, end_int=276884,
    start_int=276884) at insdel.c:2179
#5  prepare_to_modify_buffer_1 (start=start@entry=276884,
    end=end@entry=276884, preserve_ptr=preserve_ptr@entry=0x0)
    at insdel.c:2007
#6  0x010ee27d in prepare_to_modify_buffer (start=276884, end=276884,
    preserve_ptr=preserve_ptr@entry=0x0) at insdel.c:2018
#7  0x010ee54d in insert_1_both (
    string=0x1e3c9c08 " 2823D 26-May  gdb-patches@HIDDEN [244] Re: [PATCH, testsuite] Fix some duplicate test names\n\r...",
    nchars=100, nbytes=100, inherit=false, prepare=true, before_markers=false)
    at insdel.c:896
#8  0x010ee5c5 in insert_1_both (string=<optimized out>,
    nchars=<optimized out>, nchars@entry=100, nbytes=<optimized out>,
    nbytes@entry=100, inherit=inherit@entry=false,
    prepare=prepare@entry=true, before_markers=before_markers@entry=false)
    at insdel.c:947
#9  0x01174188 in Fprinc (object=XIL(0x800000001e05f278),
    printcharfun=<optimized out>) at print.c:734
#10 0x0114fc5c in funcall_subr (subr=<optimized out>,
    numargs=<optimized out>, numargs@entry=2, args=<optimized out>,
    args@entry=0x82d9b8) at eval.c:2869
#11 0x0114daed in Ffuncall (nargs=3, args=args@entry=0x82d9b0) at eval.c:2794
#12 0x0118ebe7 in exec_byte_code (bytestr=<optimized out>,
    vector=<optimized out>, maxdepth=<optimized out>,
    args_template=<optimized out>, nargs=<optimized out>, nargs@entry=4,
    args=<optimized out>, args@entry=0x82dde8) at bytecode.c:633
#13 0x0115134f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=4,
    arg_vector=arg_vector@entry=0x82dde8) at eval.c:2989
#14 0x0114da43 in Ffuncall (nargs=5, args=args@entry=0x82dde0) at eval.c:2808
#15 0x0118ebe7 in exec_byte_code (bytestr=<optimized out>,
    vector=<optimized out>, maxdepth=<optimized out>,
    args_template=<optimized out>, nargs=<optimized out>, nargs@entry=3,
    args=<optimized out>, args@entry=0x82e1b0) at bytecode.c:633
#16 0x0115134f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=3,
    arg_vector=arg_vector@entry=0x82e1b0) at eval.c:2989
#17 0x0114da43 in Ffuncall (nargs=4, args=args@entry=0x82e1a8) at eval.c:2808
#18 0x0118ebe7 in exec_byte_code (bytestr=<optimized out>,
    vector=<optimized out>, maxdepth=<optimized out>,
    args_template=<optimized out>, nargs=<optimized out>, nargs@entry=0,
    args=<optimized out>, args@entry=0x82e570) at bytecode.c:633
#19 0x0115134f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=0,
    arg_vector=arg_vector@entry=0x82e570) at eval.c:2989
#20 0x0114da43 in Ffuncall (nargs=nargs@entry=1, args=args@entry=0x82e568)
    at eval.c:2808
#21 0x0114de2d in Fapply (nargs=2, args=0x82e568) at eval.c:2377
#22 0x0114daed in Ffuncall (nargs=3, args=args@entry=0x82e560) at eval.c:2794
#23 0x0118ebe7 in exec_byte_code (bytestr=<optimized out>,
    vector=<optimized out>, maxdepth=<optimized out>,
    args_template=<optimized out>, nargs=<optimized out>, nargs@entry=0,
    args=<optimized out>, args@entry=0x82e8c0) at bytecode.c:633
#24 0x0115134f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=0,
    arg_vector=arg_vector@entry=0x82e8c0) at eval.c:2989
#25 0x0114da43 in Ffuncall (nargs=1, args=args@entry=0x82e8b8) at eval.c:2808
#26 0x0118ebe7 in exec_byte_code (bytestr=<optimized out>,
    vector=<optimized out>, maxdepth=<optimized out>,
    args_template=<optimized out>, nargs=<optimized out>, nargs@entry=3,
    args=<optimized out>, args@entry=0x82ed30) at bytecode.c:633
#27 0x0115134f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=3,
    arg_vector=arg_vector@entry=0x82ed30) at eval.c:2989
#28 0x0114da43 in Ffuncall (nargs=4, args=args@entry=0x82ed28) at eval.c:2808
#29 0x0118ebe7 in exec_byte_code (bytestr=<optimized out>,
    vector=<optimized out>, maxdepth=<optimized out>,
    args_template=<optimized out>, nargs=<optimized out>, nargs@entry=1,
    args=<optimized out>, args@entry=0x82f298) at bytecode.c:633
#30 0x0115134f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=1,
    arg_vector=arg_vector@entry=0x82f298) at eval.c:2989
#31 0x0114da43 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x82f290)
    at eval.c:2808
#32 0x0114906d in Ffuncall_interactively (nargs=2, args=0x82f290)
    at callint.c:254
#33 0x0114daed in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x82f288)
    at eval.c:2794
#34 0x0114df22 in Fapply (nargs=nargs@entry=3, args=args@entry=0x82f288)
    at eval.c:2381
#35 0x0114afbb in Fcall_interactively (function=XIL(0x5f2c790),
    record_flag=<optimized out>, keys=XIL(0xa00000000759f578))
    at callint.c:342
#36 0x0114fc89 in funcall_subr (subr=<optimized out>,
    numargs=<optimized out>, numargs@entry=3, args=<optimized out>,
    args@entry=0x82f430) at eval.c:2872
#37 0x0114daed in Ffuncall (nargs=4, args=args@entry=0x82f428) at eval.c:2794
#38 0x0118ebe7 in exec_byte_code (bytestr=<optimized out>,
    vector=<optimized out>, maxdepth=<optimized out>,
    args_template=<optimized out>, nargs=<optimized out>, nargs@entry=1,
    args=<optimized out>, args@entry=0x82f7b8) at bytecode.c:633
#39 0x0115134f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=1,
    arg_vector=arg_vector@entry=0x82f7b8) at eval.c:2989
#40 0x0114da43 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x82f7b0)
    at eval.c:2808
#41 0x0114dc1c in call1 (fn=XIL(0x3f30), arg1=XIL(0x5f2c790)) at eval.c:2654
#42 0x010d0efe in command_loop_1 () at keyboard.c:1463
#43 0x0114ca0f in internal_condition_case (
    bfun=bfun@entry=0x10d0a0e <command_loop_1>, handlers=XIL(0x90),
    hfun=hfun@entry=0x10c5049 <cmd_error>) at eval.c:1355
#44 0x010bdbda in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091
#45 0x0114c996 in internal_catch (tag=XIL(0xdfb0),
    func=func@entry=0x10bdbb3 <command_loop_2>, arg=XIL(0)) at eval.c:1116
#46 0x010bdb5d in command_loop () at keyboard.c:1070
#47 0x010c4bf3 in recursive_edit_1 () at keyboard.c:714
#48 0x010c4f0c in Frecursive_edit () at keyboard.c:786
#49 0x0124a594 in main (argc=<optimized out>, argv=<optimized out>)
    at emacs.c:2054

Lisp Backtrace:
"princ" (0x82d9b8)
"rmail-new-summary-1" (0x82dde8)
"rmail-new-summary" (0x82e1b0)
"rmail-summary" (0x82e570)
"apply" (0x82e568)
"rmail-update-summary" (0x82e8c0)
"rmail-get-new-mail-1" (0x82ed30)
"rmail-get-new-mail" (0x82f298)
"funcall-interactively" (0x82f290)
"call-interactively" (0x82f430)
"command-execute" (0x82f7b8)
(gdb) fr 4
#4  0x010f073c in Fmarker_position (marker=XIL(0xa00000001ffac2c8))
    at marker.c:452
452       CHECK_MARKER (marker);
(gdb) up
#5  0x010edd34 in signal_before_change (preserve_ptr=0x0, end_int=276884,
    start_int=276884) at insdel.c:2179
2179          report_overlay_modification (FETCH_START, FETCH_END, 0,
(gdb) p current_buffer->overlays_before
$1 = (struct Lisp_Overlay *) 0x75ac520
(gdb) p *$
$2 = {
  header = {
    size = 1140854787
  },
  start = XIL(0xa0000000075ac4e0),
  end = XIL(0xa0000000075ac500),
  plist = XIL(0xc0000000077f2340),
  next = 0x0
}
(gdb) p/x $1->header.size
$3 = 0x44001003
(gdb) p current_buffer->name_
$4 = XIL(0x8000000007364540)
(gdb) xtype
Lisp_String
(gdb) xstring
$5 = (struct Lisp_String *) 0x7364540
"INBOX-summary"
(gdb) p current_buffer->overlays_before->start
$6 = XIL(0xa0000000075ac4e0)
(gdb) p *$
$7 = 1124081664
(gdb) p current_buffer->overlays_before->start
$8 = XIL(0xa0000000075ac4e0)
(gdb) xtype
Lisp_Vectorlike
PVEC_MARKER
(gdb) xmarker
$9 = (struct Lisp_Marker *) 0x75ac4e0
(gdb) p *$
$10 = {
  header = {
    size = 1124081664
  },
  buffer = 0x7519948,
  need_adjustment = 0,
  insertion_type = 0,
  next = 0x0,
  charpos = 1,
  bytepos = 1
}
(gdb) p current_buffer->overlays_before->next
$11 = (struct Lisp_Overlay *) 0x0
(gdb) p current_buffer->overlays_after
$12 = (struct Lisp_Overlay *) 0x0
(gdb) p rvoe_arg
$13 = {
  location = 0x15c9298 <globals+120>,
  errorp = false
}
(gdb) p rvoe_arg.location
$14 = (Lisp_Object *) 0x15c9298 <globals+120>
(gdb) p *rvoe_arg.location
$15 = XIL(0xc00000001646b9b0)
(gdb) xtype
Lisp_Cons
(gdb) xcar
$16 = 0x30
(gdb) xsymbol
$17 = (struct Lisp_Symbol *) 0x15ca210 <lispsym+48>
"t"
(gdb) p *rvoe_arg.location
$18 = XIL(0xc00000001646b9b0)
(gdb) xcdr
$19 = 0xc00000001646b9d0
(gdb) xtype
Lisp_Cons
(gdb) xcar
$20 = 0xd5c0
(gdb) xtype
Lisp_Symbol
(gdb) xsymbol
$21 = (struct Lisp_Symbol *) 0x15d77a0 <lispsym+54720>
"syntax-ppss-flush-cache"
(gdb) p *rvoe_arg.location
$22 = XIL(0xc00000001646b9b0)
(gdb) xcdr
$23 = 0xc00000001646b9d0
(gdb) xcdr
$24 = 0x0
(gdb) p start_marker
$25 = XIL(0xa00000001ffac2a8)
(gdb) xtype
Lisp_Vectorlike
Cannot access memory at address 0x1ffac2a8
(gdb) p/x start_marker
$26 = 0xa00000001ffac2a8
(gdb) xgettype $26
(gdb) p $type
$27 = Lisp_Vectorlike
(gdb) xvectype $26
Cannot access memory at address 0x1ffac2a8
(gdb) p/x ((struct Lisp_Vector *) $26)->header.size
warning: value truncated
Cannot access memory at address 0x1ffac2a8
(gdb) p/x ((struct Lisp_Vector *) $26)->header
warning: value truncated
Cannot access memory at address 0x1ffac2a8
(gdb) p/x ((struct Lisp_Vector *) $26)
warning: value truncated
$35 = 0x1ffac2a8
(gdb) p/x $26
$36 = 0xa00000001ffac2a8
(gdb) p/x ((struct Lisp_Vector *)0x1ffac2a8
A syntax error in expression, near `'.
(gdb) p/x ((struct Lisp_Vector *)0x1ffac2a8)
$37 = 0x1ffac2a8
(gdb) p/x *((struct Lisp_Vector *)0x1ffac2a8)
Cannot access memory at address 0x1ffac2a8
(gdb) p/x end_marker
$38 = 0xa00000001ffac2c8
(gdb) xtype
Lisp_Vectorlike
Cannot access memory at address 0x1ffac2a8
(gdb) p/x ((struct Lisp_Vector *)0x1ffac2c8)->header
Cannot access memory at address 0x1ffac2c8
(gdb) p Vfirst_change_hook
$39 = XIL(0)
(gdb) p current_buffer->text->markers
$40 = (struct Lisp_Marker *) 0x76353a0
(gdb) p *$
$41 = {
  header = {
    size = 1124081664
  },
  buffer = 0x7519948,
  need_adjustment = 0,
  insertion_type = 0,
  next = 0x76353e0,
  charpos = 1,
  bytepos = 1
}
(gdb) p current_buffer->text->markers->next
$42 = (struct Lisp_Marker *) 0x76353e0
(gdb) p *$
$43 = {
  header = {
    size = 1124081664
  },
  buffer = 0x7519948,
  need_adjustment = 0,
  insertion_type = 0,
  next = 0x7635420,
  charpos = 1,
  bytepos = 1
}
(gdb) p current_buffer->text->markers->next->next
$44 = (struct Lisp_Marker *) 0x7635420
(gdb) p *$
$45 = {
  header = {
    size = 1124081664
  },
  buffer = 0x7519948,
  need_adjustment = 0,
  insertion_type = 0,
  next = 0x16b6a5d0,
  charpos = 1,
  bytepos = 1
}
(gdb) p current_buffer->text->markers->next->next->next
$46 = (struct Lisp_Marker *) 0x16b6a5d0
(gdb) p *$
$47 = {
  header = {
    size = 1124081664
  },
  buffer = 0x7519948,
  need_adjustment = 0,
  insertion_type = 0,
  next = 0x16b6a5b0,
  charpos = 1,
  bytepos = 1
}
(gdb) p/x start_marker
$98 = 0xa00000001ffac2c8
(gdb) pp *rvoe_arg.location
(t syntax-ppss-flush-cache)
(gdb) p last_mar
last_marked        last_marked_index
(gdb) p last_marked_index
$99 = 498
(gdb) p last_marked[497]
$100 = XIL(0x439c370)
(gdb) xtype
Lisp_Vectorlike
Cannot access memory at address 0x1ffac2a8
(gdb) find /g1 &last_marked[0], last_marked[last_marked_index-1], 0xa00000001ffac2a8
Pattern not found.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 10:01:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 06:01:23 2020
Received: from localhost ([127.0.0.1]:53849 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jebpL-000446-8S
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 06:01:23 -0400
Received: from mail-oi1-f178.google.com ([209.85.167.178]:40394)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jebpK-00043u-4A
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 06:01:22 -0400
Received: by mail-oi1-f178.google.com with SMTP id v128so2068046oia.7
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 03:01:22 -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=rnbHPCpCHix/vWyM1Ozmpe1CWOunnSYm1qcYV+NQFL0=;
 b=F14D8gCCLlS/G8cqIQ/nUABK2XntDKxwcyIiK8jSnnPVT+FNDYGb0HFEeN9rUv0ERW
 R6rMqcgXx0NNhGAPGf0QMtJrstAxSGJ+czJNvl9fBaTu2OvJf5+T5qpR2YnANew0L1cu
 S6F2BEtx14SUSVU5BMAmVhV9M+hvlEH6U2Owdpu5NDY37VQGyVj7JKyclPtmth++Z+qn
 KTdwZpH9ojP3bAF2faZbhzo/R8lCos+Q6ZQCRYoWpXLefqxQqeQHFElMPlVX6c+OQ3om
 CNh4AY/0boKYUZ4Wy+SIcvKlU5nkudV0Z9khSjsOsab1dSb2exQiCRGF1Y/3Ovy1fLqn
 IQcw==
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=rnbHPCpCHix/vWyM1Ozmpe1CWOunnSYm1qcYV+NQFL0=;
 b=a9vp3wMHRj4snWEVW5GKMp+u7mniL77hcFDSAjkqm5fdIAVHtgOJ3li7vEuroxtxCi
 Xcf06iTlzJcVde6nqWo6ujUh0ttxajs1PO2OIj/azhbffgjJyfjUeyMyzCB1+QjDjFrN
 qvPS8W2Icca+2IBgCrO0jF3CuJ3NzEHBNk6wa56uK712mzlVyA/UuGa43JG3pERl8nnF
 U1JZRk8HJgIukw1sBpA33YUj9LNplz83PSNJ9Ym+2pZcWPXwuOojn3uTNJFZu5/Sa1pQ
 vCHEC2VsGlpQg4Rt+qg1iDI7qOgdKP2//vTh4NrVsFw4i/0uIvL9YYoxSzv9ZVZ4va2l
 qLyQ==
X-Gm-Message-State: AOAM531IaRQi0iu003wyWL3FofaqSiJhphwW5MLu1CAxMV92UNXb9/Cl
 B9Ql3+Mb/vX1nOztZH+aHTPOM9+URXirtQzaZXxq98rA
X-Google-Smtp-Source: ABdhPJwu4SZ+GZ6zxNA7IjzKfEtrY4UwA70sD7KUEmMl3DkAs41bSIR7cBQlNXsMycFCa83Hs9jZOp9rCAzlQaUffOw=
X-Received: by 2002:aca:b708:: with SMTP id h8mr4887735oif.122.1590746476291; 
 Fri, 29 May 2020 03:01:16 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83367jnk6i.fsf@HIDDEN>
In-Reply-To: <83367jnk6i.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 10:00:39 +0000
Message-ID: <CAOqdjBeZRwpDC1vxeitUS7QioUcXz=BeG5WQB9SvQqTNpV4euw@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 29, 2020 at 9:51 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Fri, 22 May 2020 11:47:03 +0000
> > Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> >
> > If you could disassemble signal_before_change, we'd know whether
> > start_marker and end_marker live in callee-saved registers, and thus
> > whether this is likely to be Andrea's bug.
>
> signal_before_change cannot be disassembled because it's inlined.

Sorry. On my system, gdb does the right thing if I enter "disassemble
signal_before_change".

> Diassemblying its caller, prepare_to_modify_buffer_1, seems to
> indicate that start_marker and end_marker are pushed onto the stack
> when they are returned by copy-marker, and taken from there when we
> later call marker-position (which segfaults):

That's my reading as well.

>    0x010edd96 <+1850>:  call   0x10f15a5 <Fcopy_marker>
>    0x010edd9b <+1855>:  mov    %eax,0x4c(%esp)   <<<<<<<<<<<<<<<<<<<<<
>    0x010edd9f <+1859>:  mov    %edx,0x58(%esp)   <<<<<<<<<<<<<<<<<<<<<

As you can see, the stack positions aren't consecutive: the
Lisp_Object is split between bytes 0x58..5b(%esp) and bytes
0x4c..0x4f(%esp).

>    0x010eddc8 <+1900>:  call   0x10f15a5 <Fcopy_marker>
>    0x010eddcd <+1905>:  mov    %eax,0x38(%esp)   <<<<<<<<<<<<<<<<<<<<
>    0x010eddd1 <+1909>:  mov    %edx,0x44(%esp)   <<<<<<<<<<<<<<<<<<<<

Same here.

So we know (from your backtrace) these objects aren't 16-byte-aligned,
and we know your GC won't mark them because they're
discontinuously-stored and max_align_t has an alignment of 16 on your
system. We also know the only reference to them is on the stack.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 09:51:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 05:51:36 2020
Received: from localhost ([127.0.0.1]:53841 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jebfs-0003oS-5s
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 05:51:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42506)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jebfr-0003oC-5h
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 05:51:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55237)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jebfl-0005pK-Dn; Fri, 29 May 2020 05:51:29 -0400
Received: from [176.228.60.248] (port=1042 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jebfk-0004WX-Pi; Fri, 29 May 2020 05:51:29 -0400
Date: Fri, 29 May 2020 12:51:17 +0300
Message-Id: <83367jnk6i.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 (message from Pip Cet on Fri, 22 May 2020 11:47:03 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Fri, 22 May 2020 11:47:03 +0000
> Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> If you could disassemble signal_before_change, we'd know whether
> start_marker and end_marker live in callee-saved registers, and thus
> whether this is likely to be Andrea's bug.

signal_before_change cannot be disassembled because it's inlined.
Diassemblying its caller, prepare_to_modify_buffer_1, seems to
indicate that start_marker and end_marker are pushed onto the stack
when they are returned by copy-marker, and taken from there when we
later call marker-position (which segfaults):

2163          PRESERVE_START_END;
   0x010ed99e <+834>:   mov    0x58(%esp),%eax
   0x010ed9a2 <+838>:   or     0x4c(%esp),%eax
   0x010ed9a6 <+842>:   je     0x10edd77 <prepare_to_modify_buffer_1+1819>
   0x010ed9ac <+848>:   mov    0x44(%esp),%ecx
   0x010ed9b0 <+852>:   or     0x38(%esp),%ecx
   0x010ed9b4 <+856>:   je     0x10edf90 <prepare_to_modify_buffer_1+2356>
   0x010edd77 <+1819>:  movl   $0x0,0x8(%esp)
   0x010edd7f <+1827>:  movl   $0x0,0xc(%esp)
   0x010edd87 <+1835>:  mov    0x50(%esp),%eax
   0x010edd8b <+1839>:  mov    0x54(%esp),%edx
   0x010edd8f <+1843>:  mov    %eax,(%esp)
   0x010edd92 <+1846>:  mov    %edx,0x4(%esp)
   0x010edd96 <+1850>:  call   0x10f15a5 <Fcopy_marker>
   0x010edd9b <+1855>:  mov    %eax,0x4c(%esp)   <<<<<<<<<<<<<<<<<<<<<
   0x010edd9f <+1859>:  mov    %edx,0x58(%esp)   <<<<<<<<<<<<<<<<<<<<<
   0x010edda3 <+1863>:  mov    0x44(%esp),%ecx
   0x010edda7 <+1867>:  or     0x38(%esp),%ecx
   0x010eddab <+1871>:  jne    0x10ede59 <prepare_to_modify_buffer_1+2045>
   0x010eddb1 <+1877>:  movl   $0x0,0x8(%esp)
   0x010eddb9 <+1885>:  movl   $0x0,0xc(%esp)
   0x010eddc1 <+1893>:  mov    %esi,(%esp)
   0x010eddc4 <+1896>:  mov    %edi,0x4(%esp)
   0x010eddc8 <+1900>:  call   0x10f15a5 <Fcopy_marker>
   0x010eddcd <+1905>:  mov    %eax,0x38(%esp)   <<<<<<<<<<<<<<<<<<<<
   0x010eddd1 <+1909>:  mov    %edx,0x44(%esp)   <<<<<<<<<<<<<<<<<<<<
   0x010edf90 <+2356>:  movl   $0x0,0x8(%esp)
   0x010edf98 <+2364>:  movl   $0x0,0xc(%esp)
   0x010edfa0 <+2372>:  mov    %esi,(%esp)
   0x010edfa3 <+2375>:  mov    %edi,0x4(%esp)
   0x010edfa7 <+2379>:  call   0x10f15a5 <Fcopy_marker>
   0x010edfac <+2384>:  mov    %eax,0x38(%esp)
   0x010edfb0 <+2388>:  mov    %edx,0x44(%esp)
   [...]
2179          report_overlay_modification (FETCH_START, FETCH_END, 0,
   0x010eda5f <+1027>:  mov    0x44(%esp),%eax
   0x010eda63 <+1031>:  or     0x38(%esp),%eax
   0x010eda67 <+1035>:  jne    0x10edd20 <prepare_to_modify_buffer_1+1732>
   0x010eda6d <+1041>:  mov    0x58(%esp),%ecx
   0x010eda71 <+1045>:  or     0x4c(%esp),%ecx
   0x010eda75 <+1049>:  jne    0x10edf1e <prepare_to_modify_buffer_1+2242>
   0x010eda7b <+1055>:  mov    %esi,0x68(%esp)
   0x010eda7f <+1059>:  mov    %edi,0x6c(%esp)
   0x010eda83 <+1063>:  mov    0x50(%esp),%eax
   0x010eda87 <+1067>:  mov    0x54(%esp),%edx
   0x010eda8b <+1071>:  mov    %eax,0x60(%esp)
   0x010eda8f <+1075>:  mov    %edx,0x64(%esp)
   0x010eda93 <+1079>:  movl   $0x0,0x24(%esp)
   0x010eda9b <+1087>:  movl   $0x0,0x28(%esp)
   0x010edaa3 <+1095>:  mov    0x68(%esp),%eax
   0x010edaa7 <+1099>:  mov    0x6c(%esp),%edx
   0x010edaab <+1103>:  mov    %eax,0x1c(%esp)
   0x010edaaf <+1107>:  mov    %edx,0x20(%esp)
   0x010edab3 <+1111>:  mov    0x60(%esp),%eax
   0x010edab7 <+1115>:  mov    0x64(%esp),%edx
   0x010edabb <+1119>:  mov    %eax,0x14(%esp)
   0x010edabf <+1123>:  mov    %edx,0x18(%esp)
   0x010edac3 <+1127>:  movl   $0x0,0x10(%esp)
   0x010edacb <+1135>:  mov    %esi,0x8(%esp)
   0x010edacf <+1139>:  mov    %edi,0xc(%esp)
   0x010edad3 <+1143>:  mov    0x50(%esp),%eax
   0x010edad7 <+1147>:  mov    0x54(%esp),%edx
   0x010edadb <+1151>:  mov    %eax,(%esp)
   0x010edade <+1154>:  mov    %edx,0x4(%esp)
   0x010edae2 <+1158>:  call   0x10e76ea <report_overlay_modification>
   0x010edd20 <+1732>:  mov    0x38(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edd24 <+1736>:  mov    %eax,(%esp)
   0x010edd27 <+1739>:  mov    0x44(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edd2b <+1743>:  mov    %eax,0x4(%esp)
   0x010edd2f <+1747>:  call   0x10f072a <Fmarker_position>
   0x010edd34 <+1752>:  mov    %eax,0x68(%esp)
   0x010edd38 <+1756>:  mov    %edx,0x6c(%esp)
   0x010edd3c <+1760>:  mov    0x58(%esp),%eax 
   0x010edd40 <+1764>:  or     0x4c(%esp),%eax
   0x010edd44 <+1768>:  jne    0x10edeba <prepare_to_modify_buffer_1+2142>
   0x010edd4a <+1774>:  mov    0x38(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<
   0x010edd4e <+1778>:  mov    %eax,(%esp)
   0x010edd51 <+1781>:  mov    0x44(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<
   0x010edd55 <+1785>:  mov    %eax,0x4(%esp)
   0x010edd59 <+1789>:  call   0x10f072a <Fmarker_position>
   0x010edd5e <+1794>:  mov    %eax,%esi
   0x010edd60 <+1796>:  mov    %edx,%edi
   0x010edd62 <+1798>:  mov    0x50(%esp),%eax
   0x010edd66 <+1802>:  mov    0x54(%esp),%edx
   0x010edd6a <+1806>:  mov    %eax,0x60(%esp)
   0x010edd6e <+1810>:  mov    %edx,0x64(%esp)
   0x010edd72 <+1814>:  jmp    0x10eda93 <prepare_to_modify_buffer_1+1079>
   0x010edeba <+2142>:  mov    0x4c(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edebe <+2146>:  mov    %eax,(%esp)
   0x010edec1 <+2149>:  mov    0x58(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edec5 <+2153>:  mov    %eax,0x4(%esp)
   0x010edec9 <+2157>:  call   0x10f072a <Fmarker_position>
   0x010edece <+2162>:  mov    %eax,0x60(%esp)
   0x010eded2 <+2166>:  mov    %edx,0x64(%esp)
   0x010eded6 <+2170>:  mov    0x38(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010ededa <+2174>:  mov    %eax,(%esp)
   0x010ededd <+2177>:  mov    0x44(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edee1 <+2181>:  mov    %eax,0x4(%esp)
   0x010edee5 <+2185>:  call   0x10f072a <Fmarker_position>
   0x010edeea <+2190>:  mov    %eax,%esi
   0x010edeec <+2192>:  mov    %edx,%edi
   0x010edeee <+2194>:  mov    0x4c(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edef2 <+2198>:  mov    %eax,(%esp)
   0x010edef5 <+2201>:  mov    0x58(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edef9 <+2205>:  mov    %eax,0x4(%esp)
   0x010edefd <+2209>:  call   0x10f072a <Fmarker_position>
   0x010edf02 <+2214>:  mov    %eax,0x50(%esp)
   0x010edf06 <+2218>:  mov    %edx,0x54(%esp)
   0x010edf0a <+2222>:  jmp    0x10eda93 <prepare_to_modify_buffer_1+1079>
   0x010edf1e <+2242>:  mov    0x4c(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edf22 <+2246>:  mov    %eax,(%esp)
   0x010edf25 <+2249>:  mov    0x58(%esp),%eax   <<<<<<<<<<<<<<<<<<<<<<
   0x010edf29 <+2253>:  mov    %eax,0x4(%esp)
   0x010edf2d <+2257>:  call   0x10f072a <Fmarker_position>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 09:44:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 05:44:09 2020
Received: from localhost ([127.0.0.1]:53823 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jebYe-0003dG-Gw
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 05:44:09 -0400
Received: from mail-ot1-f65.google.com ([209.85.210.65]:38169)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jebYd-0003cu-BG
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 05:44:07 -0400
Received: by mail-ot1-f65.google.com with SMTP id o13so1471892otl.5
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 02:44:07 -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=lwlcT3xM5ePH3gDNjuyZMBkm9lvuAsM6EmJBo+7EFYk=;
 b=keGXJuaQoigdwvp2YFVa/F8np7bH89LMCfpf4idhv20wwJEJvkonvq+ynbVNbzBwPH
 6jbxBmJxGBAMudFBjYtwrcvdvYFTrDC0CTxeoFBCyCbfUTiHgTIsGjI/yTRgC7HqIBhz
 gwmca7K7zx/bPSSLhpZLvhE7AXxtTwXHXEI1ztwUKDUSNcONQfotOeL663SSeb7qrtto
 YhpHHf9YUsJCFzcRvp2Q8BguQzIltaJ4Wytu0VoYWHHzM3YhjryUNtDW+KAuHMTE6csq
 RKxHChE30DU2gS67xHLLhCdGC1DObq/PaUdDfdye8Au6WHxSpA+MlXh04ecnrZylz/Q+
 6UbQ==
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=lwlcT3xM5ePH3gDNjuyZMBkm9lvuAsM6EmJBo+7EFYk=;
 b=D90QDaTHNC/0kEfru4uDnFmbgOV6dYziUdb7nXUHb5pd+J5ADPfja+1ZciSL1A0smn
 vumloXPotqgEyR2Krl6XZrgoVuM2x1s4AAntfuO6CltYwiKO198z1xnzQawCQAFjPByB
 8XEaI5t3A2ZWxYEuFDjK9Eu/CRrbi7EavB5Ifn3pRs22/AZJTZzx9Jjsfn8alzfqmCwb
 /79g+s7US/VV3eNoKnaRJjzp44ZrXo1KGlrkzszt37eJvE3yKEHH6UPD03dTc96M+cxv
 ZXwSae8vn1gAp4Ok1Piq9uRKReL8UhZxub7G3JOt5EMgd+h9OXtA9esaUOjyR8zdh/a8
 ow2w==
X-Gm-Message-State: AOAM531SmcUT5dHAEchm21mMzKX0tF3yyeH6RR96UlcBJ28jXlFwYp1B
 GTke5vqi1yQWG59LJRdUufkDmbpbtl9jBg9PqnM=
X-Google-Smtp-Source: ABdhPJxsanOyIjXQ1KiPvlgvRz0N3MWH/Lf12xbM4BAg5BBUpZzUwR7OgcEt/h4ASpXzN32pYfysMRGq9pcRZ5J76sw=
X-Received: by 2002:a9d:4c97:: with SMTP id m23mr1362054otf.154.1590745441583; 
 Fri, 29 May 2020 02:44:01 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN> <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
In-Reply-To: <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 09:43:24 +0000
Message-ID: <CAOqdjBfaSdu8qjfFArnbB7PXsgVjTF3n_JWdGT91Vg=iSYaTNw@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000f9762c05a6c6483b"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, Paul Eggert <eggert@HIDDEN>,
 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000f9762c05a6c6483b
Content-Type: text/plain; charset="UTF-8"

On Thu, May 28, 2020 at 2:28 PM Pip Cet <pipcet@HIDDEN> wrote:
> My suggestion is instead to put MEM_TYPE_SYMBOL blocks into the rbtree
> twice, once at their proper address and once at the lispsym-based
> offset.
>
> We could then look up each pointer precisely once, though sometimes
> the blocks might overlap and we'd end up marking two objects for one
> pointer.
>
> But that would lead to overlapping rbtree entries, and that requires
> some extra code which wouldn't be exercised very often... still, I
> think it might be worth doing, particularly since there are relatively
> few symbol blocks on most systems.

Okay, here's some initial code that does that. It's a little tricky,
because real addresses and symbol offsets can overlap arbitrarily and
become mapped and unmapped in any order. The basic idea is that symbol
offsets are marked two ways:
1. an overlaps_with_symbols flag on a "normal" memory node
2. a mem node type of MEM_TYPE_SYMBOL_ADJUSTED

(2) implies (1), but not the other way around. There's only one flag
per normal memory node, which is true if any of the addresses in the
node are also valid symbol offsets. MEM_TYPE_SYMBOL_ADJUSTED nodes
have start and end addresses that do not necessarily correspond to
symbol blocks or even symbols; their length is arbitrary.

When we insert or delete memory nodes, we perform the obvious
operations to keep MEM_TYPE_SYMBOL_ADJUSTED blocks accurate: i.e.,
when a MEM_TYPE_SYMBOL_ADJUSTED node is split by an
intervening/overlapping normal node, we insert one or two new
MEM_TYPE_SYMBOL_ADJUSTED nodes to cover the remaining offsets, and set
the overlaps_with_symbols flag on the normal node, to cover those,
etc.

As I said, the code is tricky (i.e. might contain bugs that can only
be discovered through extensive testing on 32-bit systems), and it
complicates what should be generic functions for the rbtree
implementation, so this is probably a 32-bit optimization that is too
late because 32-bit systems are no longer that relevant...

--000000000000f9762c05a6c6483b
Content-Type: text/x-patch; charset="US-ASCII"; name="0001-snapshot.patch"
Content-Disposition: attachment; filename="0001-snapshot.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_kas0qa7y0>
X-Attachment-Id: f_kas0qa7y0

RnJvbSAyNDY0OTM0MjVmMDFmYzY4NzZlZDIyMjJmZDRjMTgwNmRjMGUxMmYxIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBGcmks
IDI5IE1heSAyMDIwIDA5OjQwOjM2ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gc25hcHNob3QKCi0t
LQogc3JjL2FsbG9jLmMgfCAyMDAgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKysrKysrLQogMSBmaWxlIGNoYW5nZWQsIDE5OSBpbnNlcnRpb25zKCspLCAxIGRl
bGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvc3JjL2FsbG9jLmMgYi9zcmMvYWxsb2MuYwppbmRleCBl
MjQxYjk5MzNhLi42NWNiYWNiZTg3IDEwMDY0NAotLS0gYS9zcmMvYWxsb2MuYworKysgYi9zcmMv
YWxsb2MuYwpAQCAtNDc1LDYgKzQ3NSw3IEBAIG5vX3Nhbml0aXplX21lbWNweSAodm9pZCAqZGVz
dCwgdm9pZCBjb25zdCAqc3JjLCBzaXplX3Qgc2l6ZSkKICAgTUVNX1RZUEVfQ09OUywKICAgTUVN
X1RZUEVfU1RSSU5HLAogICBNRU1fVFlQRV9TWU1CT0wsCisgIE1FTV9UWVBFX1NZTUJPTF9BREpV
U1RFRCwKICAgTUVNX1RZUEVfRkxPQVQsCiAgIC8qIFNpbmNlIG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tLT50eXBlID09IE1FTV9UWVBFX1NZTUJPTCkKKwkgICAgb2JqID0g
bGl2ZV9zeW1ib2xfaG9sZGluZyAobSwgdW5hZGp1c3Rfc3ltYm9sIChwKSk7CisJICBpZiAoIU5J
TFAgKG9iaikpCisJICAgIG1hcmtfb2JqZWN0IChvYmopOworCX0KICAgICB9CiB9CiAKQEAgLTcw
NzcsNiArNzI2MiwxOSBAQCBzd2VlcF9zeW1ib2xzICh2b2lkKQogICAgICAgICAgIC8qIFVuaG9v
ayBmcm9tIHRoZSBmcmVlIGxpc3QuICAqLwogICAgICAgICAgIHN5bWJvbF9mcmVlX2xpc3QgPSBz
YmxrLT5zeW1ib2xzWzBdLnUucy5uZXh0OwogICAgICAgICAgIGxpc3BfZnJlZSAoc2Jsayk7CisJ
ICB2b2lkICpwID0gYWRqdXN0X3N5bWJvbCAoc2Jsayk7CisJICB3aGlsZSAodHJ1ZSkKKwkgICAg
eworCSAgICAgIHN0cnVjdCBtZW1fbm9kZSAqbSA9IG1lbV9maW5kX25leHQgKHApOworCSAgICAg
IGlmIChtLT5zdGFydCA+PQorCQkgIGFkanVzdF9zeW1ib2wgKHNibGsgKyAxKSkKKwkJYnJlYWs7
CisJICAgICAgcCA9IG0tPmVuZDsKKwkgICAgICBtZW1fc2V0X292ZXJsYXBzX3dpdGhfc3ltYm9s
cyAobSk7CisJICAgICAgaWYgKG0tPnR5cGUgPT0gTUVNX1RZUEVfU1lNQk9MX0FESlVTVEVECisJ
CSAgJiYgIW0tPm92ZXJsYXBzX3dpdGhfc3ltYm9scykKKwkJbWVtX2RlbGV0ZSAobSk7CisJICAg
IH0KICAgICAgICAgfQogICAgICAgZWxzZQogICAgICAgICB7Ci0tIAoyLjI3LjAucmMwCgo=
--000000000000f9762c05a6c6483b--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 08:25:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 04:25:53 2020
Received: from localhost ([127.0.0.1]:53749 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeaKv-0001ih-Nk
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 04:25:53 -0400
Received: from mail-ot1-f43.google.com ([209.85.210.43]:35327)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jeaKu-0001iV-7B
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 04:25:52 -0400
Received: by mail-ot1-f43.google.com with SMTP id 69so1354544otv.2
 for <41321 <at> debbugs.gnu.org>; Fri, 29 May 2020 01:25:52 -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=WCOrsCNh7FUAYe1vfKdJV8oVtv3zOMzC2xFZJj7uROM=;
 b=jY+3Zx4pnchmHaEQteE7X21GvpdjL4+rKX7wRZ7NgCFgjS1xgsJFyBoFGM8Z896lH0
 1gOg7DZNO0E86Ly6xMb8rZGG/x7CJ3+FYIFW9hOr/2Q6qGnOPNBPen1nWz0UshDbTX7w
 v1odDnD4frzxd1CyU5AhNKD8Twkn2JoTlwsgqcxtZXmpCTuXW4Jxb+EJVwfyxdRbdfxb
 TL1nIas9r8P/E+IWC1a2peYkfs2HE9yJ/cTvkmvsJ2pET0n90Cu4o7Ib+0eF4xVLu1Xe
 gGfTswYZ8/TZvylBkb8T81NQKVZIH6/iFNctQ+sdThxUBj1VBhVp+8bJKiYeQElQPuHO
 wdXg==
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=WCOrsCNh7FUAYe1vfKdJV8oVtv3zOMzC2xFZJj7uROM=;
 b=J04HdyouZjX6K0drvYybi7EGLZoX3Asyp5k+UvJJ8no1wCJJqaIJlhjtvAse8O0Y4Y
 FuJGpRZgYwzU3h46Gz3bNZoxx75TAXgiLGNoAK3cmwJp8Ga9MZCB8G36QQyDJqi7LycP
 tfs0XbDASsJRLddUzXQNFhMCo2PUnBYR0KUFYABCldtWPvPMoH/x5M7oapsrzk7p4xXo
 x/9tMQO3L84AbzHCt++rryU/PG3hsZ8uX+KqBfSIeJUeeOk1gJQccDnGGO8M+ZUYb6l+
 4wkAhrcR3CzkvxppSIX6A6qeNYGizD2bzieaxEuXAKJ7iyybQKV4zTG7bxaf6ApHfQ8z
 8hWg==
X-Gm-Message-State: AOAM533UJTx60yEKkAWl0TZoDefgcyMlwTde/3i7fDVOX+2YCbHjah0U
 GO7xvUGUX+nkGz9PcPnJ31xnhK3c1Q9DN8eOA4s=
X-Google-Smtp-Source: ABdhPJxXe1QQcaNhxN/5yWxIvByK6/PIFDYM1dgvNr22gWUYbUxyPNjQljqajAtMk5lOg2DmFw7BCT1QZ+pSGfaJUKA=
X-Received: by 2002:a9d:7a50:: with SMTP id z16mr5473584otm.292.1590740746516; 
 Fri, 29 May 2020 01:25:46 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83tuzzrk30.fsf@HIDDEN> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
In-Reply-To: <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 29 May 2020 08:25:09 +0000
Message-ID: <CAOqdjBfg6L3QZzvxoKO3juZ6PJMEZRAeSi5NhFrsWwFVTpX=9g@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thu, May 28, 2020 at 7:33 PM Paul Eggert <eggert@HIDDEN> wrote:
> too, as in the attached patch.

Are you sure you attached the correct file? This patch is identical to
one you'd sent earlier, and which Eli criticized for being overly
conservative on GCALIGNMENT==1 systems.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 29 May 2020 06:19:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 02:19:49 2020
Received: from localhost ([127.0.0.1]:53600 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeYMv-0006yc-2c
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 02:19:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51822)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jeYMt-0006yP-Ot
 for 41321 <at> debbugs.gnu.org; Fri, 29 May 2020 02:19:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49392)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jeYMn-0005YF-Gw; Fri, 29 May 2020 02:19:41 -0400
Received: from [176.228.60.248] (port=3742 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jeYMm-0003Gu-RT; Fri, 29 May 2020 02:19:41 -0400
Date: Fri, 29 May 2020 09:19:34 +0300
Message-Id: <83sgfjqn49.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN> (message from
 Paul Eggert on Thu, 28 May 2020 12:33:10 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83tuzzrk30.fsf@HIDDEN>
 <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Thu, 28 May 2020 12:33:10 -0700
> 
> > After thinking about this some, I think the only sensible thing to do
> > on emacs-27 is to return to 8-byte alignment test in GC for 32-bit
> > MinGW builds.  That is, replace max_align_t with just 8 in the
> > definition of LISP_ALIGNMENT in that case.
> 
> Exactly the same problem can occur for other x86 platforms (e.g., GNU/Linux, GCC
> 7-and-later, glibc 2.25-and-earlier), because these other platforms also have
> the bug that malloc can return a pointer that is 8 modulo 16 even though alignof
> (max_align_t) is 16.  so I suggest doing the replacement for those platforms
> too, as in the attached patch.

I'm okay with doing this on other platforms, but...

>  static bool
>  maybe_lisp_pointer (void *p)
>  {
> -  return (uintptr_t) p % LISP_ALIGNMENT == 0;
> +  return (uintptr_t) p % GCALIGNMENT == 0;
>  }

...replacing LISP_ALIGNMENT with GCALIGNMENT just here doesn't sound
right to me: by keeping the current value of LISP_ALIGNMENT, we
basically declare that Lisp objects shall be aligned on that boundary,
whereas that isn't really the case.  Why not change the value of
LISP_ALIGNMENT instead?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 19:33:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 15:33:20 2020
Received: from localhost ([127.0.0.1]:53108 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeOHI-0001ZB-7i
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 15:33:20 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45546)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jeOHF-0001Yn-KL
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 15:33:18 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id B07DE16004F;
 Thu, 28 May 2020 12:33:11 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id jYeBiNiMmg2U; Thu, 28 May 2020 12:33:10 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id C57A31600CC;
 Thu, 28 May 2020 12:33:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 8CYYYOeU_L0J; Thu, 28 May 2020 12:33:10 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 8DC4616004F;
 Thu, 28 May 2020 12:33:10 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HID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E2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@HIDDEN>
Date: Thu, 28 May 2020 12:33:10 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83tuzzrk30.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------51ECAC95726408D85B31C2BA"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------51ECAC95726408D85B31C2BA
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 5/28/20 11:27 AM, Eli Zaretskii wrote:
>> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
>> From: Paul Eggert <eggert@HIDDEN>
>> Date: Wed, 27 May 2020 09:58:11 -0700
>>
>> we can then talk about what to do with emacs-27.
> 
> After thinking about this some, I think the only sensible thing to do
> on emacs-27 is to return to 8-byte alignment test in GC for 32-bit
> MinGW builds.  That is, replace max_align_t with just 8 in the
> definition of LISP_ALIGNMENT in that case.

Exactly the same problem can occur for other x86 platforms (e.g., GNU/Linux, GCC
7-and-later, glibc 2.25-and-earlier), because these other platforms also have
the bug that malloc can return a pointer that is 8 modulo 16 even though alignof
(max_align_t) is 16.  so I suggest doing the replacement for those platforms
too, as in the attached patch.

--------------51ECAC95726408D85B31C2BA
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Fix-aborts-due-to-GC-losing-pseudovectors.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0001-Fix-aborts-due-to-GC-losing-pseudovectors.patch"

From b3501c978f315d980f7a26481989725d63953558 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Thu, 28 May 2020 12:27:27 -0700
Subject: [PATCH] Fix aborts due to GC losing pseudovectors

Problem reported by Eli Zaretskii (Bug#41321).
* src/alloc.c (maybe_lisp_pointer): Modulo GCALIGNMENT,
not modulo LISP_ALIGNMENT.  Master has a more-elaborate fix.
Do not merge to master.
---
 src/alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 1c6b664b22..c7a4a3ee86 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4589,12 +4589,12 @@ mark_maybe_objects (Lisp_Object const *array, ptrdiff_t nelts)
    collected, and false otherwise (i.e., false if it is easy to see
    that P cannot point to Lisp data that can be garbage collected).
    Symbols are implemented via offsets not pointers, but the offsets
-   are also multiples of LISP_ALIGNMENT.  */
+   are also multiples of GCALIGNMENT.  */
 
 static bool
 maybe_lisp_pointer (void *p)
 {
-  return (uintptr_t) p % LISP_ALIGNMENT == 0;
+  return (uintptr_t) p % GCALIGNMENT == 0;
 }
 
 /* If P points to Lisp data, mark that as live if it isn't already
-- 
2.17.1


--------------51ECAC95726408D85B31C2BA--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 18:27:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 14:27:50 2020
Received: from localhost ([127.0.0.1]:53010 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeNFu-0008Mz-7g
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 14:27:50 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52226)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jeNFr-0008Mk-QJ
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 14:27:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38491)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jeNFl-0002Nk-8c; Thu, 28 May 2020 14:27:41 -0400
Received: from [176.228.60.248] (port=3915 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jeNFj-0004hF-F8; Thu, 28 May 2020 14:27:40 -0400
Date: Thu, 28 May 2020 21:27:31 +0300
Message-Id: <83tuzzrk30.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> (message from
 Paul Eggert on Wed, 27 May 2020 09:58:11 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Wed, 27 May 2020 09:58:11 -0700
> 
> we can then talk about what to do with emacs-27.

After thinking about this some, I think the only sensible thing to do
on emacs-27 is to return to 8-byte alignment test in GC for 32-bit
MinGW builds.  That is, replace max_align_t with just 8 in the
definition of LISP_ALIGNMENT in that case.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 16:25:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 12:25:16 2020
Received: from localhost ([127.0.0.1]:52914 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeLLI-0005PW-It
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 12:25:16 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:29418)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1jeLL4-0005Of-9w
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 12:25:15 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 83D6E806F7;
 Thu, 28 May 2020 12:24:56 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 94D3180541;
 Thu, 28 May 2020 12:24:54 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1590683094;
 bh=K7DBzaxs1TztFLjznfI+8AVrfdIBN5LOEJjY6fpnLAc=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=LZ2VhXotWww31mwDG1Xmi550CEV7LXz66BpK6Xaem3mMMktPjFGUznaHugSn+4x7m
 sHEPeK0ZM2O3ml3yE303EsAihjWuPjvzts5aLoNaomS7GPt8ciJgSv/wBBaoEijdA9
 l5h11qaxfPiGKwWiQcyUJji7K/XppX3DS3xgQ9mN7OXIBYyggXGu8H758UTh2llqGi
 Zm+m7/iXID+gjUMewhLxyrUj642/6MQ5mzjBbE4S2q+ojUmfAfwdU+zq0zk97zj/H7
 QPL6+k4YIkHDQct87yZRCpbJ2/HfMN3tKNfwaeA9FHWyyl6Veuto6WYua/nRBNgrfz
 vcZymrKTeUp9w==
Received: from alfajor (unknown [216.154.27.250])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0BE1712047F;
 Thu, 28 May 2020 12:24:54 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
Message-ID: <jwvlflckozz.fsf-monnier+emacs@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
Date: Thu, 28 May 2020 12:24:53 -0400
In-Reply-To: <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
 (Pip Cet's message of "Thu, 28 May 2020 14:28:29 +0000")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.094 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, Paul Eggert <eggert@HIDDEN>,
 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> But at that point, we already have walked the rbtree, which is
> probably the main performance problem.

Indeed, lisp_maybe_pointer can avoid this cost, but I was more concerned
with the risk of increasing the number of objects kept live because of
false-positives (i.e. a random integer/float/younameit that happens to
look like it's pointing into the object).

> I think the point of maybe_lisp_pointer wasn't to mark fewer objects,
> it was to look up fewer pointers in the rbtree.  I might be wrong.

You might right.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 14:29:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 10:29:13 2020
Received: from localhost ([127.0.0.1]:52721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeJWz-0002Vm-9j
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 10:29:13 -0400
Received: from mail-oo1-f47.google.com ([209.85.161.47]:45521)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jeJWy-0002VZ-B2
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 10:29:12 -0400
Received: by mail-oo1-f47.google.com with SMTP id p9so262603oot.12
 for <41321 <at> debbugs.gnu.org>; Thu, 28 May 2020 07:29:12 -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=ExvjXrAOpYNQPllgrs5X5MfU3PXBZWaOtkNkdq3GEoc=;
 b=ELEzI+ZtsmkN6uePMJblJ7e2PZ0Fmsx6P/0AlptqsdZvnXMR4+dcS5lYOfzHPHR42p
 0pzX3gfBIRor/+kYSs7fNTJwN7Zrb6qF2xNKaoYumXaPEl/MXjQtODzrZVe863SRzyyc
 W0xzaIFdYQSSOB1Ibe7B/QydWdDs+NcTgteE+E697t9/6phCk10hI/186mD2ObmRTiY4
 kA3JWa6CS0WPgA525PzwydTMXu1iaU+t8fTFQRunALET3NjOGqH4C9Ya0dZy+VJI1bfE
 hKTefjrYhT7+ZK1RPqiKmQlC8N58E4QEOng9DH+x8DSBNbyJZCQPi7kcR2m+yTkFklJs
 jFcA==
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=ExvjXrAOpYNQPllgrs5X5MfU3PXBZWaOtkNkdq3GEoc=;
 b=CoFJP4ljuE4KdRgLRRUpzshoKS+u+ILcfoorz7QEBtYurFtC1zl725xVpx2yF+XL8c
 0bcrw5f+NvJrWtxP9E9dDWC/eYJUZA/H2EvWeU/P2I+eqcORkyNzQE/4vgDRkz41w2KH
 iyVaRBsEjtcuqhAJM1zUUifvBnKYYSFfkDpRQXYbBNkuoy9ndMUX/dXOzrKaAtscQHVt
 enrjON4iNToYdjPnHvPYLCTwNi1ErTQ1XCHMhXmIw3RhhSCpBlew83RMpQq7eXN4Oev9
 xXUisjgoz6y2xsys2DtrxnopSGgXUfEdKlj+b2aLEet/a/EXq1jqKE7iT1iuLayHTt51
 SeMw==
X-Gm-Message-State: AOAM532QwKHX45hMqr8I4InVtPprK0k8EkkXLpvVylGfivAepQHhPHlz
 0bElY7EOBba1kHp46kn0iP8f5TT6mTZqdbjnH1s=
X-Google-Smtp-Source: ABdhPJw/pPfJQmMk+mp1X9qXOGtZu3mCGCktmr5m3R0tdFewiQZwIXxrysgyMKH2kGLTXj/+ClPDZUIvHRhTxEitktE=
X-Received: by 2002:a4a:ad0d:: with SMTP id r13mr2709718oon.22.1590676146492; 
 Thu, 28 May 2020 07:29:06 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN> <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
 <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Thu, 28 May 2020 14:28:29 +0000
Message-ID: <CAOqdjBcASE_oWgomY7kg6Xi5gNMgaLPoR9sJOh+ZDSy-ja4WfQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, Paul Eggert <eggert@HIDDEN>,
 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thu, May 28, 2020 at 1:30 PM Stefan Monnier <monnier@HIDDEN> wrote:
> >> 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_<foo>_holding`.

But at that point, we already have walked the rbtree, which is
probably the main performance problem.

My suggestion is instead to put MEM_TYPE_SYMBOL blocks into the rbtree
twice, once at their proper address and once at the lispsym-based
offset.

We could then look up each pointer precisely once, though sometimes
the blocks might overlap and we'd end up marking two objects for one
pointer.

But that would lead to overlapping rbtree entries, and that requires
some extra code which wouldn't be exercised very often... still, I
think it might be worth doing, particularly since there are relatively
few symbol blocks on most systems.

> 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).

I think the point of maybe_lisp_pointer wasn't to mark fewer objects,
it was to look up fewer pointers in the rbtree. I might be wrong.

On 64-bit systems with ASLR, at least, it's quite unlikely that we
have what looks like a valid pointer into a Lisp object that we can
conclude is not based on its offset or alignment...




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 13:30:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 09:30:32 2020
Received: from localhost ([127.0.0.1]:51274 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeIcB-0000mm-SL
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 09:30:32 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7716)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1jeIc9-0000mX-4h
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 09:30:31 -0400
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)
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==
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)
From: Stefan Monnier <monnier@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
Message-ID: <jwveer4mbwq.fsf-monnier+emacs@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
 <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
Date: Thu, 28 May 2020 09:30:20 -0400
In-Reply-To: <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN> (Paul Eggert's
 message of "Thu, 28 May 2020 00:41:33 -0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.094 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> 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_<foo>_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





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 08:12:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 04:12:26 2020
Received: from localhost ([127.0.0.1]:50884 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeDeM-000594-8H
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 04:12:26 -0400
Received: from mail-oo1-f46.google.com ([209.85.161.46]:38413)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jeDeL-00058r-2E
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 04:12:25 -0400
Received: by mail-oo1-f46.google.com with SMTP id i9so5567343ool.5
 for <41321 <at> debbugs.gnu.org>; Thu, 28 May 2020 01:12:25 -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=BzCRvpFPYO2nCPACi55I1UM1XJNVlzd0HxhAcrzfgME=;
 b=oPPDo90r1rq4nCE09wsSWUapUeX5Q1v0iLn1MN5CRveIjVvEM1+iorJzVKXAa4ditg
 E8BrEpKDdu7K52W3Zypd/47HRyLO+ceArQIbIeQT8R2V6DRmvggkHc9+hYz1RB4OGsTe
 DVGemXQGTeDJ/HisDCDHg3oFrHsSshq54GY++LEmMgEFcRE+SpChxmJc7a5ytqEiGiz9
 XPbHIrwhoQSxEOr+r+JdvYV8FuW5fvfk5lVTqD6wMbvfE6ZTckxeQECINju0FPpPQkR/
 UFIOHo570FXdoLXcQmZtH6rupXfFNgQUdm6zctWtzBMOMqqoZW9KTEal8Yemig0+J9ZL
 QlNw==
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=BzCRvpFPYO2nCPACi55I1UM1XJNVlzd0HxhAcrzfgME=;
 b=q+1hOpBuRceSPWgQBxW7J+eoeLk7UHhv/Di2jpMO01WusfQ1t2wcIVhZhY5FyqoAfo
 233Kku+V72DhJE1wi+zg3J/nVMkPdiiQNulr34gAl28QmCTPDrymMco4ClIvH/m7Hpni
 5KLMChUB5ZzbOqqdqxHm2cUUaxnhUfk8TiUCS12PjqqkK5Yv9ud9h04opo3pd7T3uXTg
 ue64cQJHbKLICYxSPPHoX7CWS+78cJQd+3S34nvF7l/0T9TW++um5DEJbKUEQIM1fjQ3
 8zsBdgPiYJ+jH/aUCO2et6VqtJ5JrmoHn8pd++OVwGd5zh7CkERz6aMk/WotbfEBkco4
 DgtA==
X-Gm-Message-State: AOAM532a0pjw/Nkjs0Fo653bLzsNbyNy3NjsIlwCxMfh2W/mPZ6jVrkx
 kSJ7EbdqFKkhUUL+SiYj4gwN8UvnB4dxjA6uHTB4nS4+
X-Google-Smtp-Source: ABdhPJz8kq43llcOqE+7CDyB34O982SgAD/Co8Nb+WoZV9UxROB2f95lsZBdEmN/dMupTk0f6bhidIuVJRi6QVQI8t0=
X-Received: by 2002:a4a:e702:: with SMTP id y2mr1613516oou.44.1590653539439;
 Thu, 28 May 2020 01:12:19 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83y2phwb9x.fsf@HIDDEN>
 <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <CAOqdjBdfxOvaRNR75GLtNkunGYqaeN3bDvyGNcyq01JopODWig@HIDDEN>
 <753eed58-287b-1c47-deef-0e343bca8e69@HIDDEN>
 <CAOqdjBdZ2imhpbp988YifCXA6kTv5hZERrLbGVYxDPfB_XpE7Q@HIDDEN>
 <1ce49934-ee4c-78b5-20ff-83f281aed4ee@HIDDEN>
 <CAOqdjBdt=xG3kwDfcH0Fu70BHqsM4_twNYvSv-0xciB8piX2kQ@HIDDEN>
 <21d399ef-5d63-dcf5-d124-64d2820885ea@HIDDEN>
In-Reply-To: <21d399ef-5d63-dcf5-d124-64d2820885ea@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Thu, 28 May 2020 08:11:42 +0000
Message-ID: <CAOqdjBejJJHF=Bq-Sum=rVhfATYfUc7sZB8E9kaa3cO-ugQgeQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thu, May 28, 2020 at 7:47 AM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/27/20 11:31 PM, Pip Cet wrote:
> > I hope you're right, in that compilers will support GC better before
> > they move on to clever optimizations that break it :-)
>
> After looking into it, I decided it wasn't worth the hassle of treating pointers
> just past the end of a Lisp object as pointing into the object. Although such
> pointers can exist, I can't think of a realistic-with-today's-compilers scenario
> at the machine level where (1) a pointer like that will exist, (2) no pointers
> into the middle or start of the object will exist, and (3) the object might be
> accessed later. In contrast we have seen scenarios with pointers into the middle
> of Lisp objects.

Okay. I was about to write that I'd concluded the same thing, after
failing to come up with an example other than that hypothetical
Freverse implementation.

> With that in mind, attached is a proposed patch to master that I hope deals with
> some of the more-serious problems mentioned so far in this thread, in particular
> the problem with Lisp_Object representations of symbols being split into two
> registers in a --with-wide-int build. I haven't tested this as much as I'd like,
> but I need to turn my attention to sleep and work and so this is a good place to
> broadcast a checkpoint.

Thanks! Looks great generally, though I confess I haven't checked what
would happen in a (hypothetical?) !USE_LSB_TAG 64-bit case.

+      if (!symbol_only && live_float_p (m, p))
+        obj = make_lisp_ptr (cp - (uintptr_t) cp % GCALIGNMENT, Lisp_Float);
       break;

I'm not sure about this code, though, it assumes GCALIGNMENT == sizeof
Lisp_Float.

> PS. Thanks for helping bring this problem to our attention; it's been fun to
> look into it.

I agree. I'll certainly continue looking for bugs and working on
Emacs, but at this point I'm unsure it's worth it to actually share
such work with anyone. But that doesn't really belong here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 07:47:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 03:47:15 2020
Received: from localhost ([127.0.0.1]:50875 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeDFy-0004W8-NV
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 03:47:15 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56868)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jeDFw-0004Vv-5G
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 03:47:12 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9EF341600C3;
 Thu, 28 May 2020 00:47:06 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id WSkExrpTw6nH; Thu, 28 May 2020 00:47:05 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7483B1600CC;
 Thu, 28 May 2020 00:47:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id X-aDHD4nwwy8; Thu, 28 May 2020 00:47:05 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 436341600C3;
 Thu, 28 May 2020 00:47:05 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83y2phwb9x.fsf@HIDDEN>
 <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4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pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <21d399ef-5d63-dcf5-d124-64d2820885ea@HIDDEN>
Date: Thu, 28 May 2020 00:47:05 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBdt=xG3kwDfcH0Fu70BHqsM4_twNYvSv-0xciB8piX2kQ@HIDDEN>
Content-Type: multipart/mixed; boundary="------------0687281901E7D082DDD4D59C"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------0687281901E7D082DDD4D59C
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 5/27/20 11:31 PM, Pip Cet wrote:
> I hope you're right, in that compilers will support GC better before
> they move on to clever optimizations that break it :-)

After looking into it, I decided it wasn't worth the hassle of treating pointers
just past the end of a Lisp object as pointing into the object. Although such
pointers can exist, I can't think of a realistic-with-today's-compilers scenario
at the machine level where (1) a pointer like that will exist, (2) no pointers
into the middle or start of the object will exist, and (3) the object might be
accessed later. In contrast we have seen scenarios with pointers into the middle
of Lisp objects.

With that in mind, attached is a proposed patch to master that I hope deals with
some of the more-serious problems mentioned so far in this thread, in particular
the problem with Lisp_Object representations of symbols being split into two
registers in a --with-wide-int build. I haven't tested this as much as I'd like,
but I need to turn my attention to sleep and work and so this is a good place to
broadcast a checkpoint.

This patch doesn't address the LISP_ALIGNMENT issues you mentioned, both in
lisp.h and in the pdumper; I can work on that soon, I think.

PS. Thanks for helping bring this problem to our attention; it's been fun to
look into it.

--------------0687281901E7D082DDD4D59C
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Fix-crashes-due-to-misidentified-pointers.patch"
Content-Disposition: attachment;
 filename="0001-Fix-crashes-due-to-misidentified-pointers.patch"
Content-Transfer-Encoding: quoted-printable

From 023344217e05d2a23b5e8157da2f9aea16a5df78 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Thu, 28 May 2020 00:11:08 -0700
Subject: [PATCH] Fix crashes due to misidentified pointers
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Pip Cet (Bug#41321#74, Bug#41321#80)
A compiler can create temporaries that point somewhere into a Lisp
object but are not GCALIGNED, and these temporaries may be the
only thing that addresses the object.  So, if any value points
within an object, treat the object as being addressed.  However,
do not worry about pointers that point just past the end of an
object, as these do not seem to be a problem in practice and
attempting to worry about them would complicate and slow the code.
* src/alloc.c (live_float_p): Don=E2=80=99t insist that the offset
be aligned properly for a float, since it might be tagged
or offset.
(GC_OBJECT_ALIGNMENT_MINIMUM, maybe_lisp_pointer):
Remove.  All uses removed.
(mark_maybe_pointer): New arg SYMBOL_ONLY.  All callers changed.
Don=E2=80=99t insist on pointers being aligned.
Align pointers before doing pdumper checks on them, and
before giving them to make_lisp_ptr.
(mark_memory): Do not use mark_maybe_object here.
Instead, use mark_maybe_pointer alone; that suffices.
Also look for offsets from lispsym, to mark symbols more
reliably.
---
 src/alloc.c | 65 +++++++++++++++--------------------------------------
 1 file changed, 18 insertions(+), 47 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index e241b9933a..b1d45dbb33 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4560,7 +4560,6 @@ live_float_p (struct mem_node *m, void *p)
       /* P must point to the start of a Lisp_Float and not be
 	 one of the unused cells in the current float block.  */
       return (offset >=3D 0
-	      && offset % sizeof b->floats[0] =3D=3D 0
 	      && offset < (FLOAT_BLOCK_SIZE * sizeof b->floats[0])
 	      && (b !=3D float_block
 		  || offset / sizeof b->floats[0] < float_block_index));
@@ -4687,54 +4686,25 @@ mark_maybe_objects (Lisp_Object const *array, ptr=
diff_t nelts)
     mark_maybe_object (*array);
 }
=20
-/* A lower bound on the alignment of Lisp objects that need marking.
-   Although 1 is safe, higher values speed up mark_maybe_pointer.
-   If USE_LSB_TAG, this value is typically GCALIGNMENT; otherwise,
-   it's determined by the natural alignment of Lisp structs.
-   All vectorlike objects have alignment at least that of union
-   vectorlike_header and it's unlikely they all have alignment greater,
-   so use the union as a safe and likely-accurate standin for
-   vectorlike objects.  */
-
-enum { GC_OBJECT_ALIGNMENT_MINIMUM
-         =3D max (GCALIGNMENT,
-		min (alignof (union vectorlike_header),
-		     min (min (alignof (struct Lisp_Cons),
-			       alignof (struct Lisp_Float)),
-			  min (alignof (struct Lisp_String),
-			       alignof (struct Lisp_Symbol))))) };
-
-/* Return true if P might point to Lisp data that can be garbage
-   collected, and false otherwise (i.e., false if it is easy to see
-   that P cannot point to Lisp data that can be garbage collected).
-   Symbols are implemented via offsets not pointers, but the offsets
-   are also multiples of GC_OBJECT_ALIGNMENT_MINIMUM.  */
-
-static bool
-maybe_lisp_pointer (void *p)
-{
-  return (uintptr_t) p % GC_OBJECT_ALIGNMENT_MINIMUM =3D=3D 0;
-}
-
 /* If P points to Lisp data, mark that as live if it isn't already
-   marked.  */
+   marked.  If SYMBOL_ONLY, mark it only if it is a symbol.  */
=20
 static void
-mark_maybe_pointer (void *p)
+mark_maybe_pointer (void *p, bool symbol_only)
 {
+  char *cp =3D p;
   struct mem_node *m;
=20
 #ifdef USE_VALGRIND
   VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p));
 #endif
=20
-  if (!maybe_lisp_pointer (p))
-    return;
-
   if (pdumper_object_p (p))
     {
+      p =3D cp - (uintptr_t) cp % GCALIGNMENT;
       int type =3D pdumper_find_object_type (p);
-      if (pdumper_valid_object_type_p (type))
+      if (pdumper_valid_object_type_p (type)
+	  && (type =3D=3D Lisp_Symbol || !symbol_only))
         mark_object (type =3D=3D Lisp_Symbol
                      ? make_lisp_symbol (p)
                      : make_lisp_ptr (p, type));
@@ -4755,11 +4725,13 @@ mark_maybe_pointer (void *p)
 	  break;
=20
 	case MEM_TYPE_CONS:
-	  obj =3D live_cons_holding (m, p);
+	  if (!symbol_only)
+	    obj =3D live_cons_holding (m, p);
 	  break;
=20
 	case MEM_TYPE_STRING:
-	  obj =3D live_string_holding (m, p);
+	  if (!symbol_only)
+	    obj =3D live_string_holding (m, p);
 	  break;
=20
 	case MEM_TYPE_SYMBOL:
@@ -4767,13 +4739,14 @@ mark_maybe_pointer (void *p)
 	  break;
=20
 	case MEM_TYPE_FLOAT:
-	  if (live_float_p (m, p))
-	    obj =3D make_lisp_ptr (p, Lisp_Float);
+	  if (!symbol_only && live_float_p (m, p))
+	    obj =3D make_lisp_ptr (cp - (uintptr_t) cp % GCALIGNMENT, Lisp_Floa=
t);
 	  break;
=20
 	case MEM_TYPE_VECTORLIKE:
 	case MEM_TYPE_VECTOR_BLOCK:
-	  obj =3D live_vector_holding (m, p);
+	  if (!symbol_only)
+	    obj =3D live_vector_holding (m, p);
 	  break;
=20
 	default:
@@ -4830,12 +4803,10 @@ mark_memory (void const *start, void const *end)
=20
   for (pp =3D start; (void const *) pp < end; pp +=3D GC_POINTER_ALIGNME=
NT)
     {
-      mark_maybe_pointer (*(void *const *) pp);
-
-      verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT =3D=3D 0);
-      if (alignof (Lisp_Object) =3D=3D GC_POINTER_ALIGNMENT
-	  || (uintptr_t) pp % alignof (Lisp_Object) =3D=3D 0)
-	mark_maybe_object (*(Lisp_Object const *) pp);
+      char *p =3D *(char *const *) pp;
+      mark_maybe_pointer (p, false);
+      p +=3D (intptr_t) lispsym;
+      mark_maybe_pointer (p, true);
     }
 }
=20
--=20
2.17.1


--------------0687281901E7D082DDD4D59C--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 07:41:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 03:41:42 2020
Received: from localhost ([127.0.0.1]:50865 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeDAb-0004ND-Sy
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 03:41:42 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56396)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jeDAa-0004N1-8s
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 03:41:40 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id BE84A160059;
 Thu, 28 May 2020 00:41:34 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id I1ab-_mj8a3C; Thu, 28 May 2020 00:41:34 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 06A731600C3;
 Thu, 28 May 2020 00:41:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id zGxrDPH8Igb3; Thu, 28 May 2020 00:41:33 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id CBB07160059;
 Thu, 28 May 2020 00:41:33 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> <838shcseng.fsf@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH
 ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL
 aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D
 UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT
 MWVuM1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dhWG0xNXRaCk9JeXpNWmhI
 UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD
 cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt
 SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2
 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <309544a0-d857-13f3-e211-41a40966dcc5@HIDDEN>
Date: Thu, 28 May 2020 00:41:33 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <838shcseng.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/28/20 12:27 AM, Eli Zaretskii wrote:
>> From: Stefan Monnier <monnier@HIDDEN>
>> Date: Wed, 27 May 2020 22:43:52 -0400
>>
>> Indeed, basically `maybe_lisp_pointer` goes against the effort we've put
>> into replacing `live_string_p` with `live_string_holding` (i.e. to
>> recognize anything that points into any part of a Lisp_String so as to
>> prevent collecting it).
> 
> 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.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 07:27:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 03:27:32 2020
Received: from localhost ([127.0.0.1]:50858 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeCwu-00041o-Mo
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 03:27:32 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jeCwt-00041d-Fx
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 03:27:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56350)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jeCwn-0001Br-Cv; Thu, 28 May 2020 03:27:25 -0400
Received: from [176.228.60.248] (port=2895 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jeCwm-0007nL-O0; Thu, 28 May 2020 03:27:25 -0400
Date: Thu, 28 May 2020 10:27:15 +0300
Message-Id: <838shcseng.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Wed, 27 May 2020 22:43:52 -0400)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
 <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  pipcet@HIDDEN,  41321 <at> debbugs.gnu.org
> Date: Wed, 27 May 2020 22:43:52 -0400
> 
> Indeed, basically `maybe_lisp_pointer` goes against the effort we've put
> into replacing `live_string_p` with `live_string_holding` (i.e. to
> recognize anything that points into any part of a Lisp_String so as to
> prevent collecting it).

You are suggesting that we go back to using live_string_p?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 06:32:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 02:32:28 2020
Received: from localhost ([127.0.0.1]:50769 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeC5c-0002d0-G7
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 02:32:28 -0400
Received: from mail-oi1-f179.google.com ([209.85.167.179]:44524)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jeC5b-0002cm-8x
 for 41321 <at> debbugs.gnu.org; Thu, 28 May 2020 02:32:27 -0400
Received: by mail-oi1-f179.google.com with SMTP id y85so23920387oie.11
 for <41321 <at> debbugs.gnu.org>; Wed, 27 May 2020 23:32:27 -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=isP7gF9KQ1RoHAcJvg+JAS4ObIP4euAgWh5O0PSoCHU=;
 b=N0Pw27MJpBtY5fAKDhogZPJmBWk81rvpKvbQFeNCnYs85uq6sQR4c8SniO6P6Be9pm
 C7tegCvYho68VcM2dwpm7zmtlZOAHG1/cSo59YnBj3CrxjLWcRpt6qalwFNKj/Coh41A
 497b9M99T9INm7ROVwaVd1CpCcl4PxqxzOv0+UF8GL2Jx8l+z1OqfujEhSz3MUraPpnu
 h5wlQNqw3if4ULs8UOHItbfx2vx+zddKtlHLOUH2eLMzMRQDtPFVh1O8OLUA2YUb795s
 8ilTyTgfIgXikQFlsZT+juKmLhOmSVZDW6DkWQjjTt8puYZjEI5ytC+N0nm4igJvWq24
 xrug==
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=isP7gF9KQ1RoHAcJvg+JAS4ObIP4euAgWh5O0PSoCHU=;
 b=G3h7xy0u7WYFQZ7Fgzuil4GMsbqXr8/LcF2/qKPNmBzjRJWYdn7kp+OIcO0JK9LCT2
 DCLJZb0GZOcseBItv0eVYlzc5PwFZJs5j44FnJG+yHjJCCdSDB+bBzH3vG2Qntxlti3L
 KNPlYsgnjKFcG4GZ/HVULZ03UkRqmxnNNaOWdoSsUv+W6xxDF5DF67LTmZEohl+OddMR
 SkPSEQnJEi/ek1vU2NWr37lN89sTsle8a3xvwb0zZOwAK6cOVQktsRxLaB4IP2qrFI4a
 lddH0gwG19RxgNxDGnWNjDEfr/Yggk53Ue9fkBtQAnqRAk8eaNcj48Wip79EiaLqeY8q
 NwRQ==
X-Gm-Message-State: AOAM533i6/9epMXHArN3k1jq47ZnvHhvHd9Ql7Y/R+M1C6K9CpfhlsI6
 Lxg4MlSMrsdJRLqm7Vf6tjNg9FnYC7smcEqA66s=
X-Google-Smtp-Source: ABdhPJxZMEz8ZQQH3ZdxTh77hSxxAyTtKy4YeoRM3MKkyVXmFM7Y1IS2aYU8szQoHhTrRQragfRL+n1GArKLFhsNqoM=
X-Received: by 2002:aca:c6d3:: with SMTP id w202mr1278892oif.44.1590647541226; 
 Wed, 27 May 2020 23:32:21 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <CAOqdjBdfxOvaRNR75GLtNkunGYqaeN3bDvyGNcyq01JopODWig@HIDDEN>
 <753eed58-287b-1c47-deef-0e343bca8e69@HIDDEN>
 <CAOqdjBdZ2imhpbp988YifCXA6kTv5hZERrLbGVYxDPfB_XpE7Q@HIDDEN>
 <1ce49934-ee4c-78b5-20ff-83f281aed4ee@HIDDEN>
In-Reply-To: <1ce49934-ee4c-78b5-20ff-83f281aed4ee@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Thu, 28 May 2020 06:31:44 +0000
Message-ID: <CAOqdjBdt=xG3kwDfcH0Fu70BHqsM4_twNYvSv-0xciB8piX2kQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thu, May 28, 2020 at 1:21 AM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/27/20 11:56 AM, Pip Cet wrote:
>
> > So, at the very least, we need to always keep the immediately
> > preceding object alive if we go that way.
>
> Yes, I'm assuming that. I'll check that the code is doing that (if it isn't
> doing it already).

Okay, that makes sense.

> > that's a significant overhead because it
> > usually means two objects are being kept alive by one reference.
>
> For Lisp_Objects with nonzero tags this shouldn't be an issue, since the tags
> mean the pointers won't tie down two objects.

On USE_LSB_TAG systems, you're correct.

> I'll measure how much overhead is involved in my usual 'make compile-always'
> benchmark. If it's not that much then we'll be OK. I'm hoping that's the case.
> If not, there are some more measures we can take.

I suspect that garbage collection is only slowed down significantly
when there are large objects on the stack; that happens when GC
happens during redisplay, for example. (All the more reason to make
the struct it stack heap-allocated as I'd proposed).

> > With prefetch instructions, it's quite likely the compiler concludes
> > it's easiest to prefetch something 256 bytes ahead of where it
> > actually makes the access, then make the actual access relative to
> > that address...
>
> I wouldn't worry about that; it's so unlikely that it's not a practical concern.

Fingers crossed.

> "Some C optimizers may lose the last undisguised pointer to a memory object as a
> consequence of clever optimizations. This has almost never been observed in
> practice." <https://github.com/ivmai/bdwgc> As I understand it, the times "in
> practice" that Hans-J. Boehm was talking about were for C code deliberately
> designed to fool the compiler / GC combination.
>
> I think it unlikely that a modern compiler would break all the code out there
> that uses conservative GC.
>
> (Besides, if that stuff really were of practical concern we'd have to give up on
> conservative GC entirely. :-)

I hope you're right, in that compilers will support GC better before
they move on to clever optimizations that break it :-)

(I'm not sure what the current state is of "real" GC support in LLVM;
I'm pretty sure not much has happened in GCC.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 02:44:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 22:44:04 2020
Received: from localhost ([127.0.0.1]:50471 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1je8Wa-0005I0-8S
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 22:44:04 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10440)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1je8WZ-0005HO-2q
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 22:44:03 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6531F1002AC;
 Wed, 27 May 2020 22:43:57 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8F6F310025D;
 Wed, 27 May 2020 22:43:54 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1590633834;
 bh=I/3rrY6bqFOC1f1dHk/M5FpWtHIz0RRX5PAj+7DPV5s=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=Ot/FgdwTfBXuHv2Mdqozt82CtnIdDPc1F0WJAawC/y1wJZKgGiX9W/2zm9iIdOD/x
 UU2VREBxRJLrjXYQEzskjKLZVRQF0PuGjB7j1sOUlOL8onGYna+E/lxoB3SnMjsP5p
 svVxWZCDMnKudgkq4l0S9ZJRnijRF4I8PXiyf450FLDWJ7oq53OsG0c4UvPvqipZFv
 Vu2uAOa5w/uJ99Y1v7i/rrqux8Vn1eVuiGe/SwYXwFn7Feos6FcPIuhL/Q26gzXIi3
 YXpGWrJqrPCN6Idujtd2K9HabsJ7rUmlJffm7vDWsunzeeBux4l3Tk36Qa5CS0Ee9l
 02Z8OQRS4+sYA==
Received: from alfajor (unknown [216.154.27.250])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C5B2A120206;
 Wed, 27 May 2020 22:43:53 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
Message-ID: <jwv5zcg6as5.fsf-monnier+emacs@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
Date: Wed, 27 May 2020 22:43:52 -0400
In-Reply-To: <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN> (Paul Eggert's
 message of "Wed, 27 May 2020 10:53:22 -0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.088 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> (obj)->contents[1], etc. each time through the loop, and transforms the call
> into foo (*R) as an optimization. When foo calls the garbage collector,
> maybe_lisp_pointer (R) can be false because R doesn't point directly at a Lisp
> object: it points somewhere into the middle of a Lisp object and R's value is
> not GC-aligned.

Indeed, basically `maybe_lisp_pointer` goes against the effort we've put
into replacing `live_string_p` with `live_string_holding` (i.e. to
recognize anything that points into any part of a Lisp_String so as to
prevent collecting it).


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 28 May 2020 01:21:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 21:21:15 2020
Received: from localhost ([127.0.0.1]:50393 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1je7EQ-00018l-VV
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 21:21:15 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1je7EN-00018X-NM
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 21:21:14 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 452701600AF;
 Wed, 27 May 2020 18:21:06 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id O8B-q2Gcs0e9; Wed, 27 May 2020 18:21:05 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2A8DF1600C8;
 Wed, 27 May 2020 18:21:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id Y-uopov2k7zQ; Wed, 27 May 2020 18:21:05 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EEE3E1600AF;
 Wed, 27 May 2020 18:21:04 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <CAOqdjBdfxOvaRNR75GLtNkunGYqaeN3bDvyGNcyq01JopODWig@HIDDEN>
 <753eed58-287b-1c47-deef-0e343bca8e69@HIDDEN>
 <CAOqdjBdZ2imhpbp988YifCXA6kTv5hZERrLbGVYxDPfB_XpE7Q@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH
 ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL
 aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D
 UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT
 MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls
 QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3
 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN
 Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHh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VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <1ce49934-ee4c-78b5-20ff-83f281aed4ee@HIDDEN>
Date: Wed, 27 May 2020 18:21:04 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBdZ2imhpbp988YifCXA6kTv5hZERrLbGVYxDPfB_XpE7Q@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/27/20 11:56 AM, Pip Cet wrote:

> So, at the very least, we need to always keep the immediately
> preceding object alive if we go that way.

Yes, I'm assuming that. I'll check that the code is doing that (if it isn't
doing it already).

> that's a significant overhead because it
> usually means two objects are being kept alive by one reference.

For Lisp_Objects with nonzero tags this shouldn't be an issue, since the tags
mean the pointers won't tie down two objects. For Lisp_Symbols (whose tags are
zero) it is an issue; also for untagged pointers to the start of objects.

I'll measure how much overhead is involved in my usual 'make compile-always'
benchmark. If it's not that much then we'll be OK. I'm hoping that's the case.
If not, there are some more measures we can take.

> With prefetch instructions, it's quite likely the compiler concludes
> it's easiest to prefetch something 256 bytes ahead of where it
> actually makes the access, then make the actual access relative to
> that address...

I wouldn't worry about that; it's so unlikely that it's not a practical concern.
"Some C optimizers may lose the last undisguised pointer to a memory object as a
consequence of clever optimizations. This has almost never been observed in
practice." <https://github.com/ivmai/bdwgc> As I understand it, the times "in
practice" that Hans-J. Boehm was talking about were for C code deliberately
designed to fool the compiler / GC combination.

I think it unlikely that a modern compiler would break all the code out there
that uses conservative GC.

(Besides, if that stuff really were of practical concern we'd have to give up on
conservative GC entirely. :-)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 18:57:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 14:57:03 2020
Received: from localhost ([127.0.0.1]:50003 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1je1Ec-0004H5-Px
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 14:57:03 -0400
Received: from mail-oi1-f178.google.com ([209.85.167.178]:39827)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1je1Ea-0004Ga-29
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 14:57:01 -0400
Received: by mail-oi1-f178.google.com with SMTP id s198so22688438oie.6
 for <41321 <at> debbugs.gnu.org>; Wed, 27 May 2020 11:56:59 -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=Nqml4TW96KHRuCSkWtcZ+rzWfm6RKCwx0rhhFeVghlE=;
 b=mSw1sC+sN3o5/0ST/czp0xW/QkoNyN9ouydHWr30hLe8hYkVvCaf+wMrqzmwoDdJ+v
 eVAwXt1HXBWOQAO1n5B0WCmISheLe+A6oTE7WOW0mcCH6AQK+fCPxIbvTGFDF0t8IZuw
 36yKRJOuHsGXPrTCypI5mjOJVcoUT2HDluHLLoixAFVuzh7BH52XK7f1NGAZnxQOxFPi
 f4m0MPUMKVR/lsBByikPD8ycI1RxtmHGTjNDm/Yici/18AvFv6Iu4kCXasWIgQa+q/1i
 0x/h7f2IO9/epLqMRXlHMoBkuOHPp//CL6z6YoDvrY/eFSHLrjy+5XdAim8hsPso4tYw
 cZCw==
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=Nqml4TW96KHRuCSkWtcZ+rzWfm6RKCwx0rhhFeVghlE=;
 b=Anw7IJucpWE6E03d9Vf/T0bN9MLJekqPgyOQyIrwteanmUQDKZvkZgIsYzJVcjbeWX
 JyFbG6tbh5R89OxIUMgiRr82ezM/b5FH5hfNxb8M6PslhY4XxD6PMKpSYiRNa7/Ij54Y
 VSw0Q/nZvRmlOeBLWPVH5k8P8Imz2x/HrS4cKN47IL2iU5A+23rkoDa052hFvO660ila
 gby6DcgYnVHtjsNiPVBok4Uey5+HWMcxNeXdWyv5svBfOKsjsYNOATKzUe7fs9Qcqjrb
 VCFwNkhbpMKl8V23HFbrA0tk/WRjS7frpHgkZVO+YcnKK2rbZWdX5pev8Z4Zrk0sYtjY
 GmvQ==
X-Gm-Message-State: AOAM5325hgZVbT08WehqTmg9bMzn6u4ZI6Q+RrpEvLNoB3AkMHfEtal1
 MZNzJ0iTNuWWIAyy5WGXpUYqF6kja4oAT7Xc9mY=
X-Google-Smtp-Source: ABdhPJwhJ1uIya3BBvmIAisN8zS8iSqx9E7x86v5kv2074DgkO1FRXgTrEydQijHlQ3usyWhyX5XzfIVqi5v6Cc7TmQ=
X-Received: by 2002:aca:b708:: with SMTP id h8mr3635896oif.122.1590605814216; 
 Wed, 27 May 2020 11:56:54 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN> <83r1vibmyj.fsf@HIDDEN>
 <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <CAOqdjBdfxOvaRNR75GLtNkunGYqaeN3bDvyGNcyq01JopODWig@HIDDEN>
 <753eed58-287b-1c47-deef-0e343bca8e69@HIDDEN>
In-Reply-To: <753eed58-287b-1c47-deef-0e343bca8e69@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 27 May 2020 18:56:17 +0000
Message-ID: <CAOqdjBdZ2imhpbp988YifCXA6kTv5hZERrLbGVYxDPfB_XpE7Q@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, May 27, 2020 at 6:39 PM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/27/20 10:57 AM, Pip Cet wrote:
>
> > Do you know of anything like this happening on 64-bit systems?
>
> I think it's unlikely on 64-bit systems; it'd happen only on platforms where
> alignof (void *) < 8, such as x86.
>
> > Emacs GC does rely, and has always relied since
> > GCPRO was removed, on compilers being sensible about what they put on
> > the stack.
>
> This isn't merely an issue about what compilers put into the stack; it's an also
> an issue of what's in registers. There may not be any pointer in the stack that
> points into the Lisp object. And compilers are not always "sensible" about
> temps; they may cache &P->x into a temp with no copy of P anywhere.

Or they may cache &P->x + 1, and use negative offsets to access it.
That used to be the most efficient way of accessing arrays on some
machines. We simply can't cater to that.

Think about code like:

Lisp_Object reverse(Lisp_Object vector)
{
  ptrdiff_t count = ASIZE (vector);
  Lisp_Object new_vector = make_nil_vector (count);
  Lisp_Object *p = aref_addr (vector, count);
  Lisp_Object *q = new_vector->contents;
  while (count--)
    {
      garbage_collect ();
      *q++ = *--p;
    }
}

(which is what many compilers would generate from more sensible code).
On the first iteration, p points to a totally different vector, or
some random other object, but it still needs to keep its vector alive.

So, at the very least, we need to always keep the immediately
preceding object alive if we go that way.

> > 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.
>
> Not sure what the point is here. None of this is "that involved". We can have
> pointers into Lisp objects, pointers that are not aligned for the purposes of
> maybe_lisp_pointer. Emacs should follow all of them, not just the one that Eli
> happened to observe.

Or pointers past them, and that's a significant overhead because it
usually means two objects are being kept alive by one reference.

> > 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.

> Yes, of course.

I didn't mean just "within the object", I did mean "in the vicinity".
With prefetch instructions, it's quite likely the compiler concludes
it's easiest to prefetch something 256 bytes ahead of where it
actually makes the access, then make the actual access relative to
that address...

> Any pointer that points somewhere within a Lisp object (in the C
> sense) should count as pointing to the object.

The C standard explicitly allows pointers (and that's C pointers) to
point one past the end of an allocated array, I believe.

> If memory serves, we already
> treat pointers that way in some places; unfortunately we're not doing it
> consistently.

Yes, we do.

> But I take your point; I'll post the change here before committing to master.

I'm sorry, I misunderstood. If you want to fix only pointers within
objects, that is quite a small change, but I believe it is incomplete.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 18:39:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 14:39:30 2020
Received: from localhost ([127.0.0.1]:49987 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1je0xe-0003rw-9a
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 14:39:30 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34998)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1je0xc-0003ri-8n
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 14:39:28 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id E4B73160052;
 Wed, 27 May 2020 11:39:22 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id IE9B6YEyGBac; Wed, 27 May 2020 11:39:22 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 31E841600D4;
 Wed, 27 May 2020 11:39:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id wAlL8TfkbZ4L; Wed, 27 May 2020 11:39:22 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id ED161160052;
 Wed, 27 May 2020 11:39:21 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r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MApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <880848de-82a1-1b15-f9f1-107af4e42cb2@HIDDEN>
Date: Wed, 27 May 2020 11:39:21 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83pnaps0bp.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/27/20 11:24 AM, Eli Zaretskii wrote:
> For this to cause trouble, you'd need to arrange for no other
> reference to obj, neither anywhere else up the callstack, nor from
> another object we will mark.

Yes, that's right. It's unlikely, but it does happen and we've seen it happen in
the past.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 18:39:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 14:39:16 2020
Received: from localhost ([127.0.0.1]:49984 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1je0xP-0003rV-Vz
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 14:39:16 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34950)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1je0xN-0003rH-HR
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 14:39:14 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0A6C6160052;
 Wed, 27 May 2020 11:39:08 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id PcaVO43DPski; Wed, 27 May 2020 11:39:07 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3E6571600C3;
 Wed, 27 May 2020 11:39:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id rl3uvR_6lbww; Wed, 27 May 2020 11:39:07 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 024BE160052;
 Wed, 27 May 2020 11:39:06 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN> <83r1vibmyj.fsf@HIDDEN>
 <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
 <CAOqdjBdfxOvaRNR75GLtNkunGYqaeN3bDvyGNcyq01JopODWig@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMn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DEN>
Date: Wed, 27 May 2020 11:39:06 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBdfxOvaRNR75GLtNkunGYqaeN3bDvyGNcyq01JopODWig@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/27/20 10:57 AM, Pip Cet wrote:

> Do you know of anything like this happening on 64-bit systems?

I think it's unlikely on 64-bit systems; it'd happen only on platforms where
alignof (void *) < 8, such as x86.

> Emacs GC does rely, and has always relied since
> GCPRO was removed, on compilers being sensible about what they put on
> the stack.

This isn't merely an issue about what compilers put into the stack; it's an also
an issue of what's in registers. There may not be any pointer in the stack that
points into the Lisp object. And compilers are not always "sensible" about
temps; they may cache &P->x into a temp with no copy of P anywhere.

> 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.

Not sure what the point is here. None of this is "that involved". We can have
pointers into Lisp objects, pointers that are not aligned for the purposes of
maybe_lisp_pointer. Emacs should follow all of them, not just the one that Eli
happened to observe.

> 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.
Yes, of course. Any pointer that points somewhere within a Lisp object (in the C
sense) should count as pointing to the object. If memory serves, we already
treat pointers that way in some places; unfortunately we're not doing it
consistently.

But I take your point; I'll post the change here before committing to master.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 18:24:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 14:24:47 2020
Received: from localhost ([127.0.0.1]:49977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1je0jO-0003Vl-N8
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 14:24:46 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39630)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1je0jN-0003VZ-3E
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 14:24:45 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42072)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1je0jG-0000rc-EQ; Wed, 27 May 2020 14:24:38 -0400
Received: from [176.228.60.248] (port=2427 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1je0jF-0007iM-Ks; Wed, 27 May 2020 14:24:38 -0400
Date: Wed, 27 May 2020 21:24:26 +0300
Message-Id: <83pnaps0bp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN> (message from
 Paul Eggert on Wed, 27 May 2020 10:53:22 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
 <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Wed, 27 May 2020 10:53:22 -0700
> 
> The source code says
> 
>    for (i = 0; i < size; i++)
>       foo (AREF (obj, i));
> 
> This is the last reference to obj, so the compiler reuses the register R holding
> obj, and has that register R contain &XVECTOR (obj)->contents[0], &XVECTOR
> (obj)->contents[1], etc. each time through the loop, and transforms the call
> into foo (*R) as an optimization. When foo calls the garbage collector,
> maybe_lisp_pointer (R) can be false because R doesn't point directly at a Lisp
> object: it points somewhere into the middle of a Lisp object and R's value is
> not GC-aligned.

For this to cause trouble, you'd need to arrange for no other
reference to obj, neither anywhere else up the callstack, nor from
another object we will mark.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 17:58:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 13:58:14 2020
Received: from localhost ([127.0.0.1]:49961 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1je0Ji-0000i2-JM
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 13:58:14 -0400
Received: from mail-oo1-f47.google.com ([209.85.161.47]:34370)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1je0Jh-0000hq-Ig
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 13:58:13 -0400
Received: by mail-oo1-f47.google.com with SMTP id v3so533329oot.1
 for <41321 <at> 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)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
 <837dwyvi74.fsf@HIDDEN> <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
 <83blm9tn4j.fsf@HIDDEN> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
In-Reply-To: <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Wed, 27 May 2020 17:57:31 +0000
Message-ID: <CAOqdjBdfxOvaRNR75GLtNkunGYqaeN3bDvyGNcyq01JopODWig@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, May 27, 2020 at 4:58 PM Paul Eggert <eggert@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 17:53:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 13:53:32 2020
Received: from localhost ([127.0.0.1]:49952 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1je0F9-0000at-O8
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 13:53:31 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53978)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1je0F7-0000af-Rs
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 13:53:30 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5C85616004F;
 Wed, 27 May 2020 10:53:23 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id JcNGJX1-VO3D; Wed, 27 May 2020 10:53:22 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8F310160052;
 Wed, 27 May 2020 10:53:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id kcEAYlRj_NBQ; Wed, 27 May 2020 10:53:22 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6022A16004F;
 Wed, 27 May 2020 10:53:22 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> <83r1v5s2p1.fsf@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFow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6a2s4NVVHCmJQRWQ3SEdGL1ZTZUhDUXdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN
 NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a
 UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G
 ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI
 UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD
 cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt
 SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2
 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <5351703b-1780-561b-7f68-cdd4ed45e599@HIDDEN>
Date: Wed, 27 May 2020 10:53:22 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83r1v5s2p1.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/27/20 10:33 AM, Eli Zaretskii wrote:
> Sorry, I don't follow: what do you mean by "losing the address of the
> original object" in this case?  Can you show an example?

The source code says

   for (i = 0; i < size; i++)
      foo (AREF (obj, i));

This is the last reference to obj, so the compiler reuses the register R holding
obj, and has that register R contain &XVECTOR (obj)->contents[0], &XVECTOR
(obj)->contents[1], etc. each time through the loop, and transforms the call
into foo (*R) as an optimization. When foo calls the garbage collector,
maybe_lisp_pointer (R) can be false because R doesn't point directly at a Lisp
object: it points somewhere into the middle of a Lisp object and R's value is
not GC-aligned.

We've seen compilers do that.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 17:33:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 13:33:36 2020
Received: from localhost ([127.0.0.1]:49918 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdzvs-00005c-GH
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 13:33:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59900)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jdzvq-00005O-MU
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 13:33:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41219)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jdzvj-0007eO-Ja; Wed, 27 May 2020 13:33:27 -0400
Received: from [176.228.60.248] (port=3094 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jdzvi-0004qQ-V3; Wed, 27 May 2020 13:33:27 -0400
Date: Wed, 27 May 2020 20:33:14 +0300
Message-Id: <83r1v5s2p1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN> (message from
 Paul Eggert on Wed, 27 May 2020 09:58:11 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
 <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Wed, 27 May 2020 09:58:11 -0700
> 
> 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.

Sorry, I don't follow: what do you mean by "losing the address of the
original object" in this case?  Can you show an example?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 16:58:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 12:58:19 2020
Received: from localhost ([127.0.0.1]:49865 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdzNj-0005VZ-Mc
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 12:58:19 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:42524)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jdzNh-0005VI-Qv
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 12:58:19 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 49A4216004F;
 Wed, 27 May 2020 09:58:12 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id bsdFIPpMj_J9; Wed, 27 May 2020 09:58:11 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8B4361600C8;
 Wed, 27 May 2020 09:58:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id PEk1-KHysmTt; Wed, 27 May 2020 09:58:11 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 59BA216004F;
 Wed, 27 May 2020 09:58:11 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> <83blm9tn4j.fsf@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH
 ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL
 aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D
 UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT
 MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls
 QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3
 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN
 Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa
 SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ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z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@HIDDEN>
Date: Wed, 27 May 2020 09:58:11 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <83blm9tn4j.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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. This sort of failure should be quite rare
but can cause crashes such as the one you observed. 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 27 May 2020 15:26:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 27 11:26:57 2020
Received: from localhost ([127.0.0.1]:49805 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdxxJ-0003Aw-Ab
	for submit <at> debbugs.gnu.org; Wed, 27 May 2020 11:26:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42066)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jdxxH-0003Aj-2F
 for 41321 <at> debbugs.gnu.org; Wed, 27 May 2020 11:26:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38257)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jdxxB-0002e4-B5; Wed, 27 May 2020 11:26:49 -0400
Received: from [176.228.60.248] (port=3293 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jdxxA-00080D-1e; Wed, 27 May 2020 11:26:48 -0400
Date: Wed, 27 May 2020 18:26:36 +0300
Message-Id: <83blm9tn4j.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN> (message from
 Paul Eggert on Tue, 26 May 2020 15:49:24 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> <837dwyvi74.fsf@HIDDEN>
 <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pipcet@HIDDEN, 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> From: Paul Eggert <eggert@HIDDEN>
> Date: Tue, 26 May 2020 15:49:24 -0700
> 
> > On non-USE_LSB_TAG systems, GCALIGNMENT is 1, so this doesn't look
> > right (or maybe I'm missing something).
> 
> Good point; I'd neglected that. I.e., on !USE_LSB_TAG systems the proposed
> emacs-27 patch is overly-conservative, as it causes maybe_lisp_pointer to always
> return true. Although this hurts GC performance it doesn't affect correctness
> and the patch does fix a crash on USE_LSB_TAG systems, so it (or something like
> it) is needed for emacs-27.

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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 26 May 2020 22:49:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 26 18:49:37 2020
Received: from localhost ([127.0.0.1]:47374 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdiO8-0007qe-SX
	for submit <at> debbugs.gnu.org; Tue, 26 May 2020 18:49:37 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jdiO7-0007qP-BK
 for 41321 <at> debbugs.gnu.org; Tue, 26 May 2020 18:49:35 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5F7731600CD;
 Tue, 26 May 2020 15:49:29 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id xd9Hj70UEA6Q; Tue, 26 May 2020 15:49:28 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 72E171600E0;
 Tue, 26 May 2020 15:49:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id SHKVBpBNrHy1; Tue, 26 May 2020 15:49:28 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3F0B51600CD;
 Tue, 26 May 2020 15:49:28 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <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tbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI
 UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD
 cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt
 SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2
 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <1484f569-c260-9fb0-bfe1-67897de289d3@HIDDEN>
Date: Tue, 26 May 2020 15:49:24 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <837dwyvi74.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------0D07ECC0599937251C10140A"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------0D07ECC0599937251C10140A
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 5/26/20 8:17 AM, Eli Zaretskii wrote:
>>  static bool
>>  maybe_lisp_pointer (void *p)
>>  {
>> -  return (uintptr_t) p % LISP_ALIGNMENT == 0;
>> +  return (uintptr_t) p % GCALIGNMENT == 0;
>>  }
> On non-USE_LSB_TAG systems, GCALIGNMENT is 1, so this doesn't look
> right (or maybe I'm missing something).

Good point; I'd neglected that. I.e., on !USE_LSB_TAG systems the proposed
emacs-27 patch is overly-conservative, as it causes maybe_lisp_pointer to always
return true. Although this hurts GC performance it doesn't affect correctness
and the patch does fix a crash on USE_LSB_TAG systems, so it (or something like
it) is needed for emacs-27.

I installed the attached patch into master to fix the !USE_LSB_TAG performance
issue you raised.  This patch does not fix crashes; it's merely a performance tweak.

I am planning on looking into related crashes for Lisp_Symbol next. Perhaps we
should wait on that before worrying about what exact patch should go into emacs-27.

--------------0D07ECC0599937251C10140A
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Tweak-GC-performance-if-USE_LSB_TAG.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0001-Tweak-GC-performance-if-USE_LSB_TAG.patch"

From 7a83c4f66cb945d43dcaf8c37f4af1334d34f501 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Tue, 26 May 2020 15:47:59 -0700
Subject: [PATCH] Tweak GC performance if !USE_LSB_TAG

Performance issue reported by Eli Zaretskii (Bug#41321#149).
* src/alloc.c (GC_OBJECT_ALIGNMENT_MINIMUM): New constant.
(maybe_lisp_pointer): Use it instead of GCALIGNMENT.
---
 src/alloc.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index f8609398a3..e241b9933a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4687,16 +4687,33 @@ mark_maybe_objects (Lisp_Object const *array, ptrdiff_t nelts)
     mark_maybe_object (*array);
 }
 
+/* A lower bound on the alignment of Lisp objects that need marking.
+   Although 1 is safe, higher values speed up mark_maybe_pointer.
+   If USE_LSB_TAG, this value is typically GCALIGNMENT; otherwise,
+   it's determined by the natural alignment of Lisp structs.
+   All vectorlike objects have alignment at least that of union
+   vectorlike_header and it's unlikely they all have alignment greater,
+   so use the union as a safe and likely-accurate standin for
+   vectorlike objects.  */
+
+enum { GC_OBJECT_ALIGNMENT_MINIMUM
+         = max (GCALIGNMENT,
+		min (alignof (union vectorlike_header),
+		     min (min (alignof (struct Lisp_Cons),
+			       alignof (struct Lisp_Float)),
+			  min (alignof (struct Lisp_String),
+			       alignof (struct Lisp_Symbol))))) };
+
 /* Return true if P might point to Lisp data that can be garbage
    collected, and false otherwise (i.e., false if it is easy to see
    that P cannot point to Lisp data that can be garbage collected).
    Symbols are implemented via offsets not pointers, but the offsets
-   are also multiples of GCALIGNMENT.  */
+   are also multiples of GC_OBJECT_ALIGNMENT_MINIMUM.  */
 
 static bool
 maybe_lisp_pointer (void *p)
 {
-  return (uintptr_t) p % GCALIGNMENT == 0;
+  return (uintptr_t) p % GC_OBJECT_ALIGNMENT_MINIMUM == 0;
 }
 
 /* If P points to Lisp data, mark that as live if it isn't already
-- 
2.17.1


--------------0D07ECC0599937251C10140A--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 26 May 2020 15:18:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 26 11:18:12 2020
Received: from localhost ([127.0.0.1]:46101 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdbLI-00033o-LC
	for submit <at> debbugs.gnu.org; Tue, 26 May 2020 11:18:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39082)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jdbLG-00033b-KW
 for 41321 <at> debbugs.gnu.org; Tue, 26 May 2020 11:18:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45957)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jdbLA-0003nZ-Gl; Tue, 26 May 2020 11:18:04 -0400
Received: from [176.228.60.248] (port=2169 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jdbL9-0001zf-PU; Tue, 26 May 2020 11:18:04 -0400
Date: Tue, 26 May 2020 18:17:51 +0300
Message-Id: <837dwyvi74.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN> (message from
 Paul Eggert on Mon, 25 May 2020 23:46:02 -0700)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Paul Eggert <eggert@HIDDEN>
> Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> Date: Mon, 25 May 2020 23:46:02 -0700
> 
> I propose the second patch for emacs-27; it's limited to what you proposed,
> namely, it weakens maybe_lisp_pointer to check only for GC_ALIGNMENT.
> 
>  static bool
>  maybe_lisp_pointer (void *p)
>  {
> -  return (uintptr_t) p % LISP_ALIGNMENT == 0;
> +  return (uintptr_t) p % GCALIGNMENT == 0;
>  }

On non-USE_LSB_TAG systems, GCALIGNMENT is 1, so this doesn't look
right (or maybe I'm missing something).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 26 May 2020 08:28:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 26 04:28:25 2020
Received: from localhost ([127.0.0.1]:43994 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdUwj-0007SX-5L
	for submit <at> debbugs.gnu.org; Tue, 26 May 2020 04:28:25 -0400
Received: from mail-oi1-f196.google.com ([209.85.167.196]:38700)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jdUwh-0007SK-RZ
 for 41321 <at> debbugs.gnu.org; Tue, 26 May 2020 04:28:24 -0400
Received: by mail-oi1-f196.google.com with SMTP id j145so18006067oib.5
 for <41321 <at> debbugs.gnu.org>; Tue, 26 May 2020 01:28:23 -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=x48aq++Bgz8bqZ3yWKtHHuU3ycN+bJ6NVruHs/3J6/k=;
 b=lvoVS7wqxWaqftmQ/POXsuQgkwehEpTtbSjLQyvFsKPE48grkZacHxK+B4xsAN1JYz
 mv6Rfqvm4C86ICcgKGVJqMVgOtBTBvqo8kJ0z3flBA70zcZS7CyGNPm/TsmdKywS9Mmd
 TB9NUql7tLz7tsCK2oNmLGnC5P7JpVc5sDI29PZ+GeE3kqn0HEZAur9gVIFoV4/apgJ6
 WugRbnKoxIjFBgktBLdmCAgpw2/B7IjW5DGLV2GRlNJExBp6cr7T1WhM0Z7G07esPPkq
 BL4Krkwx1LerTE4vLsY3x0TPjig3dLoy1tck4MFPV4f7F2aGynMArfSu9rSquyOJm9Ek
 d89w==
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=x48aq++Bgz8bqZ3yWKtHHuU3ycN+bJ6NVruHs/3J6/k=;
 b=PXVwKHM8i1QJeSgbygOIR1t0UlypUAhhMN3ni7Krh+A+MBSiGU2xQx/abC1Dfp6nZK
 X4Qw2iNNT6Dl2B0vOl657PFc7ZGiKA3UUSHcEnJxZ9Y9Rh6uPutIZYldAErIM2rZZfX0
 4ZbCuS+xvxFgqfw+EPR+gQnNf6bqjRlzr+rgsd7m5sUMrRylfLQt0ySCRBRAsOednd8I
 c9GeVEFmZutAZ71WSdsq1legvvpPMOpgdH/HUhhdfEH8/CZuHGZz1TdSlu8Ji7486GbL
 WwmtLdTActM74vVLdvxLhVlN5uFTOZSc9Rwhm6VtKtI6x+1myaR67ewRhgLt9QTvofBg
 a+wA==
X-Gm-Message-State: AOAM5316Fcw7Tt9Bu8QwO/P+4sqsTuqKOjLBQdwLrSAI1tgC+UJOSo0P
 oYCrkrNWI+VOhf+0odiC4kYMZqCef/2FJrN7E2w=
X-Google-Smtp-Source: ABdhPJxOtharsrXfU1DdtT6C7PYtV57XVJq9JO88H/2jXLMUh/UcYIHo1KD20eYtgtRLQedprHCnsFFUlLMjR5LSWqE=
X-Received: by 2002:aca:c6d3:: with SMTP id w202mr14246304oif.44.1590481698093; 
 Tue, 26 May 2020 01:28:18 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <CAOqdjBcpLzdOSMdo6k4EyEndwr+kkZTaeAbMgmSm8GQrq4itWg@HIDDEN>
 <11bedfbe-a895-ba76-c80b-9ee084ef85aa@HIDDEN>
In-Reply-To: <11bedfbe-a895-ba76-c80b-9ee084ef85aa@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Tue, 26 May 2020 08:27:41 +0000
Message-ID: <CAOqdjBf-LijxjLwj0L2mqCbv4iBBsxU8RF1_KoUK0VNyKGn_6w@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, May 26, 2020 at 7:51 AM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/25/20 11:18 PM, Pip Cet wrote:
> > However, this is only because struct Lisp_String happens to have an
> > even number of words. If someone changes that, the old code would
> > break...
>
> No, because struct Lisp_String contains a GCALIGNED_UNION_MEMBER, so it is
> always GC-aligned, and (for older compilers that don't support alignas (8)) this
> is checked statically via 'verify (GCALIGNED (struct Lisp_String))'.

As I said, this was specific to the old code, where LISP_ALIGNMENT,
not GCALIGNMENT, was used by maybe_lisp_pointer. Things should be fine
now (apart from the issue below)!

> Now that I've looked at it, though, I see that I forgot to do something similar
> with struct Lisp_Float, which has the same issue. Fixed by installing the
> attached patch on master.

LGTM.

> > We're still going to have to deal with symbols on --wide-int builds
> > when the two halves of the wide int are saved non-consecutively.
>
> Yes, I think that's the most pressing issue in this area.
> I will have to take a
> break now, though, since I have sleep and other work to do.

Thanks for all the patches and comments!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 26 May 2020 07:51:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 26 03:51:32 2020
Received: from localhost ([127.0.0.1]:43892 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdUMy-0006Wh-Sp
	for submit <at> debbugs.gnu.org; Tue, 26 May 2020 03:51:32 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37054)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jdUMi-0006WB-Oh
 for 41321 <at> debbugs.gnu.org; Tue, 26 May 2020 03:51:27 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id EBF8A160052;
 Tue, 26 May 2020 00:51:06 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id F5f49hdmeaPZ; Tue, 26 May 2020 00:51:06 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1A9D01600E0;
 Tue, 26 May 2020 00:51:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id a0-J9_q4vxyV; Tue, 26 May 2020 00:51:06 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id DE9C9160052;
 Tue, 26 May 2020 00:51:05 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
 <CAOqdjBcpLzdOSMdo6k4EyEndwr+kkZTaeAbMgmSm8GQrq4itWg@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@H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KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <11bedfbe-a895-ba76-c80b-9ee084ef85aa@HIDDEN>
Date: Tue, 26 May 2020 00:51:05 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBcpLzdOSMdo6k4EyEndwr+kkZTaeAbMgmSm8GQrq4itWg@HIDDEN>
Content-Type: multipart/mixed; boundary="------------E5B13AEAB0C6FA162B585004"
Content-Language: en-US
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------E5B13AEAB0C6FA162B585004
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 5/25/20 11:18 PM, Pip Cet wrote:

> However, this is only because struct Lisp_String happens to have an
> even number of words. If someone changes that, the old code would
> break...

No, because struct Lisp_String contains a GCALIGNED_UNION_MEMBER, so it is
always GC-aligned, and (for older compilers that don't support alignas (8)) this
is checked statically via 'verify (GCALIGNED (struct Lisp_String))'.

Now that I've looked at it, though, I see that I forgot to do something similar
with struct Lisp_Float, which has the same issue. Fixed by installing the
attached patch on master.

> We're still going to have to deal with symbols on --wide-int builds
> when the two halves of the wide int are saved non-consecutively.

Yes, I think that's the most pressing issue in this area. I will have to take a
break now, though, since I have sleep and other work to do.

--------------E5B13AEAB0C6FA162B585004
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Port-struct-Lisp_FLoat-to-oddball-platforms.patch"
Content-Disposition: attachment;
 filename="0001-Port-struct-Lisp_FLoat-to-oddball-platforms.patch"
Content-Transfer-Encoding: quoted-printable

From cfd5e106c3c9334de93ccda0d65523476553fb1f Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Tue, 26 May 2020 00:47:24 -0700
Subject: [PATCH] Port struct Lisp_FLoat to oddball platforms
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

* src/lisp.h (struct Lisp_Float): Declare via
GCALIGNED_UNION_MEMBER, not via GCALIGNED_STRUCT, since alloc.c
creates these in arrays and GCALIGNED_STRUCT does not necessarily
suffice to align struct Lisp_Float when it=E2=80=99s used in an array.
This avoids undefined behavior on oddball machines where
sizeof (struct Lisp_Float) is not a multiple of 8 and the compiler
does not support __attribute__ ((aligned 8)).
---
 src/lisp.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lisp.h b/src/lisp.h
index 8bd83a888c..f5d581a2f1 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2801,8 +2801,10 @@ XBUFFER_OBJFWD (lispfwd a)
     {
       double data;
       struct Lisp_Float *chain;
+      GCALIGNED_UNION_MEMBER
     } u;
-  } GCALIGNED_STRUCT;
+  };
+verify (GCALIGNED (struct Lisp_Float));
=20
 INLINE bool
 (FLOATP) (Lisp_Object x)
--=20
2.17.1


--------------E5B13AEAB0C6FA162B585004--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 26 May 2020 06:46:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 26 02:46:12 2020
Received: from localhost ([127.0.0.1]:43828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdTLn-0004vY-Dg
	for submit <at> debbugs.gnu.org; Tue, 26 May 2020 02:46:12 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59790)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jdTLl-0004vL-Ht
 for 41321 <at> debbugs.gnu.org; Tue, 26 May 2020 02:46:10 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 04B7E160052;
 Mon, 25 May 2020 23:46:04 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id OBiqjiW_2gJS; Mon, 25 May 2020 23:46:02 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 93E691600E0;
 Mon, 25 May 2020 23:46:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id iN1M5z2fITmA; Mon, 25 May 2020 23:46:02 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 553C7160052;
 Mon, 25 May 2020 23:46:02 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
From: Paul Eggert <eggert@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhU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JQRWQ3SEdGL1ZTZUhDUXdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN
 NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a
 UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G
 ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI
 UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD
 cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt
 SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2
 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <c9af54a4-0eb9-e1c6-7731-cdade3b2de04@HIDDEN>
Date: Mon, 25 May 2020 23:46:02 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
Content-Type: multipart/mixed; boundary="------------65049CAFD0B1249059991EAB"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------65049CAFD0B1249059991EAB
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 5/25/20 8:33 PM, Paul Eggert wrote:
> On 5/25/20 4:28 AM, Pip Cet wrote:
> 
>> And I just noticed strings aren't aligned to LISP_ALIGNMENT on
>> x86_64-pc-linux-gnu.
> 
> Could you explain?

Oh, never mind, I figured it out. Sorry about the noise.

I installed the first attached patch to fix the bug on master (as a series of
commits, the leading ones not quite right unfortunately). This patch does what
you proposed, and also tightens up some of the related alignment checks.

I propose the second patch for emacs-27; it's limited to what you proposed,
namely, it weakens maybe_lisp_pointer to check only for GC_ALIGNMENT.

--------------65049CAFD0B1249059991EAB
Content-Type: text/x-patch; charset=UTF-8;
 name="emacs.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="emacs.diff"

diff --git a/src/alloc.c b/src/alloc.c
index d5a6d9167e..f8609398a3 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -104,6 +104,46 @@ Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2020 Free Software
 #include "w32heap.h"	/* for sbrk */
 #endif
 
+/* A type with alignment at least as large as any object that Emacs
+   allocates.  This is not max_align_t because some platforms (e.g.,
+   mingw) have buggy malloc implementations that do not align for
+   max_align_t.  This union contains types of all GCALIGNED_STRUCT
+   components visible here.  */
+union emacs_align_type
+{
+  struct frame frame;
+  struct Lisp_Bignum Lisp_Bignum;
+  struct Lisp_Bool_Vector Lisp_Bool_Vector;
+  struct Lisp_Char_Table Lisp_Char_Table;
+  struct Lisp_CondVar Lisp_CondVar;
+  struct Lisp_Finalizer Lisp_Finalizer;
+  struct Lisp_Float Lisp_Float;
+  struct Lisp_Hash_Table Lisp_Hash_Table;
+  struct Lisp_Marker Lisp_Marker;
+  struct Lisp_Misc_Ptr Lisp_Misc_Ptr;
+  struct Lisp_Mutex Lisp_Mutex;
+  struct Lisp_Overlay Lisp_Overlay;
+  struct Lisp_Sub_Char_Table Lisp_Sub_Char_Table;
+  struct Lisp_Subr Lisp_Subr;
+  struct Lisp_User_Ptr Lisp_User_Ptr;
+  struct Lisp_Vector Lisp_Vector;
+  struct terminal terminal;
+  struct thread_state thread_state;
+  struct window window;
+
+  /* Omit the following since they would require including process.h
+     etc.  In practice their alignments never exceed that of the
+     structs already listed.  */
+#if 0
+  struct Lisp_Module_Function Lisp_Module_Function;
+  struct Lisp_Process Lisp_Process;
+  struct save_window_data save_window_data;
+  struct scroll_bar scroll_bar;
+  struct xwidget_view xwidget_view;
+  struct xwidget xwidget;
+#endif
+};
+
 /* MALLOC_SIZE_NEAR (N) is a good number to pass to malloc when
    allocating a block of memory with size close to N bytes.
    For best results N should be a power of 2.
@@ -112,9 +152,9 @@ Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2020 Free Software
    adds sizeof (size_t) to SIZE for internal overhead, and then rounds
    up to a multiple of MALLOC_ALIGNMENT.  Emacs can improve
    performance a bit on GNU platforms by arranging for the resulting
-   size to be a power of two.  This heuristic is good for glibc 2.0
-   (1997) through at least glibc 2.31 (2020), and does not affect
-   correctness on other platforms.  */
+   size to be a power of two.  This heuristic is good for glibc 2.26
+   (2017) and later, and does not affect correctness on other
+   platforms.  */
 
 #define MALLOC_SIZE_NEAR(n) \
   (ROUNDUP (max (n, sizeof (size_t)), MALLOC_ALIGNMENT) - sizeof (size_t))
@@ -655,25 +695,19 @@ buffer_memory_full (ptrdiff_t nbytes)
 #define COMMON_MULTIPLE(a, b) \
   ((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b))
 
-/* LISP_ALIGNMENT is the alignment of Lisp objects.  It must be at
-   least GCALIGNMENT so that pointers can be tagged.  It also must be
-   at least as strict as the alignment of all the C types used to
-   implement Lisp objects; since pseudovectors can contain any C type,
-   this is max_align_t.  On recent GNU/Linux x86 and x86-64 this can
-   often waste up to 8 bytes, since alignof (max_align_t) is 16 but
-   typical vectors need only an alignment of 8.  Although shrinking
-   the alignment to 8 would save memory, it cost a 20% hit to Emacs
-   CPU performance on Fedora 28 x86-64 when compiled with gcc -m32.  */
-enum { LISP_ALIGNMENT = alignof (union { max_align_t x;
+/* Alignment needed for memory blocks that are allocated via malloc
+   and that contain Lisp objects.  On typical hosts malloc already
+   aligns sufficiently, but extra work is needed on oddball hosts
+   where Emacs would crash if malloc returned a non-GCALIGNED pointer.  */
+enum { LISP_ALIGNMENT = alignof (union { union emacs_align_type x;
 					 GCALIGNED_UNION_MEMBER }) };
 verify (LISP_ALIGNMENT % GCALIGNMENT == 0);
 
 /* True if malloc (N) is known to return storage suitably aligned for
    Lisp objects whenever N is a multiple of LISP_ALIGNMENT.  In
    practice this is true whenever alignof (max_align_t) is also a
-   multiple of LISP_ALIGNMENT.  This works even for x86, where some
-   platform combinations (e.g., GCC 7 and later, glibc 2.25 and
-   earlier) have bugs where alignof (max_align_t) is 16 even though
+   multiple of LISP_ALIGNMENT.  This works even for buggy platforms
+   like MinGW circa 2020, where alignof (max_align_t) is 16 even though
    the malloc alignment is only 8, and where Emacs still works because
    it never does anything that requires an alignment of 16.  */
 enum { MALLOC_IS_LISP_ALIGNED = alignof (max_align_t) % LISP_ALIGNMENT == 0 };
@@ -4657,12 +4691,12 @@ mark_maybe_objects (Lisp_Object const *array, ptrdiff_t nelts)
    collected, and false otherwise (i.e., false if it is easy to see
    that P cannot point to Lisp data that can be garbage collected).
    Symbols are implemented via offsets not pointers, but the offsets
-   are also multiples of LISP_ALIGNMENT.  */
+   are also multiples of GCALIGNMENT.  */
 
 static bool
 maybe_lisp_pointer (void *p)
 {
-  return (uintptr_t) p % LISP_ALIGNMENT == 0;
+  return (uintptr_t) p % GCALIGNMENT == 0;
 }
 
 /* If P points to Lisp data, mark that as live if it isn't already
@@ -4885,9 +4919,10 @@ test_setjmp (void)
    as a stack scan limit.  */
 typedef union
 {
-  /* Align the stack top properly.  Even if !HAVE___BUILTIN_UNWIND_INIT,
-     jmp_buf may not be aligned enough on darwin-ppc64.  */
-  max_align_t o;
+  /* Make sure stack_top and m_stack_bottom are properly aligned as GC
+     expects.  */
+  Lisp_Object o;
+  void *p;
 #ifndef HAVE___BUILTIN_UNWIND_INIT
   sys_jmp_buf j;
   char c;
diff --git a/src/lisp.h b/src/lisp.h
index 85bdc172b2..8bd83a888c 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -277,7 +277,8 @@ DEFINE_GDB_SYMBOL_END (VALMASK)
    allocation in a containing union that has GCALIGNED_UNION_MEMBER)
    and does not contain a GC-aligned struct or union, putting
    GCALIGNED_STRUCT after its closing '}' can help the compiler
-   generate better code.
+   generate better code.  Also, such structs should be added to the
+   emacs_align_type union in alloc.c.
 
    Although these macros are reasonably portable, they are not
    guaranteed on non-GCC platforms, as C11 does not require support
diff --git a/src/thread.c b/src/thread.c
index df1a705382..b638dd77f8 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -717,12 +717,17 @@ run_thread (void *state)
 {
   /* Make sure stack_top and m_stack_bottom are properly aligned as GC
      expects.  */
-  max_align_t stack_pos;
+  union
+  {
+    Lisp_Object o;
+    void *p;
+    char c;
+  } stack_pos;
 
   struct thread_state *self = state;
   struct thread_state **iter;
 
-  self->m_stack_bottom = self->stack_top = (char *) &stack_pos;
+  self->m_stack_bottom = self->stack_top = &stack_pos.c;
   self->thread_id = sys_thread_self ();
 
   if (self->thread_name)

--------------65049CAFD0B1249059991EAB
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Fix-aborts-due-to-GC-losing-pseudovectors.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0001-Fix-aborts-due-to-GC-losing-pseudovectors.patch"

From 7466aeeb4ac3dace283ecef00c2b38148b56b3b3 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@HIDDEN>
Date: Mon, 25 May 2020 23:39:37 -0700
Subject: [PATCH] Fix aborts due to GC losing pseudovectors

Problem reported by Eli Zaretskii (Bug#41321).
* src/alloc.c (maybe_lisp_pointer): Modulo GCALIGNMENT,
not modulo LISP_ALIGNMENT.  Master has a more-elaborate fix.
Do not merge to master.
---
 src/alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 1c6b664b22..c7a4a3ee86 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4589,12 +4589,12 @@ mark_maybe_objects (Lisp_Object const *array, ptrdiff_t nelts)
    collected, and false otherwise (i.e., false if it is easy to see
    that P cannot point to Lisp data that can be garbage collected).
    Symbols are implemented via offsets not pointers, but the offsets
-   are also multiples of LISP_ALIGNMENT.  */
+   are also multiples of GCALIGNMENT.  */
 
 static bool
 maybe_lisp_pointer (void *p)
 {
-  return (uintptr_t) p % LISP_ALIGNMENT == 0;
+  return (uintptr_t) p % GCALIGNMENT == 0;
 }
 
 /* If P points to Lisp data, mark that as live if it isn't already
-- 
2.17.1


--------------65049CAFD0B1249059991EAB--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 26 May 2020 06:19:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 26 02:19:37 2020
Received: from localhost ([127.0.0.1]:43804 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdSw4-0004HD-Oo
	for submit <at> debbugs.gnu.org; Tue, 26 May 2020 02:19:36 -0400
Received: from mail-ot1-f42.google.com ([209.85.210.42]:35874)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jdSw3-0004H1-4g
 for 41321 <at> debbugs.gnu.org; Tue, 26 May 2020 02:19:35 -0400
Received: by mail-ot1-f42.google.com with SMTP id h7so15422620otr.3
 for <41321 <at> debbugs.gnu.org>; Mon, 25 May 2020 23:19:35 -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=/PJUI39h+d4UE3xte5uE/qhNQUQwwABZng+tvdmnqjk=;
 b=iQ09HU/ON69SiEk5VPi6rwMJScDopTOTpkGoGOsz1cIh8j3SROHEaoWNoon4oCbrST
 lPz8rKGNySXgdObKj+pz+4wn9bwqxScpcBSOGwrOt9jMK+aApiCo8SkYY7LoSLu34bDm
 efLiSpBEuv1rgCNI9HZeC2gVg289YTJ+oXg8tcalTZA8dgMyLi+j+mRSnTXM3JaWsxjA
 PBW6L2itjnW3vOoliXqk9P7p6O9ZduJeD2zOsiv9rwTjkwIVCyD46LC7VSGT3oLR1QQe
 ZVJTca0uAL/yG95E6cgWxTe0isv3NBJ5upAC0flx5bmPEkXHosS31A7CHD6ZQ/06Z3Lt
 ITkw==
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=/PJUI39h+d4UE3xte5uE/qhNQUQwwABZng+tvdmnqjk=;
 b=RlaZzGF+lA6+xq86TuidUu1Oj4T0UeSmPO9cYLLokAXGMj8WXO+zQwVZG+Tw5kV+b6
 VxuYYcfNgEgv68uQAHYNK9PSFdYv10/cxN5MTFahdCKaTw+ZeyIpESm0NxWfT9311HoE
 4nw0077yCdjfKKI6LEJa9YaEivEJ8ofFcI0DkpZlSjk0Gn2dWk/pXzrcJD4KsRcob4tt
 iKyfL8+ZJLB+uTiAj1zYsS12iTm/yEDzpzhE8esn6WA5LcwEla3nfeZvmnrmcF9Mmaen
 r6olTQVqBBkOublcJi9QC8K4bWw4ahAJQFeJ2db4BLM+w9kOhZwQ3KRFErqx6KfQhOPm
 PkzA==
X-Gm-Message-State: AOAM531RYxv8R9kPH9x/RaXvws2EdSWw0CiVcL6Ioy1nNXMzaSawMVmw
 xdfi+SUy86f+YTDbD1O3+lE6GVswkrTNImHCLuE=
X-Google-Smtp-Source: ABdhPJzNGAm+xBZWjG++FeKzgzlOsz8TmmnMLgDDqvNJjK0J4XtjZu9VZ3P38Q3AggISINHl7GH2qRMOe8RSCQAhhqc=
X-Received: by 2002:a9d:7a50:: with SMTP id z16mr24926790otm.292.1590473969417; 
 Mon, 25 May 2020 23:19:29 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
In-Reply-To: <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Tue, 26 May 2020 06:18:52 +0000
Message-ID: <CAOqdjBcpLzdOSMdo6k4EyEndwr+kkZTaeAbMgmSm8GQrq4itWg@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, May 26, 2020 at 3:33 AM Paul Eggert <eggert@HIDDEN> wrote:
> On 5/25/20 4:28 AM, Pip Cet wrote:
>
> > And I just noticed strings aren't aligned to LISP_ALIGNMENT on
> > x86_64-pc-linux-gnu.
>
> Could you explain? Strings are allocated via allocate_string -> lisp_malloc ->
> lmalloc, and lmalloc is supposed to align to LISP_ALIGNMENT for strings just
> like it does for other Lisp objects.

Sorry. You're right, the non-aligned strings aren't relevant for GC.

However, this is only because struct Lisp_String happens to have an
even number of words. If someone changes that, the old code would
break...

We're still going to have to deal with symbols on --wide-int builds
when the two halves of the wide int are saved non-consecutively.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 26 May 2020 03:39:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 23:39:33 2020
Received: from localhost ([127.0.0.1]:43188 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdQRB-0006SJ-1t
	for submit <at> debbugs.gnu.org; Mon, 25 May 2020 23:39:33 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44042)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jdQR9-0006S6-No
 for 41321 <at> debbugs.gnu.org; Mon, 25 May 2020 23:39:32 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4209B160052;
 Mon, 25 May 2020 20:39:26 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id JCbW3gMOJaJ1; Mon, 25 May 2020 20:39:25 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8971D1600E0;
 Mon, 25 May 2020 20:39:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id a4xuuqJMzWTz; Mon, 25 May 2020 20:39:25 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4B5FA160052;
 Mon, 25 May 2020 20:39:25 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Eli Zaretskii <eliz@HIDDEN>, Pip Cet <pipcet@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <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zBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <45d9178a-8990-22ea-8f34-4a62d2b91e63@HIDDEN>
Date: Mon, 25 May 2020 20:39:24 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <838shgvzfm.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/25/20 7:53 AM, Eli Zaretskii wrote:

> why did we move to max_align_t as the alignment requirement?
> AFAIU, GCC enlarged that recently to allow for _Float128 type (at
> least on 32-bit hosts), but do we really need that?

Not on current glibc on any platform that I know, no. I was merely trying to
keep the code portable to platforms where (say) alignof (pthread_cond_t) == 16.
POSIX allows this, and this sort of thing is likely to happen somewhere in the
not-too-distant future, for performance reasons.

> Does the use of max_align_t means that now stack-based Lisp objects
> will need to have 16-byte alignment on 32-bit Windows?

No, because we don't need to GC stack-based objects themselves (the stack will
reclaim them) and the GC find everything they point to (as it scans the stack).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 26 May 2020 03:33:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 23:33:41 2020
Received: from localhost ([127.0.0.1]:43183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdQLV-0006Jy-De
	for submit <at> debbugs.gnu.org; Mon, 25 May 2020 23:33:41 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43632)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jdQLU-0006Jm-An
 for 41321 <at> debbugs.gnu.org; Mon, 25 May 2020 23:33:41 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 41897160052;
 Mon, 25 May 2020 20:33:34 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id hmGxnm-awfJm; Mon, 25 May 2020 20:33:33 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8D2901600E0;
 Mon, 25 May 2020 20:33:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id zU0Hol3TRZsN; Mon, 25 May 2020 20:33:33 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 5F2A7160052;
 Mon, 25 May 2020 20:33:33 -0700 (PDT)
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
To: Pip Cet <pipcet@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2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cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <4bab5f55-95fe-cf34-e490-1d4319728395@HIDDEN>
Date: Mon, 25 May 2020 20:33:32 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 5/25/20 4:28 AM, Pip Cet wrote:

> And I just noticed strings aren't aligned to LISP_ALIGNMENT on
> x86_64-pc-linux-gnu.

Could you explain? Strings are allocated via allocate_string -> lisp_malloc ->
lmalloc, and lmalloc is supposed to align to LISP_ALIGNMENT for strings just
like it does for other Lisp objects.

String data (struct sdata) is not Lisp-aligned, but it doesn't need to be.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 25 May 2020 17:42:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 13:42:17 2020
Received: from localhost ([127.0.0.1]:42426 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdH7A-0004U5-RC
	for submit <at> debbugs.gnu.org; Mon, 25 May 2020 13:42:17 -0400
Received: from mail-ot1-f44.google.com ([209.85.210.44]:42642)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jdH78-0004Tr-Ol
 for 41321 <at> debbugs.gnu.org; Mon, 25 May 2020 13:42:15 -0400
Received: by mail-ot1-f44.google.com with SMTP id z3so14323602otp.9
 for <41321 <at> debbugs.gnu.org>; Mon, 25 May 2020 10:42:14 -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=jdYq+V76uti5Y2OytQzFXPGnvFpOed+NsMr8V5cglC4=;
 b=AOFF/3kKCmLnuKm207Q5Nf6quVdUga1JEeLqQHK8P0e7nC3h+0OgpB/8IkupegahoQ
 YHYPP3HUI5NnpCaJntVl2rfwmB8yzvHiwJpkCiE/a52tqUBO+ePudweovj4TrgPtPbZ6
 sjlfOv2YObCQ/vsRnhTX78aQ2M4UJsK594JHzTmfihGTtw7LBRR0f8/hWga15mls7YAt
 aFdpmqySYMQIkr/WItEDjPaSSzG04AfX/KWReYge000DZQUgX+ZyTEwTflIRUNwITMJj
 uKa3lTrIfRXLohfwkVMswdGvbnk68AVeTgd5FQmcI+riQhA0X6qajVpdCTZ3njJkwIwI
 kfqg==
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=jdYq+V76uti5Y2OytQzFXPGnvFpOed+NsMr8V5cglC4=;
 b=YrulesQy7xlU1r0aLJFlMEhwzboW7mMeTOlKB8qmMQGyZIeW+j+nbolYWk+lxgN4G/
 hn7XSHPIP6K3S3l9lJGLLkpz1mOI7YkKDP/fPMpaLcGRnxNF7RDjS1v69ZRnYKVaaR1z
 2p358JB/SmYrjNzO4ylRSaebBAPVBQKtClnw1qhwqq4IrFO/ujcfjX3Pp3KuCL6kzh4r
 UPGzorbz3VkfgCeHFsQ/4H/wt6wGWX60c9UX9imImqjuBXsVGBC0XRZXseogR9mQSzRF
 RKwjhabn29OvLMkBoRWhfV1twkkQCK6MbdS8bFydwMpi4tk9uB+/PnX/3Bg7vwovfhfV
 uP8w==
X-Gm-Message-State: AOAM531rajT7gV7AJ2W0b2kWQPFKoeXpSwA/9aeQ85QCa1p+Z04PrvH5
 RJK9495/U3Cam5OGC1pRWqqo68x9+iPN3dSrkCE=
X-Google-Smtp-Source: ABdhPJzz+RK8iLosPcNj+JYOtwIyml2MFQMOI8I1vtpWtnmDrVxdsKT5IxCN1VJrzEmnFORuScCancMJ4t0DCeInP4M=
X-Received: by 2002:a9d:7a50:: with SMTP id z16mr23142541otm.292.1590428529002; 
 Mon, 25 May 2020 10:42:09 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <834ks4vygh.fsf@HIDDEN>
In-Reply-To: <834ks4vygh.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Mon, 25 May 2020 17:41:32 +0000
Message-ID: <CAOqdjBcW8YKufCz6FsO-hKfk=C-qE9rRA2zmtczX_BX5CWBi1A@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, May 25, 2020 at 3:14 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Mon, 25 May 2020 06:40:11 +0000
> > Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> >
> > What are you actually planning to do?
> Not
> much: I intend to continue running Emacs under GDB and collect data
> about the crashes until either I figure out what causes the crashes,
> or the crashes disappear (which would mean the problem was fixed
> indirectly by some other change).

(Or directly, of course. I still believe my "theory" about your bug is correct.)

> > I think we should work around the mingw bug on both the master and
> > emacs-27 branches.
>
> That depends on what the proposed solution or workaround will be.

For emacs-27, reducing the alignment requirement in
maybe_lisp_pointer: that will only make us check more pointers, not
fewer, so while it is a GC change it's one that makes sense.

For master, I'd consider setting LISP_ALIGNMENT to 8 on the mingw32
platform, where memory is already scarce. I don't trust the alleged
performance hit of 20%, so we might have to collect some actual
performance data. But we definitely need to make strings aligned to
LISP_ALIGNMENT, one way or the other, because that's the original
reason for maybe_mark_pointer.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 25 May 2020 15:14:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 11:14:19 2020
Received: from localhost ([127.0.0.1]:42157 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdEnz-00070G-AI
	for submit <at> debbugs.gnu.org; Mon, 25 May 2020 11:14:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47658)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jdEnx-000703-Lh
 for 41321 <at> debbugs.gnu.org; Mon, 25 May 2020 11:14:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50812)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jdEns-0008Gk-AM; Mon, 25 May 2020 11:14:12 -0400
Received: from [176.228.60.248] (port=4483 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jdEnr-0006J1-Iw; Mon, 25 May 2020 11:14:12 -0400
Date: Mon, 25 May 2020 18:14:22 +0300
Message-Id: <834ks4vygh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 (message from Pip Cet on Mon, 25 May 2020 06:40:11 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Mon, 25 May 2020 06:40:11 +0000
> Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> 
> What are you actually planning to do?

Given the fact that I'm the only one who sees these problems?  Not
much: I intend to continue running Emacs under GDB and collect data
about the crashes until either I figure out what causes the crashes,
or the crashes disappear (which would mean the problem was fixed
indirectly by some other change).

> I think we should work around the mingw bug on both the master and
> emacs-27 branches.

That depends on what the proposed solution or workaround will be.  We
need to see where the discussion of the alignment issue goes and what
we decide to do about that.

> What we should not do is encourage people to keep looking for another
> Emacs bug based on the existing backtraces.

Indeed, I'm posting the backtraces for the record; no one should feel
compelled to study them unless they are interested.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 25 May 2020 15:13:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 11:13:06 2020
Received: from localhost ([127.0.0.1]:42151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdEmn-0006yE-Vp
	for submit <at> debbugs.gnu.org; Mon, 25 May 2020 11:13:06 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1jdEmj-0006xh-6U
 for 41321 <at> debbugs.gnu.org; Mon, 25 May 2020 11:13:05 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D711680D3D;
 Mon, 25 May 2020 11:12:55 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 25B06807F4;
 Mon, 25 May 2020 11:12:54 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1590419574;
 bh=JukwLlrKLGf5tWBciWLoNpWxLRzP9t0QnqDsN5owa5I=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=Z9X888TFbyCcrybEEs+t3C7zBrcTZ88z6hhROlOtgBvpKdFgKh4sKcAppY8Bbbzkn
 qKvQmB5avf/nNx+KZDg2mXNVbvr+tKI1RY0ya5F2sYdr/Mh2p6k2zNzBA9RNS/9ovf
 Ps17awkJm/waZYJnV12NXk6XgngVFMu5e7xcjtRpRYHUZP6Iq03GIujeyzxSbM3AYM
 WD8TclkLKxxh9rnRFIPKxK7DCjlvO1n+J69ueWHJ+oKmYxC726pUI+tkmVhRN6qzvv
 puKU8htaVOL3jT/7JDZpSoynDQKM6CsGxxMuv4ZxtDFjIAMSH2vuCRCt3HODqDRQSn
 596YBrXUjrfSA==
Received: from alfajor (unknown [216.154.27.250])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D7E421207EA;
 Mon, 25 May 2020 11:12:53 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
Message-ID: <jwv7dx0f3tr.fsf-monnier+emacs@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 <838shgvzfm.fsf@HIDDEN>
Date: Mon, 25 May 2020 11:12:53 -0400
In-Reply-To: <838shgvzfm.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 25 May
 2020 17:53:17 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.094 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: eggert@HIDDEN, 41321 <at> debbugs.gnu.org, Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> I think we're going to have to weaken the maybe_lisp_pointer check to
>> check only for GC_ALIGNMENT.

Sounds about right: the only alignment we really need for Lisp_Objects
is the GC_ALIGNMENT that allows us to use the 3 LSB for tags.
src/alloc.c makes efforts to ensure this alignment and for some objects
(e.g. Lisp_Floats as well as (on 32bit hosts) Lisp_Cons cells) that's
the only alignment we can meaningfully impose since those objects are
only 64bit in size.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 25 May 2020 14:53:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 10:53:14 2020
Received: from localhost ([127.0.0.1]:42106 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdETa-0004M3-8q
	for submit <at> debbugs.gnu.org; Mon, 25 May 2020 10:53:14 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jdETY-0004Lq-Ip
 for 41321 <at> debbugs.gnu.org; Mon, 25 May 2020 10:53:13 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50445)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jdETS-0003qm-Kx; Mon, 25 May 2020 10:53:06 -0400
Received: from [176.228.60.248] (port=3178 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jdETR-0002sI-Sq; Mon, 25 May 2020 10:53:06 -0400
Date: Mon, 25 May 2020 17:53:17 +0300
Message-Id: <838shgvzfm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>, eggert@HIDDEN
In-Reply-To: <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
 (message from Pip Cet on Mon, 25 May 2020 11:28:46 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
 <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Mon, 25 May 2020 11:28:46 +0000
> Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> 
> And I just noticed strings aren't aligned to LISP_ALIGNMENT on
> x86_64-pc-linux-gnu.
> 
> I think we're going to have to weaken the maybe_lisp_pointer check to
> check only for GC_ALIGNMENT.

I tend to agree.

Paul, why did we move to max_align_t as the alignment requirement?
AFAIU, GCC enlarged that recently to allow for _Float128 type (at
least on 32-bit hosts), but do we really need that?

Also, what does this mean for stack-based Lisp objects?  AFAIU, we
previously required 8-byte alignment on 32-bit hosts (and on
MS-Windows we jump through some hoops to guarantee that in callbacks
of Windows APIs and in thread functions that manipulate Lisp objects).
Does the use of max_align_t means that now stack-based Lisp objects
will need to have 16-byte alignment on 32-bit Windows?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 25 May 2020 11:29:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 07:29:30 2020
Received: from localhost ([127.0.0.1]:40021 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdBIQ-0003Aq-Lc
	for submit <at> debbugs.gnu.org; Mon, 25 May 2020 07:29:30 -0400
Received: from mail-oi1-f194.google.com ([209.85.167.194]:41338)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jdBIP-0003Ae-1x
 for 41321 <at> debbugs.gnu.org; Mon, 25 May 2020 07:29:29 -0400
Received: by mail-oi1-f194.google.com with SMTP id 23so14554512oiq.8
 for <41321 <at> debbugs.gnu.org>; Mon, 25 May 2020 04:29:29 -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=L6WLoWtibt1bg/F/iNqL0z2qfx0Ip5ZlxIzo9j5nnA8=;
 b=gb0Qg5/9n7g+Vm7kl74dZWz6Vh/ZPN9vKpVX6/OEpvWNvjvUrt8LHMQ9F5PYaoJDOf
 NMjEkBppyah+kUPWDkvziwY8SCRstng0I8n4vwCpe9Y14vm0aOkYpN3aMySzcv+/CS/I
 TmzRicVC3TeaZjNDbR8i2mDdTVIlAaOaRxVM/Ls2L3SI+/tJ2FnJRPph67mSjZFuTRvW
 o3kQhcAola19/83KGrAJTe4Hvrg8E5JkbG3A4vWpuGLIMkcgm/mdtpTUJzdHpbk7qCy0
 Hgd5Be9r1XX5kcTf/Nrd5R1oY81GOftsrN2L/U0VpQ0IJBTYPtZPdxd1+XxNUDthVRqg
 NDOw==
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=L6WLoWtibt1bg/F/iNqL0z2qfx0Ip5ZlxIzo9j5nnA8=;
 b=O833rhl20a/hLc3ILCdfYpFlWPCnQ/Bs8VtprHSBHBHiDB4R2w/EDUBDhOHnmhMQqh
 4RO6qt+z/2s0ehQ2hqoVFIMNCKXWHLvNTTBD4tZ/JztlJCd0OScoIsVJGLtX3z/MJTrn
 KVp20pG8pLUE5Rw3NjlyB82E7dbwfGF7EkDJN6zUURK5C0wsV4bWahCR36trUEMiZH+y
 AYWkvJqfgoYhqe1Wbhc5umwUXoLFqvniZMSRAgDdKzAJGFIPSszd2jjkzq0ZmFPKREK7
 BuWMHZfkKhstocIUM64PHcMY5dNND9yo3Ztld8fUk3RkGUtsCFgND2vB7byjMTl5KL/p
 3g9Q==
X-Gm-Message-State: AOAM532DB3fBDfaqDRDuxDua5K/ROpEd1JraYELRenBld3BOgExR4rYQ
 9P6DcomH2BaTnV68pajs//2FuoRNwWM6GmEucio=
X-Google-Smtp-Source: ABdhPJx/1B+FHM6KmiS37n+2fSstuX4ip4kPx76fTkhDTBPvAkKpTEPiNVEKCopCncvzdpNWpEdlty0V0w+v82n/I8Y=
X-Received: by 2002:a05:6808:1c8:: with SMTP id
 x8mr10546010oic.30.1590406163485; 
 Mon, 25 May 2020 04:29:23 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
 <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
In-Reply-To: <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Mon, 25 May 2020 11:28:46 +0000
Message-ID: <CAOqdjBdtG-24L2VsHPDZr6BKFKvCNerMvNeZEeK9Fx4Zt=-exA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>, eggert@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, May 25, 2020 at 6:40 AM Pip Cet <pipcet@HIDDEN> wrote:
> We should also fix the (symbol-related) Emacs bug before it bites us:
> on both branches, unless we can get a mingw user to provide the output
> of "disassemble Fprog1" (and a bunch of other functions). (OTOH, we've
> already decided to keep crashable GC bugs on the emacs-27 branch).

And I just noticed strings aren't aligned to LISP_ALIGNMENT on
x86_64-pc-linux-gnu.

I think we're going to have to weaken the maybe_lisp_pointer check to
check only for GC_ALIGNMENT.

The commit that introduced this problem, for what it's worth, is
967d2c55ef3908fd378e05b2a0070663ae45f6de




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 25 May 2020 06:40:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 02:40:57 2020
Received: from localhost ([127.0.0.1]:39576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jd6n9-00009R-Jw
	for submit <at> debbugs.gnu.org; Mon, 25 May 2020 02:40:56 -0400
Received: from mail-ot1-f54.google.com ([209.85.210.54]:35462)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jd6n7-00009E-LP
 for 41321 <at> debbugs.gnu.org; Mon, 25 May 2020 02:40:53 -0400
Received: by mail-ot1-f54.google.com with SMTP id 69so13139237otv.2
 for <41321 <at> debbugs.gnu.org>; Sun, 24 May 2020 23:40:53 -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=j+agg+IB5QK23rRQdejmAkRr7wu9w8iCHAdNUtNB7go=;
 b=P0ydDhyZHw+cjA/EZGocUJK6dHZPKN54Uts/NqiyXhnSnXslrXSdHpCi5pqBhtDvq3
 sWzchhzuOgh7FsxgONkgS9EPjw61R5pqZ6+OK6HEPJi7EH94qTvwC2FWNf0mzDQ00eiR
 1243nnPGQsTM4b/5poLTkdbp2RRYFx37pyxFPYORYlsJFkoeqKqNSyscK9ldBSGWsDvk
 ob6+oLl0any2/WOgCVz9ubV93qq/TCXbiaIwb2NBibN2YlxEIPG3VMkRXo8w83/bB+oF
 8LKdVFeb37D3imtpI/1weiZGoXIxKwOD+SB9RUbHvUW5qzKcO4GAnK2Lg0JDhAGFd3/Q
 m9tw==
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=j+agg+IB5QK23rRQdejmAkRr7wu9w8iCHAdNUtNB7go=;
 b=OnnGGIf4gzZyH5FVRWzcjDtFMwLzQwM3dkw6C6OU5DNzS1I9id544VBB+1qNSjlldz
 KPheYyWKhA01Axfao3FvaCNM+9CHsSQl3oEMR9r2kxoTfKUR7Q4sufE+3uMyF38HE+ui
 eSPaSL3e6Kua8Pw20dCkwtAK0zQvanUv/YpeHFm2h9CZguBTnH+SDrq2NaxaXXXmfnTz
 CqnoSpeoILGn58eURvB6VYNTSG+/gybXx9aampfhGZderR2NIqVOMT+Fk0xFdCMYAH7Y
 cdWPSJjWDC+OxEqagmfBNjMpRNIVVm3WDiQreUct5YSKzprRF3oeTUtah94nZw5ipCbM
 wiVQ==
X-Gm-Message-State: AOAM531UwyRH+XRb3qYUzGf1rbpMbKiZftasR95eI0n5kjCpoHKV/nkx
 ZcFWowJtHKP2rsudOKeNbmihX/lrPPBdnKr37A4=
X-Google-Smtp-Source: ABdhPJyUrWzsWDfS3HSJiJQ7VWaIdSeXUxdzLAu5O7xDIfrAtgrCJyrtxBm3U4hnUpKJ44nVuUoQODPCnC+7TT37jR4=
X-Received: by 2002:a9d:7a50:: with SMTP id z16mr21252998otm.292.1590388847915; 
 Sun, 24 May 2020 23:40:47 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 <83k110wxte.fsf@HIDDEN>
In-Reply-To: <83k110wxte.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Mon, 25 May 2020 06:40:11 +0000
Message-ID: <CAOqdjBcdbmU75ChUKAsJ8P8kf+M0ZnTCGfd2tKFi9Vo0KRyDkA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, May 25, 2020 at 2:30 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Sun, 24 May 2020 19:40:09 +0000
> > Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> > What they show you is that memory at a certain address, which they
> > helpfully specify, isn't mapped.
> >
> > You conclude that memory at a totally different address isn't mapped,
> > even though GDB quite explicitly never says so.
> >
> > That conclusion is invalid.
> Your opinion, not mine, not yet anyway.

Maybe I'm approaching this the wrong way: What are you actually planning to do?

I think we should work around the mingw bug on both the master and
emacs-27 branches.

We should also fix the (symbol-related) Emacs bug before it bites us:
on both branches, unless we can get a mingw user to provide the output
of "disassemble Fprog1" (and a bunch of other functions). (OTOH, we've
already decided to keep crashable GC bugs on the emacs-27 branch).

And we should wait and see whether similar crashes keep happening.

What we should not do is encourage people to keep looking for another
Emacs bug based on the existing backtraces.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 25 May 2020 02:30:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 22:30:36 2020
Received: from localhost ([127.0.0.1]:39245 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jd2su-0000IB-Ga
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 22:30:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34174)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jd2st-0000Hz-2U
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 22:30:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41338)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jd2sn-0002w8-EL; Sun, 24 May 2020 22:30:29 -0400
Received: from [176.228.60.248] (port=1382 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jd2sl-0003i5-2k; Sun, 24 May 2020 22:30:28 -0400
Date: Mon, 25 May 2020 05:30:37 +0300
Message-Id: <83k110wxte.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
 (message from Pip Cet on Sun, 24 May 2020 19:40:09 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
 <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sun, 24 May 2020 19:40:09 +0000
> Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> 
> > I use GDB every day in this very "unusual
> > environment", both when debugging Emacs and other programs.
> 
> And you've never run into GDB bugs?

Not such blatant ones, no, and not lately.

> Are you saying the bug I've found isn't "a real trouble"?

I'm saying I'm not convinced that problem has anything to do with this
particular segfault.

> What they show you is that memory at a certain address, which they
> helpfully specify, isn't mapped.
> 
> You conclude that memory at a totally different address isn't mapped,
> even though GDB quite explicitly never says so.
> 
> That conclusion is invalid.

Your opinion, not mine, not yet anyway.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 24 May 2020 19:40:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 15:40:59 2020
Received: from localhost ([127.0.0.1]:38836 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcwUV-0000ib-AD
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 15:40:59 -0400
Received: from mail-ot1-f42.google.com ([209.85.210.42]:35318)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jcwUN-0000i6-He
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 15:40:51 -0400
Received: by mail-ot1-f42.google.com with SMTP id 69so12413225otv.2
 for <41321 <at> debbugs.gnu.org>; Sun, 24 May 2020 12:40:51 -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=SaNZTZAk2E3O2TYeOuZFzDNnTA50frPGKHaWomX1xvA=;
 b=X43FyVEzcEOQaRzGIvKrCRT2ryAyUoHajfvhFXI7ebUA7EY7ogcVjuMZgC38tQrq6j
 japlsINL69qcpPl97+Qg3sEBt8IAylBrYVTuJpS5efIHC/cvRHraHfsoNO2/++8soBsG
 8aVBGz05Fsxo7gP8aLkVDtGH53hKnpo56yp+quOJLsh5DHQNoZ3Invq/VDeW4KuGmbBU
 Rf2K5NLPBhFVkR6xesFTJ8mxxNpU1Ra4ggPyepCU+Fa3UvrIKlS09l8KZtKcOOaMAc1g
 BsX55qcaFYwgSghyU4+UQbUqlf+DeLZS2axgU861UlAplnIyNtKZ/Svc20Pa7ezgwfkW
 Q78g==
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=SaNZTZAk2E3O2TYeOuZFzDNnTA50frPGKHaWomX1xvA=;
 b=KIjzf/UeBGdZ+H/smk2iw41OIcEusEEyID5C1e66xVw+7guiFUxHgRsLwC0pYJ5UjD
 X7TUE5waiYBaBMiEMr25E6JqwNiCCEd3WCZ2Wy/9gC/DUiRc0JhS7vhlxBuvNSlHo2/P
 frVtCNjJlNvnOguCkOvRZ8RxdfNZVQQKjFsYR3Dw12R9Ao7TZ89BQnBg88XfHmvNblds
 b9f5dCCYGucu4UrFKlXvImsjWdtALscM2I4DBi83ZUxe2+yHm/jJYgEYI28FXBhZsMfb
 hINk/LZ0y9Ffr2H0StupKeRuDxFbUAwnVpHSkjw3rY4hz6FVdPEcWVNf7wpEu2rfu5XR
 kXqw==
X-Gm-Message-State: AOAM531MModdUA0/qdT0xiL1wuY1xd9O1lOAJVoODrmhzPEatstQG/uG
 IFpTSqo971l8RNBadO9VoNG0+BH8JhCODwV6z9U=
X-Google-Smtp-Source: ABdhPJy8KiErZokPJLEvxcIoUTikGtPpmMsloPI6tUEpOuo1HZegWBV/aIYwdaPgmF9JkKH7Hn4watafC7+7K42VrWM=
X-Received: by 2002:a05:6830:61b:: with SMTP id
 w27mr16605196oti.154.1590349245522; 
 Sun, 24 May 2020 12:40:45 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 <83mu5xw50d.fsf@HIDDEN>
In-Reply-To: <83mu5xw50d.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sun, 24 May 2020 19:40:09 +0000
Message-ID: <CAOqdjBfeCNALm=S969A_9AG5Bq6q5pkSiP+DZWhrpk1QE52RkQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, May 24, 2020 at 6:40 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Sun, 24 May 2020 18:03:57 +0000
> > Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> >
> > > If you still claim that I didn't demonstrate that the buffer's overlay
> > > chain got corrupted
> >
> > I do, of course. The message GDB prints simply does not say anything
> > problematic about the buffer's overlay chain.
> >
> > > as part of the bug that caused the segfault,
> > > please point out what I missed here.
> >
> > You omitted the third call to xtype, which was even more clearly
> > nonsensical: xtype was misbehaving. We don't know in which way it was
> > misbehaving. So there's no evidence either way.
> >
> > FWIW, running into gdb bugs is something that happens to me almost on
> > a regular basis. There's no point reporting those, as there's
> > generally no response. In your case, you're in an unusual environment
> > with a rather large and complicated .gdbinit file which does very
> > strange things to avoid running into GDB bugs that we know about. All
> > that increases the likelihood of your encountering a gdb bug that no
> > one else has, or that has been reported but never responded to.
>
> I don't buy this, sorry.

So you think there's a second bug, located in Emacs, which causes GDB,
which isn't supposed to be broken by anything the debuggee does, to be
broken and respond in nonsensical ways?

> I use GDB every day in this very "unusual
> environment", both when debugging Emacs and other programs.

And you've never run into GDB bugs?

> The
> probability of these being due to some bug in GDB or in .gdbinit
> commands is very low, as I and others use them all the time.

I'm perfectly willing to help you trace down this bug (in GDB or
.gdbinit; we've already found the bug in mingw and the one in Emacs)
if it serves any purpose, but I suspect you don't have the time.

But I can't conceive of an explanation in which a bug in Emacs could
cause a bug-free GDB to respond in the nonsensical way your last
invocation of xtype did.

> It is much more probable that the commands I've shown are signs of a real
> trouble in Emacs and not in GDB.

Are you saying the bug I've found isn't "a real trouble"? I'm curious
as to what trouble you're imagining.

> I'm not willing to disregard what
> those commands show me because they don't match your theory.

What they show you is that memory at a certain address, which they
helpfully specify, isn't mapped.

You conclude that memory at a totally different address isn't mapped,
even though GDB quite explicitly never says so.

That conclusion is invalid.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 24 May 2020 19:10:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 15:10:26 2020
Received: from localhost ([127.0.0.1]:38747 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcw0w-0008Nu-GZ
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 15:10:26 -0400
Received: from mail-ot1-f51.google.com ([209.85.210.51]:34752)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jcw0g-0008NL-Gn
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 15:10:25 -0400
Received: by mail-ot1-f51.google.com with SMTP id b18so12375748oti.1
 for <41321 <at> debbugs.gnu.org>; Sun, 24 May 2020 12:10:10 -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=gPnSx2BsHkjdX0KbbiptYAXmiMn5SNbKDMldjRQH+2s=;
 b=gg6jGpLEqlNPEieSYjf3qhEaeFyWeOEPT/FgWkQxJjnv7JuY5qag0KpiV9qrtoynx2
 QCLwxo/69Eo3Dg6exfDkozMsWyRoZlIDu19GUDWAULNPt+VJF0ooiwev9/0WyGwkycsT
 9V8/bhPqKjyWJy91Hjb3UpTmpoCpPKCaTc29+3FRm7tTqQcVkse/JuO3w5Vkl6D/BhGF
 eUlh8UMCy6frqtvyGR38H2KHRlTqW2XTcBvEGbybG6IrKfX5QgLOGiDCsiX+mibQwnjy
 R/IrlA/IFE2pMehztfV2T7Hfjh6NYRWAEjCQPD/GhNP1sz0/QQUdzXGBP5Rv/XwPj4KX
 IFGQ==
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=gPnSx2BsHkjdX0KbbiptYAXmiMn5SNbKDMldjRQH+2s=;
 b=Z32lPMHvhyKDGwcr2vvGMld/AvRo/0mzdGA/tDlvsbWv/JB19vUwchQcDPakRjomaD
 xHEbuHh+90pUuYMCoqNaIP3wloKmrvL9161aBF8ir1cIE9E6UXS1WqMkzrIdghdAgwcU
 /4uraPZwJQCdjOeAQ5BzFPKQJM2R+ReHKWFJCUkqmzDP96GhIo794pLtBkd4l0LSAVak
 Yn813aIkDdmkPZvRUbcy4HWBdqF9vhADUa4pu0mD8paPLnOQn7hyeY/h7uDg10jKRprL
 nK9Qb2z2bMwPRTTilOHDby2t1QzXwS6xfzF4RjOQm3lG/sBh2mAxapKtiIjNlyF88i0r
 k5kw==
X-Gm-Message-State: AOAM531LZcHBskDbJGmR2XBGi5uLN7/fRpDGyU1Jh7AuhX8HE9QwnhS5
 D/mgYea8fDPafBz+FT95WUUR1tdzSoIA+r+7RyA=
X-Google-Smtp-Source: ABdhPJxySqqSQk3yC+570zDliVSOIfCLi5w+98gsCVple0kAC1X+DSl7Q06a0wJogtue9rfMZxZj5+LWfw0IFRgHkKk=
X-Received: by 2002:a05:6830:61b:: with SMTP id
 w27mr16538372oti.154.1590347404985; 
 Sun, 24 May 2020 12:10:04 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83zha8cgpi.fsf@HIDDEN> <86tv05noov.fsf@HIDDEN>
In-Reply-To: <86tv05noov.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sun, 24 May 2020 19:09:28 +0000
Message-ID: <CAOqdjBdvMr=nX-290HY5JHYWeh+oO1OEHQkFs8RYci2rhd2VKw@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Andy Moreton <andrewjmoreton@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, May 24, 2020 at 7:01 PM Andy Moreton <andrewjmoreton@HIDDEN> wrote:
> > So your flavor is even more broken than what Debian ships? That's
> > interesting, which flavor is it?
>
> FYI, there are two separate projects:
>   mingw.org: 32bit only.
>   mingw-w64: 32bit and 64bit, using a different C runtime.
>
> On my machine a simple test program shows:
>
> --------------------------------------------------------------
>   project     gcc     cpu   alignof(max_align_t)
> --------------------------------------------------------------
> mingw.org   9.2.0    i686   16
> mingw-w64  10.1.0    i686   16 (stdint.h before stddef.h)
>                              8 (stdint.h after  stddef.h)
> mingw-w64  10.1.0  x86_64   16
> --------------------------------------------------------------

Thanks!

> This problem only appears with the 32bit mingw-w64 toolchain.

FWIW, the problem is that the incorrect value of 16 is returned in
some cases. All 32bit toolchains appear to be broken. I said that
mingw.org was "more broken" than mingw-w64 because it _always_ returns
the incorrect value, rather than doing so only for an unfortunate
combination of #includes.

> Eli uses the mingw.org toolchain. Linux distros initially used
> mingw.org, but switched to mingw-w64 cross compilers several years ago.

I couldn't get the mingw.org toolchain to work at all...




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 May 2020 19:00:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 15:00:29 2020
Received: from localhost ([127.0.0.1]:38739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcvrJ-000877-Af
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 15:00:29 -0400
Received: from lists.gnu.org ([209.51.188.17]:41216)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1jcvrH-000870-Tq
 for submit <at> debbugs.gnu.org; Sun, 24 May 2020 15:00:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34876)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1jcvrH-0000vu-Jd
 for bug-gnu-emacs@HIDDEN; Sun, 24 May 2020 15:00:27 -0400
Received: from ciao.gmane.io ([159.69.161.202]:56466)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1jcvrG-0002RB-H0
 for bug-gnu-emacs@HIDDEN; Sun, 24 May 2020 15:00:27 -0400
Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1jcvrB-000KNS-Ro
 for bug-gnu-emacs@HIDDEN; Sun, 24 May 2020 21:00:21 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Andy Moreton <andrewjmoreton@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
Date: Sun, 24 May 2020 20:00:16 +0100
Message-ID: <86tv05noov.fsf@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
Cancel-Lock: sha1:ChM2o76/gfGWWPTrWwWh2kJVeu4=
Received-SPF: pass client-ip=159.69.161.202;
 envelope-from=geb-bug-gnu-emacs@HIDDEN; helo=ciao.gmane.io
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/24 13:37:56
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: 3
X-Spam_score: 0.3
X-Spam_bar: /
X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001,
 FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)

On Sun 24 May 2020, Pip Cet wrote:

> On Sun, May 24, 2020 at 2:24 PM Eli Zaretskii <eliz@HIDDEN> wrote:
>> > From: Pip Cet <pipcet@HIDDEN>
>> > Date: Sat, 23 May 2020 23:54:17 +0000
>> > Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
>> >
>> > I think I've worked it out: it's this mingw bug:
>> > https://sourceforge.net/p/mingw-w64/bugs/778/
>>
>> Thank you for working on this tricky problem.
>>
>> FTR, I don't use that flavor of MinGW.
>
> So your flavor is even more broken than what Debian ships? That's
> interesting, which flavor is it?

FYI, there are two separate projects:
  mingw.org: 32bit only.
  mingw-w64: 32bit and 64bit, using a different C runtime.

On my machine a simple test program shows:

--------------------------------------------------------------
  project     gcc     cpu   alignof(max_align_t)
--------------------------------------------------------------
mingw.org   9.2.0    i686   16
mingw-w64  10.1.0    i686   16 (stdint.h before stddef.h)
                             8 (stdint.h after  stddef.h)
mingw-w64  10.1.0  x86_64   16
--------------------------------------------------------------

This problem only appears with the 32bit mingw-w64 toolchain.

Eli uses the mingw.org toolchain. Linux distros initially used
mingw.org, but switched to mingw-w64 cross compilers several years ago.

    AndyM





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 24 May 2020 18:40:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 14:40:39 2020
Received: from localhost ([127.0.0.1]:38707 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcvY7-0007XI-0O
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 14:40:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54040)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jcvXz-0007Wv-MH
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 14:40:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35980)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jcvXu-0008QH-2w; Sun, 24 May 2020 14:40:26 -0400
Received: from [176.228.60.248] (port=4283 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jcvXt-0007t3-Fi; Sun, 24 May 2020 14:40:25 -0400
Date: Sun, 24 May 2020 21:40:34 +0300
Message-Id: <83mu5xw50d.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
 (message from Pip Cet on Sun, 24 May 2020 18:03:57 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
 <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sun, 24 May 2020 18:03:57 +0000
> Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> 
> > If you still claim that I didn't demonstrate that the buffer's overlay
> > chain got corrupted
> 
> I do, of course. The message GDB prints simply does not say anything
> problematic about the buffer's overlay chain.
> 
> > as part of the bug that caused the segfault,
> > please point out what I missed here.
> 
> You omitted the third call to xtype, which was even more clearly
> nonsensical: xtype was misbehaving. We don't know in which way it was
> misbehaving. So there's no evidence either way.
> 
> FWIW, running into gdb bugs is something that happens to me almost on
> a regular basis. There's no point reporting those, as there's
> generally no response. In your case, you're in an unusual environment
> with a rather large and complicated .gdbinit file which does very
> strange things to avoid running into GDB bugs that we know about. All
> that increases the likelihood of your encountering a gdb bug that no
> one else has, or that has been reported but never responded to.

I don't buy this, sorry.  I use GDB every day in this very "unusual
environment", both when debugging Emacs and other programs.  The
probability of these being due to some bug in GDB or in .gdbinit
commands is very low, as I and others use them all the time.  It is
much more probable that the commands I've shown are signs of a real
trouble in Emacs and not in GDB.  I'm not willing to disregard what
those commands show me because they don't match your theory.  I prefer
facts.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 24 May 2020 18:04:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 14:04:41 2020
Received: from localhost ([127.0.0.1]:38650 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcuzI-0006f9-Qw
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 14:04:41 -0400
Received: from mail-ot1-f51.google.com ([209.85.210.51]:38603)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jcuzI-0006ew-3J
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 14:04:40 -0400
Received: by mail-ot1-f51.google.com with SMTP id o13so12300935otl.5
 for <41321 <at> debbugs.gnu.org>; Sun, 24 May 2020 11:04:40 -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=AadenALC9XcefOWndGXdd48cEQ8Zm9n2scqMnBtIHuk=;
 b=TI/D2Wc4vPSRXkstjbv/bUPQNw3eWUFuoMi+osmo4suX2g3LQWogrI6DxyeReTS6Oz
 nAGUIAm7p07LHbNepyVeW5VEGfJ7e5wrp203dWehk1uFePyt1kfBENOqQuEJ3rSyL1mF
 uPQBF1qM6pQgLOzsVV0H+RjEdyxKmrXXmRXR37G1oU+TH213y3QTmpv3OQ+4asII4vMu
 nR2F6OikR6/ldh6tCEG4Ly2t5DpBFJoTJ5btUObfXhK2FVCfjrxuLjFnapfTMW7w53DZ
 oVRC59WSDxnvghDP0aMX5xH3w9KGYoojGCWWw2WudznIk1Ajp8H3wKobHwHKt6jKUp9b
 CxCg==
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=AadenALC9XcefOWndGXdd48cEQ8Zm9n2scqMnBtIHuk=;
 b=mjKVTc85ziCqjcdZ2j35k1R1LLIQ/6bH9oVzZOgD2ZyS/+wwB6Z7xLvgbamNRWq25F
 AJFlfuUMubBL6AuTAZPFRlZOaSAJLuBEjNuirUME+PRlYnACY88ThxGV07YkwBTKfaKY
 RC4YW91fCsTcLMbB2DtIxyvEnA+Bmpfp1xADRcaMwOPobtee2hlwwMta3i9qZ4SN2xYs
 7uJJmgK/uk7p9gKN+EdSBa98ZGTjrjh5IeHqxhm9PQPbRb1jPa3VAxnLBpR5nI1EckvC
 83g1C0EGyvN9JVZg2ChUsd77g45/pyC3o3GkPpVzy9kyzbEtJsrBOax8/iTgzZUO20gM
 ToOA==
X-Gm-Message-State: AOAM531db1rOdJLNNN1cRK+yGP4fcid+kSuT+5Gr5dDQStmwcHcLLHYV
 JBu1KeADJjL2vqprKPQ+qMlD/6sgu53alkTYZQE=
X-Google-Smtp-Source: ABdhPJz4ho4WHuXhRDBVvs7UftLYjDKijmcxlGTY1qJiSQuXyJDIEqOV594EyqLTCYgmf0K+6Naxb0ve5TxhT+9Ib1c=
X-Received: by 2002:a05:6830:61b:: with SMTP id
 w27mr16381061oti.154.1590343474468; 
 Sun, 24 May 2020 11:04:34 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN> <83r1v9w9vi.fsf@HIDDEN>
In-Reply-To: <83r1v9w9vi.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sun, 24 May 2020 18:03:57 +0000
Message-ID: <CAOqdjBetfK+4beScdosoduVbMfD7pmO6D0s8YamXo-K0nTkn3g@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, May 24, 2020 at 4:55 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> And here's a reminder from how the same looked in the session that> segfaulted:
>
>   (gdb) p current_buffer->overlays_before
>   $28 = (struct Lisp_Overlay *) 0x170cb080
>   (gdb) p $28->start
>   $29 = XIL(0xa0000000170cb040)
>   (gdb) xtype
>   Lisp_Vectorlike
>   Cannot access memory at address 0x18ac04f8

That should read "Cannot access memory at address 0x170cb080". It
doesn't. It doesn't tell you whether the memory at page 0x170cb000 is
mapped, because gdb, for whatever reason (a bug in .gdbinit, a bug in
gdb, some weird command entered at the gdb prompt before the
transcript started, or even, as you yourself suggested, somehow as the
result of the memory corruption that caused the crash), looked in the
wrong place.

Instead, it tells you that the page at 0x18ac0000 isn't mapped. Which we knew.

>   (gdb) p $28->next
>   $30 = (struct Lisp_Overlay *) 0x13050320
>   (gdb) p $28->next->start
>   $31 = XIL(0xa000000016172310)
>   (gdb) xtype
>   Lisp_Vectorlike
>   Cannot access memory at address 0x18ac04f8

Same here. It should read "Cannot access memory at address 0x16172310".

> If you still claim that I didn't demonstrate that the buffer's overlay
> chain got corrupted

I do, of course. The message GDB prints simply does not say anything
problematic about the buffer's overlay chain.

> as part of the bug that caused the segfault,
> please point out what I missed here.

You omitted the third call to xtype, which was even more clearly
nonsensical: xtype was misbehaving. We don't know in which way it was
misbehaving. So there's no evidence either way.

FWIW, running into gdb bugs is something that happens to me almost on
a regular basis. There's no point reporting those, as there's
generally no response. In your case, you're in an unusual environment
with a rather large and complicated .gdbinit file which does very
strange things to avoid running into GDB bugs that we know about. All
that increases the likelihood of your encountering a gdb bug that no
one else has, or that has been reported but never responded to.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 24 May 2020 16:55:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 12:55:34 2020
Received: from localhost ([127.0.0.1]:38560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jctuQ-0002sR-C5
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 12:55:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47158)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jctuO-0002sE-QT
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 12:55:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34503)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jctuJ-0008B1-4L; Sun, 24 May 2020 12:55:27 -0400
Received: from [176.228.60.248] (port=1793 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jctuD-0007VW-EI; Sun, 24 May 2020 12:55:25 -0400
Date: Sun, 24 May 2020 19:55:29 +0300
Message-Id: <83r1v9w9vi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: pipcet@HIDDEN
In-Reply-To: <83y2phwb9x.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 24
 May 2020 19:25:14 +0300)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 <83y2phwb9x.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 24 May 2020 19:25:14 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
> 
> > > I still very much doubt that this has anything to do with stack
> > > marking during GC, since I've shown in my backtrace that
> > > current_buffer->overlays_before points to an overlay with invalid
> > > markers.
> > 
> > You haven't.
> 
> Of course, I have.

Here's how healthy overlays look in a healthy buffer:

  (gdb) p current_buffer->overlays_after
  $10 = (struct Lisp_Overlay *) 0x0
  (gdb) p current_buffer->overlays_before
  $11 = (struct Lisp_Overlay *) 0x7728258
  (gdb) p $11->start
  $12 = XIL(0xa000000007728218)
  (gdb) xtype
  Lisp_Vectorlike
  PVEC_MARKER
  (gdb) xmarker
  $13 = (struct Lisp_Marker *) 0x7728218
  (gdb) p *$
  $14 = {
    header = {
      size = 1124081664
    },
    buffer = 0x728fc38,
    need_adjustment = 0,
    insertion_type = 0,
    next = 0x765eae8,
    charpos = 13968,
    bytepos = 13968
  }
  (gdb) p $11->next
  $15 = (struct Lisp_Overlay *) 0x0

And here's a reminder from how the same looked in the session that
segfaulted:

  (gdb) p current_buffer->overlays_before
  $28 = (struct Lisp_Overlay *) 0x170cb080
  (gdb) p $28->start
  $29 = XIL(0xa0000000170cb040)
  (gdb) xtype
  Lisp_Vectorlike
  Cannot access memory at address 0x18ac04f8
  (gdb) p $28->next
  $30 = (struct Lisp_Overlay *) 0x13050320
  (gdb) p $28->next->start
  $31 = XIL(0xa000000016172310)
  (gdb) xtype
  Lisp_Vectorlike
  Cannot access memory at address 0x18ac04f8
  (gdb) p current_buffer->overlays_after
  $32 = (struct Lisp_Overlay *) 0x0
  (gdb) p $28->next->next
  $33 = (struct Lisp_Overlay *) 0x0

If you still claim that I didn't demonstrate that the buffer's overlay
chain got corrupted as part of the bug that caused the segfault,
please point out what I missed here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 24 May 2020 16:25:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 12:25:13 2020
Received: from localhost ([127.0.0.1]:38505 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jctR3-00027z-D9
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 12:25:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44740)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jctR2-00027m-1C
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 12:25:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34167)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jctQw-0002qO-Ac; Sun, 24 May 2020 12:25:06 -0400
Received: from [176.228.60.248] (port=3660 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jctQu-0002e0-KH; Sun, 24 May 2020 12:25:05 -0400
Date: Sun, 24 May 2020 19:25:14 +0300
Message-Id: <83y2phwb9x.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
 (message from Pip Cet on Sun, 24 May 2020 15:00:36 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
 <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sun, 24 May 2020 15:00:36 +0000
> Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> > FTR, I don't use that flavor of MinGW.
> 
> So your flavor is even more broken than what Debian ships?

Why _more_ broken?

> That's interesting, which flavor is it?

mingw.org's MinGW.

> > Isn't that strange?  Lisp data is allocated via lmalloc, AFAIK, and
> > lmalloc is supposed to guarantee LISP_ALIGNMENT alignment.  Or am I
> > missing something?
> 
> No, it relies on the compile-time constants and never checks.

So that is the bug to fix, no?

> > I still very much doubt that this has anything to do with stack
> > marking during GC, since I've shown in my backtrace that
> > current_buffer->overlays_before points to an overlay with invalid
> > markers.
> 
> You haven't.

Of course, I have.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 24 May 2020 15:01:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 11:01:22 2020
Received: from localhost ([127.0.0.1]:38472 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcs7t-0000EH-VC
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 11:01:22 -0400
Received: from mail-ot1-f50.google.com ([209.85.210.50]:36184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jcs7r-0000E1-NY
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 11:01:20 -0400
Received: by mail-ot1-f50.google.com with SMTP id h7so12092809otr.3
 for <41321 <at> debbugs.gnu.org>; Sun, 24 May 2020 08:01:19 -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=HHje3StXqblbWj6o2C9lFSZcqQEWFY7CuVzKH9Y/MwE=;
 b=EQL1XPeePTMm44Ymk+TkRdiVyesYNUUQMUwwvSyRJAM94w0mKNqTomLaaFbo/1Rivh
 k9xU4xOrz7LFY5JrDqGDgEL6BRL+g/Nh3KhSFjLa0ySd66iYrzeEwOPKXeKYzJhCA8Sz
 hfDH0XfgsQZg1avgsuXzhg7mZl5m1joN8StIEsEGuD65wDGS72wn+SL6HVzn1lKjtNzT
 IdtQN0JW4VgFS+O7GWwcUTjerE+J6b1EiEYMZQVUckGXbhRteONsipldhfAjGLk3oWL9
 53ufy1yjRzXhadb4McuMEZBTIVJfCTUcGfYZGum72pam9CI6JwkBvYc/9vm2Y86Ftluu
 T7fA==
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=HHje3StXqblbWj6o2C9lFSZcqQEWFY7CuVzKH9Y/MwE=;
 b=U/sMIpR9ZvTpws3CjxyBT8nyWa8uznJFD6IVahdXjclcR3875padXLAXDOuIrQy8eS
 bRdOE4W6Svn79pT672K+o/YSq2SXqTuxGWLZrSNHHge1uTsbFFSPfGEhxL6APDPmBbyX
 wzSwGASZZzwA9cwRmT60lLEdwgaeKNOr4Taeu+p+3s5Q7lBHeAPDkObU0A/0Ic51cMq5
 +taYu3uxITXTCJHV2AZzZtlbjOS6Q+6QcPumEqTeBASq698yN/L1BEpx/5JWGwLiilJA
 BqESOamPSvxk8/AcwDjOTyBYCl6ibWj2zeEX7JRE9f2JQVlb3/eUY+6X9z9rRVFS7tkJ
 1Szw==
X-Gm-Message-State: AOAM532VO2QpZtNOhDlM+82aB9ssrUDMsGlxC3LBfvrfYfzBCtuB+q96
 G9MpBeFGbufIL+VbY59r+Xf3jeFxHeYC8N9QYsxCek0gLUo=
X-Google-Smtp-Source: ABdhPJy7i/Um9c4AGo6I3e6eKlq8dRmPrzIDRqV03KKLblyTBCCgsp6MsRDmuPpkWmtMGXAC/vdrte4rI/vp/JLIypE=
X-Received: by 2002:a05:6830:61b:: with SMTP id
 w27mr15901947oti.154.1590332473029; 
 Sun, 24 May 2020 08:01:13 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 <83h7w5xvfa.fsf@HIDDEN>
In-Reply-To: <83h7w5xvfa.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sun, 24 May 2020 15:00:36 +0000
Message-ID: <CAOqdjBcg+Uaqp3=UUxjNEcO7fSWMLevmv55YbYJU2ZOhDaKbJA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, May 24, 2020 at 2:24 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Sat, 23 May 2020 23:54:17 +0000
> > Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> >
> > I think I've worked it out: it's this mingw bug:
> > https://sourceforge.net/p/mingw-w64/bugs/778/
>
> Thank you for working on this tricky problem.
>
> FTR, I don't use that flavor of MinGW.

So your flavor is even more broken than what Debian ships? That's
interesting, which flavor is it?

> > On mingw, if <stdint.h> is included before/instead of stddef.h,
> > alignof (max_align_t) == 16.
>
> The problem with the order of inclusion doesn't exist in my header
> files, so alignof (max_align_t) is always 16.

Okay, so that is our bug.

> > However, as can be seen by the backtrace
> > above, Eli's malloc only returned an 8-byte-aligned block.
>
> Isn't that strange?  Lisp data is allocated via lmalloc, AFAIK, and
> lmalloc is supposed to guarantee LISP_ALIGNMENT alignment.  Or am I
> missing something?

No, it relies on the compile-time constants and never checks.

The relevant code is:

enum { MALLOC_IS_LISP_ALIGNED = alignof (max_align_t) % LISP_ALIGNMENT == 0 };

static bool
laligned (void *p, size_t size)
{
  return (MALLOC_IS_LISP_ALIGNED || (intptr_t) p % LISP_ALIGNMENT == 0
      || size % LISP_ALIGNMENT != 0);
}

... so laligned is a constant "true" function on your machine, since
alignof (max_align_t) is 16 and LISP_ALIGNMENT is 16.

static void *
lmalloc (size_t size, bool clearit)
{
#ifdef USE_ALIGNED_ALLOC
  if (! MALLOC_IS_LISP_ALIGNED && size % LISP_ALIGNMENT == 0)
    {
      void *p = aligned_alloc (LISP_ALIGNMENT, size);
      if (clearit && p)
    memclear (p, size);
      return p;
    }
#endif

  while (true)
    {
      void *p = clearit ? calloc (1, size) : malloc (size);
      if (laligned (p, size))
    return p;
      free (p);
      size_t bigger = size + LISP_ALIGNMENT;
      if (size < bigger)
    size = bigger;
    }
}

That optimizes down to returning the malloc/calloc return value directly.

IOW, alloc.c relies on malloc() being max_align_t-aligned, and never
checks, not even in debug builds. That's something that needs to be
fixed, since broken-malloc environments such as yours exist.

> > That's not normally a problem, because mark_maybe_object doesn't
> > care about alignment; but in conjunction with the gcc behavior
> > change, we rely or mark_maybe_pointer to mark the pointer, and it
> > doesn't, because the pointer is not aligned to a LISP_ALIGNMENT =
> > 16-byte boundary.
>
> I still very much doubt that this has anything to do with stack
> marking during GC, since I've shown in my backtrace that
> current_buffer->overlays_before points to an overlay with invalid
> markers.

You haven't.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 24 May 2020 14:24:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 10:24:43 2020
Received: from localhost ([127.0.0.1]:38417 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcrYR-0007l9-96
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 10:24:43 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36132)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jcrYQ-0007ky-3A
 for 41321 <at> debbugs.gnu.org; Sun, 24 May 2020 10:24:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60876)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jcrYK-00066X-Q2; Sun, 24 May 2020 10:24:36 -0400
Received: from [176.228.60.248] (port=4136 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jcrYK-0007t9-95; Sun, 24 May 2020 10:24:36 -0400
Date: Sun, 24 May 2020 17:24:41 +0300
Message-Id: <83h7w5xvfa.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
 (message from Pip Cet on Sat, 23 May 2020 23:54:17 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sat, 23 May 2020 23:54:17 +0000
> Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> I think I've worked it out: it's this mingw bug:
> https://sourceforge.net/p/mingw-w64/bugs/778/

Thank you for working on this tricky problem.

FTR, I don't use that flavor of MinGW.

> On mingw, if <stdint.h> is included before/instead of stddef.h,
> alignof (max_align_t) == 16.

The problem with the order of inclusion doesn't exist in my header
files, so alignof (max_align_t) is always 16.

> However, as can be seen by the backtrace
> above, Eli's malloc only returned an 8-byte-aligned block.

Isn't that strange?  Lisp data is allocated via lmalloc, AFAIK, and
lmalloc is supposed to guarantee LISP_ALIGNMENT alignment.  Or am I
missing something?

> That's not normally a problem, because mark_maybe_object doesn't
> care about alignment; but in conjunction with the gcc behavior
> change, we rely or mark_maybe_pointer to mark the pointer, and it
> doesn't, because the pointer is not aligned to a LISP_ALIGNMENT =
> 16-byte boundary.

I still very much doubt that this has anything to do with stack
marking during GC, since I've shown in my backtrace that
current_buffer->overlays_before points to an overlay with invalid
markers.  And GC always marks buffer's overlays (and thus their
markers), as can be seen in mark_buffer.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 23 May 2020 23:55:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 19:55:02 2020
Received: from localhost ([127.0.0.1]:36052 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcdyn-00013X-U9
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 19:55:02 -0400
Received: from mail-ot1-f49.google.com ([209.85.210.49]:41818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jcdyl-00013J-AO
 for 41321 <at> debbugs.gnu.org; Sat, 23 May 2020 19:55:00 -0400
Received: by mail-ot1-f49.google.com with SMTP id 63so11234624oto.8
 for <41321 <at> debbugs.gnu.org>; Sat, 23 May 2020 16:54:59 -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=nNMERfQAzD6KoLPSM2yvIapughRDq7+jStSuuDJNfAk=;
 b=uSMmBamnj/Cb7TbE1hMw8LsCdQgr1c2DOO+ZAIE8w1Ai49Ty6SGOtgNhkisawEjNI8
 YKN9FPrFftqblQJ808U1FDcarKz/jrsj6nU8/XcFemxCKF5rszIOmULaaaWSOk1/T1en
 fftn4ummsT66ApaCbSeShY1OKJZAGFBUb4WdePS+MDqA7aFwA298DnofcAvGmBOCZ2eM
 ggFHUwdNkG29Yt+I5g6JvS7ngYd6paJMXIqVbds9MOSzvd4/dZVKt8tJwqU6jWtqbjRl
 7YN1z2Bk4TMOQljm1u4vpvhvCj8U18fTDwjdhbxJIAw1lewO5XzzvtN5+jP389o+ky7E
 0kQQ==
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=nNMERfQAzD6KoLPSM2yvIapughRDq7+jStSuuDJNfAk=;
 b=eQiTJjx5nHCqe3mTo6/E0jjU0JbyKGRBHJAtT0XdorXSlMNW7HcrsZVzytToBPKDsl
 Xi+x2K+uYFcJ7LUeSN+CnGj/8Bq8/92APF0X5c4WZ0VmnMyE9H73WkkmAnjPa2/hv02i
 aUl4hAkYaHkcQebNLHnMVmKNafX1KUtULi662CqpQ4QKeRIp6t2aCYQQRXWWClxaXVbh
 tM1i6DpQl9WBJ0vpeyrRc3Hah1rG+9zVECLUQhI5dSSi+zm1bPuKsm8FyDSrsiFIONsP
 qzmX9mas8sJBVgQDaqiLSfXoMxD7eoR82VjsQR6TBGcfYLnJhckzO5RPbEpeaYvMZsqu
 8+aQ==
X-Gm-Message-State: AOAM530VCaZnnYdNhsK1n+rQmwEFHrW3mKZxWaoM37GURDXHs031Iwju
 o5mD0N13fXlF06Uzx4pofKfp25SHJF2sDRXm+dw=
X-Google-Smtp-Source: ABdhPJx9uoU1tJZFt74Bz8I3C+wzbgHX02E6C+IuuOUkDKmQfhPtt2L6z8UuI1aj/Q/86RVtLkaxYKkmGoygYoR/vZo=
X-Received: by 2002:a05:6830:61b:: with SMTP id
 w27mr13946665oti.154.1590278093620; 
 Sat, 23 May 2020 16:54:53 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
In-Reply-To: <831rncjuwf.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 23 May 2020 23:54:17 +0000
Message-ID: <CAOqdjBeAFGTKgBOYSEBzRxFqVL+DOWFkVva4OohCOq2iAa1iEw@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000dd5c7505a6597855"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000dd5c7505a6597855
Content-Type: text/plain; charset="UTF-8"

On Fri, May 22, 2020 at 7:22 AM Eli Zaretskii <eliz@HIDDEN> wrote:
>   #0  PSEUDOVECTORP (code=<optimized out>, a=<optimized out>) at lisp.h:1720
>   #1  MARKERP (x=<optimized out>) at lisp.h:2618
>   #2  CHECK_MARKER (x=XIL(0xa000000018ac0518)) at marker.c:133
>   #3  0x010f073c in Fmarker_position (marker=XIL(0xa000000018ac0518))
>       at marker.c:452

I think I've worked it out: it's this mingw bug:
https://sourceforge.net/p/mingw-w64/bugs/778/

On mingw, if <stdint.h> is included before/instead of stddef.h,
alignof (max_align_t) == 16. However, as can be seen by the backtrace
above, Eli's malloc only returned an 8-byte-aligned block. That's not
normally a problem, because mark_maybe_object doesn't care about
alignment; but in conjunction with the gcc behavior change, we rely or
mark_maybe_pointer to mark the pointer, and it doesn't, because the
pointer is not aligned to a LISP_ALIGNMENT = 16-byte boundary.

Brute-force patch attached until we can work out how to fix this properly.

--000000000000dd5c7505a6597855
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Accept-unaligned-pointers-in-maybe_lisp_pointer.patch"
Content-Disposition: attachment; 
	filename="0001-Accept-unaligned-pointers-in-maybe_lisp_pointer.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_kakafz8k0>
X-Attachment-Id: f_kakafz8k0

RnJvbSBhYmI3OWJmMzM2MjJiNGU4NDA3NTY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ci0tIAoyLjI3LjAucmMwCgo=
--000000000000dd5c7505a6597855--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 23 May 2020 23:26:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 19:26:20 2020
Received: from localhost ([127.0.0.1]:36038 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcdX2-0000OX-MU
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 19:26:20 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31785)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1jcdX0-0000OK-Ho
 for 41321 <at> debbugs.gnu.org; Sat, 23 May 2020 19:26:19 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id ECD7080ACA;
 Sat, 23 May 2020 19:26:12 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4EB73806C9;
 Sat, 23 May 2020 19:26:11 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1590276371;
 bh=qEQ6paaPSLqQuT65VhRFvN0kArzeK79CUfJj6bGGa5k=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=fceitrq0Y92h9SY/GCVCVePRs1d2FtcBTmocgTapoMBdqlzBtEj7BX+bXz6KIY2rM
 rPZwk3PFffrWvcdByJaB9hTKB6XgMn6EkXoJJYHn/FxC6LJDFhWGeCTRljqd/mnXKh
 uvjY4GEEAydg31HpqtaZSj385cZ2DFphp7efXTaZwkZkFvd6Udzt0I2yOAIm2hrUWz
 ZqO3qAef2aXqEjOMFmew1OHjcOGzOnQlDsIG7IZ73paaY/T3+pVgZHIm4lF38lUcL/
 V0MSyZKaAlU/ci875ZYpVCbBLzRi1Ydk3+LutazQJA3i6SaHNXuFXppZdxQ8XqugD+
 mgLTIC0mZ82ow==
Received: from alfajor (unknown [216.154.27.250])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BC41A1202C1;
 Sat, 23 May 2020 19:26:10 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
Message-ID: <jwv367qjktv.fsf-monnier+emacs@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
 <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
 <83blmg2ggi.fsf@HIDDEN> <xjfpnawvxru.fsf@HIDDEN>
 <834ks73i8n.fsf@HIDDEN>
 <CAOqdjBdpU4U1NqErNH0idBmUxNeE3fL=2=KKpo9kbCM3DhW5gA@HIDDEN>
 <xjfblmev8hw.fsf@HIDDEN> <jwvh7w6jn4j.fsf-monnier+emacs@HIDDEN>
 <CAOqdjBcw68E5vFSwDJzU1cZ7JXr5gK29ZAiMzAXWkvsZvfKL5w@HIDDEN>
Date: Sat, 23 May 2020 19:26:09 -0400
In-Reply-To: <CAOqdjBcw68E5vFSwDJzU1cZ7JXr5gK29ZAiMzAXWkvsZvfKL5w@HIDDEN>
 (Pip Cet's message of "Sat, 23 May 2020 22:41:41 +0000")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.094 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Andrea Corallo <akrl@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> This shouldn't be a problem: wide-int builds use MSB tagging, so all
>> Lisp_Objects which contain a pointer have their lowest 32bits exactly
>> identical to that pointer (and the higher 32bits just contain the tag).
> As I said, I don't believe that's true for symbols.  Qnil is always
> binary 0, so we offset all symbols by the offset of lispsym.

Oh, right, good point: I had completely forgotten about that "detail".
We should probably adjust our conservative stack scanning accordingly.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 23 May 2020 22:42:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 18:42:25 2020
Received: from localhost ([127.0.0.1]:35962 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jccqW-0007mC-O6
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 18:42:24 -0400
Received: from mail-oi1-f171.google.com ([209.85.167.171]:45893)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jccqV-0007lz-8g
 for 41321 <at> debbugs.gnu.org; Sat, 23 May 2020 18:42:23 -0400
Received: by mail-oi1-f171.google.com with SMTP id d191so12587049oib.12
 for <41321 <at> debbugs.gnu.org>; Sat, 23 May 2020 15:42:23 -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=UDbETsv8N0mgA+ZWqfvLhXOpWfS3oFkkGOkAMUq+vMU=;
 b=cFmA1qEr77WEBVEoFt98Lut2kOQg7fPae5gQGkPd6ydLDbluoVtJ70JzZo8l5OZ2Va
 fN6O+8nfyn/jmn/7ZUUYfWV6fI8VIxGRH1i8qXo5xICRdNTpiPt2a3ZOTbRSojt6s4Ci
 jkPvavNXTJ8w+PaxfQrhlk54VWynBpPNC+WSp+iDzcbpqb6mOzxe3Qyxfm0HtNE5oTIq
 HFiO0Np9N9bByS+ZCMsd/twqnR6P/SGibWTfQOzKdi8We0mUnatGB3G47fncvvy3+LzR
 iCbqVS1rJxmtwJuxKErHlSIB2bLGjrrNetHDhMURNyNO1NjFXcHlfYqFgKTMWDDtAbr+
 Zlsg==
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=UDbETsv8N0mgA+ZWqfvLhXOpWfS3oFkkGOkAMUq+vMU=;
 b=DF3+w8+N2HC4UKMrkWIq7eIWqgk3lSLn2/YbFHr/ofQlrZ8hY1b/71fsK6hO5B2+on
 LUkN5fNFwJyDODrAQyZRBSaEIbaInyj08VLBQDAp2bcRaeFvKNdiuApSfCNSldcA0OgE
 Za4unSQeS2pDjFR5LOjFbdXj53MovIx0kOWGjK9Ug/0DXNFmx/1w6aIsOm1+4bfaQB7X
 vpXUQUy+1EA2g7taGpbvL0+VBGbT0CcPK86BMGpWtQkBxs8z/oVHSYe8YnQsJCYq1m5c
 39VY0Zfl7oJk0LoCTrs/pYznOx+baSNdq+KOBojvz7m0YYFl+fBo+G1T8iS8FgH4cB16
 ckLA==
X-Gm-Message-State: AOAM5314YClDEuzOir9cKhzv1TSr9UcUTfUpvln0dkfsFs0FZrUAaChI
 buKw2+MEBVwPx6fHDiXat9tCsj0PtrLy9cgl/Q4=
X-Google-Smtp-Source: ABdhPJyos2JyGbFquf8w0BXCF/5mxsCWAq1kQmJt5rtVTUW+UwspL+TLhmyRqnckTuQGEYgPOP5x8lMSBKh74DrsK6o=
X-Received: by 2002:aca:b708:: with SMTP id h8mr5590372oif.122.1590273737555; 
 Sat, 23 May 2020 15:42:17 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
 <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
 <83blmg2ggi.fsf@HIDDEN> <xjfpnawvxru.fsf@HIDDEN> <834ks73i8n.fsf@HIDDEN>
 <CAOqdjBdpU4U1NqErNH0idBmUxNeE3fL=2=KKpo9kbCM3DhW5gA@HIDDEN>
 <xjfblmev8hw.fsf@HIDDEN> <jwvh7w6jn4j.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwvh7w6jn4j.fsf-monnier+emacs@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 23 May 2020 22:41:41 +0000
Message-ID: <CAOqdjBcw68E5vFSwDJzU1cZ7JXr5gK29ZAiMzAXWkvsZvfKL5w@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Andrea Corallo <akrl@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, May 23, 2020 at 10:38 PM Stefan Monnier
<monnier@HIDDEN> wrote:
> >> If I'm reading this correctly, it's of some concern for wide-int
> >> builds: the two 32-bit halves of a Lisp_Object are stored
> >> non-consecutively.
>
> This shouldn't be a problem: wide-int builds use MSB tagging, so all
> Lisp_Objects which contain a pointer have their lowest 32bits exactly
> identical to that pointer (and the higher 32bits just contain the tag).

As I said, I don't believe that's true for symbols. Qnil is always
binary 0, so we offset all symbols by the offset of lispsym.

> So we'll find them in the stack even if the two halves are separate
> simply because the pointer-part will be found like any other pointer.

Yes, that's what I meant to say when I said it should still work for
pseudovectors.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 23 May 2020 22:38:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 18:38:08 2020
Received: from localhost ([127.0.0.1]:35954 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jccmN-0007ft-SN
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 18:38:08 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19837)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1jccmM-0007fP-DQ
 for 41321 <at> debbugs.gnu.org; Sat, 23 May 2020 18:38:06 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8DA2D4407FD;
 Sat, 23 May 2020 18:38:00 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3832B4407F2;
 Sat, 23 May 2020 18:37:59 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1590273479;
 bh=FPMRLv9toaweRuDL/u+txoAyq0unkBm1OIG1NsThiAw=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=oMRnIsCxpzmA1cjvrYYOaaYp2efaZuislaE261csaXWe2IdrONiVydyg+txUea4G2
 A5sXcWr7aQmrRthBqafLZKGoPbW/k+DDoArriMSUN9LJMnVc3ilSmScgdE14VV1fvb
 1hNtG78vrT+W9lRSZBzMfRGBRHWmCwwvcF5KXGu9DOLsZZlRu28JYSU4BvBGLsrK/m
 Q48RKng5gOEVn68JlolSij5NYuLMUiEMaSB3IaEGHf61jyy6IZANfpi+xYGFPFbWYD
 nyX7dyA8TWW1KATjWmk1R5wJ9sODyMnr80KOVa7ICk2z4kxyVyyHOL3Jt+/qnNReZ/
 sNFquDgWLVtPQ==
Received: from alfajor (unknown [216.154.27.250])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E5E3B1203C7;
 Sat, 23 May 2020 18:37:58 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Andrea Corallo <akrl@HIDDEN>
Subject: Re: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector
 objects
Message-ID: <jwvh7w6jn4j.fsf-monnier+emacs@HIDDEN>
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
 <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
 <83blmg2ggi.fsf@HIDDEN> <xjfpnawvxru.fsf@HIDDEN>
 <834ks73i8n.fsf@HIDDEN>
 <CAOqdjBdpU4U1NqErNH0idBmUxNeE3fL=2=KKpo9kbCM3DhW5gA@HIDDEN>
 <xjfblmev8hw.fsf@HIDDEN>
Date: Sat, 23 May 2020 18:37:57 -0400
In-Reply-To: <xjfblmev8hw.fsf@HIDDEN> (Andrea Corallo's message of "Sat, 23
 May 2020 17:58:19 +0000")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.099 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> If I'm reading this correctly, it's of some concern for wide-int
>> builds: the two 32-bit halves of a Lisp_Object are stored
>> non-consecutively.

This shouldn't be a problem: wide-int builds use MSB tagging, so all
Lisp_Objects which contain a pointer have their lowest 32bits exactly
identical to that pointer (and the higher 32bits just contain the tag).
So we'll find them in the stack even if the two halves are separate
simply because the pointer-part will be found like any other pointer.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 23 May 2020 17:58:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 13:58:22 2020
Received: from localhost ([127.0.0.1]:35487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcYPe-00078N-1Z
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 13:58:22 -0400
Received: from mx.sdf.org ([205.166.94.20]:51382)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <akrl@HIDDEN>) id 1jcYPc-00078G-RJ
 for 41321 <at> debbugs.gnu.org; Sat, 23 May 2020 13:58:21 -0400
Received: from sdf.org (ma.sdf.org [205.166.94.33])
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04NHwKDk016404
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO);
 Sat, 23 May 2020 17:58:20 GMT
Received: (from akrl@localhost)
 by sdf.org (8.15.2/8.12.8/Submit) id 04NHwJ44024688;
 Sat, 23 May 2020 17:58:19 GMT
From: Andrea Corallo <akrl@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
 <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
 <83blmg2ggi.fsf@HIDDEN> <xjfpnawvxru.fsf@HIDDEN>
 <834ks73i8n.fsf@HIDDEN>
 <CAOqdjBdpU4U1NqErNH0idBmUxNeE3fL=2=KKpo9kbCM3DhW5gA@HIDDEN>
Date: Sat, 23 May 2020 17:58:19 +0000
In-Reply-To: <CAOqdjBdpU4U1NqErNH0idBmUxNeE3fL=2=KKpo9kbCM3DhW5gA@HIDDEN>
 (Pip Cet's message of "Sat, 23 May 2020 07:00:56 +0000")
Message-ID: <xjfblmev8hw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: Eli Zaretskii <eliz@HIDDEN>, 41321 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Pip Cet <pipcet@HIDDEN> writes:

> I believe this isn't the problem we're looking for, but it might be
> related anyway.
>
> I'm seeing this in the assembler source code for insdel.c produced
> with the mingw cross compiler (i686-w64-mingw32-gcc-win32):
>
>     movl    60(%esp), %eax
>     movl    %eax, (%esp)
>     movl    72(%esp), %eax
>     movl    %eax, 4(%esp)
>     call    _Fmarker_position
> If I'm reading this correctly, it's of some concern for wide-int
> builds: the two 32-bit halves of a Lisp_Object are stored
> non-consecutively.
>
> Our stack marking doesn't catch that; at least, it doesn't for
> symbols, where the less-significant half isn't a valid pointer. For
> pseudovectors, things should still work...
>
> So I think we have a problem with such --wide-int builds in cases
> where a stack temporary holds an unpinned uninterned symbol while GC
> is called. Something like
>
> (prog1
>   (gensym)
>   (garbage-collect))
>
> might trigger it. No problem with gcc -m32 on GNU/Linux, for some reason.

Very interesting.  AFAIK there's no guarantees for the compiler to spill
a DI reg in adjacent memory.  Also reading the GC code your observation
seems correct to me.

-- 
akrl@HIDDEN




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 23 May 2020 07:01:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 03:01:39 2020
Received: from localhost ([127.0.0.1]:33284 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcOA7-0000tY-AC
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 03:01:39 -0400
Received: from mail-ot1-f42.google.com ([209.85.210.42]:39184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jcOA6-0000tH-0V
 for 41321 <at> debbugs.gnu.org; Sat, 23 May 2020 03:01:38 -0400
Received: by mail-ot1-f42.google.com with SMTP id d7so9988150ote.6
 for <41321 <at> debbugs.gnu.org>; Sat, 23 May 2020 00:01:37 -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=UrsnNwMdDVHQTKouDaFJPgR27evs4tXwmX3mzrRdwCU=;
 b=iIXPZHB+1gZEcLq2nP7HWYVNSEDGpZuehSDqmsZgHRfjHy1isMafe1ynLwGkfeblcd
 Bz7mnVFvIuzGKBXYCocvRWMumKuV/7E+XcqBS9VmYpcnMBFv+QUj+U3zOBpkWcjmhYce
 pEKjatBwq1h4zm0PqoSgyzqmEXnBrkS54r2uFDS02hWSX1oa7BguKuTmeSF4Tsktmt1l
 BXKq6NrCW0aJWiwGeDZrDbzJSgr78vL3S1k4duxlOWkr0bxYyDam/4wz2ktsFPFE6AAn
 YLiTz/Uw4npRGlNaYPwXpx2jPP7Iyqo0hzpBflHlKF0H1P0ub4lMGM978OfYdUc+BVhy
 aePQ==
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=UrsnNwMdDVHQTKouDaFJPgR27evs4tXwmX3mzrRdwCU=;
 b=ksbFeAjR0nuqFcRuZn1DVlxiW+PgOgxsxvhpG+YeB0KQMU78FD+HYM0d7A6mAVVEHE
 lJHKsHtZKXnU9jJVnRDOCTKzFnXfTaEdRiJav1gc8QXMoEo1qOSX2wIXPcOiLMZEgYW3
 U3JYUplsxAqM774IGzvA+GxVM3zIdfJbgIEWVDl93dij/m1k1hUFZolWoSkr87qHurh+
 RDW9wytXFOLIySZIjCo1xrenWnTeV9kLwbSPR0KvR9eU6lKEXW5kLuu22H1MHW9KSa5U
 WPO1nLKt1gCn1qPQJkeTPWhCHZEr9fGzObLzDBiHZpm5XObdBwEzzb+0qS6oQ8bWpX00
 DndQ==
X-Gm-Message-State: AOAM533RJ7HZdJyZsJhhjWCHDZ1XRN0EwMLUvqdrTqWtJJYxpy2h4To1
 pFNHqAwaCmS25IvBxvohyjcHM9EJEC24T8JdYDA=
X-Google-Smtp-Source: ABdhPJx9eThXRX5A52Qed+W+z3NAWlaEm7p1ZnnKuI4ZpfDAHol7f4dypB78dkREIT/F1/7tf591vN+GjHtLLUAXWOI=
X-Received: by 2002:a9d:7a50:: with SMTP id z16mr14538447otm.292.1590217292166; 
 Sat, 23 May 2020 00:01:32 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
 <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
 <83blmg2ggi.fsf@HIDDEN> <xjfpnawvxru.fsf@HIDDEN> <834ks73i8n.fsf@HIDDEN>
In-Reply-To: <834ks73i8n.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sat, 23 May 2020 07:00:56 +0000
Message-ID: <CAOqdjBdpU4U1NqErNH0idBmUxNeE3fL=2=KKpo9kbCM3DhW5gA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Andrea Corallo <akrl@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I believe this isn't the problem we're looking for, but it might be
related anyway.

I'm seeing this in the assembler source code for insdel.c produced
with the mingw cross compiler (i686-w64-mingw32-gcc-win32):

    movl    60(%esp), %eax
    movl    %eax, (%esp)
    movl    72(%esp), %eax
    movl    %eax, 4(%esp)
    call    _Fmarker_position
If I'm reading this correctly, it's of some concern for wide-int
builds: the two 32-bit halves of a Lisp_Object are stored
non-consecutively.

Our stack marking doesn't catch that; at least, it doesn't for
symbols, where the less-significant half isn't a valid pointer. For
pseudovectors, things should still work...

So I think we have a problem with such --wide-int builds in cases
where a stack temporary holds an unpinned uninterned symbol while GC
is called. Something like

(prog1
  (gensym)
  (garbage-collect))

might trigger it. No problem with gcc -m32 on GNU/Linux, for some reason.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 19:03:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 15:03:10 2020
Received: from localhost ([127.0.0.1]:60402 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcCwn-0004Dn-S0
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 15:03:10 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50292)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jcCwl-0004Da-N2
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 15:03:08 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54850)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jcCwe-0004KF-TJ; Fri, 22 May 2020 15:03:00 -0400
Received: from [176.228.60.248] (port=2243 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jcCwe-0002e8-4c; Fri, 22 May 2020 15:03:00 -0400
Date: Fri, 22 May 2020 22:03:04 +0300
Message-Id: <834ks73i8n.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <akrl@HIDDEN>
In-Reply-To: <xjfpnawvxru.fsf@HIDDEN> (message from Andrea Corallo on Fri, 22
 May 2020 14:40:05 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
 <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
 <83blmg2ggi.fsf@HIDDEN> <xjfpnawvxru.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andrea Corallo <akrl@HIDDEN>
> Cc: Pip Cet <pipcet@HIDDEN>, 41321 <at> debbugs.gnu.org,
>         monnier@HIDDEN
> Date: Fri, 22 May 2020 14:40:05 +0000
> 
> > I see this on two different systems where Emacs was compiled with two
> > different versions of GCC.  So if you want to see the disassembly, any
> > 32-bit GCC will do, I think.
> 
> I believe the triplet can make a difference given the calling convention
> can change no?  Also CFLAGS are clearly a factor.

My CFLAGS are in my original report of this bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 14:40:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 10:40:10 2020
Received: from localhost ([127.0.0.1]:59989 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc8qI-0001qb-Gg
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 10:40:10 -0400
Received: from mx.sdf.org ([205.166.94.20]:64235)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <akrl@HIDDEN>) id 1jc8qF-0001qM-2K
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 10:40:09 -0400
Received: from sdf.org (ma.sdf.org [205.166.94.33])
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04MEe5MD000016
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO);
 Fri, 22 May 2020 14:40:06 GMT
Received: (from akrl@localhost)
 by sdf.org (8.15.2/8.12.8/Submit) id 04MEe5L7018251;
 Fri, 22 May 2020 14:40:05 GMT
From: Andrea Corallo <akrl@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
 <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
 <83blmg2ggi.fsf@HIDDEN>
Date: Fri, 22 May 2020 14:40:05 +0000
In-Reply-To: <83blmg2ggi.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 22 May
 2020 17:26:53 +0300")
Message-ID: <xjfpnawvxru.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Pip Cet <pipcet@HIDDEN>
>> Date: Fri, 22 May 2020 14:04:03 +0000
>> Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
>> 
>> I don't think posting the disassembled code for
>> `signal_before_change' can hurt, since there's no easy way for
>> anyone else to reproduce it.
>
> I see this on two different systems where Emacs was compiled with two
> different versions of GCC.  So if you want to see the disassembly, any
> 32-bit GCC will do, I think.

I believe the triplet can make a difference given the calling convention
can change no?  Also CFLAGS are clearly a factor.

-- 
akrl@HIDDEN




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 14:26:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 10:26:56 2020
Received: from localhost ([127.0.0.1]:59961 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc8dU-0001W7-Ds
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 10:26:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48606)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jc8dT-0001Vv-8a
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 10:26:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49249)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jc8dN-0000c1-Jn; Fri, 22 May 2020 10:26:49 -0400
Received: from [176.228.60.248] (port=1196 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jc8dM-0005Li-PD; Fri, 22 May 2020 10:26:49 -0400
Date: Fri, 22 May 2020 17:26:53 +0300
Message-Id: <83blmg2ggi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
 (message from Pip Cet on Fri, 22 May 2020 14:04:03 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
 <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Fri, 22 May 2020 14:04:03 +0000
> Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> I don't think posting the disassembled code for
> `signal_before_change' can hurt, since there's no easy way for
> anyone else to reproduce it.

I see this on two different systems where Emacs was compiled with two
different versions of GCC.  So if you want to see the disassembly, any
32-bit GCC will do, I think.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 14:04:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 10:04:58 2020
Received: from localhost ([127.0.0.1]:59922 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc8I2-0000xl-PF
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 10:04:58 -0400
Received: from mail-oi1-f172.google.com ([209.85.167.172]:34196)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jc8I1-0000xY-Ee
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 10:04:45 -0400
Received: by mail-oi1-f172.google.com with SMTP id w4so9411465oia.1
 for <41321 <at> debbugs.gnu.org>; Fri, 22 May 2020 07:04:45 -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=YQFPxd60jkr+tIVaDYyLX4LXmqKGH/tymvJyhkS4i/0=;
 b=f+z+BF2KSk6EpctT+BVFATQ2iGh2zfKEhhiIKcXX/b0LdQrOlUfPARP6PdxPKkOhxn
 vqEdDiRErbdOmu8gIrBqoNd1UbbwwiwcdNOD23dIC77Z1eGB/WkS94DZ+HjqPMUMbEbt
 tcmfQO02jgLP2Azt2cZU6DpKHXYAW9bC27K89w5e8CWhotfGMTlZgIjaeZrDqlU2kKU7
 lUQ9Zcu/crvhSrDh+iH5Ic9Db7yazsIiV+0pTw+oVlYURQMMGO2PBugJvv64/3jlxsMi
 ikdOkxDOKrsSvy+qgqojU8Tu86VRF1EZyfPEP9A98Lh6772AfdCt8e77VeLSYRPsN9aA
 D1CA==
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=YQFPxd60jkr+tIVaDYyLX4LXmqKGH/tymvJyhkS4i/0=;
 b=dsB7nlLpRSs5Urp4RSGaYsm7I1qmTTXno49rwaHFis9gP+QJlKyjjFCTFxoNbj4NDa
 ICeGHNRp0KxqNu3XiRwFbEi+FxN2ccFEc04oQwQ7QYRrKOrDGfh1Rns2i7ZoHkO/3frh
 +6p1mYYtI3OeZG1dEvXnj27hogujNuvTz2F+fVFprxjjpOeBfjeatsVBV71otWCdubCX
 q9XEn1iu2s+ERZD1CDRq9cR+7n31X4dx3/vgcI6/gBk0dkkPHIe4Dh1QN5odGci1mf+i
 T9dvzc/qphO9mGNdMSjXgAqqa0J6urVyKwdXaKqiiT4uFNuZivHrs+XHHb3VEcv4KsdJ
 bSCQ==
X-Gm-Message-State: AOAM532vOWp+q/MsPkLqMwyPq+5Bv1bhHU9pgGNrd6eBd6urv21c2spu
 3OSHz3jS/wzjbb3JtoIx1PSSPCjEvLxRgihoEy0=
X-Google-Smtp-Source: ABdhPJxqbjVBfVWA7z/2wlB3nAARmoWZPULTSvKCjWsmzMerhOq++xnMFWFiACqoMN5S9g3grvauucqwg0YRAy6PIxE=
X-Received: by 2002:aca:c6d3:: with SMTP id w202mr2869083oif.44.1590156279735; 
 Fri, 22 May 2020 07:04:39 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 <83lflk2l07.fsf@HIDDEN>
In-Reply-To: <83lflk2l07.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 22 May 2020 14:04:03 +0000
Message-ID: <CAOqdjBf_D34Fa5QUhDqk70y98Nn=qbb4Bp7jAYbw9W7kpfTWaA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 22, 2020 at 12:48 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Fri, 22 May 2020 12:39:27 +0000
> > Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> >
> > > Sorry, I don't follow.  "xtype" shows the type of the last result,
> > > AFAIK, in this case the type of $29.  If this changed somehow, either
> > > we have a bug in .gdbinit or I have been using GDB incorrectly for I
> > > don't know how many years.
> >
> > I think it's most likely to be a GDB bug, and I can't reproduce it here.
> >
> > But it's definitely trying to access memory at address 0x18ac04f8,
> > which corresponds to start_marker.
>
> My interpretation of that equality was that both start_marker and the
> buffer's overlay chain git invalidated because some code relocated
> objects and unmapped the previously referenced memory, perhaps due to
> GC.  I don't yet have an explanation for how this could happen, so
> maybe this hypothesis is wrong.

I think it has to be, because the error message would then read
"Cannot access memory at address 0x170cb040", which is the only
address xvectype is supposed to look at.

> But I very much doubt there's such a blatant bug in GDB: this is the
> latest GDB 9.1, and I'm using these commands from .gdbinit all the
> time.  I tend to think this is somehow part of the bug that caused the
> crash.

I'm not sure how it could be. I don't think posting the disassembled
code for `signal_before_change' can hurt, since there's no easy way
for anyone else to reproduce it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 12:55:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 08:55:25 2020
Received: from localhost ([127.0.0.1]:58398 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc7Cv-0007KX-94
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 08:55:25 -0400
Received: from mx.sdf.org ([205.166.94.20]:64295)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <akrl@HIDDEN>) id 1jc7Cs-0007KK-BA
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 08:55:24 -0400
Received: from sdf.org (ma.sdf.org [205.166.94.33])
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04MCtIhl010140
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO);
 Fri, 22 May 2020 12:55:19 GMT
Received: (from akrl@localhost)
 by sdf.org (8.15.2/8.12.8/Submit) id 04MCtIe1028316;
 Fri, 22 May 2020 12:55:18 GMT
From: Andrea Corallo <akrl@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN> <xjfy2pkwems.fsf@HIDDEN>
 <835zco44f0.fsf@HIDDEN>
Date: Fri, 22 May 2020 12:55:18 +0000
In-Reply-To: <835zco44f0.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 22 May
 2020 14:04:03 +0300")
Message-ID: <xjftv08w2mh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Andrea Corallo <akrl@HIDDEN>
>> Cc: pipcet@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
>>         41321 <at> debbugs.gnu.org
>> Date: Fri, 22 May 2020 08:35:55 +0000
>> 
>> I'be curious of the outcome if you had a look to your 'garbage_collect'
>> assembly to investigate the possible relation with 41357 as suggested
>> here
>> https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-05/msg01095.html
>
> Sorry, I'm not sure I understand what you mean by the above.  Did you
> mean whether I disassembled garbage_collect and looked at the code?

Yes, should be quick to see if callee-save regs are pushed.

> However, given the latest findings, I now doubt even more that the
> issue you identified can have any relation to this problem.  As seen
> by the backtrace I've shown in my last message, the buffer's overlay
> list has invalid overlay objects at the point of the crash.  The 2
> pointers to the overlay lists of a buffer are unconditionally marked
> in mark_buffer, so I don't see how problems in GC with Lisp objects in
> registers could interfere in this case.  Am I missing something?

Not that I'm aware, I'm no expert of the piece of code you are looking
at and haven't investigated into.  Was just a 'cheap' idea to exclude a
potential problem from the table.

  Andrea

-- 
akrl@HIDDEN




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 12:48:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 08:48:49 2020
Received: from localhost ([127.0.0.1]:58385 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc76T-0007AL-Nf
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 08:48:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37344)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jc76R-0007A6-Kp
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 08:48:44 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47611)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jc76M-0007Lx-6D; Fri, 22 May 2020 08:48:38 -0400
Received: from [176.228.60.248] (port=3051 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jc76L-0003bP-Gh; Fri, 22 May 2020 08:48:38 -0400
Date: Fri, 22 May 2020 15:48:40 +0300
Message-Id: <83lflk2l07.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
 (message from Pip Cet on Fri, 22 May 2020 12:39:27 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
 <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Fri, 22 May 2020 12:39:27 +0000
> Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> > Sorry, I don't follow.  "xtype" shows the type of the last result,
> > AFAIK, in this case the type of $29.  If this changed somehow, either
> > we have a bug in .gdbinit or I have been using GDB incorrectly for I
> > don't know how many years.
> 
> I think it's most likely to be a GDB bug, and I can't reproduce it here.
> 
> But it's definitely trying to access memory at address 0x18ac04f8,
> which corresponds to start_marker.

My interpretation of that equality was that both start_marker and the
buffer's overlay chain git invalidated because some code relocated
objects and unmapped the previously referenced memory, perhaps due to
GC.  I don't yet have an explanation for how this could happen, so
maybe this hypothesis is wrong.

>   (gdb) p rvoe_arg.location
>   $35 = (Lisp_Object *) 0x15c9298 <globals+120>
>   (gdb) xtype
>   Lisp_Vectorlike
>   Cannot access memory at address 0x18ac04f8
>   (gdb) p rvoe_arg.errorp
>   $36 = false
> 
> Surely rvoe_arg.location isn't a vectorlike, so that also points to
> GDB not dealing with things correctly.

rvoe_arg.location should be a pointer to the value of
before-change-functions, so yes, it isn't supposed to be vectorlike.
But I very much doubt there's such a blatant bug in GDB: this is the
latest GDB 9.1, and I'm using these commands from .gdbinit all the
time.  I tend to think this is somehow part of the bug that caused the
crash.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 12:40:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 08:40:11 2020
Received: from localhost ([127.0.0.1]:58339 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc6yB-0006w6-Ke
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 08:40:11 -0400
Received: from mail-oi1-f177.google.com ([209.85.167.177]:43009)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jc6y9-0006vk-OV
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 08:40:10 -0400
Received: by mail-oi1-f177.google.com with SMTP id i22so9138070oik.10
 for <41321 <at> debbugs.gnu.org>; Fri, 22 May 2020 05:40:09 -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=0cZlLosrT1wh8dox16BR6Di3FXorI+5qCyGxJJbZTQA=;
 b=jKeABuOw0k4TKgVly0KMk9i3WOU4REo3PX9fua9uoeWsd2brhq7ssZVDRdZYuMmbJm
 GgR0fJ20PXyNjnF1MDEcRZ4tRYi5agPJ0/AsSUbLwAD3YOyXPBD7MehYxH3j4Pv9jjK2
 lOC+Q+O5CdjIBOW8iTNwf0JigsQIJQ9hGkFKwLJfbxeomBGDdLTLYmabmeXLSklb+7xX
 vL5Q+49z+2Cs7k76C9AumwnIwN2vdXjKc/gVEulnEJLlLlAONl6PPGNpnAEcbtxdrqWd
 Pg7ZjXZk5GIp9xrkI++JUH5AIddIPKNAunEJb6fBe0gdRD1B7UEbjPw4x8N6Dts3TO/5
 D8lg==
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=0cZlLosrT1wh8dox16BR6Di3FXorI+5qCyGxJJbZTQA=;
 b=stgHPvrkOJsiL0zkoCbgenWFdofRHsPIeH3s2a0YhPDj0LY0CK8P2CWrrToT+sZJTE
 NYw6uwH+E72dvMGpJuHPMfeSiUfjOF+mErJf6twuXLKbBflEZ41BaJerVBhFor56f+HL
 Zy8hCA1pNrLEtYolPe6T8leulzzFzcqX7ibhC3PYBnY9ncAotzyE3qwfLr+ylnyi1ZZN
 NxLTpy66NcpcpMcQIJTGEImfM8On9yNPC/HduQfss4fRoZ4xrZ/V0KOSxh5oV5a+qAWg
 Ve8pBTPSFFP/0wWfipboETkxwnWRvF4a2zIHPVAxD7tvsClK7C7VFjUVEPgCbpXv2PG8
 Pn6A==
X-Gm-Message-State: AOAM532t/iL+dNgyfbwpZ2expbDIm9fimOrA02C4kyiXaqWLSnaQVVAz
 CB4tdruDv//sD3ilXRO7YazeJYTSLrxJrcRBc/8=
X-Google-Smtp-Source: ABdhPJykumIl4Rc7irumuH2CJGFQfPAD1dRLPQVlBndRNAzWPQln90+IHdAYaoBwAGciv8jVWMBWZ2lcmMQhjLlvu4Y=
X-Received: by 2002:a05:6808:1c8:: with SMTP id
 x8mr2396294oic.30.1590151203910; 
 Fri, 22 May 2020 05:40:03 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 <83tv082mm1.fsf@HIDDEN>
In-Reply-To: <83tv082mm1.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 22 May 2020 12:39:27 +0000
Message-ID: <CAOqdjBehfP3r===keyPY4se_wCZkZL-=pOXp2GfDp59UmNj2AA@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 22, 2020 at 12:13 PM Eli Zaretskii <eliz@HIDDEN> wrote:
> > From: Pip Cet <pipcet@HIDDEN>
> > Date: Fri, 22 May 2020 11:47:03 +0000
> > Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> >
> > On Fri, May 22, 2020 at 7:22 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> > >   (gdb) p current_buffer->overlays_before
> > >   $28 = (struct Lisp_Overlay *) 0x170cb080
> > >   (gdb) p $28->start
> > >   $29 = XIL(0xa0000000170cb040)
> > >   (gdb) xtype
> > >   Lisp_Vectorlike
> > >   Cannot access memory at address 0x18ac04f8
> >
> > Note that didn't try to print $29, but the original invalid marker.
>
> Sorry, I don't follow.  "xtype" shows the type of the last result,
> AFAIK, in this case the type of $29.  If this changed somehow, either
> we have a bug in .gdbinit or I have been using GDB incorrectly for I
> don't know how many years.

I think it's most likely to be a GDB bug, and I can't reproduce it here.

But it's definitely trying to access memory at address 0x18ac04f8,
which corresponds to start_marker.

  (gdb) p rvoe_arg.location
  $35 = (Lisp_Object *) 0x15c9298 <globals+120>
  (gdb) xtype
  Lisp_Vectorlike
  Cannot access memory at address 0x18ac04f8
  (gdb) p rvoe_arg.errorp
  $36 = false

Surely rvoe_arg.location isn't a vectorlike, so that also points to
GDB not dealing with things correctly.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 12:32:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 08:32:59 2020
Received: from localhost ([127.0.0.1]:58324 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc6rC-0006lF-L4
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 08:32:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jc6qx-0006kN-8Z
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 08:32:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47257)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jc6qr-0003to-V2; Fri, 22 May 2020 08:32:37 -0400
Received: from [176.228.60.248] (port=2061 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jc6qr-0000yI-Ac; Fri, 22 May 2020 08:32:37 -0400
Date: Fri, 22 May 2020 15:32:42 +0300
Message-Id: <83r1vc2lqt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 (message from Pip Cet on Fri, 22 May 2020 11:47:03 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Fri, 22 May 2020 11:47:03 +0000
> Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> On Fri, May 22, 2020 at 7:22 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> >   (gdb) p current_buffer->overlays_before
> >   $28 = (struct Lisp_Overlay *) 0x170cb080
> >   (gdb) p $28->start
> >   $29 = XIL(0xa0000000170cb040)
> >   (gdb) xtype
> >   Lisp_Vectorlike
> >   Cannot access memory at address 0x18ac04f8
> 
> Note that didn't try to print $29, but the original invalid marker. In
> particular, I believe 0x170cb040 is a pointer to a valid marker.
> 
> >   (gdb) p $28->next
> >   $30 = (struct Lisp_Overlay *) 0x13050320
> >   (gdb) p $28->next->start
> >   $31 = XIL(0xa000000016172310)
> >   (gdb) xtype
> >   Lisp_Vectorlike
> >   Cannot access memory at address 0x18ac04f8
> 
> Same here.
> 
> If you could disassemble signal_before_change, we'd know whether
> start_marker and end_marker live in callee-saved registers, and thus
> whether this is likely to be Andrea's bug.

Since $28 is neither start_marker nor end_marker, but the first
overlay on the buffer's overlay chain, how could it be affected by
whether start_marker or end_marker are in a callee-saved register?
What am I missing here?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 12:14:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 08:14:03 2020
Received: from localhost ([127.0.0.1]:58260 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc6Ys-0006Dw-TP
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 08:14:03 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60972)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jc6Yr-0006Cw-I9
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 08:14:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46669)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jc6Yl-00009F-W7; Fri, 22 May 2020 08:13:56 -0400
Received: from [176.228.60.248] (port=4877 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jc6Yl-0008Pc-7y; Fri, 22 May 2020 08:13:55 -0400
Date: Fri, 22 May 2020 15:13:58 +0300
Message-Id: <83tv082mm1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
 (message from Pip Cet on Fri, 22 May 2020 11:47:03 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
 <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Fri, 22 May 2020 11:47:03 +0000
> Cc: Stefan Monnier <monnier@HIDDEN>, 41321 <at> debbugs.gnu.org
> 
> On Fri, May 22, 2020 at 7:22 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> >   (gdb) p current_buffer->overlays_before
> >   $28 = (struct Lisp_Overlay *) 0x170cb080
> >   (gdb) p $28->start
> >   $29 = XIL(0xa0000000170cb040)
> >   (gdb) xtype
> >   Lisp_Vectorlike
> >   Cannot access memory at address 0x18ac04f8
> 
> Note that didn't try to print $29, but the original invalid marker.

Sorry, I don't follow.  "xtype" shows the type of the last result,
AFAIK, in this case the type of $29.  If this changed somehow, either
we have a bug in .gdbinit or I have been using GDB incorrectly for I
don't know how many years.

What am I missing?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 11:47:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 07:47:48 2020
Received: from localhost ([127.0.0.1]:58206 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc69U-0005Yt-1c
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 07:47:48 -0400
Received: from mail-oo1-f52.google.com ([209.85.161.52]:40500)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jc69R-0005Yf-Hb
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 07:47:45 -0400
Received: by mail-oo1-f52.google.com with SMTP id r1so2102636oog.7
 for <41321 <at> debbugs.gnu.org>; Fri, 22 May 2020 04:47:45 -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=UsTgJfvVJULqy6F7BSNWHIxYFwklxCAvmwyX0yVsWCg=;
 b=eWX27rNkA55GtERdDvd71GrU1iEnxgjpPpYv9rH4JSTvVSvnkQWj519qLcsAL3LDk5
 ErUg/XZI1+aRgbnzmk9HgQxIHRVQeORFjduScFI8Vg9pgFDBMrW5CLOrjTwAx73USHcP
 xBP96IV+1+oiBiB/fIVE0KelzORI7PbTNSEL9+Ty9t83RNx+UFu0QrUEJX7O+0UMGaDu
 UHm6mLscMpudQKjYO2aXLTj9g4PtOo2q/Isc8ViWFnBlTt/gJRSD9SjrAzZWA9c1JHaY
 VyAtVk76ONWvcygOYKl2Tw/8hvrIRXLdHAFg5aKUKkQEm4icqj8S3/WlhzDQF0lGTpD6
 vy6g==
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=UsTgJfvVJULqy6F7BSNWHIxYFwklxCAvmwyX0yVsWCg=;
 b=N1HSqqw+36oxOvdFjU64AZk8mIuMd6yNqN9RHmIo2uOfAkDAhTWIfZRab0Q4dCDbcw
 fUQY7gbUxFIOKjgUsih8VuDZ0esS0pyZS923f7ikUQ5y4zvlptDnQjL4sqF3vspgCykj
 c8aZ6wuezmhi9JTcmnMYlb/6AsQFW59bPRrjj2l1QvysqMOMVsRRyJViqcEl3Vw4IZaB
 GPVMZYoT7EIWbHFXEmU1Ma3pXeTGMjPMTcpyTwVM63ZbHMmDyfYNdJXUga8e2WjYYtey
 5jr1i9hJ5svNNEBY6BW5YJykeZwBwkEQfUVZLnHJ/9SD8od6kJxs4cvec/Tz/6pxE266
 hDAg==
X-Gm-Message-State: AOAM533gFK8LmFtIAbMyVwW/L58ZVxce4sth6UXqEc3ykhnLzvKO3JQC
 PpFgzXby33Ln7rcYmBHIWBYy3qmquJbSPTRovgzVr+Uz
X-Google-Smtp-Source: ABdhPJx0036TRs2A0zV00buIbVoBfkPv3sOQbh2YUgaSZhL51FoIzH31zXzmFjUDBcvQXrXl+yRiic48QHDTVQEkVi8=
X-Received: by 2002:a4a:9704:: with SMTP id u4mr2679917ooi.88.1590148059726;
 Fri, 22 May 2020 04:47:39 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
In-Reply-To: <831rncjuwf.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Fri, 22 May 2020 11:47:03 +0000
Message-ID: <CAOqdjBftuHcQR5xh8=J1sxH+Tqeoe8X19owj9ZGmhryMO1cDXQ@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, May 22, 2020 at 7:22 AM Eli Zaretskii <eliz@HIDDEN> wrote:
>   (gdb) p current_buffer->overlays_before
>   $28 = (struct Lisp_Overlay *) 0x170cb080
>   (gdb) p $28->start
>   $29 = XIL(0xa0000000170cb040)
>   (gdb) xtype
>   Lisp_Vectorlike
>   Cannot access memory at address 0x18ac04f8

Note that didn't try to print $29, but the original invalid marker. In
particular, I believe 0x170cb040 is a pointer to a valid marker.

>   (gdb) p $28->next
>   $30 = (struct Lisp_Overlay *) 0x13050320
>   (gdb) p $28->next->start
>   $31 = XIL(0xa000000016172310)
>   (gdb) xtype
>   Lisp_Vectorlike
>   Cannot access memory at address 0x18ac04f8

Same here.

If you could disassemble signal_before_change, we'd know whether
start_marker and end_marker live in callee-saved registers, and thus
whether this is likely to be Andrea's bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 11:04:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 07:04:09 2020
Received: from localhost ([127.0.0.1]:58151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc5TE-0002Nf-OK
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 07:04:08 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jc5TC-0002NH-Nh
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 07:04:07 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41080)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jc5T5-0003ez-Qk; Fri, 22 May 2020 07:03:59 -0400
Received: from [176.228.60.248] (port=4546 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jc5T5-0003mF-77; Fri, 22 May 2020 07:03:59 -0400
Date: Fri, 22 May 2020 14:04:03 +0300
Message-Id: <835zco44f0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <akrl@HIDDEN>
In-Reply-To: <xjfy2pkwems.fsf@HIDDEN> (message from Andrea Corallo on Fri, 22
 May 2020 08:35:55 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN> <xjfy2pkwems.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, monnier@HIDDEN, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andrea Corallo <akrl@HIDDEN>
> Cc: pipcet@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
>         41321 <at> debbugs.gnu.org
> Date: Fri, 22 May 2020 08:35:55 +0000
> 
> I'be curious of the outcome if you had a look to your 'garbage_collect'
> assembly to investigate the possible relation with 41357 as suggested
> here
> https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-05/msg01095.html

Sorry, I'm not sure I understand what you mean by the above.  Did you
mean whether I disassembled garbage_collect and looked at the code?
If so, the answer is NO, I didn't yet have time for that.

However, given the latest findings, I now doubt even more that the
issue you identified can have any relation to this problem.  As seen
by the backtrace I've shown in my last message, the buffer's overlay
list has invalid overlay objects at the point of the crash.  The 2
pointers to the overlay lists of a buffer are unconditionally marked
in mark_buffer, so I don't see how problems in GC with Lisp objects in
registers could interfere in this case.  Am I missing something?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 10:54:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 06:54:08 2020
Received: from localhost ([127.0.0.1]:58147 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc5JX-0008R2-SM
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 06:54:08 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52276)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jc5JW-0008Qq-Ux
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 06:54:07 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40433)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jc5JR-0002QI-Kn; Fri, 22 May 2020 06:54:01 -0400
Received: from [176.228.60.248] (port=3931 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jc5JP-0002Yk-Gt; Fri, 22 May 2020 06:54:01 -0400
Date: Fri, 22 May 2020 13:54:02 +0300
Message-Id: <837dx444vp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <831rncjuwf.fsf@HIDDEN> (message from Eli Zaretskii on Fri, 22
 May 2020 10:22:56 +0300)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN> <831rncjuwf.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 22 May 2020 10:22:56 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 41321 <at> debbugs.gnu.org
> 
> Since the previous call to before-change-functions already used the
> same overlay markers, I suspect that the call to
> before-change-functions caused the memory to be unmapped (perhaps due
> to GC).

FTR: I am now running the 27.0.91 pretest with the patch for bug#40661
applied.  It's a long shot, since the problem here is not with
pointers to buffer text, but I just want to be sure I didn't
rediscover a complicated way to reproduce that bug ;-)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 08:36:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 04:36:02 2020
Received: from localhost ([127.0.0.1]:58022 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc39u-0002id-0X
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 04:36:02 -0400
Received: from mx.sdf.org ([205.166.94.20]:60718)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <akrl@HIDDEN>) id 1jc39s-0002iM-6a
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 04:36:00 -0400
Received: from sdf.org (ma.sdf.org [205.166.94.33])
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04M8ZuKk025730
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO);
 Fri, 22 May 2020 08:35:57 GMT
Received: (from akrl@localhost)
 by sdf.org (8.15.2/8.12.8/Submit) id 04M8ZtrJ015172;
 Fri, 22 May 2020 08:35:55 GMT
From: Andrea Corallo <akrl@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
 <831rncjuwf.fsf@HIDDEN>
Date: Fri, 22 May 2020 08:35:55 +0000
In-Reply-To: <831rncjuwf.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 22 May
 2020 10:22:56 +0300")
Message-ID: <xjfy2pkwems.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> FETCH_END calls marker-position, and that segfaults because the marker
> points to invalid memory, which was probably unmapped from the process
> address space (so I guess this is w32-specific, as GNU systems don't
> really return memory to the system).  The start_marker is also
> invalid, it's just that FETCH_END is called first.
>
> Since the previous call to before-change-functions already used the
> same overlay markers, I suspect that the call to
> before-change-functions caused the memory to be unmapped (perhaps due
> to GC).  As you see below, the value of before-change-functions is
>
>   (t syntax-ppss-flush-cache)
>
> So the prime suspect is what happens when syntax-ppss-flush-cache
> runs, and thus I CC Stefan.  The main question to answer now from my
> POV is how come a marker on buffer position 3116 which was valid
> before before-change-functions was called became invalid as result of
> some Lisp, in particular as result of calling before-change-functions.
>
> Here's the backtrace; ideas for further debugging are welcome.

Hi Eli,

I'be curious of the outcome if you had a look to your 'garbage_collect'
assembly to investigate the possible relation with 41357 as suggested
here
https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-05/msg01095.html

Hope it helps

  Andrea

-- 
akrl@HIDDEN




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 22 May 2020 07:23:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 03:23:06 2020
Received: from localhost ([127.0.0.1]:57922 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jc21J-0000y5-Jo
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 03:23:06 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33750)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jc21H-0000xO-AU
 for 41321 <at> debbugs.gnu.org; Fri, 22 May 2020 03:23:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59227)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jc21B-0007Ip-MK; Fri, 22 May 2020 03:22:57 -0400
Received: from [176.228.60.248] (port=2917 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jc21B-0007U7-2H; Fri, 22 May 2020 03:22:57 -0400
Date: Fri, 22 May 2020 10:22:56 +0300
Message-Id: <831rncjuwf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: pipcet@HIDDEN, Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <83imgublku.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 17
 May 2020 18:57:53 +0300)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN> <83imgublku.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 17 May 2020 18:57:53 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 41321 <at> debbugs.gnu.org
> 
> > Date: Sun, 17 May 2020 18:28:04 +0300
> > From: Eli Zaretskii <eliz@HIDDEN>
> > Cc: 41321 <at> debbugs.gnu.org
> > 
> > I'm already running with such a breakpoint, let's how it will catch
> > something.                                        ^^^
> 
> Should have been "hope".  Sorry.

It happened again, and now insert-file-contents wasn't involved, so I
guess it's off the hook.  The command which triggered the problem was
self-insert-command, as shown in the backtrace below.  The problem
seems to be with handling overlays when buffer text changes.

The backtrace below, as well as some tinkering with values of relevant
variables, indicate that the buffer has two overlays, both of which
point to invalid memory.  The crash happens here:

  /* Now run the before-change-functions if any.  */
  if (!NILP (Vbefore_change_functions))
    {
      rvoe_arg.location = &Vbefore_change_functions;
      rvoe_arg.errorp = 1;

      PRESERVE_VALUE;
      PRESERVE_START_END;

      /* Mark before-change-functions to be reset to nil in case of error.  */
      record_unwind_protect_ptr (reset_var_on_error, &rvoe_arg);

      /* Actually run the hook functions.  */
      CALLN (Frun_hook_with_args, Qbefore_change_functions,
	     FETCH_START, FETCH_END);

      /* There was no error: unarm the reset_on_error.  */
      rvoe_arg.errorp = 0;
    }

  if (buffer_has_overlays ())
    {
      PRESERVE_VALUE;
      report_overlay_modification (FETCH_START, FETCH_END, 0,  <<<<<<<<<<<<
				   FETCH_START, FETCH_END, Qnil);
    }

FETCH_END calls marker-position, and that segfaults because the marker
points to invalid memory, which was probably unmapped from the process
address space (so I guess this is w32-specific, as GNU systems don't
really return memory to the system).  The start_marker is also
invalid, it's just that FETCH_END is called first.

Since the previous call to before-change-functions already used the
same overlay markers, I suspect that the call to
before-change-functions caused the memory to be unmapped (perhaps due
to GC).  As you see below, the value of before-change-functions is

  (t syntax-ppss-flush-cache)

So the prime suspect is what happens when syntax-ppss-flush-cache
runs, and thus I CC Stefan.  The main question to answer now from my
POV is how come a marker on buffer position 3116 which was valid
before before-change-functions was called became invalid as result of
some Lisp, in particular as result of calling before-change-functions.

Here's the backtrace; ideas for further debugging are welcome.

  Thread 1 received signal SIGSEGV, Segmentation fault.
  PSEUDOVECTORP (code=<optimized out>, a=<optimized out>) at lisp.h:1720
  1720          return PSEUDOVECTOR_TYPEP (XUNTAG (a, Lisp_Vectorlike,
  (gdb) bt
  #0  PSEUDOVECTORP (code=<optimized out>, a=<optimized out>) at lisp.h:1720
  #1  MARKERP (x=<optimized out>) at lisp.h:2618
  #2  CHECK_MARKER (x=XIL(0xa000000018ac0518)) at marker.c:133
  #3  0x010f073c in Fmarker_position (marker=XIL(0xa000000018ac0518))
      at marker.c:452
  #4  0x010edd34 in signal_before_change (preserve_ptr=0x0, end_int=3116,
      start_int=3116) at insdel.c:2179
  #5  prepare_to_modify_buffer_1 (start=start@entry=3116, end=end@entry=3116,
      preserve_ptr=preserve_ptr@entry=0x0) at insdel.c:2007
  #6  0x010ee27d in prepare_to_modify_buffer (start=3116, end=3116,
      preserve_ptr=preserve_ptr@entry=0x0) at insdel.c:2018
  #7  0x010ee54d in insert_1_both (string=string@entry=0x82ef1b "r",
      nchars=nchars@entry=1, nbytes=nbytes@entry=1, inherit=inherit@entry=true,
      prepare=prepare@entry=true, before_markers=before_markers@entry=false)
      at insdel.c:896
  #8  0x010ef005 in insert_1_both (before_markers=false, prepare=true,
      inherit=true, nbytes=1, nchars=1, string=0x82ef1b "r") at insdel.c:697
  #9  insert_and_inherit (string=string@entry=0x82ef1b "r",
      nbytes=nbytes@entry=1) at insdel.c:692
  #10 0x01107160 in internal_self_insert (c=114, n=<optimized out>)
      at cmds.c:477
  #11 0x01107804 in Fself_insert_command (n=make_fixnum(1), c=<optimized out>)
      at cmds.c:302
  #12 0x0114fb6c in funcall_subr (subr=<optimized out>,
      numargs=<optimized out>, numargs@entry=2, args=<optimized out>,
      args@entry=0x82f120) at eval.c:2869
  #13 0x0114d9fd in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x82f118)
      at eval.c:2794
  #14 0x01148f7d in Ffuncall_interactively (nargs=3, args=0x82f118)
      at callint.c:254
  #15 0x0114d9fd in Ffuncall (nargs=4, args=0x82f110) at eval.c:2794
  #16 0x0114dca3 in Fapply (nargs=<optimized out>, nargs@entry=3,
      args=<optimized out>, args@entry=0x82f288) at eval.c:2424
  #17 0x0114aecb in Fcall_interactively (function=XIL(0x43b3350),
      record_flag=<optimized out>, keys=XIL(0xa000000016a31530))
      at callint.c:342
  #18 0x0114fb99 in funcall_subr (subr=<optimized out>,
      numargs=<optimized out>, numargs@entry=3, args=<optimized out>,
      args@entry=0x82f430) at eval.c:2872
  #19 0x0114d9fd in Ffuncall (nargs=4, args=args@entry=0x82f428) at eval.c:2794
  #20 0x0118eaf7 in exec_byte_code (bytestr=<optimized out>,
      vector=<optimized out>, maxdepth=<optimized out>,
      args_template=<optimized out>, nargs=<optimized out>, nargs@entry=1,
      args=<optimized out>, args@entry=0x82f7b8) at bytecode.c:633
  #21 0x0115125f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=1,
      arg_vector=arg_vector@entry=0x82f7b8) at eval.c:2989
  #22 0x0114d953 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x82f7b0)
      at eval.c:2808
  #23 0x0114db2c in call1 (fn=XIL(0x3f30), arg1=XIL(0x43b3350)) at eval.c:2654
  #24 0x010d0efe in command_loop_1 () at keyboard.c:1463
  #25 0x0114c91f in internal_condition_case (
      bfun=bfun@entry=0x10d0a0e <command_loop_1>, handlers=XIL(0x90),
      hfun=hfun@entry=0x10c5049 <cmd_error>) at eval.c:1355
  #26 0x010bdbda in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091
  #27 0x0114c8a6 in internal_catch (tag=XIL(0xdfb0),
      func=func@entry=0x10bdbb3 <command_loop_2>, arg=XIL(0)) at eval.c:1116
  #28 0x010bdb5d in command_loop () at keyboard.c:1070
  #29 0x010c4bf3 in recursive_edit_1 () at keyboard.c:714
  #30 0x010c4f0c in Frecursive_edit () at keyboard.c:786
  #31 0x0124a4a4 in main (argc=<optimized out>, argv=<optimized out>)
      at emacs.c:2054

  Lisp Backtrace:
  "self-insert-command" (0x82f120)
  "funcall-interactively" (0x82f118)
  "call-interactively" (0x82f430)
  "command-execute" (0x82f7b8)
  (gdb) fr 3
  #3  CHECK_MARKER (x=XIL(0xa000000018ac0518)) at marker.c:133
  133       CHECK_TYPE (MARKERP (x), Qmarkerp, x);
  (gdb) up
  #4  0x010f073c in Fmarker_position (marker=XIL(0xa000000018ac0518))
      at marker.c:452
  452       CHECK_MARKER (marker);
  (gdb) p marker
  $3 = XIL(0xa000000018ac0518)
  (gdb) xtype
  Lisp_Vectorlike
  Cannot access memory at address 0x18ac0518
  (gdb) p marker+0
  $4 = -6917529027227155176
  (gdb) p/x marker+0
  $5 = 0xa000000018ac0518
  (gdb) up
  #5  0x010edd34 in signal_before_change (preserve_ptr=0x0, end_int=3116,
      start_int=3116) at insdel.c:2179
  2179          report_overlay_modification (FETCH_START, FETCH_END, 0,
  (gdb) p Vbefore_change_functions
  $6 = XIL(0xc000000018dbef20)
  (gdb) xtype
  Lisp_Cons
  (gdb) xcar
  $7 = 0x30
  (gdb) xtype
  Lisp_Symbol
  (gdb) xsymbol
  $8 = (struct Lisp_Symbol *) 0x15ca210 <lispsym+48>
  "t"
  (gdb) p Vbefore_change_functions
  $9 = XIL(0xc000000018dbef20)
  (gdb) xcdr
  $10 = 0xc000000018dbf410
  (gdb) xcar
  $11 = 0xd5c0
  (gdb) xtype
  Lisp_Symbol
  (gdb) xsym
  xsymbol   xsymname
  (gdb) xsymbol
  $12 = (struct Lisp_Symbol *) 0x15d77a0 <lispsym+54720>
  "syntax-ppss-flush-cache"
  (gdb) p Vbefore_change_functions
  $13 = XIL(0xc000000018dbef20)
  (gdb) xcdr
  $14 = 0xc000000018dbf410
  (gdb) xcdr
  $15 = 0x0
  (gdb) p start
  $16 = <optimized out>
  (gdb) p start_int
  $17 = 3116
  (gdb) p end_int
  $18 = 3116
  (gdb) p start_marker
  $19 = XIL(0xa000000018ac04f8)
  (gdb) p end_marker
  $20 = XIL(0xa000000018ac0518)
  (gdb) p start_marker
  $21 = XIL(0xa000000018ac04f8)
  (gdb) xtype
  Lisp_Vectorlike
  Cannot access memory at address 0x18ac04f8
  (gdb) p preserve_ptr
  $22 = (ptrdiff_t *) 0x0
  (gdb) p *(current_buffer->text->beg+3000)
  $23 = 115 's'
  (gdb) p *(current_buffer->text->beg+3000)@200
  $24 = "sense would then\nsuggest us that the feature should be extended to other means of\ndkispaying messages in the echo a", '\000' <repeats 84 times>
  (gdb) p *(current_buffer->text->beg+3116)
  $25 = 0 '\000'
  (gdb) p GPT
  $26 = 3116
  (gdb) p GPT_ADDR
  $27 = (unsigned char *) 0x7d80c2b ""
  (gdb) p current_buffer->overlays_before
  $28 = (struct Lisp_Overlay *) 0x170cb080
  (gdb) p $28->start
  $29 = XIL(0xa0000000170cb040)
  (gdb) xtype
  Lisp_Vectorlike
  Cannot access memory at address 0x18ac04f8
  (gdb) p $28->next
  $30 = (struct Lisp_Overlay *) 0x13050320
  (gdb) p $28->next->start
  $31 = XIL(0xa000000016172310)
  (gdb) xtype
  Lisp_Vectorlike
  Cannot access memory at address 0x18ac04f8
  (gdb) p current_buffer->overlays_after
  $32 = (struct Lisp_Overlay *) 0x0
  (gdb) p $28->next->next
  $33 = (struct Lisp_Overlay *) 0x0
  (gdb) p rvoe_arg.location
  $35 = (Lisp_Object *) 0x15c9298 <globals+120>
  (gdb) xtype
  Lisp_Vectorlike
  Cannot access memory at address 0x18ac04f8
  (gdb) p rvoe_arg.errorp
  $36 = false





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 17 May 2020 15:58:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 11:58:15 2020
Received: from localhost ([127.0.0.1]:44401 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaLg7-0005hr-EL
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 11:58:15 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44726)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jaLg6-0005he-87
 for 41321 <at> debbugs.gnu.org; Sun, 17 May 2020 11:58:14 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33191)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jaLg0-0007mi-Sf; Sun, 17 May 2020 11:58:08 -0400
Received: from [176.228.60.248] (port=4684 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jaLfs-0006in-L3; Sun, 17 May 2020 11:58:01 -0400
Date: Sun, 17 May 2020 18:57:53 +0300
Message-Id: <83imgublku.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: pipcet@HIDDEN
In-Reply-To: <83r1vibmyj.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 17
 May 2020 18:28:04 +0300)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 <83r1vibmyj.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 17 May 2020 18:28:04 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 41321 <at> debbugs.gnu.org
> 
> I'm already running with such a breakpoint, let's how it will catch
> something.                                        ^^^

Should have been "hope".  Sorry.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 17 May 2020 15:28:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 11:28:19 2020
Received: from localhost ([127.0.0.1]:44323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaLD9-0004nS-Jm
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 11:28:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39876)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jaLD7-0004nE-Tb
 for 41321 <at> debbugs.gnu.org; Sun, 17 May 2020 11:28:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60581)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jaLD2-0008Nr-MP; Sun, 17 May 2020 11:28:12 -0400
Received: from [176.228.60.248] (port=2849 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jaLD1-0001wK-N4; Sun, 17 May 2020 11:28:12 -0400
Date: Sun, 17 May 2020 18:28:04 +0300
Message-Id: <83r1vibmyj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
In-Reply-To: <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
 (message from Pip Cet on Sun, 17 May 2020 10:56:28 +0000)
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
References: <83zha8cgpi.fsf@HIDDEN>
 <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Pip Cet <pipcet@HIDDEN>
> Date: Sun, 17 May 2020 10:56:28 +0000
> Cc: 41321 <at> debbugs.gnu.org
> 
> What I would do next is run with a breakpoint on wrong_type_argument
> (if that's impossible, change the code in CHECK_MARKER to abort upon
> encountering a PVEC_FREE vector) to see where the reference to the
> freed pseudovector came from. An undo list, maybe?

I'm already running with such a breakpoint, let's how it will catch
something.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 17 May 2020 10:57:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 06:57:12 2020
Received: from localhost ([127.0.0.1]:42406 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaGym-0001o7-6S
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 06:57:12 -0400
Received: from mail-ot1-f43.google.com ([209.85.210.43]:37902)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1jaGyk-0001nu-SL
 for 41321 <at> debbugs.gnu.org; Sun, 17 May 2020 06:57:11 -0400
Received: by mail-ot1-f43.google.com with SMTP id w22so5639900otp.5
 for <41321 <at> debbugs.gnu.org>; Sun, 17 May 2020 03:57:10 -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=fmFsaWgSwVRHH+lCxrbSoa/tv6zNnIIoTL2Mnnk+uqQ=;
 b=fpgktwIzbp3d8H7LrH0RilSnwT93Zx3qR0lFK2q9CT1DziZJlmVFYa7FEBRT9JMAXg
 r41lY3zi21fTHbycBVNScnayu6+VNUayY1LtUjkwVQ1/LlLB7OH2ggbf5lMjYXXsXZWf
 MmNrm3MewWLT6HNX98v6Go2dCpqhxSrE5cOQ1fMgTolgjr3XEiyOntL9CxZNb2X1Wp7a
 lYYxg0kr7GKevivhdXbevxCBBlKwPqY2HhFNeQKpUvWDF9taMq0AbMFsUTgHy7Odc1CB
 sSxZx+mj/WTWqU/hifepebbMHIwOYsWfX8ocjJy8BpEqTuWX0/L7nd4/8A3nF9ND3TcJ
 a2rw==
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=fmFsaWgSwVRHH+lCxrbSoa/tv6zNnIIoTL2Mnnk+uqQ=;
 b=TLRwSgv60HU82YjvVQVI8qX2KtMvyja0CKQi2F1CxZQVCkoxuJd20mkisCpfbLOSfE
 VQqppB8UHzPMirc7XYFg/GN0SSSiraPbpH6HCjnnVtTp10bAHn36REIu28BnS0UI85Vf
 4yOsFmtRvi8rUYuIYSuGSk4U6/mPCb1s25hYAQGskkAzhFc/JE9oiwZMG0exm0v731qE
 6pkIxKhWwSAa1l3/WiQoRwpimdBM3C9nvFb1P401LpMcCMU23ze4DebC2sFMCdlf2IWt
 gswSwBDNjZNJfxbdUey3vOYreXxRaX91fATbtgiPbenIpl/BD7s7al/NF1ieiCUyGbhM
 /O1g==
X-Gm-Message-State: AOAM530cc2luJT54oDrdAaM8hoz1AaPMdSUhrRm+7yPuQTwrhIU6BxKR
 WJ8aTOpERxoYx2jl2lhEVtx6MPJqScLwB94rL7lPfuLA
X-Google-Smtp-Source: ABdhPJx6PR9JPl3N7C99lllOl/oee2BmqucIyDmD6gaqvEmWbcWe0VYLVAfrZ0F2BZZFRmoAvEi4QHNTu0N7KRrPGMM=
X-Received: by 2002:a9d:6a44:: with SMTP id h4mr4008615otn.287.1589713025005; 
 Sun, 17 May 2020 03:57:05 -0700 (PDT)
MIME-Version: 1.0
References: <83zha8cgpi.fsf@HIDDEN>
In-Reply-To: <83zha8cgpi.fsf@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sun, 17 May 2020 10:56:28 +0000
Message-ID: <CAOqdjBf5WThscN54Tg2ef4Hrxkc9P2UWfKRrptSDsd=X7WrRbg@HIDDEN>
Subject: Re: bug#41321: 27.0.91;
 Emacs aborts due to invalid pseudovector objects
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, May 16, 2020 at 10:34 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> So far, I've seen this in a C Mode buffer reverted because "git pull"
> brought a modified version, and in an Info mode buffer reverted
> because the manual was rebuilt after the Texinfo sources were
> modified.  In the latter case I captured a backtrace, see below.
>
> The problem seem to involve invalid markers, perhaps markers that were
> unchained and put on the free list

Even unchained markers shouldn't be put on the free list as long as
they're still reachable, so I suspect the problem is more likely to be
caused by that.

> (witness the PVEC_FREE object that
> caused the abort in the backtrace below, where Emacs seems to be
> trying to display an error message about an invalid marker).

What I would do next is run with a breakpoint on wrong_type_argument
(if that's impossible, change the code in CHECK_MARKER to abort upon
encountering a PVEC_FREE vector) to see where the reference to the
freed pseudovector came from. An undo list, maybe?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 16 May 2020 16:47:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 16 12:47:48 2020
Received: from localhost ([127.0.0.1]:41614 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jZzyW-0001f3-HM
	for submit <at> debbugs.gnu.org; Sat, 16 May 2020 12:47:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37806)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jZzyU-0001eX-CB
 for 41321 <at> debbugs.gnu.org; Sat, 16 May 2020 12:47:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44497)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1jZzyO-00081J-0U; Sat, 16 May 2020 12:47:40 -0400
Received: from [176.228.60.248] (port=3117 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jZzyN-0005Sk-HO; Sat, 16 May 2020 12:47:39 -0400
Date: Sat, 16 May 2020 19:47:29 +0300
Message-Id: <83d073ddy6.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
In-Reply-To: <a493b7a3-21b9-24ac-0ce5-9dd21175744f@HIDDEN> (message from
 Paul Eggert on Sat, 16 May 2020 09:33:35 -0700)
Subject: Re: 27.0.91; Emacs aborts due to invalid pseudovector objects
References: <a493b7a3-21b9-24ac-0ce5-9dd21175744f@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 41321 <at> debbugs.gnu.org
> From: Paul Eggert <eggert@HIDDEN>
> Date: Sat, 16 May 2020 09:33:35 -0700
> 
> I fooled around a bit with emacs-27 on Ubuntu 18.04.4 (compiled in 32-bit mode
> --with-wide-int) and couldn't reproduce it. I'll keep trying.

Yes, I didn't succeed reproducing it on purpose, either.  Not sure
why, maybe there's some other factor that is at work, e.g. how many
markers are there in the buffer.

> Could you give more details about the failures you observed? That might help
> attempts at reproducing. How did you revert your info buffer - was it by typing
> "M-x revert-buffer"? Are you using auto-revert-mode? That sort of thing.

Just "M-x revert-buffer RET" followed by 'y'.  I don't use
auto-revert-mode.

In the Git case, I would usually switch to a buffer visiting the file,
perhaps via "M-.", and Emacs would ask me whether to re-read the file
into its buffer, I'd say yes, and then I see an error about a bad
marker; the next command would abort Emacs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at 41321 <at> debbugs.gnu.org:


Received: (at 41321) by debbugs.gnu.org; 16 May 2020 16:33:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 16 12:33:44 2020
Received: from localhost ([127.0.0.1]:41574 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jZzku-0001BV-GN
	for submit <at> debbugs.gnu.org; Sat, 16 May 2020 12:33:44 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35480)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jZzks-0001BI-TL
 for 41321 <at> debbugs.gnu.org; Sat, 16 May 2020 12:33:43 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 68E701600DA;
 Sat, 16 May 2020 09:33:37 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id p-nN_3GxQsEh; Sat, 16 May 2020 09:33:36 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id AE2751600DE;
 Sat, 16 May 2020 09:33:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id fZMwt_EjSu4B; Sat, 16 May 2020 09:33:36 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7544C1600DA;
 Sat, 16 May 2020 09:33:36 -0700 (PDT)
To: Eli Zaretskii <eliz@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Subject: Re: 27.0.91; Emacs aborts due to invalid pseudovector objects
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH
 ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL
 aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D
 UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT
 MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls
 QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0Ix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3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt
 SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2
 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <a493b7a3-21b9-24ac-0ce5-9dd21175744f@HIDDEN>
Date: Sat, 16 May 2020 09:33:35 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41321
Cc: 41321 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

I fooled around a bit with emacs-27 on Ubuntu 18.04.4 (compiled in 32-bit mode
--with-wide-int) and couldn't reproduce it. I'll keep trying.

Could you give more details about the failures you observed? That might help
attempts at reproducing. How did you revert your info buffer - was it by typing
"M-x revert-buffer"? Are you using auto-revert-mode? That sort of thing.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 May 2020 10:33:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 16 06:33:31 2020
Received: from localhost ([127.0.0.1]:39842 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jZu8J-0006W5-4Q
	for submit <at> debbugs.gnu.org; Sat, 16 May 2020 06:33:31 -0400
Received: from lists.gnu.org ([209.51.188.17]:41768)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jZu8E-0006Vv-Kf
 for submit <at> debbugs.gnu.org; Sat, 16 May 2020 06:33:30 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36220)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1jZu8E-0003wQ-EP
 for bug-gnu-emacs@HIDDEN; Sat, 16 May 2020 06:33:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39925)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>) id 1jZu8E-0000Aw-5q
 for bug-gnu-emacs@HIDDEN; Sat, 16 May 2020 06:33:26 -0400
Received: from [176.228.60.248] (port=3758 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>) id 1jZu8D-0000z3-IW
 for bug-gnu-emacs@HIDDEN; Sat, 16 May 2020 06:33:25 -0400
Date: Sat, 16 May 2020 13:33:13 +0300
Message-Id: <83zha8cgpi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.91; Emacs aborts due to invalid pseudovector objects
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

I don't have a reproducible recipe, unfortunately.

What happens is that Emacs aborts a short time after reverting a
buffer (reverted because the file it is visiting was changed on disk).
So far, I've seen this in a C Mode buffer reverted because "git pull"
brought a modified version, and in an Info mode buffer reverted
because the manual was rebuilt after the Texinfo sources were
modified.  In the latter case I captured a backtrace, see below.

The problem seem to involve invalid markers, perhaps markers that were
unchained and put on the free list (witness the PVEC_FREE object that
caused the abort in the backtrace below, where Emacs seems to be
trying to display an error message about an invalid marker).

I don't think I saw such problems in Emacs 27.0.90, so I walked
through all the changes since then till 27.0.91 release, but didn't
see anything that could explain the problem.

Needless to say, this is a serious problem, so I'd like to ask
everyone to please run the latest pretest under a debugger and report
any similar problems with all the details they can provide.

Here's the backtrace and some additional information from the session
where it happened last:

Thread 1 hit Breakpoint 3, 0x77c36bb3 in msvcrt!abort ()
   from C:\WINDOWS\system32\msvcrt.dll
(gdb) bt
#0  0x77c36bb3 in msvcrt!abort () from C:\WINDOWS\system32\msvcrt.dll
#1  0x011cfdd8 in emacs_abort () at w32fns.c:10893
#2  0x01175f3a in print_vectorlike (obj=<optimized out>,
    printcharfun=XIL(0x30), escapeflag=escapeflag@entry=true,
    buf=buf@entry=0x82f07a "") at print.c:1830
#3  0x01172055 in print_object (obj=<optimized out>, printcharfun=XIL(0x30),
    escapeflag=true) at print.c:2148
#4  0x01172f04 in print (obj=<optimized out>, printcharfun=<optimized out>,
    escapeflag=<optimized out>, escapeflag@entry=true) at print.c:1147
#5  0x01173355 in Fprin1 (object=XIL(0xa00000001c9866d8),
    printcharfun=<optimized out>) at print.c:653
#6  0x0117483b in print_error_message (data=<optimized out>,
    stream=<optimized out>, context=<optimized out>, caller=<optimized out>)
    at print.c:979
#7  0x010c13c5 in Fcommand_error_default_function (
    data=XIL(0xc000000000ff92e0), context=XIL(0x80000000058e9118),
    sys_signal=XIL(0x5d72548)) at keyboard.c:1029
#8  0x0114fb99 in funcall_subr (subr=<optimized out>,
    numargs=<optimized out>, numargs@entry=3, args=<optimized out>,
    args@entry=0x82f498) at eval.c:2872
#9  0x0114d9fd in Ffuncall (nargs=4, args=0x82f490) at eval.c:2794
#10 0x0114dca3 in Fapply (nargs=<optimized out>, args=<optimized out>)
    at eval.c:2424
#11 0x0114d9fd in Ffuncall (nargs=3, args=args@entry=0x82f590) at eval.c:2794
#12 0x0118eaf7 in exec_byte_code (bytestr=<optimized out>,
    vector=<optimized out>, maxdepth=<optimized out>,
    args_template=<optimized out>, nargs=<optimized out>, nargs@entry=3,
    args=<optimized out>, args@entry=0x82f888) at bytecode.c:633
#13 0x0115125f in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=3,
    arg_vector=arg_vector@entry=0x82f888) at eval.c:2989
#14 0x0114d953 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x82f880)
    at eval.c:2808
#15 0x01151d29 in call3 (fn=XIL(0xa000000005e00b20),
    arg1=XIL(0xc000000000ff92e0), arg2=XIL(0x80000000058e9118),
    arg3=XIL(0x5d72548)) at eval.c:2668
#16 0x010c5020 in cmd_error_internal (data=XIL(0xc000000000ff92e0),
    context=context@entry=0x82f92e "") at keyboard.c:984
#17 0x010c51e6 in cmd_error (data=XIL(0xc000000000ff92e0)) at keyboard.c:953
#18 0x0114c952 in internal_condition_case (
    bfun=bfun@entry=0x10d0a0e <command_loop_1>, handlers=XIL(0x90),
    hfun=hfun@entry=0x10c5049 <cmd_error>) at eval.c:1351
#19 0x010bdbda in command_loop_2 (ignore=XIL(0)) at keyboard.c:1091
#20 0x0114c8a6 in internal_catch (tag=XIL(0xdfb0),
    func=func@entry=0x10bdbb3 <command_loop_2>, arg=XIL(0)) at eval.c:1116
#21 0x010bdb5d in command_loop () at keyboard.c:1070
#22 0x010c4bf3 in recursive_edit_1 () at keyboard.c:714
#23 0x010c4f0c in Frecursive_edit () at keyboard.c:786
#24 0x0124a4a4 in main (argc=<optimized out>, argv=<optimized out>)
    at emacs.c:2054

Lisp Backtrace:
"command-error-default-function" (0x82f498)
"apply" (0x82f598)
0x5e00b20 PVEC_COMPILED
(gdb) fr 2
#2  0x01175f3a in print_vectorlike (obj=<optimized out>,
    printcharfun=XIL(0x30), escapeflag=escapeflag@entry=true,
    buf=buf@entry=0x82f07a "") at print.c:1830
1830          emacs_abort ();
(gdb) fr 7
#7  0x010c13c5 in Fcommand_error_default_function (
    data=XIL(0xc000000000ff92e0), context=XIL(0x80000000058e9118),
    sys_signal=XIL(0x5d72548)) at keyboard.c:1029
1029          print_error_message (data, Qt, SSDATA (context), signal);
(gdb) p data
$1 = XIL(0xc000000000ff92e0)
(gdb) xtype
Lisp_Cons
(gdb) xcar
$2 = 0xfd80
(gdb) xtype
Lisp_Symbol
(gdb) xsym
xsymbol   xsymname
(gdb) xsymbol
$3 = (struct Lisp_Symbol *) 0x15d9f60 <lispsym+64896>
"wrong-type-argument"
(gdb) p data
$4 = XIL(0xc000000000ff92e0)
(gdb) xcdr
$5 = 0xc000000000ff9300
(gdb) xtype
Lisp_Cons
(gdb) xcar
$6 = 0x9810
(gdb) xtype
Lisp_Symbol
(gdb) xsymbol
$7 = (struct Lisp_Symbol *) 0x15d39f0 <lispsym+38928>
"markerp"
(gdb) p data
$8 = XIL(0xc000000000ff92e0)
(gdb) xcdr
$9 = 0xc000000000ff9300
(gdb) xcdr
$10 = 0xc000000000ff9310
(gdb) xtype
Lisp_Cons
(gdb) xcar
$11 = 0xa00000001c9866d8
(gdb) xtype
Lisp_Vectorlike
PVEC_FREE
(gdb) fr 17
#17 0x010c51e6 in cmd_error (data=XIL(0xc000000000ff92e0)) at keyboard.c:953
953       cmd_error_internal (data, macroerror);

In GNU Emacs 27.0.91 (build 1, i686-pc-mingw32)
 of 2020-04-18 built on HOME-C4E4A596F7
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --prefix=/d/usr --with-wide-int --with-modules 'CFLAGS=-O2
 -gdwarf-4 -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1255

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify w32 lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 50536 10936)
 (symbols 48 7172 1)
 (strings 16 18837 2268)
 (string-bytes 1 532938)
 (vectors 16 9527)
 (vector-slots 8 127687 7318)
 (floats 8 21 170)
 (intervals 40 254 84)
 (buffers 888 11))




Acknowledgement sent to Eli Zaretskii <eliz@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#41321; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 30 May 2020 19:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.