Skip to content

Commit

Permalink
Don't define MPROTECT_VDB for SerenityOS
Browse files Browse the repository at this point in the history
This causes a null pointer dereference crash when building without
SMALL_CONFIG.

See: #688
  • Loading branch information
linusg committed Dec 15, 2024
1 parent 437c08c commit e2e6fe9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion include/private/gcconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,6 @@ extern int etext[], _end[];
# define DATASTART PTR_ALIGN_UP((ptr_t)etext, 0x1000)
# define DATAEND ((ptr_t)_end)
# define DYNAMIC_LOADING
# define MPROTECT_VDB
# define USE_MMAP_ANON
#endif /* SERENITY */

Expand Down
6 changes: 2 additions & 4 deletions os_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -3259,8 +3259,7 @@ STATIC mach_port_t GC_task_self = 0;

# elif !defined(USE_WINALLOC)
# include <sys/mman.h>
# if !defined(AIX) && !defined(CYGWIN32) && !defined(HAIKU) \
&& !defined(SERENITY)
# if !defined(AIX) && !defined(CYGWIN32) && !defined(HAIKU)
# include <sys/syscall.h>
# endif

Expand Down Expand Up @@ -3377,8 +3376,7 @@ is_header_found_async(const void *p)
# elif defined(IRIX5)
# define CODE_OK (si->si_code == EACCES)
# elif defined(AIX) || defined(COSMO) || defined(CYGWIN32) \
|| defined(HAIKU) || defined(HURD) || defined(LINUX) \
|| defined(SERENITY)
|| defined(HAIKU) || defined(HURD) || defined(LINUX)
/* Linux: Empirically c.trapno == 14, on IA32, but is that useful? */
/* Should probably consider alignment issues on other architectures. */
# define CODE_OK TRUE
Expand Down

0 comments on commit e2e6fe9

Please sign in to comment.