Commit 4bd56d18 authored by Tom Tromey's avatar Tom Tromey
Browse files

Fix regression caused by minimal symbol changes

The earlier patch to change minimal symbol allocations to use xmalloc
erroneously left a call to obstack_blank in
minimal_symbol_reader::install.  Because obstack_blank does not finish
the object allocation on an obstack, this in turn could cause invalid
memory reads in some situations.

This patch fixes the problem by removing the call.  Tested on x86-64
Fedora 29; also verified with valgrind.

2019-03-18  Tom Tromey  <>

	* minsyms.c (minimal_symbol_reader::install): Remove call to
parent 55c10aca
2019-03-18 Tom Tromey <>
* minsyms.c (minimal_symbol_reader::install): Remove call to
2019-03-18 Pedro Alves <>
* tui/tui-io.c (reverse_mode_p, reverse_save_bg, reverse_save_fg):
......@@ -1360,8 +1360,6 @@ minimal_symbol_reader::install ()
we will give back the excess space. */
alloc_count = m_msym_count + m_objfile->per_bfd->minimal_symbol_count;
obstack_blank (&m_objfile->per_bfd->storage_obstack,
alloc_count * sizeof (struct minimal_symbol));
msym_holder (XNEWVEC (minimal_symbol, alloc_count));
msymbols = msym_holder.get ();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment