very bad bug in gtk2-perl 0.20 through 1.011



all released versions of gtk2-perl from 0.20 to 1.011 fail to clean up the stack properly after invoking callbacks. this results in unbounded stack growth; if your program uses a persistent idle handler, it can grow with alarming speed. in my testing i saw a very simple program grow by 40Mb in about five minutes.

i've fixed this in cvs, and will be releasing 1.012 very soon to get the new code out for testing. anyone using cvs, please update Glib, Gtk2, and Gnome2-VFS and test your programs.



for binding developers:
when you use call_sv (or GPERL_CLOSURE_MARSHAL_CALL) you pass flags that determine context in which the subroutine is invoked. if those flags *don't* include G_DISCARD, and do include either G_SCALAR or G_ARRAY, you must pop those values off the stack *and* call PUTBACK to ensure that your local changes to the stack are kept. perl does not do this for you unless you specify G_DISCARD, in which case you can't do anything with the returned values.

--
muppet <scott at asofyet dot org>




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