* tests/test-c32ispunct.c (main): Skip a test case that fails on Fil-C.
* tests/test-free.c (main): Avoid converting from a pointer to uintptr_t
and back.
* tests/test-explicit_bzero.c (test_heap): Skip this test on Fil-C.
* tests/test-memset_explicit.c (test_heap): Likewise.
* tests/test-sigsegv-catch-segv1.c: Skip the entire test on Fil-C, since
it relies on converting an uintptr_t value to a pointer.
* tests/test-sigsegv-catch-segv2.c: Likewise.
+2026-07-28 Bruno Haible <bruno@clisp.org>
+
+ tests: Avoid some more runtime errors with Fil-C.
+ * tests/test-c32ispunct.c (main): Skip a test case that fails on Fil-C.
+ * tests/test-free.c (main): Avoid converting from a pointer to uintptr_t
+ and back.
+ * tests/test-explicit_bzero.c (test_heap): Skip this test on Fil-C.
+ * tests/test-memset_explicit.c (test_heap): Likewise.
+ * tests/test-sigsegv-catch-segv1.c: Skip the entire test on Fil-C, since
+ it relies on converting an uintptr_t value to a pointer.
+ * tests/test-sigsegv-catch-segv2.c: Likewise.
+
2026-07-28 Paul Eggert <eggert@cs.ucla.edu>
Bruno Haible <bruno@clisp.org>
is = for_character ("\360\235\204\200", 4);
ASSERT (is != 0);
#endif
- #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__) || defined __ANDROID__)
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__) || defined __ANDROID__ || defined __FILC__)
/* U+E003A TAG COLON */
is = for_character ("\363\240\200\272", 4);
ASSERT (is == 0);
/* =============== Verify operation on heap-allocated memory =============== */
/* Skip this part when an address sanitizer is in use, because it would report
- a "heap use after free". */
+ a "heap use after free".
+ Skip it also with Fil-C, because that environment does not support the
+ conversion of uintptr_t to a pointer or the re-use of a freed pointer. */
#ifndef __has_feature
# define __has_feature(a) 0
#endif
-#if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer)
+#if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer) \
+ || defined __FILC__
static void
test_heap (void)
printf ("test_heap: address range is unmapped after free().\n");
}
-#endif /* ! address sanitizer enabled */
+#endif /* ! (address sanitizer enabled || Fil-C) */
/* =============== Verify operation on stack-allocated memory =============== */
/* Do a large memory allocation. */
size_t big_size = 0x1000000;
void *ptr = malloc (big_size - 0x100);
- char *ptr_aligned = (char *) ((uintptr_t) ptr & ~(pagesize - 1));
+ char *ptr_aligned = (char *) ptr - ((uintptr_t) ptr & (pagesize - 1));
/* This large memory allocation allocated a memory area
from ptr_aligned to ptr_aligned + big_size.
Enlarge this memory area by adding a page before and a page
/* =============== Verify operation on heap-allocated memory =============== */
/* Skip this part when an address sanitizer is in use, because it would report
- a "heap use after free". */
+ a "heap use after free".
+ Skip it also with Fil-C, because that environment does not support the
+ conversion of uintptr_t to a pointer or the re-use of a freed pointer. */
#ifndef __has_feature
# define __has_feature(a) 0
#endif
-#if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer)
+#if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer) \
+ || defined __FILC__
static void
test_heap (void)
printf ("test_heap: address range is unmapped after free().\n");
}
-#endif /* ! address sanitizer enabled */
+#endif /* ! (address sanitizer enabled || Fil-C) */
/* =============== Verify operation on stack-allocated memory =============== */
#include <stdint.h>
#include <stdio.h>
-#if HAVE_SIGSEGV_RECOVERY
+#if HAVE_SIGSEGV_RECOVERY && !defined __FILC__
# include "mmap-anon-util.h"
# include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
-#if HAVE_SIGSEGV_RECOVERY
+#if HAVE_SIGSEGV_RECOVERY && !defined __FILC__
# if defined _WIN32 && !defined __CYGWIN__
/* Windows doesn't have sigset_t. */