After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166715 - Invalid read reported by valgrind
Invalid read reported by valgrind
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: Shaun McCance
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-08 21:25 UTC by Kjartan Maraas
Modified: 2005-11-16 20:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kjartan Maraas 2005-02-08 21:25:03 UTC
==19874== Invalid read of size 4
==19874==    at 0x1C23ED8A: xmlXPathFreeNodeSet__internal_alias (xpath.c:2221)
==19874==    by 0x1C21E4D3: xmlHashFree__internal_alias (hash.c:307)
==19874==    by 0x1C1766E4: xsltFreeDocumentKeys (keys.c:182)
==19874==    by 0x1C17E784: xsltFreeDocuments (documents.c:228)
==19874==    by 0x1C180EA5: xsltFreeTransformContext (transform.c:519)
==19874==    by 0x805EAD2: xslt_pager_process (yelp-xslt-pager.c:278)
==19874==    by 0x1C0FABAF: g_idle_dispatch (gmain.c:3821)
==19874==    by 0x1C0F7D60: IA__g_main_context_dispatch (gmain.c:1947)
==19874==    by 0x1C0F963E: g_main_context_iterate (gmain.c:2578)
==19874==    by 0x1C0F98BF: IA__g_main_loop_run (gmain.c:2782)
==19874==    by 0x1BFCC098: bonobo_main (bonobo-main.c:297)
==19874==    by 0x805F903: main (yelp-main.c:387)
Comment 1 Kjartan Maraas 2005-02-08 21:27:57 UTC
This is the code it complains about (yelp-xslt-pager.c:278)

    if (priv->transformContext) {
        xsltFreeTransformContext (priv->transformContext); /* beep beep */
        priv->transformContext = NULL;
    }
Comment 2 Don Scorgie 2005-11-16 20:55:33 UTC
Hi,

This is caused by xsltFreeTransformContext trying to free some internal stuff
that has already been freed (in one of its docs).  Freeing the actual document
after the transform context stops libxml doing this, removing the invalid read.
 Committed to CVS HEAD.

2005-11-16  Don Scorgie  <dscorgie@cvs.gnome.org>

	* src/yelp-xslt-pager.c:
	 Fix invalid read (bug #166715)