Re: G-Golf - Callback segmentation fault

David Pirotte <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <20240828211805.68f594a7@tintin>
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:

	>= 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 >= 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 >= 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 ... 

[2] 

g_callable_info_create_closure

	https://salsa.debian.org/gnome-team/gobject-introspection/-/blob/debian/latest/girepository/girffi.c?ref_type=heads#L355


g_callable_info_prepare_closure

	https://salsa.debian.org/gnome-team/gobject-introspection/-/blob/debian/latest/girepository/girffi.c?ref_type=heads#L447
signature.asc (application/pgp-signature, 488 B)
-----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-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.