From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts Date: Wed, 24 Jul 2024 10:33:11 +0200 Message-ID: <87ed7j6vg8.fsf@gmail.com> References: <861q3k9sfb.fsf@gnu.org> <86y15s893y.fsf@gnu.org> <86ttgg867k.fsf@gnu.org> <86ikww7zvf.fsf@gnu.org> <86h6cg7y59.fsf@gnu.org> <87v80v6wxd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37290"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 24 10:34:12 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 1sWXRs-0009aF-8w for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Jul 2024 10:34:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWXR4-0000pD-2X; Wed, 24 Jul 2024 04:33:22 -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 1sWXR0-0000ga-6w for emacs-devel@gnu.org; Wed, 24 Jul 2024 04:33:18 -0400 Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWXQx-0005A2-2q; Wed, 24 Jul 2024 04:33:17 -0400 Original-Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a6265d3ba8fso133338066b.0; Wed, 24 Jul 2024 01:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721809993; x=1722414793; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=nOn1eqPQ0Xwqy0uz/R9/q2DIhGUAOrTxLnb+0YPQRhE=; b=M1jLGAotB5bS/D0Iu+4M0+m7Ti57CoDFKXMYSC0r5NRzQS/anIU8aO9aOkgr8BJNC1 Ti0eUdM3P0EN9xuQMRha856atCLuVPgWJbXzdDye0bl9Yvz78jiPVreDELVXutGLr+Mj a4w6nRkWmq7pOEeSpLFmxZ/gyXkgsHNJBY5gF1VmviZFu7VqDZeanu8sfZHHB88ftDpW a1JNDuuKIHCL4qtuORbqJR1EOwT+r0U/uqlzAabCW3P9cdlOVkt1wde7e5T5RWi3YEl4 7DF3pzfAAiQLcJQ2D7jyibhFLd4xDNkoFjp89plPd7fTdyehiebp7bYy1F1VSkVB8gLq oenQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721809993; x=1722414793; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nOn1eqPQ0Xwqy0uz/R9/q2DIhGUAOrTxLnb+0YPQRhE=; b=QzE6REwpGuZqA/V3ExKP7WrcUxRIVpK/9PGpw0IjVOpxPCUScWv8iY1z2pCab0gdVb M/vrEVvG0UulXpALhp8SzwgWJxZwabz0oZgVsVjQ0862aEVnf2bF4vobsf7CA1sVuV3g FOZQJ8wMspuWr9WfUzw34QXFR3WQ4RD4ymXqCgxXCNAyGhsmDjr9T4pr9nyjeD/bvJKp CfhAKK/BceL/o2sGp5HGcrpjeTvT+YIa9rKKw8eUjqU36g7788GFmEn2Lqoi7VZnKNEA 3beZJzekVsfKc/lmurS9P0oPxP3+U3JK0QoJ/ixhcyc77U6UqRK/3xFDtKXPbnTYLO4K UtbA== X-Forwarded-Encrypted: i=1; AJvYcCVkyOQVS3+WR6hTD5yiux//22WWMeojlz2bkZ13SZDlFmdySNRtdlVDW+6LsuUZnAkaHeOOJ/lTbP4b4S1jNIK56u89 X-Gm-Message-State: AOJu0YwAaA7wLAssXIV1hPVyXyXyYglP4Zvr+mJr/3JU2PraQb1f+mAN gZFzgkJwzMLMoinlIMMOL/XXj0AHQAnS72byH1Oh8IPPXNx5Nw3hLO3ZeQ== X-Google-Smtp-Source: AGHT+IFrTJLph1AbQrbdCK8vIvIh6ylRlg7w3W5XHW98/uFJwgQ8QEPFLFiiVtP0vLxR2Zirx/cZDw== X-Received: by 2002:a17:906:f5a5:b0:a77:ab40:6d7f with SMTP id a640c23a62f3a-a7ab10bb270mr90551966b.43.1721809992707; Wed, 24 Jul 2024 01:33:12 -0700 (PDT) Original-Received: from caladan (dialin-234199.rol.raiffeisen.net. [195.254.234.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a92dddccdsm165233266b.79.2024.07.24.01.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jul 2024 01:33:12 -0700 (PDT) In-Reply-To: (Pip Cet's message of "Wed, 24 Jul 2024 08:21:11 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=eller.helmut@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:322030 Archived-At: On Wed, Jul 24 2024, Pip Cet wrote: >> First, is_aligned doesn't make any sense; client is neither a tagged >> pointer nor does it point to a header. > > It points to the contents area of a struct Lisp_Vector. Since the Lisp > vector header is aligned to 8 bytes, and 16 bytes in size including > the MPS header, the client address also has to be aligned. On my machine: (gdb) p sizeof (struct vectorlike_header) $56 = 12 (gdb) p sizeof (struct Lisp_Vector) $57 = 16 (gdb) p &((struct Lisp_Vector*)0)->contents $58 = (Lisp_Object (*)[]) 0xc (gdb) (gdb) p header_size $59 = header_size (gdb) p/x header_size $60 = 0xc (gdb) > I believe the best thing to do here is to calculate the header address > and assert, not check, that it is aligned. Unaligned addresses should > never get here. Right, the is_aligned test doesn't make any sense, even on 64-bit machines. >> Second, sizeof (struct Lisp_Vector) is 16 because the struct decl has >> GCALIGNED_STRUCT. The code should perhaps use header_size or >> offsetof (struct Lisp_Vector, content). > > I'm not sure I understand. sizeof (struct Lisp_Vector), header_size, > and offsetof (struct Lisp_Vector, content) are all 16. Not on my machine. See above.