[Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3
vogt at linux dot vnet.ibm.com
gcc-bugzilla@gcc.gnu.org
Mon Nov 21 10:58:00 GMT 2016
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
More information about the Gcc-bugs
mailing list