gdk_pixbuf_new_from_inline on 64-bit OpenBSD

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

gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Postby jggimi » Sun Feb 21, 2016 12:51 am

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.

x190
Posts: 5095
Joined: Sun Nov 30, 2008 4:59 am

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Postby x190 » Sun Feb 21, 2016 2:43 am

@mike.dld: ?
The stone age didn’t end because we ran out of stones.
---The Great Disruption - by Paul Gilding
https://paulgilding.com/
-------------------------------------------------

mike.dld
Transmission Developer
Posts: 254
Joined: Wed Dec 25, 2013 10:56 pm

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Postby mike.dld » Tue Feb 23, 2016 4:40 am


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

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Postby jggimi » Tue Feb 23, 2016 12:20 pm

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

Postby jggimi » Wed Feb 24, 2016 12:01 am

Test successful. Thank you!


Return to “GTK+ Support”