binutils-gdb/include
tromey e20773049f 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268793 138bc75d-0d04-0410-961f-82ee72b054a4
2019-02-12 06:06:19 -07:00
..
aout Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
cgen Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
coff Include coff/sym.h from coff/ecoff.h 2019-01-22 20:35:59 -07:00
elf RISC-V: Support ELF attribute for gas and readelf. 2019-01-16 13:14:59 -08:00
gdb Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mach-o Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
opcode S/390: Implement instruction set extensions 2019-01-31 17:32:18 +01:00
som Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
vms Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
COPYING Update the address and phone number of the FSF organization 2005-05-10 10:21:13 +00:00
COPYING3 * COPYING3: New file. Contains version 3 of the GNU General Public License. 2007-07-17 13:50:23 +00:00
ChangeLog Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp 2019-02-12 06:06:19 -07:00
ChangeLog-0415 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-2016 ChangeLog rotation 2017-01-02 13:55:05 +10:30
ChangeLog-2017 ChangeLog rotation 2018-01-03 17:49:42 +10:30
ChangeLog-2018 ChangeLog rotation 2019-01-01 21:25:40 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
MAINTAINERS Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
alloca-conf.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ansidecl.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
bfdlink.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
binary-io.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
bout.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
demangle.h Sync libiberty sources with gcc master versions. 2019-01-10 09:44:13 +00:00
diagnostics.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
dis-asm.h Include <string.h> to dis-asm.h to get strchr declaration 2019-01-14 16:41:03 -05:00
dwarf2.def Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
dwarf2.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
dyn-string.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
environ.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
fibheap.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
filenames.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
floatformat.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
fnmatch.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
fopen-bin.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
fopen-same.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
fopen-vms.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
gcc-c-fe.def Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
gcc-c-interface.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
gcc-cp-fe.def Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
gcc-cp-interface.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
gcc-interface.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
getopt.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
hashtab.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
hp-symtab.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
leb128.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
libiberty.h Merge from gcc: use "cannot" instead of "can not" in libiberty and include. 2019-01-09 13:59:16 -08:00
longlong.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
lto-symtab.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
md5.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
oasys.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
objalloc.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
obstack.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
os9k.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
partition.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
plugin-api.h Merge from gcc: use "cannot" instead of "can not" in libiberty and include. 2019-01-09 13:59:16 -08:00
progress.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
safe-ctype.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
sha1.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
simple-object.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
sort.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
splay-tree.h Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp 2019-02-12 06:06:19 -07:00
symcat.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
timeval-utils.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
vtv-change-permission.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
xregex.h merge from gcc 2011-07-25 17:11:48 +00:00
xregex2.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
xtensa-config.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
xtensa-isa-internal.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
xtensa-isa.h Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30