Re: rpl_free undefined

2022-05-01 Thread Bruno Haible
Reuben Thomas wrote: > Check out https://github.com/rrthomas/libpaper.git commit 8fe608f on MSYS > > Edit bootstrap.conf to remove the posix-free module > > ./bootstrap I don't want to debug a gnulib version from more than 1 year ago, therefore I'm using ./bootstrap --skip-git --gnulib-srcdir

Re: setlocale with NULL locale (to read current locale) segfaults on MSYS

2022-05-01 Thread Bruno Haible
Reuben Thomas wrote: > > In the end I tried something a bit different, which was to reduce the > > > number of gnulib modules I was using, as for the code I'm writing it > > > seemed > > > reasonable to assume C99 and POSIX.1-2008. > > > > ?? That makes no sense to me. Either you want to assume PO

Re: vasnprintf.c: "out_of_memory", -Wanalyzer-free-of-non-heap, -Wanalyzer-malloc-leak

2022-05-01 Thread Paul Eggert
On 5/1/22 14:28, Bruno Haible wrote: I pushed these three patches in your name. (I hope that's fine with you.) Thanks, looks good.

Re: malloc failing with EAGAIN

2022-05-01 Thread Paul Eggert
On 5/1/22 13:28, Bruno Haible wrote: I would argue that glibc should use a different errno value in this case. Either errno value makes sense to me. If you keep doing a non-blocking read on a pipe that only you can write to you'll keep getting EAGAIN, which has the same feel as a bug where yo

Re: rpl_free undefined

2022-05-01 Thread Reuben Thomas
On Sun, 1 May 2022 at 22:39, Bruno Haible wrote: > A link error is not a "minor" problem; it's a major one. > > More generally: How to reproduce? > Check out https://github.com/rrthomas/libpaper.git commit 8fe608f on MSYS Edit bootstrap.conf to remove the posix-free module ./bootstrap ./config

Re: setlocale with NULL locale (to read current locale) segfaults on MSYS

2022-05-01 Thread Reuben Thomas
On Sun, 1 May 2022 at 22:34, Bruno Haible wrote: > Reuben Thomas wrote: > > It's not really that I'm doing anything: gnulib seems to detect MSYS as > > being a POSIX platform. > > Not really; something in the configure step (which you haven't shown) > made it "detect" some POSIX threads facility.

Re: rpl_free undefined

2022-05-01 Thread Bruno Haible
Reuben Thomas wrote: > I ran into another minor problem while doing this. My module list was: > > bootstrap > filenamecat-lgpl > getline > getopt-gnu > manywarnings > pathmax > relocatable-lib-lgpl > relocatable-script > strcase > > On Windows, I got a link error when linking against libgnu, as t

Re: setlocale with NULL locale (to read current locale) segfaults on MSYS

2022-05-01 Thread Bruno Haible
Reuben Thomas wrote: > It's not really that I'm doing anything: gnulib seems to detect MSYS as > being a POSIX platform. Not really; something in the configure step (which you haven't shown) made it "detect" some POSIX threads facility. > In the end I tried something a bit different, which was to

Re: vasnprintf.c: "out_of_memory", -Wanalyzer-free-of-non-heap, -Wanalyzer-malloc-leak

2022-05-01 Thread Bruno Haible
Hi Paul, I wrote: > I'll rework your patch; thanks for the ideas! I pushed these three patches in your name. (I hope that's fine with you.) Bruno From da95c0389f5e8c668d6c8c16462669135f02fb38 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 1 May 2022 22:38:50 +0200 Subject: [PATCH 1/3] v

Re: setlocale with NULL locale (to read current locale) segfaults on MSYS

2022-05-01 Thread Reuben Thomas
On Sat, 30 Apr 2022 at 12:44, Bruno Haible wrote: > Reuben Thomas wrote: > > on MSYS it goes wrong > > ... > > setlocale_null_with_lock (category=category@entry=0, buf=buf@entry > =0xbd80 > > "", bufsize=bufsize@entry=3221) at setlocale_null.c:228 > > 228 if (pthread_in_use()) > > (gdb)

Re: malloc failing with EAGAIN

2022-05-01 Thread Bruno Haible
Paul Eggert wrote: > malloc can fail with EAGAIN > on GNU/Linux and I assume other errno values are also possible. Indeed [1], although the glibc manual [2] and the Linux man page [3] don't mention it. The meaning of EAGAIN in this case is as documented for the mmap() system call [4]: "too muc

Re: vasnprintf.c: "out_of_memory", -Wanalyzer-free-of-non-heap, -Wanalyzer-malloc-leak

2022-05-01 Thread Paul Eggert
On 5/1/22 10:16, Bjarni Ingi Gislason wrote: I checked what of the about 30 options, I use for compiling "groff", could cause the only warning (leak) about "vasnprintf.c" and it was the "-flto". Ah, the "-flto" suggests that the problem isn't in vasnprintf per se; it's in groff, which isn't

Re: vasnprintf.c: "out_of_memory", -Wanalyzer-free-of-non-heap, -Wanalyzer-malloc-leak

2022-05-01 Thread Bjarni Ingi Gislason
On Sat, Apr 30, 2022 at 01:27:28PM -0700, Paul Eggert wrote: > On 4/30/22 07:13, Bjarni Ingi Gislason wrote: > >With latest gnulib version: > > I'm not seeing this problem with the current > (84863a1c4dc8cca8fb0f6f670f67779cdd2d543b) gnulib version on Fedora 35 > x86-64, which has GCC 11.3.1 2