Re: localename-unsafe: Add support for illumos getlocalename_l()

2025-05-04 Thread Bruno Haible via Gnulib discussion list
Hi Andy, > > I was going to test the attached patch, but find that I cannot test it: > > The commit > > https://github.com/illumos/illumos-gate/commit/004345e48064ccd168d15f66eba2031c6090ccee > > is from 2025-04-24. > > - In OmniOS, https://downloads.omnios.org/media/, the latest 'bloody' > > b

Re: Testsuite failure in (unprivileged) user namespace

2025-05-04 Thread Collin Funk
Hi Ludovic, Ludovic Courtès writes: >> I am only a relatively new user of guix, so I can't speak for which >> approach would be preferable from their perspective. I CC'ed Ludovic >> since he implemented the unprivileged guix daemon approach. > > I’m not sure how ‘modules/test-xfail’ is supposed

Re: Testsuite failure in (unprivileged) user namespace

2025-05-04 Thread Bruno Haible via Gnulib discussion list
Thanks for jumping in, Collin. > In the file 'modules/test-xfail' there is a few conditionals similar to > this: > > gl_CONDITIONAL([OS_IS_NETBSD], >[case "$host_os" in netbsd*) true ;; *) false ;; esac]) > > Then in 'cat modules/sigprocmask-tests', for example, we have:

Re: vc-mtime: Add API for more efficient use of git

2025-05-04 Thread Collin Funk
Bruno Haible via Gnulib discussion list writes: > Finally some good use of the GCC analyzer. gcc reports this warning: > > -Wanalyzer-possible-null-argument > ../../../gettext-tools/gnulib-lib/vc-mtime.c:374:7: warning: use of > possibly-NULL 'dir2' where non-null expected [CWE-690] I fi

Re: vc-mtime: Add API for more efficient use of git

2025-05-04 Thread Bruno Haible via Gnulib discussion list
Collin Funk wrote: > > The cause is that xgetcwd() may return NULL, which I did not remember. > > Good catch. I assumed from the name it would always be successful or > exit. But it only exits when OOM, not for other errors. And I made this assumption because when I looked at xgetcwd.h, it has no

Re: crypto/gc: Silence some -Wcalloc-transposed-args warnings

2025-05-04 Thread Collin Funk
Bruno Haible via Gnulib discussion list writes: > Building a testdir with a GCC 15 snapshot, I see these warnings: > > ../../gllib/gc-gnulib.c:177:24: warning: 'calloc' sizes specified with > 'sizeof' in the earlier argument and not in the later argument > ../../gllib/gc-gnulib.c:566:24: warning

crypto/gc-arcfour tests: Fix link error when using --with-libgcrypt.

2025-05-04 Thread Collin Funk
After running the following commands: $ gnulib-tool --create-testdir --dir testdir1 --single-configure `gnulib-tool --list | grep -E '^crypto/gc-?' | xargs` $ cd testdir1 && ./configure --with-libgcrypt CFLAGS='-Wcalloc-transposed-args' make[4]: Entering directory '/home/collin

Re: vc-mtime: Add API for more efficient use of git

2025-05-04 Thread Bruno Haible via Gnulib discussion list
Oops, the code uses one more array element than allocated. Found with 'valgrind'. Fixed like this: 2025-05-04 Bruno Haible vc-mtime: Fix a buffer overflow. * lib/vc-mtime.c (max_vc_mtime): Increase the size of argv by one element. diff --git a/lib/vc-mtime.c b/lib/vc-

Re: vc-mtime: Add API for more efficient use of git

2025-05-04 Thread Bruno Haible via Gnulib discussion list
Finally some good use of the GCC analyzer. gcc reports this warning: -Wanalyzer-possible-null-argument ../../../gettext-tools/gnulib-lib/vc-mtime.c:374:7: warning: use of possibly-NULL 'dir2' where non-null expected [CWE-690] The cause is that xgetcwd() may return NULL, which I did not re

Re: Testsuite failure in (unprivileged) user namespace

2025-05-04 Thread Ludovic Courtès
Hi Bruno and all, keinflue writes: >> Instead, how about >> a) if you just ignore the test failures — since you know you are >> running them in a very special environment, or >> b) we can mark these 3 tests as expected test failures if you >> provide an identifier to mark them with

Re: Testsuite failure in (unprivileged) user namespace

2025-05-04 Thread Collin Funk
Collin Funk writes: > I think something like this would work: > > gl_CONDITIONAL([IS_OVERFLOW_GID], >[test `cat /proc/sys/kernel/overflowgid` = `id -G | sed > 's/ /\n/g' | awk '{ if (NR == 2) print }'`]) > > Let me see if I can figure out how to set up a guix vm. Unfortu

Re: localename-unsafe: Add support for illumos getlocalename_l()

2025-05-04 Thread Andy Fiddaman
On Sun, 4 May 2025, Bruno Haible wrote: > Hi, > > Andy Fiddaman wrote: > > The attached patch adds support for using the POSIX getlocalename_l() > > function > > in illumos to avoid having to reach into undocumented/opaque structs. > > Thanks for notifying us about this. Yes, the purpose of ge

Re: localename-unsafe: Add support for illumos getlocalename_l()

2025-05-04 Thread Bruno Haible via Gnulib discussion list
Hi, Andy Fiddaman wrote: > The attached patch adds support for using the POSIX getlocalename_l() function > in illumos to avoid having to reach into undocumented/opaque structs. Thanks for notifying us about this. Yes, the purpose of getlocalename_l() in POSIX is to avoid peeking into undocumente

obstack changes: relicense under LGPLv2+

2025-05-04 Thread Bruno Haible via Gnulib discussion list
[sorry for the private email before. please reply to this one, CCing the list] Hi Alan, Paul, You contributed a lot of changes to the files lib/obstack.{h,in.h,c} between 2007 and 2021. We would like to have the ability to flow back these changes into glibc. glibc is under LGPLv2+. In this peri