Avoid crash in compile_to_object
authorTom Tromey <tom@tromey.com>
Sat, 9 Jan 2021 18:38:41 +0000 (11:38 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 9 Jan 2021 18:38:41 +0000 (11:38 -0700)
commit54585eee2e10de40b160c750dbe8bf15dcbf4527
tree61824074d73cba3b26d0871ee622d8dd55b238aa
parentbc167b6b3eb81de168c54aed4a8f0d1fdaa065e2
Avoid crash in compile_to_object

PR 23672 points out a crash in compile_to_object.  This crash came in
during a C++-ization.  This patch avoids the crash.

The PR also points out another weird behavior in this code, but that
one requires some setup that I don't have here, and it seems to date
back to the introduction of the compile feature.  So, it isn't
addressed here.  I will leave the PR open so this bug isn't forgotten.

gdb/ChangeLog
2021-01-09  Tom Tromey  <tom@tromey.com>

PR compile/23672
* compile/compile.c (compile_to_object): Avoid crash when
osabi_triplet_regexp returns NULL.
gdb/ChangeLog
gdb/compile/compile.c
This page took 0.025141 seconds and 4 git commands to generate.