[PATCH 00/19] Pointer UB in binutils/dwarf.c

Alan Modra amodra@gmail.com
Sat May 15 08:09:38 GMT 2021


This series of patches is aimed at removing pointer undefined behaviour
as per ISO C 1989/1999 sections 6.5.6 and 6.5.8, in dwarf.c.  Most of
these are probably benign with current compilers, but I do worry about
some future crazy compiler optimisation making use of the UB to omit
some of the pointer bound checking.

Alan Modra (19):
  _mul_overflow and get_encoded_value
  SAFE_BYTE_GET_INTERNAL
  process_debug_info
  read_debug_line_header
  display_debug_lines_decoded
  display_debug_pubnames_worker
  display_debug_macinfo
  get_line_filename_and_dirname
  display_debug_macro
  display_loc_list
  display_debug_aranges
  display_debug_str_offsets
  display_debug_rnglists_list
  display_debug_ranges
  read_cie
  display_debug_frames
  display_debug_names
  display_gdb_index
  process_cu_tu_index

 binutils/ChangeLog | 102 +++++++
 binutils/bucomm.h  |   8 +
 binutils/dwarf.c   | 688 ++++++++++++++++++++++-----------------------
 3 files changed, 447 insertions(+), 351 deletions(-)



More information about the Binutils mailing list