Skip to content

Commit

Permalink
Update debugging macro for lazy fromspace alloc.
Browse files Browse the repository at this point in the history
Also make it dump out the pointer in question.
  • Loading branch information
jnthn committed Apr 20, 2016
1 parent b625398 commit 5ac981d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gc/debug.h
Expand Up @@ -2,7 +2,8 @@
* debugging. */

#define MVM_ASSERT_NOT_FROMSPACE(tc, c) do { \
if ((char *)(c) >= (char *)tc->nursery_fromspace && \
if (tc->nursery_fromspace && \
(char *)(c) >= (char *)tc->nursery_fromspace && \
(char *)(c) < (char *)tc->nursery_fromspace + MVM_NURSERY_SIZE) \
MVM_exception_throw_adhoc(tc, "Collectable in fromspace accessed"); \
MVM_exception_throw_adhoc(tc, "Collectable %p in fromspace accessed", c); \
} while (0)

0 comments on commit 5ac981d

Please sign in to comment.