This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[dw-op-value] fix a bad compare


I ran into this bug when writing a test case for submitting this branch
upstream.

There was an incorrect comparison in the code, causing us to reject
certain expressions.

Tom

2009-09-02  Tom Tromey  <tromey@redhat.com>

	* dwarf2expr.c (execute_stack_op) <DW_OP_implicit_value>: Fix
	test.

diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index a673939..7b788b9 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -456,7 +456,7 @@ execute_stack_op (struct dwarf_expr_context *ctx,
 	  {
 	    ULONGEST len;
 	    op_ptr = read_uleb128 (op_ptr, op_end, &len);
-	    if (op_ptr + len >= op_end)
+	    if (op_ptr + len > op_end)
 	      error (_("DW_OP_implicit_value: too few bytes available."));
 	    ctx->len = len;
 	    ctx->data = op_ptr;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]