gcc/include
Philippe Waroquiers f9f75f8d3c Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp
When a node is removed from a splay tree, the splay tree was
not using the function splay_tree_delete_key_fn to release the key.
This was causing a leak, fixed by Tom Tromey.

This patch fixes another key leak, that happens when a key equal to
a key already present is inserted.  In such a case, we have to release
the old KEY.
Note that this is based on the assumption that the caller always
allocates a new KEY when doing an insert.

Also, clarify the documentation about when the release functions are
called.

2019-02-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* splay-tree.h (splay_tree_delete_key_fn): Update comment.
	(splay_tree_delete_value_fn): Likewise.

libiberty/ChangeLog
2019-02-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* splay-tree.c (splay_tree_insert): Also release old KEY in case
	of insertion of a key equal to an already present key.
	(splay_tree_new_typed_alloc): Update comment.

From-SVN: r268793
2019-02-12 13:02:48 +00:00
..
gdb Update copyright years. 2019-01-01 13:31:55 +01:00
ansidecl.h Update copyright years. 2019-01-01 13:31:55 +01:00
ChangeLog Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp 2019-02-12 13:02:48 +00:00
ChangeLog-9103
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
COPYING
COPYING3
demangle.h Update copyright years. 2019-01-01 13:31:55 +01:00
dwarf2.def Update copyright years. 2019-01-01 13:31:55 +01:00
dwarf2.h Update copyright years. 2019-01-01 13:31:55 +01:00
dyn-string.h Update copyright years. 2019-01-01 13:31:55 +01:00
environ.h Update copyright years. 2019-01-01 13:31:55 +01:00
fibheap.h Update copyright years. 2019-01-01 13:31:55 +01:00
filenames.h Update copyright years. 2019-01-01 13:31:55 +01:00
floatformat.h Update copyright years. 2019-01-01 13:31:55 +01:00
fnmatch.h Update copyright years. 2019-01-01 13:31:55 +01:00
gcc-c-fe.def Update copyright years. 2019-01-01 13:31:55 +01:00
gcc-c-interface.h Update copyright years. 2019-01-01 13:31:55 +01:00
gcc-cp-fe.def Update copyright years. 2019-01-01 13:31:55 +01:00
gcc-cp-interface.h Update copyright years. 2019-01-01 13:31:55 +01:00
gcc-interface.h Update copyright years. 2019-01-01 13:31:55 +01:00
getopt.h Update copyright years. 2019-01-01 13:31:55 +01:00
gomp-constants.h Update copyright years. 2019-01-01 13:31:55 +01:00
hashtab.h Update copyright years. 2019-01-01 13:31:55 +01:00
hsa.h Update copyright years. 2019-01-01 13:31:55 +01:00
leb128.h Update copyright years. 2019-01-01 13:31:55 +01:00
libiberty.h PR other/16615 [2/5] 2019-01-09 16:39:49 -05:00
longlong.h Update copyright years. 2019-01-01 13:31:55 +01:00
lto-symtab.h Update copyright years. 2019-01-01 13:31:55 +01:00
md5.h Update copyright years. 2019-01-01 13:31:55 +01:00
objalloc.h Update copyright years. 2019-01-01 13:31:55 +01:00
obstack.h Update copyright years. 2019-01-01 13:31:55 +01:00
partition.h Update copyright years. 2019-01-01 13:31:55 +01:00
plugin-api.h PR other/16615 [2/5] 2019-01-09 16:39:49 -05:00
safe-ctype.h Update copyright years. 2019-01-01 13:31:55 +01:00
sha1.h Update copyright years. 2019-01-01 13:31:55 +01:00
simple-object.h Update copyright years. 2019-01-01 13:31:55 +01:00
sort.h Update copyright years. 2019-01-01 13:31:55 +01:00
splay-tree.h Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp 2019-02-12 13:02:48 +00:00
symcat.h Update copyright years. 2019-01-01 13:31:55 +01:00
timeval-utils.h Update copyright years. 2019-01-01 13:31:55 +01:00
unique-ptr.h Update copyright years. 2019-01-01 13:31:55 +01:00
vtv-change-permission.h Update copyright years. 2019-01-01 13:31:55 +01:00
xregex2.h Update copyright years. 2019-01-01 13:31:55 +01:00
xregex.h system.h [...]: Wrap C function declarations in extern "C". 2011-07-25 14:24:59 +00:00
xtensa-config.h Update copyright years. 2019-01-01 13:31:55 +01:00