(no subject)



Hi all!

I'm using Gtk 0.7006.

There is a bug in Gtk::Gdk::Font::string_height() causing 'segmentation fault'
when I call this function.
At the same time text_height() works perfectly.

Examining Gtk.xs I've found out the following:
There is a line:
 RETVAL = gdk_text_height(font, SvPV(text, tlen), ix==1?len:tlen); 
which is buggy (in my opinion, of course). 
Compiler doesn't guarantee that parameters are calculating in order they 
appear in the list (from left to right). 
My gcc 2.96, for example, passes them in opposite order, so function
gdk_text_height will be passed undefined value as third parameter because
it is pushed to the stack earlier than SvPV is called.

It seems to me there are more functions with the same bug (at least 
gdk_string_extents() contains similar line).


-- 

Best regards
Pavel.






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