Binutils with MCST patches
Go to file
Andrew Burgess 35ee2dc2e4 gdb: Guard against NULL dereference in dwarf2_init_integer_type
In this commit:

    commit eb77c9df9f
    Date:   Thu Oct 18 14:04:27 2018 +0100

        gdb: Handle ICC's unexpected void return type

A potential dereference of a NULL pointer was introduced if a
DW_TAG_base_type is missing a DW_AT_name attribute.

I have taken this opportunity to fix a slight confusion that existed
in the test also added in the above commit, the test had two C
variables, declared like this:

    int var_a = 5;

    void *var_ptr = &var_a;

However, the fake DWARF in the test script declared them like this:

    void var_a = 5;

    void *var_ptr = &var_a;

This wasn't a problem as the test never uses 'var_a' directly, this
only exists so 'var_ptr' can be initialised.  However, it seemed worth
fixing.

I've also added a test for a DW_TAG_base_type with a missing
DW_AT_name, as clearly there's not test currently that covers this
(the original patch tested cleanly).  I can confirm that the new test
causes GDB to crash before this patch, and passes with this patch.

gdb/ChangeLog:

	* dwarf2read.c (dwarf2_init_integer_type): Check for name being
	NULL before dereferencing it.

gdb/testsuite/ChangeLog:

	* gdb.dwarf2/void-type.exp: Rename types, and make var_a an 'int'.
	* gdb.dwarf2/missing-type-name.exp: New file.
2018-11-07 12:58:56 +00:00
bfd Regen bfd/configure 2018-11-07 21:55:06 +10:30
binutils rx: Add target rx-*-linux. 2018-11-07 17:18:05 +09:00
config Merge config/ changes from GCC. 2018-10-31 17:16:41 +00:00
contrib
cpu or1k: Add the l.muld, l.muldu, l.macu, l.msbu insns 2018-10-05 11:41:42 +09:00
elfcpp [MIPS] Add Loongson 2K1000 proccessor support. 2018-08-29 20:55:25 +08:00
etc
gas rx: Add target rx-*-linux. 2018-11-07 17:18:05 +09:00
gdb gdb: Guard against NULL dereference in dwarf2_init_integer_type 2018-11-07 12:58:56 +00:00
gold [GOLD] make clean 2018-11-02 14:00:15 +10:30
gprof Fix typo setting user_specified variable when parsing -Z option. 2018-10-01 17:18:20 +01:00
include Add support for a couple of new Mach-O commands. 2018-11-06 17:17:43 +00:00
intl
ld elfedit: Add --enable-x86-feature/--disable-x86-feature 2018-11-06 09:38:51 -08:00
libdecnumber Merge config/ changes from GCC. 2018-10-31 17:16:41 +00:00
libiberty
opcodes [BINUTILS, ARM] Add Armv8.5-A to select_arm_features and update macros. 2018-11-06 12:13:45 +00:00
readline
sim [src/erc32] Use ncurses instead of termcap on Cygwin too 2018-10-30 16:41:12 +00:00
texinfo
zlib Merge config/ changes from GCC. 2018-10-31 17:16:41 +00:00
.cvsignore
.gitattributes
.gitignore
COPYING
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
COPYING3
COPYING3.LIB
ChangeLog Merge autoconf / automake update changes from GCC. 2018-10-31 17:10:56 +00:00
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
README
README-maintainer-mode
ar-lib
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
depcomp
djunpack.bat
install-sh
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am Merge autoconf / automake update changes from GCC. 2018-10-31 17:10:56 +00:00
setup.com
src-release.sh Add "contrib" to the list of GDB support dirs (on src-release.sh) 2018-09-13 12:33:19 -04:00
symlink-tree
test-driver
ylwrap

README

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.