]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/value.c
Detect infinite loop in value_fetch_lazy's lval_register handling.
authorTom Tromey <tromey@redhat.com>
Fri, 22 Nov 2013 17:38:44 +0000 (17:38 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 22 Nov 2013 17:38:44 +0000 (17:38 +0000)
commit6eeee81c8e59511962bdd83df5e7785bfdf871d2
tree665dbcbe078b8f2ba0878597126ef8eac72d0f66
parent0cb112f7400187275da81a05a9ad0534f1430139
Detect infinite loop in value_fetch_lazy's lval_register handling.

If value_fetch_lazy loops infinitely while unwrapping lval_register
values, it means we either somehow ended up with two frames with the
same ID in the frame chain, or some code is trying to unwind behind
get_prev_frame's back (e.g., a frame unwind sniffer trying to unwind).
In any case, it should always be an internal error to end up in this
situation.

This patch adds a check and throws an internal error if the same frame
is returned.

2013-11-22  Tom Tromey  <tromey@redhat.com>
    Pedro Alves  <palves@redhat.com>

PR backtrace/16155
* value.c (value_fetch_lazy): Internal error if
get_frame_register_value returns the same register.
gdb/ChangeLog
gdb/value.c