diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2019-08-21 22:19:03 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-08-21 22:30:18 -0700 |
| commit | 2b552f34892ee3c73f4b5fb5380218dc6ebbf4bb (patch) | |
| tree | a5c875fa6082cb43b403a9bfa0b3ef2b90d93ebc /src/alloc.c | |
| parent | ceebf3efbea7faffc01558d88c91250539c737e0 (diff) | |
Don’t debug fset by default
This GC bug seems to have been fixed, so the check is no longer
needed in production code. From a suggestion by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html
* src/alloc.c (SUSPICIOUS_OBJECT_CHECKING) [!ENABLE_CHECKING]:
Do not define.
(find_suspicious_object_in_range, detect_suspicious_free):
Expand to proper dummy expressions if !SUSPICIOUS_OBJECT_CHECKING.
* src/data.c (Ffset): Convert test to an eassert.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/alloc.c b/src/alloc.c index 53af7325f47..39964c4b293 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -302,15 +302,11 @@ static intptr_t garbage_collection_inhibited; const char *pending_malloc_warning; -#if 0 /* Normally, pointer sanity only on request... */ +/* Pointer sanity only on request. FIXME: Code depending on + SUSPICIOUS_OBJECT_CHECKING is obsolete; remove it entirely. */ #ifdef ENABLE_CHECKING #define SUSPICIOUS_OBJECT_CHECKING 1 #endif -#endif - -/* ... but unconditionally use SUSPICIOUS_OBJECT_CHECKING while the GC - bug is unresolved. */ -#define SUSPICIOUS_OBJECT_CHECKING 1 #ifdef SUSPICIOUS_OBJECT_CHECKING struct suspicious_free_record @@ -327,8 +323,8 @@ static int suspicious_free_history_index; static void *find_suspicious_object_in_range (void *begin, void *end); static void detect_suspicious_free (void *ptr); #else -# define find_suspicious_object_in_range(begin, end) NULL -# define detect_suspicious_free(ptr) (void) +# define find_suspicious_object_in_range(begin, end) ((void *) NULL) +# define detect_suspicious_free(ptr) ((void) 0) #endif /* Maximum amount of C stack to save when a GC happens. */ |
