From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector objects Date: Sat, 23 May 2020 23:54:17 +0000 Message-ID: References: <83zha8cgpi.fsf@gnu.org> <83r1vibmyj.fsf@gnu.org> <83imgublku.fsf@gnu.org> <831rncjuwf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000dd5c7505a6597855" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="60849"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41321@debbugs.gnu.org, Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 24 01:56:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jcdzt-000FnJ-Fs for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 May 2020 01:56:09 +0200 Original-Received: from localhost ([::1]:57638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcdzs-0001gO-4O for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 May 2020 19:56:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcdzm-0001gD-8C for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 19:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcdzl-0005ts-VY for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 19:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcdzl-000157-Um for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 19:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 May 2020 23:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41321 X-GNU-PR-Package: emacs Original-Received: via spool by 41321-submit@debbugs.gnu.org id=B41321.15902781024076 (code B ref 41321); Sat, 23 May 2020 23:56:01 +0000 Original-Received: (at 41321) by debbugs.gnu.org; 23 May 2020 23:55:02 +0000 Original-Received: from localhost ([127.0.0.1]:36052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcdyn-00013X-U9 for submit@debbugs.gnu.org; Sat, 23 May 2020 19:55:02 -0400 Original-Received: from mail-ot1-f49.google.com ([209.85.210.49]:41818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcdyl-00013J-AO for 41321@debbugs.gnu.org; Sat, 23 May 2020 19:55:00 -0400 Original-Received: by mail-ot1-f49.google.com with SMTP id 63so11234624oto.8 for <41321@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) In-Reply-To: <831rncjuwf.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180870 Archived-At: --000000000000dd5c7505a6597855 Content-Type: text/plain; charset="UTF-8" On Fri, May 22, 2020 at 7:22 AM Eli Zaretskii wrote: > #0 PSEUDOVECTORP (code=, a=) at lisp.h:1720 > #1 MARKERP (x=) 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 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: X-Attachment-Id: f_kakafz8k0 RnJvbSBhYmI3OWJmMzM2MjJiNGU4NDA3NTY1YWI4ZTgyNzcxYjZhMzU5NDVlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBTYXQs IDIzIE1heSAyMDIwIDIzOjUxOjU1ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gQWNjZX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