Bug 10770 - Hang on some CFI programs
Summary: Hang on some CFI programs
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: backtrace (show other bugs)
Version: 7.0
: P2 normal
Target Milestone: 7.1
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-13 17:51 UTC by Jan Kratochvil
Modified: 2010-01-20 18:08 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-unknown-linux-gnu
Build:
Last reconfirmed:


Attachments
testcase (2.62 KB, text/plain)
2009-10-13 17:52 UTC, Jan Kratochvil
Details

Note You need to log in before you can comment on or make changes to this bug.
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.