summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-11-29 23:30:22 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2014-11-29 23:32:29 -0800
commit3517da701ea5d16c296745d6678988b06bee615d (patch)
treeaa890d2a3915c69ce9a6a41714bc8cad9c6c3b70 /src/data.c
parent70723e5107fd92c31e5b395d58be0b20b13c322d (diff)
downloademacs-3517da701ea5d16c296745d6678988b06bee615d.tar.gz
Port better to AddressSanitizer.
These changes suffice for temacs on x86-64 with GCC 4.9.2 and -fsanitize=address. * alloc.c (valid_pointer_p) [ADDRESS_SANITIZER]: Return -1 or 0, as the pipe trick doesn't work. * alloc.c (relocatable_string_data_p, mark_object, sweep_symbols): * data.c (Ffset): * print.c (print_object): When a pointer-check primitive returns -1, do not assume this means the pointer is valid or that the underlying system has failed. It could just be that addresses are being sanitized so Emacs can't test for pointer validity. * lisp.h (defined_GC_CHECK_STRING_BYTES): New constant. (USE_STACK_STRING) [GC_CHECK_STRING_BYTES]: Now false, since the string validity checker doesn't work on stack-based strings.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c
index 9977a3aaadd..b48dbbebabc 100644
--- a/src/data.c
+++ b/src/data.c
@@ -729,7 +729,7 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
/* Convert to eassert or remove after GC bug is found. In the
meantime, check unconditionally, at a slight perf hit. */
- if (valid_lisp_object_p (definition) < 1)
+ if (! valid_lisp_object_p (definition))
emacs_abort ();
set_symbol_function (symbol, definition);