From 34f33a1c1b1bd2342da2bcad24e74d018b4cdf0b 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. --- Cytoplasm/src/Memory.c | 4 ++-- TODO.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cytoplasm/src/Memory.c b/Cytoplasm/src/Memory.c index 3641957..73bc4fe 100644 --- a/Cytoplasm/src/Memory.c +++ b/Cytoplasm/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) diff --git a/TODO.txt b/TODO.txt index 87202ab..e22df13 100644 --- a/TODO.txt +++ b/TODO.txt @@ -12,7 +12,7 @@ Milestone: v0.3.0 ----------------- [x] Fix leaks in json -[ ] Debug ARM64 Debian +[x] Debug ARM64 Debian [ ] Cytoplasm [ ] Debug OpenSSL