diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-22 01:55:16 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-22 01:55:16 +0000 |
commit | 95bfe26e6b78a99478c0c518ac61ee12a44c1f62 (patch) | |
tree | e2274eda925f929919fd3a51c48d74a79a395e5c /gas/ChangeLog | |
parent | 99fd6accc4b12b8a788395218c46c0c4a6be8131 (diff) | |
download | gdb-95bfe26e6b78a99478c0c518ac61ee12a44c1f62.zip gdb-95bfe26e6b78a99478c0c518ac61ee12a44c1f62.tar.gz gdb-95bfe26e6b78a99478c0c518ac61ee12a44c1f62.tar.bz2 |
gas: mips: fix segfault with invalid default cpu strings
If you configure gas for a mips32el-* target, the default cpu calculation
gets mangled, and we end up passing and invalid value as the default cpu.
If you try executing gas after that, it segfaults. This is because it
assumes that the default cpu value is always valid.
$ ./gas/as-new
Assembler messages:
Error: Bad value (2) for default CPU
Segmentation fault (core dumped)
I'm not debating that the target tuple is valid, just that gas shouldn't
crash. So add a friendly assert to avoid that.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gas/ChangeLog')
-rw-r--r-- | gas/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 116ba37..caef2ba 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2012-05-21 Mike Frysinger <vapier@gentoo.org> + + * config/tc-mips.c (mips_after_parse_args): Assert that arch_info + is non-NULL. + 2012-05-19 Alan Modra <amodra@gmail.com> * config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES |