From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD Date: Tue, 16 Jul 2024 08:49:38 -0700 Organization: UCLA Computer Science Department Message-ID: References: <86zfqhh2xv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17405"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: pipcet@protonmail.com, emacs-devel@gnu.org, eller.helmut@gmail.com To: Eli Zaretskii , =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 16 17:50:39 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sTkRq-0004HX-T3 for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Jul 2024 17:50:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTkR3-0002Ka-KA; Tue, 16 Jul 2024 11:49:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTkR1-0002K1-Jg for emacs-devel@gnu.org; Tue, 16 Jul 2024 11:49:47 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTkQz-0006HC-CE; Tue, 16 Jul 2024 11:49:47 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 9F2613C0140A0; Tue, 16 Jul 2024 08:49:39 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id GuhDBJt7-RS7; Tue, 16 Jul 2024 08:49:39 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 3DD023C00E40F; Tue, 16 Jul 2024 08:49:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 3DD023C00E40F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1721144979; bh=Q1C9/TQoYoVMK08rUBkPkxVqGQAuliNj+/yK5A/zjYs=; h=Message-ID:Date:MIME-Version:To:From; b=QNrXpY4NrdCkSqzkzv+eTfzV5YSfOfl0hmmcmOnDh6lU360MvO0nmxS2W3eKER+9T P760Hz19PbgmBqdjrD53gDrF6tBTE/LretrdV6/dbVx6jBTfY5VnzxZ6ce2VBOU2fg M2IGO4/nh6puxXhDlkY0uqTAsH29em3zy+Ov/RYutMECqKXss6FU+hPuswrtqj7dDZ l1hYXdvn1c5MU/7gcz/tGu8VHnxD40mc+nE+1N8Zr5Q0y+32/chhaLXswjgwKFFFpX STohA2O//k2L0KYgX7GB3VP3ERn5euRVDdQ/C0xSqWV8Z3VSBwwY5/u0ynaBArwAUI sAKGzXX95Wt7g== X-Virus-Scanned: amavis at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id NpzG2SfPLvXe; Tue, 16 Jul 2024 08:49:39 -0700 (PDT) Original-Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 20C393C0140A0; Tue, 16 Jul 2024 08:49:39 -0700 (PDT) Content-Language: en-US In-Reply-To: <86zfqhh2xv.fsf@gnu.org> Received-SPF: pass client-ip=131.179.128.66; envelope-from=eggert@cs.ucla.edu; helo=mail.cs.ucla.edu X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321717 Archived-At: On 2024-07-16 06:38, Eli Zaretskii wrote: >> From: Gerd M=C3=B6llmann >> Cc: Emacs Devel, Helmut Eller >> The function scan_ambig assumes that that references are aligned on wo= rd >> boundaries (8 bytes here). I haven't checked (and I'm too lazy to chec= k >> :-)), but that assumption doesn't have to be true. > I think it_is_ true. At least the original allocation code in > alloc.c made sure it was true. Paul, am I right? You're right. In lisp.h, struct Lisp_Symbol is declared with a=20 GCALIGNED_UNION_MEMBER, which means that struct Lisp_Symbol must be on=20 an address that is a multiple of 8. This is verified statically by=20 lisp.h's line "verify (GCALIGNED (struct Lisp_Symbol));". Although there=20 could be a bug in Emacs that would use pointer arithmetic to misalign a=20 struct Lisp_Symbol, that would be the same class of bug that would=20 misalign any other type. GCALIGNED_UNION_MEMBER is implemented via GNU C and/or C11 primitives if=20 available. Although this could be ineffective on older compilers, the=20 "verify (GCALIGNED (struct Lisp_Symbol));" would catch any older=20 compiler that happened to not align struct Lisp_Symbol properly. In=20 practice we've never run into any such compiler and are never likely to=20 in the future, so long as we insist only on an alignment of 8.