Re: Undefined behavior in lib/canonicalize-lgpl.c

2020-09-10 Thread Paul Eggert
On 9/10/20 6:34 AM, Adhemerval Zanella wrote: I think the lib/canonicalize.c is also affected: Thanks for the heads-ups. I installed the attached patch to Gnulib, which fixes a related bug I noticed while in the neighborhood (I don't think glibc has this bug). This patch uses the expression

Compilation problems with stat-w32.c

2020-09-10 Thread Eli Zaretskii
I've built today's snapshot of GDB on MS-Windows, and bumped into a problem: starting the produced binary on Windows XP fails with this message: The procedure entry point GetFinalPathNameByHandleA could not be located in the dynamic link library KERNEL32.dll. This happens because stat-w

Re: Undefined behavior in lib/canonicalize-lgpl.c

2020-09-10 Thread Adhemerval Zanella
On 10/09/2020 05:32, Florian Weimer wrote: > We have received a report that the glibc realpath implementation > exhibits undefined behavior: > > > > In gnulib, the code is in lib/canonicalize-lgpl.c: > > 234 if (!ISSLASH (de

Undefined behavior in lib/canonicalize-lgpl.c

2020-09-10 Thread Florian Weimer
We have received a report that the glibc realpath implementation exhibits undefined behavior: In gnulib, the code is in lib/canonicalize-lgpl.c: 234 if (!ISSLASH (dest[-1])) 235 *dest++ = '/'; 236 23

[PATCH] tempname: help merge with glibc

2020-09-10 Thread Paul Eggert
Inspired by draft patches by Adhemerval Zanella in: https://sourceware.org/pipermail/libc-alpha/2020-September/117501.html https://sourceware.org/pipermail/libc-alpha/2020-September/117502.html * lib/tempname.c: Include stdalign.h, time.h. If _LIBC, do not include random-bits.h. (__getrandom, __clo