From a706784e9ba4fe6d249d1f23673d7c554ffc43e7 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 20 Jun 2017 17:05:20 +0300 Subject: [PATCH] Prevent abort in register_data_segments for Symbian and Emscripten Issue #163 (bdwgc). DATASTART is tested to have a non-null value in GC_register_data_segments, so the macro should not be defined to null even if it is not really used (null value typically means that the corresponding weak symbol is not resolved). * include/private/gcconfig.h [SYMBIAN || __EMSCRIPTEN__] (DATASTART, DATAEND): Change to a non-null value (ALIGNMENT). --- include/private/gcconfig.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 24bd0fb6..bf4b099a 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -797,16 +797,16 @@ # define OS_TYPE "SYMBIAN" # define CPP_WORDSZ 32 # define ALIGNMENT 4 -# define DATASTART (ptr_t)NULL /* typed null for cppcheck */ -# define DATAEND (ptr_t)NULL +# define DATASTART (ptr_t)ALIGNMENT /* cannot be null */ +# define DATAEND (ptr_t)ALIGNMENT # endif # ifdef __EMSCRIPTEN__ # define OS_TYPE "EMSCRIPTEN" # define CPP_WORDSZ 32 # define ALIGNMENT 4 -# define DATASTART (ptr_t)NULL -# define DATAEND (ptr_t)NULL +# define DATASTART (ptr_t)ALIGNMENT +# define DATAEND (ptr_t)ALIGNMENT # define STACK_NOT_SCANNED # endif -- 2.50.1