diff options
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/alloc.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0b03069c8d7..ea32a480a6c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2014-04-08 Daniel Colascione <dancol@dancol.org> | 1 | 2014-04-08 Daniel Colascione <dancol@dancol.org> |
| 2 | 2 | ||
| 3 | * alloc.c (sweep_symbols, mark_object): Assert that symbol | ||
| 4 | function cells contain valid lisp objects. (Modified version of | ||
| 5 | patch from Dmitry). | ||
| 6 | |||
| 3 | * alloc.c (detect_suspicious_free): Split actual stack capturing | 7 | * alloc.c (detect_suspicious_free): Split actual stack capturing |
| 4 | out into new function for easier breakpoint setting. | 8 | out into new function for easier breakpoint setting. |
| 5 | (note_suspicious_free): New function. | 9 | (note_suspicious_free): New function. |
diff --git a/src/alloc.c b/src/alloc.c index d22e71bd1a8..15bfbbbb1b7 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -6220,6 +6220,8 @@ mark_object (Lisp_Object arg) | |||
| 6220 | break; | 6220 | break; |
| 6221 | CHECK_ALLOCATED_AND_LIVE (live_symbol_p); | 6221 | CHECK_ALLOCATED_AND_LIVE (live_symbol_p); |
| 6222 | ptr->gcmarkbit = 1; | 6222 | ptr->gcmarkbit = 1; |
| 6223 | /* Attempt to catch bogus objects. */ | ||
| 6224 | eassert (valid_lisp_object_p (ptr->function) >= 1); | ||
| 6223 | mark_object (ptr->function); | 6225 | mark_object (ptr->function); |
| 6224 | mark_object (ptr->plist); | 6226 | mark_object (ptr->plist); |
| 6225 | switch (ptr->redirect) | 6227 | switch (ptr->redirect) |
| @@ -6640,6 +6642,8 @@ sweep_symbols (void) | |||
| 6640 | { | 6642 | { |
| 6641 | ++num_used; | 6643 | ++num_used; |
| 6642 | sym->s.gcmarkbit = 0; | 6644 | sym->s.gcmarkbit = 0; |
| 6645 | /* Attempt to catch bogus objects. */ | ||
| 6646 | eassert (valid_lisp_object_p (sym->s.function) >= 1); | ||
| 6643 | } | 6647 | } |
| 6644 | } | 6648 | } |
| 6645 | 6649 | ||