diff options
| author | Daniel Colascione | 2014-04-08 05:34:30 -0700 |
|---|---|---|
| committer | Daniel Colascione | 2014-04-08 05:34:30 -0700 |
| commit | a237d879b98cc655382e2dbd83c1a05208c19db8 (patch) | |
| tree | 733b726240e75abe9e8a0a38238b25e3c4bd4853 | |
| parent | fd9c746d747bf9f18919d88d25a8d95a878f82b5 (diff) | |
| parent | e3f04a4a8f439dee381d8e6d0c55c684107c1a55 (diff) | |
| download | emacs-a237d879b98cc655382e2dbd83c1a05208c19db8.tar.gz emacs-a237d879b98cc655382e2dbd83c1a05208c19db8.zip | |
More GC assertions
| -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 | ||