Debian Codegraph @

src/lib/libdwarf/ChangeLog2017

raw
1
2 2017-12-01 David Anderson
3 * gennames.c: Update version string.
4 2017-12-01 David Anderson
5 * dwarf_frame2.c: dwarf_get_fde_augmentation_data() could
6 return data that would result in segfaulting in a caller.
7 Now the length is checked and if in error
8 then DW_DLE_AUG_DATA_LENGTH_BAD is set as the error.
9 2017-11-08 David Anderson
10 * dwarf_die_deliv.c(_dwarf_die_next_info_ptr): Dereferencing
11 a pointer not fully checked could lead to segv in libdwarf.
12 * dwarf_frame.c(_dwarf_get_return_address_reg): Dereferencing
13 a pointer not fully checked could lead to segv in libdwarf.
14 * dwarf_frame2.c(dwarf_create_cie_from_after_start): Dereferencing
15 a pointer not fully checked could lead to segv in libdwarf.
16 * dwarf_line_table_reader_common.c(_dwarf_read_line_table_header):
17 DW201711-002 fix. Dereferencing
18 pointers not fully checked could lead to segv in libdwarf.
19 * dwarf_query.c(_dwarf_die_attr_unsigned_constant): Dereferencing
20 a pointer not fully checked could lead to segv in libdwarf.
21 2017-11-01 David Anderson
22 * dwarf_frame.c(_dwarf_exec_frame_instr):
23 An invalid frame section with
24 a DW_CFA_advance_loc1 could result in dereferencing
25 an invalid pointer. Now fixed.
26 2017-10-29 David Anderson
27 * dwarf.h: There was a typo in DW_FORM_strx4.
28 2017-10-20 David Anderson
29 * dwarf_form.c: New function: dwarf_formdata16() reads
30 DW_FORM_data16.
31 * dwarf_query.c,dwarf_util.c: Added support for DW_FORM_data16.
32 * libdwarf.h.in: Declarations for new functions dwarf_add_AT_data16()
33 and dwarf_formdata16() and new datatype Dwarf_Form_Data16 (since there
34 is no numerical type we can use at present).
35 2017-10-15 David Anderson
36 * dwgetopt.c: Removing unused local variable 'found'.
37 2017-10-15 David Anderson
38 * dwgetopt.c,dwgetopt.h: Now handles simple long argument
39 names cases.
40 2017-10-05 David Anderson
41 * gennames.c: Update version string.
42 2017-10-13 David Anderson
43 * dwarf.h,libdwarf/dwarf_loc.c: Corrected spelling to
44 match its use in DWARF5: DW_SECT_LOC -> DW_SECT_LOCLISTS
45 2017-10-05 David Anderson
46 * tag_attr.list,dwarf.h,dwarf_die_deliv.c, dwarf_opaque.h,
47 dwarf_query.c,libdwarf.h.in: Changed DW_AT_ranges_base
48 spelling to DW_AT_rnglists_base to match the final
49 DWARF5 standard.
50 2017-09-26 David Anderson
51 * gennames.c: Update version string.
52 * dwarf_abbrev.c: See DW201709-001. A carefully
53 constructed invalid abbrev section could result
54 in a caller getting an invalid memory reference.
55 So an addtional 'if' statement catches the error now.
56 2017-08-22 David Anderson
57 * gennames.c: Update version string.
58 2017-08-21 David Anderson
59 * Makefile.in: Now 'make test', not 'make tests'.
60 So consistent test name with dwarfdump.
61 * configure.cmake: Improving the handling of libelf
62 (mainly for Windows) and simplifying this file.
63 * dwarf_init_finish.c: Fixed indentation errors.
64 * gennames.c: Update version string.
65 2017-07-27 David Anderson
66 * dwarf_init_finish.c(_dwarf_setup): Removed some dead code and
67 that simplified the the logic. Comments fixed
68 as some in this area were not correct (stale comments).
69 2017-07-24 David Anderson
70 * configure.in, configure.cmake, config.h.in: Renamed
71 LOCATION_OF_LIBELFHEADER to HAVE_LOCATION_OF_LIBELFHEADER
72 for consistency with config.h.in generally.
73 * configure: Regenerated
74 2017-07-24 David Anderson
75 * configure.in, configure.cmake, config.h.in: Consistent use of
76 LOCATION_OF_LIBELFHEADER so Windows can build libdwarf with
77 configure or cmake.
78 * configure: Regenerated
79 2017-07-08 David Anderson
80 * gennames.c: Update version string.
81 2017-07-06 David Anderson
82 * dwarf_query.c(_dwarf_get_value_ptr): Did an add that could
83 overflow and segv given certain fuzzing and a certain
84 run time data layout. Fixed so the bad data is detected now
85 and libdwarf returns an error code. A place
86 in _dwarf_extract_address_from_debug_addr()
87 that an overflow might possibly occur fixed too.
88 2017-06-29 David Anderson
89 * dwarf_elf_access.c: Added R_SPARC_TLS_DTPOFF32
90 for the EM_SPARC32PLUS.
91 2017-06-03 David Anderson
92 * dwarf_form.c,dwarf_frame2.c: Now use
93 _dwarf_decode_s_leb128_chk(), the checked form.
94 * dwarf_leb.c: Deleted _dwarf_decode_u_leb128() and
95 _dwarf_decode_s_leb128(), they are no longer used.
96 * dwarf_reloc_386.h: Removed some trailing whitespace.
97 * dwarf_util.h: Removed READ_UNALIGNED macro. Removed
98 declarations of the deleted two functions
99 _dwarf_decode_u_leb128() and _dwarf_decode_s_leb128()
100 2017-05-30 David Anderson
101 * dwarf_die_deliv.c: Added commentary about the DW_AT_dwo_id
102 found only in experimental DWARF4.
103 * libdwarf.h.in: Added commentary about Dwarf_Sig8 struct.
104 2017-05-28 David Anderson
105 * gennames.c: Update version string.
106 2017-05-25 David Anderson
107 * gennames.c: Update version string.
108 * dwarf_reloc_386.h: Added so dwarfdump can print
109 i386 relocations sensibly.
110 * dwarf_elf_access.c: For WIN32 added dwarf_reloc_386.h include.
111 2017-05-18 David Anderson
112 * dwarf_elf_access.c: Added R_X86_64_PC32 to
113 the list of relocations we can expect to see.
114 2017-05-18 David Anderson
115 * dwarf_opaque.h: Now names _dwarf_destroy_group_map so the
116 group map destructor can be called when cleaning up a Dwarf_Debug.
117 * dwarf_alloc.c: Call _dwarf_destroy_group_map().
118 * dwarf_groups.c: Implemented _dwarf_destroy_group_map()
119 to clean up the map.
120 2017-05-18 David Anderson
121 * dwarf_init_finish.c: One argument was unused in
122 is_a_special_section_semi_dwarf() so removed
123 that argument. Function is local (static) so safe
124 to change it. Avoids a compiler warning.
125 2017-05-18 David Anderson
126 * libdwarf2.1.mm: Filling in documentation of the new sections.
127 Rev 2.58. There is more on this to do.
128 * libdwarf2.1.pdf: Regenerated.
129 * dwarf_groups.c: Inserted a space so things lined up, one place.
130 2017-05-18 David Anderson
131 * libdwarf2.1.mm: Documenting new functions
132 including .debug_names access and group operations.
133 Rev 2.57. There is more on this to do.
134 * libdwarf2.1.pdf: Regenerated.
135 2017-05-18 David Anderson
136 * libdwarf2.1.mm: Documenting new functions
137 including .debug_names access and group operations.
138 Rev 2.56.
139 2017-05-14 David Anderson
140 * libdwarf2.1.mm: Added a comment about a special
141 case of dwarf_get_section_count(). Rev 2.55 now.
142 * CMakeLists.txt, Makefile.in: Add dwarf_groups.c(.o),
143 a new source file.
144 * dwarf_elf_access.c: Added trailing _doas to a local variable so
145 related uses easily found with grep. Added some sections to
146 the relocatables sections list.
147 * dwarf_errmsg_list.c: Added six new error codes related to groups.
148 * dwarf_groups.c: New file to deal with both split-dwarf and
149 comdat groups. Added section name to the struct for improved reporting from
150 dwarfdump. Much easier to understand groups this way.
151 Added array of dwo section names so those group 2 names get the
152 right group (and obviously get it right).
153 * dwarf_init_finish.c: most of the new code for groups is in this
154 file. Now accomodates non-dwarf
155 SHT_GROUP sections by figuring out they should
156 be ignored. Fixed some indentation issues.
157 Added critical commentary to make it easier to follow the
158 handling of groups.
159 * dwarf_die_deliv.c: Named a local for a call so the call would
160 not have an unadorned 0.
161 * dwarf_opaque.h: New fields for comdat groups. A new small
162 struct, Dwarf_Group_Data_s has the data so it's all in
163 one place.
164 * dwarf_query.c: Trailing blank lines deleted.
165 Added a few lines of #if 0 code, for debugging.
166 * libdwarf.h.in: New error codes and new functions for section
167 groups.
168 2017-04-29 David Anderson
169 * pro_arange.c,pro_init.c, pro_opaque.h, pro_section.c, pro_types.c:
170 Renamed de_reloc_name function pointer as
171 de_relocate_by_name_symbol.
172 Most relocation points use a single section-name elf symbol as
173 the relocation reference.
174 Renamed de_reloc_pair function pointer as
175 de_relocate_pair_by_symbol.
176 dump_bytes() debug code is now #if 0. Deleted set but not used
177 local variable in _dwarf_pro_generate_debuginfo().
178 2017-04-21 David Anderson
179 * pro_section.c: Improved commentary on the abbrev section
180 offset and on the backpatch of overall CU length once CU
181 generated.
182 2017-04-20 David Anderson
183 * dwarf_die_deliv.c: declaration of local separated from definition
184 for easier insertion of debug stuff. Nothing substantive done.
185 * dwarf_errmsg_list.c,libdwarf.h.in: Added
186 DW_DLE_UNIT_TYPE_NOT_HANDLED.
187 * dwarf_util.c: Fixed setup of debug_info header field reader.
188 output code.
189 2017-04-20 David Anderson
190 * pro_section.c: A harmless(!) comment-within-comment
191 removed.
192 2017-04-20 David Anderson
193 * gennames.c: Update version string.
194 2017-04-20 David Anderson
195 * configure.in: Added additional gcc -W to --enable-wall.
196 * configure: Regenerated.
197 * dwarf_errmsg_list.c: Added new error codes in
198 new DWARF5 support.
199 * dwarf_line_table_reader_common.c: Improved comments and
200 added specific code for DWARF5 (just clarity here,
201 no real change).
202 * dwarf_opaque.h: Removed unused declaration of cc_at_comp_dir.
203 * dwarf_print_lines.c: Update copyright year.
204 * libdwarf.h.in: Added new DW_DLE codes.
205 * pro_alloc.c: Added tdestroy for the de_debug_line_str_hashtab
206 to support a .debug_line_str section.
207 * pro_arange.c: Renamed local variables for greater clarity
208 and fixed an improper length write to be offset_size.
209 * pro_die.c: Generalized _dwarf_insert_or_find_in_debug_str()
210 so it can apply to the debug_str or debug_line_str sections.
211 * pro_finish.c: We have new statistics arrangement
212 to aid in getting statistics on debug_str and
213 debug_line_str independently.
214 So a little change needed to get things to compile.
215 * pro_frame.c: Now sets cie_version properly for all
216 DWARF versions.
217 * pro_frame.h: cie_version field changed to proper size (Dwarf_Half).
218 * pro_init.c: Support for .debug_line_str strings added.
219 Corrected ancient serious botch in setting up 64bit output.
220 Tweaked the version setup a little (no real change).
221 Moved _dwarf_init_default_line_header_vals() call to
222 where it actually works right for getting version number.
223 * pro_line.c: Unified handling of include directories
224 and files so that we can reuse code readily.
225 Eliminating one internal struct declaration.
226 * pro_line.h: Added new fields for DWARF5 data.
227 Deleted struct Dwarf_P_Inc_Dir_s.
228 * pro_opaque.h: Rearranged section codes and strings
229 and added in DWARF5 sections.
230 Added fields to Dwarf_P_Line_Inits_s for DWARF5 support.
231 Revised struct Dwarf_P_Stats_s and Dwarf_P_Debug_s
232 for DWARF5 support.
233 * pro_section.c: Added DWARF5 sections to tables and
234 began the addition to generation of these sections.
235 Refactored debug_line header output for clarity,
236 DWARF5 support, and to avoid code duplication.
237 2017-04-19 David Anderson
238 * dwarf_opaque.h: Deleted the unused field cc_at_comp_dir.
239 2017-04-17 David Anderson
240 * pro_init.c(common_init): Handling of 64bit offsets
241 was coded wrong, the length field would be emitted
242 incorrectly (confusing standard 64bit offset dwarf
243 with non-standard IRIX 64bit offset dwarf).
244 2017-04-17 David Anderson
245 * gennames.c: Update version string.
246 * dwarf_dnames.c: Fixed indentation of a few lines.
247 * dwarf_frame2.c: Deleted the argument fde_eh_encoding_out
248 from the local function get_gcc_eh_augmentation() as
249 is not needed and got an annoying compiler warning.
250 * dwarf_print_lines.c: Removed trailing whitespace.
251 2017-04-16 David Anderson
252 * CMakeLists.txt: Added in the new files dwarf_dnames.c, .h
253 2017-04-16 David Anderson
254 * README: A common build problem and the fix are mentioned.
255 * configure.in: Added more checking messages and results so
256 easier diagnose problems.
257 * config.h.in,configure: Regenerated with GNU Autoconf 2.69
258 2017-04-15 David Anderson
259 * dwarf_print_lines.c: Added a comment , a reminder
260 that _dwarf_print_line_context_record() was never
261 implemented.
262 * libdwarf.h.in: Deleted mistaken declarations
263 dwarf_srcfiles_b(), dwarf_get_macro(),
264 and dwarf_get_all_defined_macros().
265 No such functions were ever defined.
266 2017-04-12 David Anderson
267 * gennames.c: Update version string.
268 2017-04-12 David Anderson
269 * dwarf_alloc.c: Renamed function as _dwarf_debugnames_destructor().
270 * dwarf_dnames.c: Implemented a suite of new functions to allow
271 reading .debug_names. dwarf_debugnames_header() is
272 the entry point to get .debug_names information.
273 * dwarf_dnames.h: new structs and fields to complete
274 getting access to .debug_names section data.
275 * dwarf_form.c: Refactored so dwarf_dnames.c has
276 access to getting form data.
277 * dwarf_opaque.h: Declare new internal .debug_names
278 access functions.
279 * libdwarf.h.in: Declare new .debug_names functions
280 and new error codes.
281 * pro_section.c: Partial outline for generation of DWARF5
282 .debug_names added.
283 2017-04-02 David Anderson
284 * dwarf.h: Corrected comment about DW_IDX_type_unit.
285 * dwarf_alloc.c, dwarf_alloc.h: Added support for .debug_names
286 and Dwarf_Dnames_Head.
287 * dwarf_dnames.c,dwarf_dnames.h: Skeleton implemenatation
288 of .debug_denames section reader.
289 * dwarf_errmsg_list.c: Added new *DEBUG_NAMES* error codes.
290 * libdwarf.h.in: New *DEBUG_NAMES* and new Dwarf_Dnames_Head type.
291 * pro_opaque.h: Now defines DEBUG_NAMES
292 * pro_section.c: Now defines _dwarf_pro_generate_debug_names,
293 and _dwarf_pro_generate_debug_names.
294 A skeleton implementation.
295 2017-04-02 David Anderson
296 * checkexamples.c: Slight change in a comment.
297 * libdwarf.h.in: Added commentary.
298 * libdwarf2.1.mm: Document dwarf_init_b(), dwarf_elf_init_b()
299 and dwarf_object_init_b().
300 * libdwarf2.1.pdf: Regenerate. Version 2.54
301 2017-04-02 David Anderson
302 * gennames.c: Update version string.
303 2017-04-02 David Anderson
304 * dwarf_init_finish.c(determine_target_group): Correct the default
305 group number code so the if() tests work properly.
306 2017-03-30 David Anderson
307 * gennames.c: Update version string.
308 2017-03-30 David Anderson
309 * dwarf_arange.c: Now uses DW_DLE_ADDRESS_SIZE_ZERO
310 to be more precise about the error found in the object.
311 * dwarf_die_deliv.c: Adding DWARF5 cu header reading.
312 Adding support to more fully support split dwarf.
313 Fixed some potential leaks (in case of erroneous DWARF).
314 New functions that add functionality where needed
315 to deal with reading split dwarf DWARF5.
316 * dwarf_errmsg_list.c: Clarified DW_DLE_ADDRESS_SIZE_ERROR
317 string and added DW_DLE_IMPROPER_DWO_ID DW_DLE_GROUPNUMBER_ERROR
318 and DW_DLE_ADDRESS_SIZE_ZERO.
319 * dwarf_form.c,dwarf_loc.c: Fixed trailing whitespace.
320 * dwarf_init_finish.c: Added support so split dwarf
321 can be read properly.
322 New function dwarf_object_init_b() is part of that support.
323 * dwarf_opaque.c: Added de_groupnumber. Clarified
324 some fields with commentary.
325 * dwarf_original_elf_init.c: New functions
326 dwarf_init_b() dwarf_elf_init_b() for groupnumber
327 support.
328 * dwarf_query.c: Removed trailing whitespace.
329 * dwarf_xu_index.c: Moved static declaration so it
330 is useful in more places in this source.
331 * libdwarf.h.in: Added DW_GROUPNUMBER_ANY, DW_GROUPNUMBER_BASE,
332 DW_GROUPNUMBER_DWO as part of giving better
333 split dwarf support.
334 Declared the new global functions mentioned just above.
335 2017-03-23 David Anderson
336 * dwarf_query.c(dwarf_dietype_offset): dwarf_dietype_offset()
337 leaked a Dwarf_Attribute. The one line fix
338 removes the leak.
339 2017-03-23 David Anderson
340 * gennames.c: Update version string.
341 2017-03-21 David Anderson
342 * dwarf_form.c: Vulnerability DW201703-006
343 and DW201703-001 fixed.
344 Some types of form were not checked as being in bounds.
345 * dwarf_leb.c: Vulnerability DW201703-002 fixed.
346 A check for out of bounds was done after the
347 relevant dereference. Fixed.
348 * dwarf_loc.c: Vulnerability DW201703-005 fixed.
349 _dwarf_read_loc_expr_op() was failing to check for
350 a bounds violation.
351 * dwarf_query.c: Vulnerability DW201703-006.
352 A call to _dwarf_reference_outside_section()
353 did not pass a sufficiently careful argument list,
354 so a bounds violation was missed.
355
356 2017-03-21 David Anderson
357 * checkexamples.c: Updated dwarf_discr_list example
358 with a cast to match function declaration.
359 * libdwarf2.1.mm: Updated dwarf_discr_list example
360 with a cast to match function declaration.
361 * libdwarf2.1.pdf: Regenerated. Version 2.53
362
363 2017-03-04 David Anderson
364 * dwarf_loc2.c(_dwarf_get_locdesc_c): Renamed to _dwarf_get_locdesc_op_c
365 and corrected the handling so offsets properly dealt with
366 and so a final empty operator is synthesized properly into an
367 end operator like DWARF5.
368 2017-01-30 David Anderson
369 * dwarf_die_deliv.c(_dwarf_make_CU_Context): Recent change
370 in dwarf.h for DWARF5 package files required a small change
371 here.
372 * dwarf_xu_index.c(dwarf_get_xu_section_names): Recent change
373 in dwarf.h for DWARF5 package files required a small change
374 here and in dwp_secnames[].
375 * dwarf.h: Now matches final DWARF5.
376 2017-01-23 David Anderson
377 * config.h.in.cmake,configure,configure.cmake,configure.in,
378 CMakeLists.txt,Makefile.in:
379 Add checks for sys/elf_386.h sys/elf_amd64.h sys/elf_SPARC.h so
380 relocations noticed for Solaris.
381 Better diagostic about not-building archive or shared library.
382 * configure: Regenerated
383 * dwarf_elf_access.c: Ifdef added for sys/elf_386.h,sys/elf_amd64.h,
384 sys/elf_SPARC.h so Solaris relocations are found.
385 * Makefile.in
386 2017-01-02 David Anderson
387 * dwarf.h: DWARF5 added new DW_UT codes compared
388 to earlier DWARF5 drafts.