More GC assertions
authorDaniel Colascione <dancol@dancol.org>
Tue, 8 Apr 2014 12:34:30 +0000 (05:34 -0700)
committerDaniel Colascione <dancol@dancol.org>
Tue, 8 Apr 2014 12:34:30 +0000 (05:34 -0700)
1  2 
src/ChangeLog
src/alloc.c

diff --cc src/ChangeLog
@@@ -1,5 -1,11 +1,9 @@@
 -2014-04-03  Daniel Colascione  <dancol@dancol.org>
 -
 -      * alloc.c (sweep_symbols,mark_object): Assert that symbol function
 -      cells contain valid lisp objects.  (Modified version of patch from
 -      Dmitry).
 +2014-04-08  Daniel Colascione  <dancol@dancol.org>
  
 -2014-04-03  Daniel Colascione  <dancol@dancol.org>
++      * alloc.c (sweep_symbols, mark_object): Assert that symbol
++      function cells contain valid lisp objects.  (Modified version of
++      patch from Dmitry).
        * alloc.c (detect_suspicious_free): Split actual stack capturing
        out into new function for easier breakpoint setting.
        (note_suspicious_free): New function.
diff --cc src/alloc.c
@@@ -6639,7 -6600,11 +6641,9 @@@ sweep_symbols (void
            else
              {
                ++num_used;
 -              if (!pure_p)
 -                eassert (!STRING_MARKED_P (XSTRING (sym->s.name)));
                sym->s.gcmarkbit = 0;
+               /* Attempt to catch bogus objects.  */
+               eassert (valid_lisp_object_p (sym->s.function) >= 1);
              }
          }