Avoid crash in dwarf2_init_complex_target_type
authorTom Tromey <tromey@adacore.com>
Tue, 16 Apr 2019 18:12:09 +0000 (12:12 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 17 Apr 2019 12:55:05 +0000 (06:55 -0600)
After commit 35add35 ("gdb: Fix failure in gdb.base/complex-parts.exp
for x86-32"), dwarf2_init_complex_target_type can crash if "tt" is
nullptr.  This patch avoids the problem by checking for this case.

No test case because I don't know a good way to write one; it was
found by an internal AdaCore test case that apparently uses a 16 bit
floating point type.

gdb/ChangeLog:
* dwarf2read.c (dwarf2_init_complex_target_type): Check "tt"
against nullptr before use.

gdb/ChangeLog
2019-04-17  Tom Tromey  <tromey@adacore.com>

* dwarf2read.c (dwarf2_init_complex_target_type): Check "tt"
against nullptr before use.


No differences found
This page took 0.025202 seconds and 4 git commands to generate.