diff options
| author | Daniel Colascione | 2014-04-03 02:50:58 -0700 |
|---|---|---|
| committer | Daniel Colascione | 2014-04-03 02:50:58 -0700 |
| commit | e3f04a4a8f439dee381d8e6d0c55c684107c1a55 (patch) | |
| tree | 2b06876269dfbf41ba45efdd2fbcff663b7e5daa /src/alloc.c | |
| parent | 1b85074c81b11066f60b6f4d8c827788429000a2 (diff) | |
| download | emacs-e3f04a4a8f439dee381d8e6d0c55c684107c1a55.tar.gz emacs-e3f04a4a8f439dee381d8e6d0c55c684107c1a55.zip | |
Assert that function cells contain valid lisp objects
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index 7c63fa05ac6..a007a43457d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -6174,6 +6174,8 @@ mark_object (Lisp_Object arg) | |||
| 6174 | break; | 6174 | break; |
| 6175 | CHECK_ALLOCATED_AND_LIVE (live_symbol_p); | 6175 | CHECK_ALLOCATED_AND_LIVE (live_symbol_p); |
| 6176 | ptr->gcmarkbit = 1; | 6176 | ptr->gcmarkbit = 1; |
| 6177 | /* Attempt to catch bogus objects. */ | ||
| 6178 | eassert (valid_lisp_object_p (ptr->function) >= 1); | ||
| 6177 | mark_object (ptr->function); | 6179 | mark_object (ptr->function); |
| 6178 | mark_object (ptr->plist); | 6180 | mark_object (ptr->plist); |
| 6179 | switch (ptr->redirect) | 6181 | switch (ptr->redirect) |
| @@ -6601,6 +6603,8 @@ sweep_symbols (void) | |||
| 6601 | if (!pure_p) | 6603 | if (!pure_p) |
| 6602 | eassert (!STRING_MARKED_P (XSTRING (sym->s.name))); | 6604 | eassert (!STRING_MARKED_P (XSTRING (sym->s.name))); |
| 6603 | sym->s.gcmarkbit = 0; | 6605 | sym->s.gcmarkbit = 0; |
| 6606 | /* Attempt to catch bogus objects. */ | ||
| 6607 | eassert (valid_lisp_object_p (sym->s.function) >= 1); | ||
| 6604 | } | 6608 | } |
| 6605 | } | 6609 | } |
| 6606 | 6610 | ||