This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Fix for bfd/dwarf1.c
- To: binutils at sourceware dot cygnus dot com
- Subject: Fix for bfd/dwarf1.c
- From: Will Cohen <wcohen at redhat dot com>
- Date: Tue, 03 Oct 2000 11:05:13 -0400
- Organization: Red Hat, Inc.
2000-10-03 Will Cohen <wcohen@redhat.com>
* dwarf1.c (_bfd_dwarf1_find_nearest_line): Added code to
initialize fields in aUnit.
This fixes a problem with some unitialized pointer fields being
filled with garbage, causing the linker to crash on winNT
when trying to link code with debugging information.
-Will Cohen
Index: dwarf1.c
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/dwarf1.c,v
retrieving revision 1.1
diff -c -2 -p -r1.1 dwarf1.c
*** dwarf1.c 1998/10/05 16:07:44 1.1
--- dwarf1.c 2000/09/25 22:10:44
*************** _bfd_dwarf1_find_nearest_line (abfd, sec
*** 547,550 ****
--- 547,553 ----
aUnit->has_stmt_list = aDieInfo.has_stmt_list;
aUnit->stmt_list_offset = aDieInfo.stmt_list_offset;
+ aUnit->line_count = 0;
+ aUnit->linenumber_table = 0;
+ aUnit->func_list = 0;
/* A die has a child if it's followed by a die that is