Re: getdelim: Work around buggy implementation on macOS 10.13

2022-10-24 Thread Jeffrey Walton
On Sun, Oct 23, 2022 at 11:57 PM Simon Josefsson via Gnulib discussion list wrote: > > Bruno Haible writes: > > > While testing a GNU sed snapshot on macOS 10.13, I see this test failure: > ... > > ==85029== Invalid read of size 16 > ... > > An out-of-bounds read. Oh oh. When I reconfigure and

Re: getdelim: Work around buggy implementation on macOS 10.13

2022-10-23 Thread Bruno Haible
I wrote: > TODO: Someone should test the same thing on the *BSD systems as well. Done: On FreeBSD 13.1, with valgrind 3.19.0, in a 'sed' binary that uses getdelim from FreeBSD's libc, there is no failure in sed's test suite. valgrind is not ported to NetBSD and OpenBSD; let's assume that these

Re: getdelim: Work around buggy implementation on macOS 10.13

2022-10-23 Thread Bruno Haible
Hi Simon, > > + [case "$host_os" in > > + darwin*) > > + dnl On macOS 10.13, valgrind detected an out-of-bounds read > > during > > + dnl the GNU sed test suite: > > + dnl Invalid read of size 16 > > + dnl at 0x100EE6A05:

Re: getdelim: Work around buggy implementation on macOS 10.13

2022-10-23 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > While testing a GNU sed snapshot on macOS 10.13, I see this test failure: ... > ==85029== Invalid read of size 16 ... > An out-of-bounds read. Oh oh. When I reconfigure and recompile with the > environment variable > gl_cv_func_working_getdelim=no > this test succeeds.

getdelim: Work around buggy implementation on macOS 10.13

2022-10-16 Thread Bruno Haible
rect (it's not a particularly complex code), this proves that the out-of-bounds read comes from the macOS getdelim() function. This patch adds a workaround. TODO: Someone should test the same thing on the *BSD systems as well. 2022-10-16 Bruno Haible getdelim: Work around buggy implementatio