Bug 162545 - wrong dwarf register numbers generated
Summary: wrong dwarf register numbers generated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: binutils
Version: 4.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact:
URL: http://sources.redhat.com/ml/binutils...
Whiteboard:
Depends On:
Blocks: 156322
TreeView+ depends on / blocked
 
Reported: 2005-07-06 04:02 UTC by Ulrich Drepper
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: RHSA-2005-673
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 12:44:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:673 0 qe-ready SHIPPED_LIVE Low: binutils security update 2005-10-05 04:00:00 UTC

Description Ulrich Drepper 2005-07-06 04:02:50 UTC
Description of problem:
The assembler currently generated incorrect dwarf register numbers if symbolic
register names are used in cfi instructions.  This is on x86-64 only.  I expect
that ISVs will start using unwind info now since it is much more efficient then
old methods for thread cancellation.  And C++ unwinding needs the info in any
case and if exceptions need to be thrown throughasm code the ISVs hopefully will
use the cfi instructions and symbolic register names.

Version-Release number of selected component (if applicable):
2.15.92.0.2-13

How reproducible:
always

Steps to Reproduce:
1.use .cfi_register(rbx)
2.
3.
  
Actual results:
dwarf2 output shows rdx used

Expected results:
rbx in dwarf2 info

Additional info:
This bug has the potential to cause long standing problems in ISV applications
if the ISV starts using cfi instructions.  The patch is harmless and tested in FC4.

Comment 1 Jakub Jelinek 2005-07-06 09:57:59 UTC
The patch is http://sources.redhat.com/ml/binutils/2005-05/msg00243.html
The incorrectly numbered registers are rdx (ought to be 1, but gas emits 3),
rbx (should be 3 instead of 1), rsi (should be 4 instead of 5) and rdi (should be
5 instead of 4).

In glibc sources this problem occurs in 4 places:
./sysdeps/unix/sysv/linux/x86_64/setcontext.S:  cfi_def_cfa(%rdi, 0)
./sysdeps/unix/sysv/linux/x86_64/setcontext.S:  cfi_offset(%rbx,oRBX)
./sysdeps/x86_64/__longjmp.S:   cfi_def_cfa(%rdi, 0)
./sysdeps/x86_64/__longjmp.S:   cfi_offset(%rbx,JB_RBX*8)


Comment 5 Red Hat Bugzilla 2005-10-05 12:44:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-673.html



Note You need to log in before you can comment on or make changes to this bug.