binutils-gdb/gdb/mi
Tom Tromey 9d78f827e0 PR gdb/17210 - fix possible memory leak in read_memory_robust
PR gdb/17210 concerns a possible memory leak in read_memory_robust.
The bug can happen because read_memory_robust allocates memory, does
not install any cleanups, and invokes QUIT.  Similarly, target_read
calls QUIT, so it too can potentially throw.

The fix is to install cleanups to guard the allocated memory.

Built and regtested on x86-64 Fedora 23.  I couldn't think of a way to
test this, so no new test; and of course this means it should have
more careful review.

2016-06-29  Tom Tromey  <tom@tromey.com>

	PR gdb/17210:
	* target.c (free_memory_read_result_vector): Take a pointer to the
	VEC as an argument.
	(read_memory_robust): Install a cleanup for "result".
	* mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.
2016-06-29 10:03:45 -06:00
..
ChangeLog-1999-2003
mi-cmd-break.c
mi-cmd-break.h
mi-cmd-catch.c
mi-cmd-disas.c
mi-cmd-env.c
mi-cmd-file.c
mi-cmd-info.c
mi-cmd-stack.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
mi-cmd-target.c
mi-cmd-var.c
mi-cmds.c
mi-cmds.h Make raw_stdout be per MI instance 2016-06-21 01:11:50 +01:00
mi-common.c
mi-common.h Make raw_stdout be per MI instance 2016-06-21 01:11:50 +01:00
mi-console.c
mi-console.h
mi-getopt.c
mi-getopt.h
mi-interp.c Make stdin be per UI 2016-06-21 01:11:54 +01:00
mi-main.c PR gdb/17210 - fix possible memory leak in read_memory_robust 2016-06-29 10:03:45 -06:00
mi-main.h Make raw_stdout be per MI instance 2016-06-21 01:11:50 +01:00
mi-out.c
mi-out.h
mi-parse.c
mi-parse.h
mi-symbol-cmds.c