bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* immutable: Avoid test failures on MidnightBSD
@ 2021-02-07 16:26 Bruno Haible
  2021-02-07 18:58 ` c-stack: Adjust for MidnightBSD Bruno Haible
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Haible @ 2021-02-07 16:26 UTC (permalink / raw)
  To: bug-gnulib

On MidnightBSD 1.1, I see this test failure:

FAIL: test-immutable.sh
=======================

Bus error
test-immutable.sh: test case 2 failed
Bus error
test-immutable.sh: test case 3 failed
FAIL test-immutable.sh (exit status: 1)

This patch fixes it.


2021-02-07  Bruno Haible  <bruno@clisp.org>

	immutable: Avoid test failures on MidnightBSD.
	* tests/test-immutable.c (install_segv_handler): On FreeBSD, install the
	handler also for SIGBUS.

diff --git a/tests/test-immutable.c b/tests/test-immutable.c
index 4bee1f2..18ccf9d 100644
--- a/tests/test-immutable.c
+++ b/tests/test-immutable.c
@@ -45,7 +45,7 @@ static void
 install_segv_handler (void)
 {
   signal (SIGSEGV, segv_handler);
-# if defined __APPLE__ && defined __MACH__
+# if (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__
   signal (SIGBUS, segv_handler);
 # endif
 }



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* c-stack: Adjust for MidnightBSD
  2021-02-07 16:26 immutable: Avoid test failures on MidnightBSD Bruno Haible
@ 2021-02-07 18:58 ` Bruno Haible
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno Haible @ 2021-02-07 18:58 UTC (permalink / raw)
  To: bug-gnulib

> Bus error
> test-immutable.sh: test case 2 failed
> Bus error
> test-immutable.sh: test case 3 failed
> FAIL test-immutable.sh (exit status: 1)

Accordingly, the 'c-stack' module must also install a SIGBUS handler on
this platform.


2021-02-07  Bruno Haible  <bruno@clisp.org>

	c-stack: Adjust for MidnightBSD.
	* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): On MidnightBSD,
	set FAULT_YIELDS_SIGBUS.

diff --git a/m4/c-stack.m4 b/m4/c-stack.m4
index e7413a2..df8dc52 100644
--- a/m4/c-stack.m4
+++ b/m4/c-stack.m4
@@ -7,7 +7,7 @@
 
 # Written by Paul Eggert.
 
-# serial 20
+# serial 21
 
 AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
   [
@@ -19,7 +19,7 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
    dnl is accessed, or when the stack overflows.
    dnl Either { SIGSEGV } or { SIGSEGV, SIGBUS }.
    case "$host_os" in
-     sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
+     sunos4* | freebsd* | dragonfly* | midnightbsd* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
        FAULT_YIELDS_SIGBUS=1 ;;
      hpux*) # HP-UX
        FAULT_YIELDS_SIGBUS=1 ;;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-07 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07 16:26 immutable: Avoid test failures on MidnightBSD Bruno Haible
2021-02-07 18:58 ` c-stack: Adjust for MidnightBSD Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).