Re: Has the pango_itemize call changed since libpango 1.8? We now get severe valgrind issues (invalid read and others) associated with this call.



On 2007-03-25 18:06-0400 Behdad Esfahbod wrote:

Has there been some change to how users should set up pango_itemize since
version 1.8.1 of the libpango library?

Not really.

All the warnings you attached look like false positives happening deep
into the libc.

Granted, false positives are always a concern with valgrind, but three
things make me suspicious there is a subtle problem here with our call to
pango_itemize for modern libpango but not for the Debian stable version of
libpango.  (1) None of those valgrind warnings occur for the Debian stable
libpango (2) All of these valgrind warnings for modern libpango libraries
(Ubuntu Dapper and others I have heard about but don't have access to) occur
_just_ for the pango_itemize call and no other function that libLASi calls.
(3) One of our developers tried out our build on Cygwin (with modern
libpango) and actually got segfaults from the example.  Unfortunately, there
doesn't seem to be a readily available version of valgrind for Cygwin so we
cannot analyze that segfault with valgrind to see if it is related to the
pango-itemize call or not, but segfaults are often a symptom of memory
management issues so that is why I mention this symptom here.

What happens if you use the 1.8.1 pango on the same
system as the one you tested 1.12.3?

That's a difficult question to answer.  There are roughly 5 libraries that
libpango depends upon, and to build the right combination of old versions
using the appropriate configuration seems problematic to me.

I'd prefer to approach the problem another way: What are best practices for
setting up a call to pango_itemize?  (It's possible we are doing something
wrong that the old version of the library doesn't care about but which makes
a difference for the modern version.)

Could somebody give me simple example code that includes a call to
pango_itemize that they _know_ is set up correctly?  Then I (and the rest of
the libLASi development team) can attempt to build that simple example on
our various platforms and test it with valgrind.

The reason why I am requesting a simple example that is known to be correct
is I am having trouble following the documentation at
http://www.gtk.org/api/2.6/pango/pango-Text-Processing.html for
pango_itemize.

For example, the first argument of pango_itemize is
"PangoContext *context" which is defined as
"a structure holding information that affects the itemization process."

But when I look up that structure, I can only find

"typedef struct _PangoContext PangoContext;

The PangoContext structure stores global information used to control the
itemization process"

However _PangoContext is completely undocumented (at least in that location
in the documentation) so I cannot tell whether the first argument to
pango_itemize in
http://lasi.svn.sourceforge.net/viewvc/lasi/trunk/src/psDoc.cpp?revision=73&view=markup
has been set up correctly or not.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________



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