Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 687738 Details for
Bug 903804
libdwarf Segmentation fault on incomplete location
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to decode DW_OP_GNU_const_type correctly
0002-Decode-DW_OP_GNU_const_type-correctly.patch (text/plain), 2.45 KB, created by
Tom Hughes
on 2013-01-25 22:40:55 UTC
(
hide
)
Description:
Patch to decode DW_OP_GNU_const_type correctly
Filename:
MIME Type:
Creator:
Tom Hughes
Created:
2013-01-25 22:40:55 UTC
Size:
2.45 KB
patch
obsolete
>From 315976a0fb7fb35b01864d5698277378215e289d Mon Sep 17 00:00:00 2001 >From: Tom Hughes <tom@compton.nu> >Date: Fri, 25 Jan 2013 20:50:51 +0000 >Subject: [PATCH 2/2] Decode DW_OP_GNU_const_type correctly > >--- > dwarfdump2/print_die.cc | 7 ++++++- > libdwarf/dwarf_loc.c | 11 ++++++++++- > 2 files changed, 16 insertions(+), 2 deletions(-) > >diff --git a/dwarfdump2/print_die.cc b/dwarfdump2/print_die.cc >index 864620c..75b232f 100644 >--- a/dwarfdump2/print_die.cc >+++ b/dwarfdump2/print_die.cc >@@ -184,7 +184,7 @@ struct operation_descr_s opdesc[]= { > {DW_OP_GNU_encoded_addr,1,"addr"}, > {DW_OP_GNU_implicit_pointer,2,"addr" }, > {DW_OP_GNU_entry_value,2,"val" }, >- {DW_OP_GNU_const_type,1,"uleb" }, >+ {DW_OP_GNU_const_type,2,"uleb" }, > {DW_OP_GNU_regval_type,2,"uleb" }, > {DW_OP_GNU_deref_type,1,"val" }, > {DW_OP_GNU_convert,1,"uleb" }, >@@ -2419,8 +2419,13 @@ _dwarf_print_one_expr_op(Dwarf_Debug dbg,Dwarf_Loc* expr,int index, > string_out.append(IToHex0N(opd1,10)); > break; > case DW_OP_GNU_const_type: >+ { > string_out.append(" "); > string_out.append(IToHex0N(opd1,10)); >+ string_out.append(" "); >+ Dwarf_Unsigned opd2 = expr->lr_number2; >+ string_out.append(IToHex0N(opd2,10)); >+ } > break; > case DW_OP_GNU_regval_type: > { >diff --git a/libdwarf/dwarf_loc.c b/libdwarf/dwarf_loc.c >index 21a613f..133a8d8 100644 >--- a/libdwarf/dwarf_loc.c >+++ b/libdwarf/dwarf_loc.c >@@ -591,11 +591,20 @@ _dwarf_get_locdesc(Dwarf_Debug dbg, > offset = offset + operand1; > loc_ptr = loc_ptr + operand1; > break; >- case DW_OP_GNU_const_type: /* 0xf4 GNU */ >+ case DW_OP_GNU_const_type:{ /* 0xf4 GNU */ > /* die offset as uleb. */ > operand1 = _dwarf_decode_u_leb128(loc_ptr, &leb128_length); > loc_ptr = loc_ptr + leb128_length; > offset = offset + leb128_length; >+ /* length of constant */ >+ Dwarf_Small conlen = *(Dwarf_Small *) loc_ptr; >+ loc_ptr = loc_ptr + 1; >+ offset = offset + 1; >+ /* constant */ >+ READ_UNALIGNED(dbg, operand2, Dwarf_Unsigned, loc_ptr, conlen); >+ loc_ptr = loc_ptr + conlen; >+ offset = offset + conlen; >+ } > break; > case DW_OP_GNU_regval_type: /* 0xf5 GNU */ > /* reg num uleb*/ >-- >1.8.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 903804
:
687737
| 687738