Skip to content

Commit

Permalink
Fix 'use of undeclared SIGSEGV' on Linux if malloc redirection
Browse files Browse the repository at this point in the history
(fix of commit 54d8c74)

Issue #588 (bdwgc).

* os_dep.c [MPROTECT_VDB && DARWIN || OPENBSD]: Include signal.h.
* os_dep.c [NEED_FIND_LIMIT || UNIX_LIKE && !NO_DEBUGGING
|| USE_PROC_FOR_LIBRARIES && THREADS || WRAP_MARK_SOME
&& NO_SEH_AVAILABLE]: Likewise.
* os_dep.c [MPROTECT_VDB && !MSWINCE]: Do not include signal.h
if MSWIN32.
  • Loading branch information
ivmai committed Dec 11, 2023
1 parent 54d8c74 commit a753bcb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions os_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

#include "private/gc_priv.h"

#if (defined(MPROTECT_VDB) && !defined(DARWIN) && !defined(MSWINCE)) \
|| defined(GC_SOLARIS_THREADS)
#if (defined(MPROTECT_VDB) && !defined(MSWIN32) && !defined(MSWINCE)) \
|| defined(GC_SOLARIS_THREADS) || defined(OPENBSD)
# include <signal.h>
#endif

Expand Down Expand Up @@ -873,6 +873,8 @@ GC_INNER void GC_setpagesize(void)
|| (defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS)) \
|| (defined(WRAP_MARK_SOME) && defined(NO_SEH_AVAILABLE))

# include <signal.h>

# ifdef USE_SEGV_SIGACT
# ifndef OPENBSD
static struct sigaction old_segv_act;
Expand Down

0 comments on commit a753bcb

Please sign in to comment.