changeset 664:64880e3f286c default tip

- test/thunk: disable output buffering (might not be able catch segfaults on stack without SA_ONSTACK, so print maximum for when handler isn't called)
author Tassilo Philipp
date Thu, 23 May 2024 16:05:45 +0200
parents 127b569978cc
children
files test/thunk/Makefile.generic test/thunk/test_thunk.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/thunk/Makefile.generic	Sun Mar 24 13:52:44 2024 +0100
+++ b/test/thunk/Makefile.generic	Thu May 23 16:05:45 2024 +0200
@@ -1,4 +1,4 @@
-APP     = thunk
+APP     = thunk${APP_SUFFIX}
 OBJS    = test_thunk.o
 SRCTOP  = ${VPATH}/../..
 BLDTOP  = ../..
--- a/test/thunk/test_thunk.c	Sun Mar 24 13:52:44 2024 +0100
+++ b/test/thunk/test_thunk.c	Thu May 23 16:05:45 2024 +0200
@@ -6,7 +6,7 @@
  Description: 
  License:
 
-   Copyright (c) 2011-2021 Daniel Adler <dadler@uni-goettingen.de>,
+   Copyright (c) 2011-2024 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -137,6 +137,9 @@
 #if !defined(DC_WINDOWS)
   signal(SIGBUS,  segv_handler);
 #endif
+  /* disable output buffering - might not be able catch segfaults on stack
+     without SA_ONSTACK, so print maximum for when handler isn't called */
+  setvbuf(stdout, NULL, _IONBF, 0);
 #endif