bugfix for 1.10x and HEAD



In IRC today, squentin pointed out a bug that some of his users were seeing when upgrading to perl 5.8.8 with Glib 1.10x. A very simple test case, a perl-derived GObject, was failing to have its properties set.

Turns out this is due to me incorrectly using SvLEN()-1 instead of SvCUR() to find the length of an SV's string in the private helper function _gperl_fetch_wrapper_key() in GObject.xs. Something about perl 5.8.8 causes these scalars to have larger buffers than necessary for their strings (probably something like reusing already-allocated scalars), and this triggers the bug, where older versions did not. The bug manifests as the Glib::Object instance having garbage characters in the names of the hash keys corresponding to properties (e.g. if you don't use a getter or setter).


I've applied the fix to HEAD and to stable-1-10, but in case there's not a timely release of the next 1.10x (or if there is no 1.10x), the patch is attached for packagers to apply at their level.

Attachment: fetch_wrapper_key-stable-1-10.patch
Description: Binary data



--
I like drawing and painting. If you make something really weird, that means "abstract".
  -- Some kid on a PBS kid's show.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]