mirror of git://sourceware.org/git/glibc.git
The build of glibc for i686-gnu has been failing for a while with GCC
mainline / GCC 13:
../sysdeps/mach/hurd/getcwd.c: In function '__hurd_canonicalize_directory_name_internal':
../sysdeps/mach/hurd/getcwd.c:242:48: error: pointer 'file_name' may be used after 'realloc' [-Werror=use-after-free]
242 | file_namep = &buf[file_namep - file_name + size / 2];
| ~~~~~~~~~~~^~~~~~~~~~~
../sysdeps/mach/hurd/getcwd.c:236:25: note: call to 'realloc' here
236 | buf = realloc (file_name, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Fix by doing the subtraction before the reallocation.
Tested with build-many-glibcs.py for i686-gnu.
[samuel.thibault@ens-lyon.rg: Removed mention of this being a bug]
Message-Id: <18587337-7815-4056-ebd0-724df262d591@codesourcery.com>
|
||
|---|---|---|
| .. | ||
| htl | ||
| hurd | ||
| i386 | ||
| include | ||
| sys | ||
| x86 | ||
| x86_64 | ||
| Makefile | ||
| Subdirs | ||
| _strerror.c | ||
| adjtime.c | ||
| clock_gettime.c | ||
| clock_nanosleep.c | ||
| configure | ||
| configure.ac | ||
| getloadavg.c | ||
| getpagesize.c | ||
| getsysstats.c | ||
| libc-lock.h | ||
| libmachuser.abilist | ||
| mprotect.c | ||
| msync.c | ||
| munmap.c | ||
| pagecopy.h | ||
| readonly-area.c | ||
| sched_yield.c | ||
| sleep.c | ||
| strerror_l.c | ||
| sysdep.h | ||
| thread_state.h | ||
| usleep.c | ||
| xpg-strerror.c | ||