gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Ask for help and report issues with the GTK+ version of Transmission
Post Reply
jggimi
Posts: 3
Joined: Sun Feb 21, 2016 12:35 am

gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Post by jggimi »

We have 2.84 in the OpenBSD ports/packages system, and I have been working on revising the port with recent trunks in order to prepare for the next release.

OpenBSD uses gdk-pixbuf 2.32.3, which has deprecated the gdk_pixbuf_new_from_inline function that is called from gtk/actions.c. Because the gtk build uses -DGDK_PIXBUF_DISABLE_DEPRECATED, there is no prototype of this function call (per gdk-pixbuf/gdk-pixbuf-core.h) and the return value is treated as a 32-bit integer. Which is fine on 32-bit architectures, but causes segfaults on 64-bit archs, as the high order 4-bytes are sign-ended to 0x00000000 or 0xffffffff.

If I remove GDK_PIXBUF_DISABLE_DEPRECATED, the returned value is all 64-bits and works fine.

I'm not sure if I should open a ticket, because a) I'm not sure if this is (or could be) a problem for any other OSes with the same gdk-pixbuf library, as implementations may differ, and b) the team may already have plans to manage this particular deprecation in actions.c.

I've been testing with trunk 14675 as time allowed, trying to track down what was (for me) a strange error. I note that 14679 has the same function call and the same preprocessor token.
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Post by mike.dld »

jggimi
Posts: 3
Joined: Sun Feb 21, 2016 12:35 am

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Post by jggimi »

Thank you! That was a lot of work, as it was a complete switch to GResource.

I will test the diff as soon as I have an opportunity, which will be in about 12-14 hours.
jggimi
Posts: 3
Joined: Sun Feb 21, 2016 12:35 am

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Post by jggimi »

Test successful. Thank you!
Post Reply