This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
gdb and binutils branch master updated. ebf13736b42af47c9907b5157c8e80c78dbe00e1
- From: palves at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 4 Sep 2014 20:55:51 -0000
- Subject: gdb and binutils branch master updated. ebf13736b42af47c9907b5157c8e80c78dbe00e1
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via ebf13736b42af47c9907b5157c8e80c78dbe00e1 (commit)
from eb0b04635f2f57506ab4365b32a6fc0b62920d2f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebf13736b42af47c9907b5157c8e80c78dbe00e1
commit ebf13736b42af47c9907b5157c8e80c78dbe00e1
Author: Pedro Alves <palves@redhat.com>
Date: Thu Sep 4 21:46:28 2014 +0100
parse_number("0") reads uninitialized memory
valgrind caught that parse_number reads uninitialized memory when we
parse literal "0":
$ valgrind ./gdb -q -nx -ex "set height 0"
(...)
==10378== Conditional jump or move depends on uninitialised value(s)
==10378== at 0x548A10: parse_number (c-exp.y:1828)
==10378== by 0x54A340: lex_one_token (c-exp.y:2638)
==10378== by 0x54B4BB: c_lex (c-exp.y:3089)
==10378== by 0x544951: c_parse_internal (c-exp.c:2208)
==10378== by 0x54BF8C: c_parse (c-exp.y:3260)
==10378== by 0x6502E7: parse_exp_in_context_1 (parse.c:1221)
==10378== by 0x650064: parse_exp_in_context (parse.c:1122)
==10378== by 0x65001F: parse_exp_1 (parse.c:1114)
==10378== by 0x650421: parse_expression (parse.c:1266)
==10378== by 0x5A74B7: parse_and_eval_long (eval.c:92)
==10378== by 0x501ABD: do_set_command (cli-setshow.c:302)
==10378== by 0x721059: execute_command (top.c:452)
==10378==
(gdb)
I've pushed the obvious fix.
Tested on x86_64 Fedora 20.
gdb/ChangeLog:
* c-exp.y (parse_number): Skip handling base-switching prefixes if
the input is only one character long.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 5 +++++
gdb/c-exp.y | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
hooks/post-receive
--
gdb and binutils