Page 1 of 1

gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Posted: Sun Feb 21, 2016 12:51 am
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.

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Posted: Tue Feb 23, 2016 4:40 am
by mike.dld

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Posted: Tue Feb 23, 2016 12:20 pm
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.

Re: gdk_pixbuf_new_from_inline on 64-bit OpenBSD

Posted: Wed Feb 24, 2016 12:01 am
by jggimi
Test successful. Thank you!