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.
- From: Behdad Esfahbod <behdad behdad org>
- To: "Alan W. Irwin" <irwin beluga phys uvic ca>
- Cc: gtk-i18n-list gnome org
- Subject: 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.
- Date: Mon, 26 Mar 2007 02:35:03 -0400
On Sun, 2007-03-25 at 17:38 -0700, Alan W. Irwin wrote:
> 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.
Pango 1.8.1 should easily compile on a recent distro. If you are not
willing to do spend time to do that, I'm afraid no one else has enough
spare time to help you further.
> 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"
Because it's an opaque struct. More recent versions of Pango have a lot
of setters and getters for PangoContext:
http://developer.gnome.org/doc/API/2.0/pango/pango-Text-Processing.html
> 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.
What can I say. You are casting your _pContextMgr to PangoContext all
the time. I have absolutely no idea, nor time to learn, what that is.
> Alan
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]