I could use a cluestick from those with greater skills and knowledge.

I've been working on an updated port of net/transmission, preparing 
for its next release, which I expect from upstream, eventually.

I've got an odd problem with the GTK version of the app, which 
gets a segfault because a 64-bit pointer gets truncated to 32-bits
on return from gdk_pixbuf_new_from_inline, a function within the
graphics/gdk-pixbuf library.

In the library, I can see a perfectly fine 64-bit GdkPixBuf pointer 
pointing to a valid structure right before the return to the application.
But when the application assigns the variable out of the function call,
the value has been truncated, so I get segfaults.  The application is 
multithreaded, so both gdb and egdb often fail to let me step through
while running without additional aborts, but I have had some success 
obtaining data from the core files, combined with the addition of 
printf() functions in the library and the application itself to aid
with my understanding of the problem so far.

I've built both the application and library with -O0, so there 
shouldn't be any odd optimizations involved.  

The WIP port is on Jasper's openbsd-wip repository, where I've 
summarized the problem in net/transmission/TODO:

---

1. break/fix: transmission-gtk segfaults in gdk-pixbuf2 on amd64

   The segfault has been traced to a truncated pointer returning from
   gdk_pixbuf_new_from_inline, a library function of graphics/gdk-pixbuf.
   The call is from gtk/actions.c.  The problem occurs on amd64, but
   not on i386 (of course).

   The top 32-bits of the returned value will be 0x00000000 or 0xffffffff.
   It's fine in the library, and truncated upon return to the application.
   
   This is from debugging with fprintf()s sprinkled through the mentioned
   source module and the gdk-pixbuf library.  gdb/egdb isn't very helpful,
   as the multithreaded operation of the application precludes clean step
   through.  

---

Thank you in advance for any recommendations -- diagnostic, corrective, or
ball peen hammer.  I know that this particular Gdk function has been
deprecated, but the upstream application still requires it.
gdk function has been deprecated, but upstream is still using it.  

Reply via email to