mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
don't print any debug info about potentially invalid objects
This commit is contained in:
parent
fa730ee28e
commit
e455d7b2cb
1 changed files with 2 additions and 4 deletions
6
gc.c
6
gc.c
|
@ -46,15 +46,13 @@ sexp_uint_t sexp_allocated_bytes (sexp ctx, sexp x) {
|
||||||
static int sexp_in_heap_p(sexp ctx, sexp x) {
|
static int sexp_in_heap_p(sexp ctx, sexp x) {
|
||||||
sexp_heap h;
|
sexp_heap h;
|
||||||
if ((sexp_uint_t)x & (sexp_heap_align(1)-1)) {
|
if ((sexp_uint_t)x & (sexp_heap_align(1)-1)) {
|
||||||
fprintf(stderr, SEXP_BANNER("invalid heap alignment: %p %d"),
|
fprintf(stderr, SEXP_BANNER("invalid heap alignment: %p"), x);
|
||||||
x, sexp_pointer_tag(x));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for (h=sexp_context_heap(ctx); h; h=h->next)
|
for (h=sexp_context_heap(ctx); h; h=h->next)
|
||||||
if (((sexp)h < x) && (x < (sexp)(h->data + h->size)))
|
if (((sexp)h < x) && (x < (sexp)(h->data + h->size)))
|
||||||
return 1;
|
return 1;
|
||||||
fprintf(stderr, SEXP_BANNER("invalid object outside heap: %p %d"),
|
fprintf(stderr, SEXP_BANNER("invalid object outside heap: %p"), x);
|
||||||
x, sexp_pointer_tag(x));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue