From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matija Obid Newsgroups: gmane.lisp.guile.user Subject: Re: G-Golf - Callback segmentation fault Date: Sat, 31 Aug 2024 16:35:07 +0000 Message-ID: <87cylo8xc4.fsf@posteo.net> References: <87msl6c4lf.fsf@posteo.net> <20240821212129.7647d035@tintin> <87a5gxybgm.fsf@posteo.net> <20240828211805.68f594a7@tintin> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26374"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: David Pirotte Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Aug 31 18:35:57 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 1skR4v-0006h6-6Q for guile-user@m.gmane-mx.org; Sat, 31 Aug 2024 18:35:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skR4R-0006PF-LK; Sat, 31 Aug 2024 12:35: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 1skR4H-0006Oc-1Z for guile-user@gnu.org; Sat, 31 Aug 2024 12:35:17 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1skR4D-0005qb-TK for guile-user@gnu.org; Sat, 31 Aug 2024 12:35:15 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F40A2240027 for ; Sat, 31 Aug 2024 18:35:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1725122109; bh=1zjVSVwDXk8hZhbUydiGK+bY5Y7pzX4ymCYKW8SLl/I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=fxG7f/7IQAxp/33nRb5eKPW+3Zo4ix2N09X2n62K65hC22lTEcU4HT/BJRO71uSg0 QSDFMRyAoTVeSyubKF+ouf/B1LzJR4OLbdcUHcaV0LIC05ZRyP8Vhj2b1AO7SmpSyv lNVAdhJHM59UGSzywwkg8mYw7iA3zK6vAWzeh4rHMBugn03PBhVjalcwiIOGC1xkMS Q42Y4uCrLsUdP1WPHF7pOhNruwMpf1ok1RWysA4a+vllfgmuF40HRa+8B38ZUxiZ75 RNNwj3Gh9Ef9mwJVfODoGGkxePeT1LBY5MqdDrtxH0FwztbqemQZn+WIsZ02IzNH0s YwKpzTR2fK1BA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Wx0x82BmPz6trs; Sat, 31 Aug 2024 18:35:08 +0200 (CEST) In-Reply-To: <20240828211805.68f594a7@tintin> (David Pirotte's message of "Wed, 28 Aug 2024 21:18:05 -0300") Received-SPF: pass client-ip=185.67.36.65; envelope-from=matija.obid@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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:19774 Archived-At: Hello David, > 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 >= 1.71.0 should use ... I see. The comment in deprecated function made me thinking and I found notice in LFS [1]: > --disable-exec-static-tramp > Disable static trampoline support. It's a new security feature in > libffi, but some BLFS packages (notably GJS and > gobject-introspection) have not been adapted for it. This flag was recently removed [2] in nixpkgs with a comment: > The fix for gobject-introspection is in version 1.72. Bottom line: If I compile Guile with patched libffi [3] dependency (where flag "disable-exec-static-tramp" is present) problematic examples are working (without patched G-Golf). > 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] Most probably has Debian present flag "disable-exec-static-tramp" when configuring libffi. Where can we check that? I still wonder where is the problem, in Guile, G-Golf or gobject-introspection (which according to [2] should not be a problem). [1] https://www.linuxfromscratch.org/~xry111/lfs-cross-la/view/systemd/chapter08/libffi.html [2] https://github.com/NixOS/nixpkgs/pull/257742 [3] Libffi is used in a lot of packages. I patch it only for Guile. -- Regards, Matija