From b02ad117c43e4b4b8f3d44c456038ab4804fe7f2 Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Fri, 26 May 2023 23:05:35 +0000 Subject: [PATCH] Fix SIGBUS on some platforms. Memory alignment matters! This is a temporary fix; I'm not convinced it will work on all platforms, so I will probably end up removing all of the memory boundary code altogether. --- src/Memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Memory.c b/src/Memory.c index 3641957..73bc4fe 100644 --- a/src/Memory.c +++ b/src/Memory.c @@ -50,8 +50,8 @@ struct MemoryInfo void *pointer; }; -#define MEM_BOUND_TYPE UInt16 -#define MEM_BOUND 0xFFFF +#define MEM_BOUND_TYPE UInt32 +#define MEM_BOUND 0xFFFFFFFF #define MEM_BOUND_LOWER(p) *((MEM_BOUND_TYPE *) p) #define MEM_BOUND_UPPER(p, x) *(((MEM_BOUND_TYPE *) (((UInt8 *) p) + x)) + 1)