From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD Date: Tue, 16 Jul 2024 18:21:36 +0300 Message-ID: <86v815gy67.fsf@gnu.org> References: <86zfqhh2xv.fsf@gnu.org> <86y161h1e8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="416"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eggert@cs.ucla.edu, pipcet@protonmail.com, emacs-devel@gnu.org, eller.helmut@gmail.com To: Gerd =?iso-8859-1?Q?M=F6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 16 17:22:32 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 1sTk0Z-000AEm-TV for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Jul 2024 17:22:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTjzs-0002op-7f; Tue, 16 Jul 2024 11:21:44 -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 1sTjzp-0002nj-Aj for emacs-devel@gnu.org; Tue, 16 Jul 2024 11:21:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTjzo-00085t-9I; Tue, 16 Jul 2024 11:21:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=yRhH+bEPyCmmYrrrLMPKmojn0EruEnWqc5tD193GECU=; b=q52z2lEYCznI/z8VZB80 LWCxiI5JE69oYnL4L0xfRjAp4cf32KTxKNM/vm76OIKI/GOo9EXQaaLiKMDLHHF5qe2zth7LT3pc+ fz6T+Kh+nMJCqJKZxyXd0Zbi+5vGnDuNMs//KQLicYBHc3wLWqcWXkizxZR4b1lHR0mj2VBX7RmJ8 H5og+AfyGNKb8sVEkwX2vPgoCAAYkb2M5bVaWvbiF7+QAxNmVHGxn3gh59WZNddcrMZZUnJ2cQaF3 QuD8vI9KErA+2NvrJNDAALlkwnOUln94dbLPXGSeeUXXZ4cA3hatrOuMzCrLOYwOj31XhgXKo/hn2 BQZyRQ2DWZ8bAg==; In-Reply-To: (message from Gerd =?iso-8859-1?Q?M=F6llmann?= on Tue, 16 Jul 2024 16:39:46 +0200) 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:321712 Archived-At: > From: Gerd Möllmann > Cc: eggert@cs.ucla.edu, pipcet@protonmail.com, emacs-devel@gnu.org, > eller.helmut@gmail.com > Date: Tue, 16 Jul 2024 16:39:46 +0200 > > Eli Zaretskii writes: > > >> Example with sizeof(int) = 4, and sizeof(void *) = 8 > >> > >> struct x > >> { > >> int x; > >> struct Lisp_Symbol *s; > >> }; > >> > >> What about the offset of x::s? > > > > The pointer or the Lisp_Symbol struct it points to? > > What is offsetof (struct x, s)? Is it guaranteed to be 8 in this case? Yes, AFAIK. > But it's not limited to struct members. The question is similar for > control stacks, and anything allocated via malloc. Given an address > range [start, end) to scan with scan_ambig, where can references be > found? AFAIU, each memory block allocated by malloc is guaranteed to have the alignment of the largest fundamental data type on the platform. So yes, 8-byte alignment is guaranteed in this case. (See also the max_align_t data type introduced by C11.)