https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63489
--- Comment #3 from Jonathan Hogg <jonathan.hogg at stfc dot ac.uk> --- Confirmed, this is the cause is the larger example as well. I had missed the introduction of -fsanitize=address, useful feature. I'd assumed something like that valgrind would have picked up for me however!