Re: Regression: "wchar: fix bug when checking for ‘inline’" breaks distcc usage

2018-09-06 Thread Thomas Deutschmann
Hi, Bruno Haible wrote: > Looks like distcc, or the distcc installation and configuration on the > particular user's machine (*), is broken. I won't investigate that. > > [...] > > (*) AFAIK, the same version of the same program frequently behaves > differently on different Gentoo machines.

stddef: override max_align_t on NetBSD 8.0/x86

2018-09-06 Thread Bruno Haible
On NetBSD 8.0/x86 I'm seeing this compilation failure: In file included from ../../gltests/test-stddef.c:24:0: ../../gltests/../gllib/verify.h:207:21: error: static assertion failed: "verify (__alignof__ (double) <= __alignof__ (max_align_t))" # define _GL_VERIFY _Static_assert

fcntl: fix F_DUPFD_CLOEXEC behaviour on Haiku

2018-09-06 Thread Bruno Haible
On Haiku, the fcntl tests fail. Reason: 1) fcntl (oldfd, F_DUPFD_CLOEXEC, newfd) sets the FD_CLOEXEC flag on oldfd, not on newfd (!). 2) Additionally, if newfd < 0, it fails with errno = EMFILE, where POSIX wants errno = EINVAL. This fixes it. I'm too lazy to write an autoconf test for

Re: bug#32592: heap-use-after-free in regex module

2018-09-06 Thread Jim Meyering
On Thu, Sep 6, 2018 at 12:18 AM Paul Eggert wrote: > Jim Meyering wrote: > > I couldn't help but notice this nonsense right after the line > > you inserted: > > > >if (err == REG_NOMATCH) > > continue; > > } > > > > That is an "if (...) continue;" just before the

Re: limits-h: provide numerical limits macros

2018-09-06 Thread Bruno Haible
With this revamped 'limits-h' module, a number of other modules can be simplified. Done as in the attached patches. 2018-09-06 Bruno Haible count-trailing-zeros tests: Rely on limits-h module. * tests/test-count-trailing-zeros.c (ULLONG_MAX): Remove fallback

intprops tests: fix compilation error

2018-09-06 Thread Bruno Haible
While testing the previous changes on IRIX 6.5 with cc, I got "declaration after statement" errors. Since the 'intprops' module is used as a dependency in a number of modules, it and its tests should better not rely on the 'c99' module. Therefore I'm committing this fix: 2018-09-06 Bruno

limits-h: provide numerical limits macros

2018-09-06 Thread Bruno Haible
While testing the 'fcntl' module on Fedora 1 (a distribution from 2003), I got these compilation errors: test-intprops.c: In function `main': test-intprops.c:137: error: `LLONG_MIN' undeclared (first use in this function) test-intprops.c:137: error: (Each undeclared identifier is reported only

Re: Out of bounds va_arg access in rpl_fcntl

2018-09-06 Thread Bruno Haible
> 2018-09-05 Bruno Haible > > fcntl: Don't access nonexistent optional argument. > Reported by Frank Busse in > . > * lib/fcntl.c (rpl_fcntl): For actions that don't take an argument, > don't

Re: bug#32592: heap-use-after-free in regex module

2018-09-06 Thread Paul Eggert
Assaf Gordon wrote: Speaking of coincidences, I just found this use-after-free bug was already reported (but not fixed) back in 2015:https://sourceware.org/bugzilla/show_bug.cgi?id=18040 . Thanks, I had looked for a duplicate bug report before filing glibc bug 23609 but did not find that

Re: bug#32592: heap-use-after-free in regex module

2018-09-06 Thread Assaf Gordon
Thank you all for the review and comments. On Thu, Sep 6, 2018 at 1:18 AM, Paul Eggert wrote: > What a coincidence that we would find two bugs right next to each other, > huh?... > > I filed a bug report against glibc, and unless there's an objection I would > like to fix both bugs in glibc and

Re: bug#32592: heap-use-after-free in regex module

2018-09-06 Thread Paul Eggert
Jim Meyering wrote: I couldn't help but notice this nonsense right after the line you inserted: if (err == REG_NOMATCH) continue; } That is an "if (...) continue;" just before the closing brace of a for-loop. Those two lines constitute a no-op and should be