On Fri, May 29, 2020 at 1:39 PM Harald Anlauf <anl...@gmx.de> wrote: > > The initial patch for this PR had some fallout which for unknown reason > did only show up on i686, but not on x86_64. With initial guidance by > Manfred Schwarb three further locations exhibiting buffer overrun could > be identified in a gdb session and were fixed. > > Committed as 'obvious' to master. > > Thanks, > Harald > > > PR fortran/95090 - ICE: identifier overflow > > The initial fix for this PR uncovered several latent issues with further > too small string buffers which showed up only when testing on i686. > Provide sufficiently large temporaries. > > 2020-05-29 Harald Anlauf <anl...@gmx.de> > > gcc/fortran/ > PR fortran/95090 > * class.c (get_unique_type_string): Enlarge temporary for > name-mangling. Use strncpy to prevent buffer overrun. > (get_unique_hashed_string): Enlarge temporary. > (gfc_hash_value): Enlarge temporary for name-mangling.
This breaks bootstrap: https://gcc.gnu.org/pipermail/gcc-regression/2020-May/072642.html ../../src-master/gcc/fortran/class.c:487:13: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 67 equals destination size [-Werror=stringop-truncation] 487 | strncpy (dt_name, gfc_dt_upper_string (derived->name), sizeof (dt_name)); -- H.J.