bfd_get_full_section_contents memory leak, plus
H.J. Lu
hjl.tools@gmail.com
Sun Oct 21 11:16:00 GMT 2012
On Sat, Oct 20, 2012 at 3:17 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, Oct 20, 2012 at 1:28 AM, Alan Modra <amodra@gmail.com> wrote:
>> On Sat, Oct 20, 2012 at 10:42:21AM +1030, Alan Modra wrote:
>>> This on top of Tom's patch ought to cure the failures. Testing
>>> in progress.
>>>
>>> * compress.c: Reinstate 2012-10-19 change.
>>> (bfd_get_full_section_contents): Don't free unless we alloc.
>>> Use proper decompress size. Delete some vars, rename others.
>>
>> Testing successful. Committed.
>>
>
> It breaks objdump. I checked in this tectase to show the
> error.
>
> --
> H.J.
> ---
> 2012-10-20 H.J. Lu <hongjiu.lu@intel.com>
>
> * binutils-all/compress.exp: Add an objdump test.
> * binutils-all/dw2-1.W: New file.
>
I checked in this patch so that it will pass on all targets.
--
H.J.
---
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 06dae33..6514b1a 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * binutils-all/dw2-1.W: Updated.
+
2012-10-20 H.J. Lu <hongjiu.lu@intel.com>
* binutils-all/compress.exp: Add an objdump test.
diff --git a/binutils/testsuite/binutils-all/dw2-1.W
b/binutils/testsuite/binutils-all/dw2-1.W
index 9b9c844..002802a 100644
--- a/binutils/testsuite/binutils-all/dw2-1.W
+++ b/binutils/testsuite/binutils-all/dw2-1.W
@@ -10,8 +10,8 @@ Contents of the .debug_info section:
Pointer Size: 4
<0><b>: Abbrev Number: 1 \(DW_TAG_compile_unit\)
<c> DW_AT_stmt_list : 0x0
- <10> DW_AT_high_pc : 0x8
- <14> DW_AT_low_pc : 0x4
+ <10> DW_AT_high_pc : 0x.
+ <14> DW_AT_low_pc : 0x.
<18> DW_AT_name : file1.txt
<22> DW_AT_producer : GNU C 3.3.3
<2e> DW_AT_language : 1 \(ANSI C\)
@@ -21,9 +21,9 @@ Contents of the .debug_info section:
<32> DW_AT_decl_line : 2
<33> DW_AT_name : func_cu1
<3c> DW_AT_type : <0x4a>
- <40> DW_AT_low_pc : 0x4
- <44> DW_AT_high_pc : 0x8
- <48> DW_AT_frame_base : 1 byte block: 55 \(DW_OP_reg5 \(rdi\)\)
+ <40> DW_AT_low_pc : 0x.
+ <44> DW_AT_high_pc : 0x.
+ <48> DW_AT_frame_base : 1 byte block: 55 \(DW_OP_reg5 \([^()]*\)\)
<1><4a>: Abbrev Number: 3 \(DW_TAG_base_type\)
<4b> DW_AT_name : int
<4f> DW_AT_byte_size : 4
@@ -66,11 +66,11 @@ Raw dump of debug contents of section .debug_line:
1 0 0 0 file1.txt
Line Number Statements:
- Extended opcode 2: set Address to 0x4
+ Extended opcode 2: set Address to .*
Advance Line by 3 to 4
Copy
Copy
- Extended opcode 2: set Address to 0x8
+ Extended opcode 2: set Address to .*
Extended opcode 1: End of Sequence
@@ -101,4 +101,3 @@ Contents of the .debug_abbrev section:
DW_AT_encoding DW_FORM_data1
DW_AT value: 0 DW_FORM value: 0
-#pass
More information about the Binutils
mailing list