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 605841 - xmlListSort frees list elements via deallocator
xmlListSort frees list elements via deallocator
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
2.7.6
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-01 08:45 UTC by Josh Triplett
Modified: 2021-07-05 13:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Josh Triplett 2010-01-01 08:45:50 UTC
Having had some trouble trying to use xmlListSort, I took a look at the
implementation.  It seems to work by copying the original list, clearing
the original list, and then inserting each element from the copy into
the original.  Apart from inefficiency, this has one major bug: clearing
the original list calls the user-supplied deallocator on each element,
making those elements unusable in the copy.  This resulted in accesses
to freed memory, easily found via valgrind.

Originally reported in Debian: http://bugs.debian.org/563227
Comment 1 GNOME Infrastructure Team 2021-07-05 13:20:55 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.