From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.user Subject: Re: G-Golf - Callback segmentation fault Date: Wed, 28 Aug 2024 21:18:05 -0300 Message-ID: <20240828211805.68f594a7@tintin> References: <87msl6c4lf.fsf@posteo.net> <20240821212129.7647d035@tintin> <87a5gxybgm.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_//ajQzUXMyT_IhO.JhqE9Aop"; protocol="application/pgp-signature"; micalg=pgp-sha512 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38840"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: Matija Obid Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Aug 29 02:19:10 2024 Return-path: Envelope-to: guile-user@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 1sjSsY-000A2Q-F9 for guile-user@m.gmane-mx.org; Thu, 29 Aug 2024 02:19:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjSrr-0004fV-6D; Wed, 28 Aug 2024 20:18:27 -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 1sjSro-0004Zo-N8 for guile-user@gnu.org; Wed, 28 Aug 2024 20:18:24 -0400 Original-Received: from mail.all2all.org ([79.99.200.14] helo=moses.all2all.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjSrm-0005as-Hk for guile-user@gnu.org; Wed, 28 Aug 2024 20:18:24 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by moses.all2all.org (Postfix) with ESMTP id 8A76467C007A; Thu, 29 Aug 2024 02:18:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at moses.all2all.org Original-Received: from moses.all2all.org ([127.0.0.1]) by localhost (moses.all2all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zvg8DArWSfAb; Thu, 29 Aug 2024 02:18:16 +0200 (CEST) Original-Received: from tintin (unknown [168.227.184.149]) by moses.all2all.org (Postfix) with ESMTPSA id ED0E967C0074; Thu, 29 Aug 2024 02:18:14 +0200 (CEST) In-Reply-To: <87a5gxybgm.fsf@posteo.net> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-pc-linux-gnu) Received-SPF: pass client-ip=79.99.200.14; envelope-from=david@altosw.be; helo=moses.all2all.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19773 Archived-At: --Sig_//ajQzUXMyT_IhO.JhqE9Aop Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello Matija, > There is a version check in "g-callable-info-make-closure" function, > if I disable it (check patch) all examples works just fine. Great! But ... > I'm not quite sure what these functions does, can you take another > look? g-callable-info-make-closure just select in between the appropriate GI make closure function it must use [1], depending on your GI version: >=3D 1.71.0 use g-callable-info-create-closure otherwise use g-callable-info-prepare-closure > My gi version is 1.80.1. So your patch seems to point to a problem in the upstream definition of the (most recent) g-callable-info-create-closure, which is the one everybody who's using GI >=3D 1.71.0 should use ... Your patch 'wrongly' force to still use the (deprecated in 1.72.0) g-callable-info-prepare-closure function. Note that, on NixOS and Guix, it is not the call to g-callable-info-create-closure that segfault, but the call to the closure that was made calling g-callable-info-create-closure Fwiw, I just posted an explanation of this problem in the matrix room #introspection:gnome.org, asking if anyone has an idea ... but i very much doubt they will answer. Do you (or anyone else interested ofc) have an idea of why would g-callable-info-create-closure perfectly create a closure pointer on debian, and not on guix/nix? Here is the upstream code def [2] Thanks, David [1] note that this code precedes the fact that g-golf now depends on GI >=3D 1.72.0, for some other reason - so technically, i could have removed g-callable-info-make-closure and always use g-callable-info-create-closure ... fortunately for guix/nix, till will find a real fix, i left this 'inoffensive' code in g-golf core ...=20 [2]=20 g_callable_info_create_closure https://salsa.debian.org/gnome-team/gobject-introspection/-/blob/debian/la= test/girepository/girffi.c?ref_type=3Dheads#L355 g_callable_info_prepare_closure https://salsa.debian.org/gnome-team/gobject-introspection/-/blob/debian/la= test/girepository/girffi.c?ref_type=3Dheads#L447 --Sig_//ajQzUXMyT_IhO.JhqE9Aop Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAmbPvj0ACgkQ83T9k6MF eteJ5Af/Sr6DIllyrTC9Q4Z60RktssqXCiUBSKrydc9FVi+HXFHUAc89COXATVuu ylt57LsIyDl2gXz1OsE4XGhxIthL/BASOXjQP1zwwOjm6U8OlMArtuKeL3o9AYyt 1QkBTpYPu/ABV/DxXbGFHyNBLSRoFnlmFpSVFf/AryTTEpJxxJBmABEIFNrRGgEV N7varuL6af3FzIHRz1KNPvPcCmG8jdW4gym+DPpZPNHEmyNFP7QSNdkcYFEPcosZ ZtUNlqkkcEGR2NAnIebcfoNC9r5x+OjAveNKNfFxWRMv+9ptvZjfE+5SIRdoYz/G ydJbanvLf+kLqcqgRrmyHIGcRx97Vg== =XgW+ -----END PGP SIGNATURE----- --Sig_//ajQzUXMyT_IhO.JhqE9Aop--