Re: Work around BSD `join` bug

2024-01-10 Thread Paul Eggert
On 1/10/24 13:58, Bruno Haible wrote: - POSIX violation or not? Is it valid to pass lines with missing fields to 'join', according to POSIX [1]? It should be valid, yes. POSIX 'join' defers to POSIX 'sort' for the definition of fields, and POSIX 'sort' says missing fields should be t

Re: Work around BSD `join` bug

2024-01-10 Thread Bruno Haible
Hello Avinash, > BSD `join` has a bug where if one of the input file contains blank > lines then `join` fails.[0] Confirmed on FreeBSD and NetBSD. [0] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232405 Before applying the patch, it would be useful to understand its scope and the kind of bu

Work around BSD `join` bug

2024-01-10 Thread Avinash Sonawane
Hello! BSD `join` has a bug where if one of the input file contains blank lines then `join` fails.[0] Confirmed on FreeBSD and NetBSD. This patch removes blank lines before performing `join`: From cbf07f14b090a44981a94510753b68633eb46b72 Mon Sep 17 00:00:00 2001 From: Avinash Sonawane Date: Wed

Re: Provide a module for `clear_cache'

2024-01-10 Thread Bruno Haible
Marc Nieper-Wißkirchen wrote on 2023-11-06: > Emulators aren't of much help because they usually do not implement > the need for cache invalidation faithfully. Indeed, you were right. In my testing on various platforms: * I haven't seen the assertion ASSERT (f () == 2); fail on any QEM

jit/cache tests: Fix for powerpc64le CPUs

2024-01-10 Thread Bruno Haible
This patch fixes a test failure on Linux/powerpc64le. 2024-01-10 Bruno Haible jit/cache tests: Fix for powerpc64le CPUs. * tests/jit/test-cache.c: Treat Linux/powerpc64le *not* like AIX. diff --git a/tests/jit/test-cache.c b/tests/jit/test-cache.c index 18416f8f51..d19c720eb9

Re: jit/cache tests: Avoid test failure on hppa CPUs

2024-01-10 Thread Bruno Haible
Yesterday I did: > (structptr_to_funcptr, funcptr_to_structptr): New functions/macros. > (xcopy_structptr): Renamed from xcopy_funcptr. Mark as inline. > (COPY_FUNCPTR, CODE): Use structptr_to_funcptr, funcptr_to_structptr. This produces gcc -Wstrict-aliasing warnings on Linux/po

jit/cache: Fix for arm CPUs with GCC target arm-linux-gnueabihf

2024-01-10 Thread Bruno Haible
I see test failures on Debian 'armhf' 8 and 12. The cause is the following: On arm, there are two instruction sets: - The "ARM" instruction set, consisting of 4-byte words. - The "Thumb" instruction set, consisting of 2-byte words. A pointer to a function in "ARM" instruction set is just a poi

Re: jit/cache tests: Avoid test failure on OpenBSD

2024-01-10 Thread Bruno Haible
That patch caused some compiler warnings. Fixed like this: 2024-01-10 Bruno Haible jit/cache tests: Avoid compiler warnings on OpenBSD. * tests/jit/test-cache.c (main): New variables size_of_return1, size_of_return2. diff --git a/tests/jit/test-cache.c b/tests/jit/tes