Bug 10770

Summary: Hang on some CFI programs
Product: gdb Reporter: Jan Kratochvil <jan>
Component: backtraceAssignee: Tom Tromey <tromey>
Status: RESOLVED FIXED    
Severity: normal CC: gdb-prs
Priority: P2    
Version: 7.0   
Target Milestone: 7.1   
Host: Target: x86_64-unknown-linux-gnu
Build: Last reconfirmed:
Attachments: testcase

Description Jan Kratochvil 2009-10-13 17:51:21 UTC
The attached testcase contains all the known CFI OP_*s, written by Jakub Jelinek.

(gdb) b force_unwind
Breakpoint 1 at 0x400690: file cleanup-13.c, line 285.
(gdb) r
Starting program: .../cleanup-13 
Breakpoint 1, force_unwind () at cleanup-13.c:285
285	  struct _Unwind_Exception *exc = malloc (sizeof (*exc));
(gdb) bt
#0  force_unwind () at cleanup-13.c:285
#1  0x00000000004006ff in callme () at cleanup-13.c:306
<hang>
Comment 1 Jan Kratochvil 2009-10-13 17:52:02 UTC
Created attachment 4277 [details]
testcase
Comment 2 Tom Tromey 2010-01-19 18:36:38 UTC
Testing a patch.
Comment 3 Sourceware Commits 2010-01-20 18:06:33 UTC
Subject: Bug 10770

CVSROOT:	/cvs/src
Module name:	src
Changes by:	tromey@sourceware.org	2010-01-20 18:06:16

Modified files:
	gdb            : ChangeLog dwarf2expr.c valarith.c 
	gdb/testsuite  : ChangeLog 
	gdb/testsuite/gdb.dwarf2: Makefile.in 
Added files:
	gdb/testsuite/gdb.dwarf2: pr10770.c pr10770.exp 

Log message:
	gdb
	PR backtrace/10770:
	* valarith.c (value_binop): Handle BINOP_GTR, BINOP_LEQ, and
	BINOP_GEQ.  Handle BINOP_NOTEQUAL in the signed case.
	* dwarf2expr.c (new_dwarf_expr_context): Allocate
	dwarf_stack_values, not CORE_ADDRs.
	(execute_stack_op): Change DW_OP_div and comparison operators to
	use signed operands.
	gdb/testsuite
	PR backtrace/10770:
	* gdb.dwarf2/pr10770.exp: New file.
	* gdb.dwarf2/pr10770.c: New file.
	* gdb.dwarf2/Makefile.in (EXECUTABLES): Add pr10770.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11282&r2=1.11283
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/dwarf2expr.c.diff?cvsroot=src&r1=1.39&r2=1.40
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/valarith.c.diff?cvsroot=src&r1=1.78&r2=1.79
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2096&r2=1.2097
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.dwarf2/pr10770.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.dwarf2/pr10770.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.dwarf2/Makefile.in.diff?cvsroot=src&r1=1.5&r2=1.6

Comment 4 Tom Tromey 2010-01-20 18:08:53 UTC
Fix checked in.