https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69650

--- Comment #52 from Roger Orr <rogero at howzatt dot demon.co.uk> ---
Ah - added print of *pfile->line_table  at line 978 and compared with the value
when we error.

978       struct line_maps *line_table = pfile->line_table;
$3702 = {info_ordinary = {maps = 0x7fffec65d000, allocated = 4096, used = 4096,
cache = 4095}, info_macro = {maps = 0x0, allocated = 0, used = 0, cache = 0},
depth = 8,
  trace_includes = false, highest_location = 511461984, highest_line =
511461856, max_column_hint = 128, reallocator = 0x25409c0
<realloc_for_line_map(void*, size_t)>,
  round_alloc_size = 0x11bf0fa <ggc_round_alloc_size(unsigned long)>,
location_adhoc_data_map = {htab = 0x60b00000ad80, curr_loc = 4884, allocated =
8192, data = 0x7fffeb7ab000},
  builtin_location = 1, seen_line_directive = true, default_range_bits = 5,
num_optimized_ranges = 500030, num_unoptimized_ranges = 4884}

(gdb) p *pfile->line_table
$3703 = {info_ordinary = {maps = 0x7fffec993000, allocated = 16384, used =
4097, cache = 4096}, info_macro = {maps = 0x0, allocated = 0, used = 0, cache =
0}, depth = 8,
  trace_includes = false, highest_location = 511470272, highest_line =
511470272, max_column_hint = 256, reallocator = 0x25409c0
<realloc_for_line_map(void*, size_t)>,
  round_alloc_size = 0x11bf0fa <ggc_round_alloc_size(unsigned long)>,
location_adhoc_data_map = {htab = 0x60b00000ad80, curr_loc = 4885, allocated =
8192, data = 0x7fffeb7ab000},
  builtin_location = 1, seen_line_directive = true, default_range_bits = 5,
num_optimized_ranges = 500031, num_unoptimized_ranges = 4885}


The 'mapos' address has changed and the allocated size has changed from 4096 to
16384. The 'map' variable points 0x1ffe0 bytes beyond the *old* value of maps.

Reply via email to