https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78433
--- Comment #9 from Dominik Vogt <vogt at linux dot vnet.ibm.com> --- ... and I think the buffer allocated in __execvpe() is also one byte too small: char buffer[path_len + file_len + 1]; ... char *pend = mempcpy (buffer, p, subp - p); <-- path_len *pend = '/'; <-- path_len + 1 memcpy (pend + (p < subp), file, file_len + 1); <-- path_len + file_len + 2