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: Building the igc branch on MS-Windows Date: Sat, 27 Apr 2024 14:15:35 +0300 Message-ID: <86y18zukdk.fsf@gnu.org> References: <86il063imh.fsf@gnu.org> <87pluegd4z.fsf@gmail.com> <86ttjp20je.fsf@gnu.org> <87y191fwnd.fsf@gmail.com> <87cyqcfv6k.fsf@gmail.com> <86o79wzi31.fsf@gnu.org> <86mspgza23.fsf@gnu.org> <867cgkz7e2.fsf@gnu.org> <87r0esdv7o.fsf@gmail.com> <87le50dmec.fsf@gmail.com> <8734r7etu1.fsf@gmail.com> <86il03xrlz.fsf@gnu.org> <868r0zxpfr.fsf@gnu.org> <8634r7xoil.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1561"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 27 13:16:59 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 1s0g38-0000Ci-Ij for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Apr 2024 13:16:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0g2B-0003nT-E8; Sat, 27 Apr 2024 07:15:59 -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 1s0g24-0003m0-Tw for emacs-devel@gnu.org; Sat, 27 Apr 2024 07:15:56 -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 1s0g24-0001De-Gh; Sat, 27 Apr 2024 07:15:52 -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=wvJIO0Bu1tvXbQNtWzF4DjA9fWqENmIchFAixCWEuHw=; b=eKt+bTOsxAln2OiPg3vK prssKxzqeo31Y5+UjtKNgZIDlgQe3a1uncVrb1xIwtL2WoMIJsuM2H11zB9hj5LbfT3hK2xXGtlM+ AgJlnLKvNEWgYtt2Ego/sXQeGBJ9wpgw1vVaW1WjSJXr6JqeMH9VFi5CXxlqncqxaEGp9LIWMzoQj zZZTrdMV1GAgPaQTMFrPyAlahog9+9HNyThZCUXey54frUvU/DOFiKnql6SVf6UCXql7V9fPACmJ0 wBDb73s+lDmibPbkLSN8j8zjsJwVpWYPfeKqBSupQDCHM50/eTrswVnXr0Jp9gBqlYBieQaiFGNPn I2/bDcjqqznjNA==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Sat, 27 Apr 2024 10:38:02 +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:318186 Archived-At: > From: Gerd Möllmann > Cc: eller.helmut@gmail.com, emacs-devel@gnu.org > Date: Sat, 27 Apr 2024 10:38:02 +0200 > > Eli Zaretskii writes: > > > How do we protect the font objects we create in xfaces.c from being > > GC'ed? AFAICT, the face's 'font' member is the 'struct font' part of > > a Lisp font object, which comes from Lisp. But when the Lisp object > > is copied, does MPS update the 'font' pointer of a face? > > I'm creating the MPS pools with support for interior pointers, i.e. a > pointer to somehwere inside of an object keeps the object alive. It's > not necessary that there exists a pointer to the object start. > > Is that's what happening here? Maybe. If font objects are kept alive, and face->font is supposed to be updated when the font object moves, by virtue of fix_face, then how come face->font ends up pointing to inaccessible memory in Helmut's recipe? > (Not directly related, just to spread the info: This is necessary anyway > because I'm not using MPS in-band headers. With in-band headers, MPS > would itself do the calculations that I put into client_to_base, and > base_to_client. Base meaning the object start from the perspective of > MPS, and client meaning the object start from Emacs' POV. So, any > reference that Emacs holds is an interior pointer for MPS. Speaking about these two functions: are we sure struct member alignment will not get in the way of these calculations? AFAIR, alignment of struct members is 8, even in 32-bit builds, is that right? While sizeof (struct igc_header) yields 8 in my build, I wonder whether this is enough?