* sh.md (mulsi3): Don't add a no-op move at the end.
[official-gcc.git] / boehm-gc / dbg_mlc.c
blob079e43be7cb45317f577f2e6a5d6d1c29711a8e2
1 /*
2 * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
3 * Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved.
4 * Copyright (c) 1997 by Silicon Graphics. All rights reserved.
6 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
7 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
9 * Permission is hereby granted to use or copy this program
10 * for any purpose, provided the above notices are retained on all copies.
11 * Permission to modify the code and to distribute modified code is granted,
12 * provided the above notices are retained, and a notice that the code was
13 * modified is included with the above copyright notice.
15 /* Boehm, October 9, 1995 1:16 pm PDT */
16 # include "gc_priv.h"
18 /* Do we want to and know how to save the call stack at the time of */
19 /* an allocation? How much space do we want to use in each object? */
21 # define START_FLAG ((word)0xfedcedcb)
22 # define END_FLAG ((word)0xbcdecdef)
23 /* Stored both one past the end of user object, and one before */
24 /* the end of the object as seen by the allocator. */
27 /* Object header */
28 typedef struct {
29 char * oh_string; /* object descriptor string */
30 word oh_int; /* object descriptor integers */
31 # ifdef NEED_CALLINFO
32 struct callinfo oh_ci[NFRAMES];
33 # endif
34 word oh_sz; /* Original malloc arg. */
35 word oh_sf; /* start flag */
36 } oh;
37 /* The size of the above structure is assumed not to dealign things, */
38 /* and to be a multiple of the word length. */
40 #define DEBUG_BYTES (sizeof (oh) + sizeof (word))
41 #undef ROUNDED_UP_WORDS
42 #define ROUNDED_UP_WORDS(n) BYTES_TO_WORDS((n) + WORDS_TO_BYTES(1) - 1)
45 #ifdef SAVE_CALL_CHAIN
46 # define ADD_CALL_CHAIN(base, ra) GC_save_callers(((oh *)(base)) -> oh_ci)
47 # define PRINT_CALL_CHAIN(base) GC_print_callers(((oh *)(base)) -> oh_ci)
48 #else
49 # ifdef GC_ADD_CALLER
50 # define ADD_CALL_CHAIN(base, ra) ((oh *)(base)) -> oh_ci[0].ci_pc = (ra)
51 # define PRINT_CALL_CHAIN(base) GC_print_callers(((oh *)(base)) -> oh_ci)
52 # else
53 # define ADD_CALL_CHAIN(base, ra)
54 # define PRINT_CALL_CHAIN(base)
55 # endif
56 #endif
58 /* Check whether object with base pointer p has debugging info */
59 /* p is assumed to point to a legitimate object in our part */
60 /* of the heap. */
61 GC_bool GC_has_debug_info(p)
62 ptr_t p;
64 register oh * ohdr = (oh *)p;
65 register ptr_t body = (ptr_t)(ohdr + 1);
66 register word sz = GC_size((ptr_t) ohdr);
68 if (HBLKPTR((ptr_t)ohdr) != HBLKPTR((ptr_t)body)
69 || sz < sizeof (oh)) {
70 return(FALSE);
72 if (ohdr -> oh_sz == sz) {
73 /* Object may have had debug info, but has been deallocated */
74 return(FALSE);
76 if (ohdr -> oh_sf == (START_FLAG ^ (word)body)) return(TRUE);
77 if (((word *)ohdr)[BYTES_TO_WORDS(sz)-1] == (END_FLAG ^ (word)body)) {
78 return(TRUE);
80 return(FALSE);
83 /* Return start of object that might have debugging info. */
84 ptr_t GC_debug_object_start(p)
85 ptr_t p;
87 register word * result = (word *)((oh *)p + 1);
88 if (! GC_has_debug_info(p))
89 return(p);
90 return((ptr_t)result);
93 /* Store debugging info into p. Return displaced pointer. */
94 /* Assumes we don't hold allocation lock. */
95 ptr_t GC_store_debug_info(p, sz, string, integer)
96 register ptr_t p; /* base pointer */
97 word sz; /* bytes */
98 char * string;
99 word integer;
101 register word * result = (word *)((oh *)p + 1);
102 DCL_LOCK_STATE;
104 /* There is some argument that we should dissble signals here. */
105 /* But that's expensive. And this way things should only appear */
106 /* inconsistent while we're in the handler. */
107 LOCK();
108 ((oh *)p) -> oh_string = string;
109 ((oh *)p) -> oh_int = integer;
110 ((oh *)p) -> oh_sz = sz;
111 ((oh *)p) -> oh_sf = START_FLAG ^ (word)result;
112 ((word *)p)[BYTES_TO_WORDS(GC_size(p))-1] =
113 result[ROUNDED_UP_WORDS(sz)] = END_FLAG ^ (word)result;
114 UNLOCK();
115 return((ptr_t)result);
118 /* Check the object with debugging info at p */
119 /* return NIL if it's OK. Else return clobbered */
120 /* address. */
121 ptr_t GC_check_annotated_obj(ohdr)
122 register oh * ohdr;
124 register ptr_t body = (ptr_t)(ohdr + 1);
125 register word gc_sz = GC_size((ptr_t)ohdr);
126 if (ohdr -> oh_sz + DEBUG_BYTES > gc_sz) {
127 return((ptr_t)(&(ohdr -> oh_sz)));
129 if (ohdr -> oh_sf != (START_FLAG ^ (word)body)) {
130 return((ptr_t)(&(ohdr -> oh_sf)));
132 if (((word *)ohdr)[BYTES_TO_WORDS(gc_sz)-1] != (END_FLAG ^ (word)body)) {
133 return((ptr_t)((word *)ohdr + BYTES_TO_WORDS(gc_sz)-1));
135 if (((word *)body)[ROUNDED_UP_WORDS(ohdr -> oh_sz)]
136 != (END_FLAG ^ (word)body)) {
137 return((ptr_t)((word *)body + ROUNDED_UP_WORDS(ohdr -> oh_sz)));
139 return(0);
142 void GC_print_obj(p)
143 ptr_t p;
145 register oh * ohdr = (oh *)GC_base(p);
147 GC_err_printf1("0x%lx (", (unsigned long)ohdr + sizeof(oh));
148 GC_err_puts(ohdr -> oh_string);
149 GC_err_printf2(":%ld, sz=%ld)\n", (unsigned long)(ohdr -> oh_int),
150 (unsigned long)(ohdr -> oh_sz));
151 PRINT_CALL_CHAIN(ohdr);
154 void GC_debug_print_heap_obj_proc(p)
155 ptr_t p;
157 if (GC_has_debug_info(p)) {
158 GC_print_obj(p);
159 } else {
160 GC_default_print_heap_obj_proc(p);
164 void GC_print_smashed_obj(p, clobbered_addr)
165 ptr_t p, clobbered_addr;
167 register oh * ohdr = (oh *)GC_base(p);
169 GC_err_printf2("0x%lx in object at 0x%lx(", (unsigned long)clobbered_addr,
170 (unsigned long)p);
171 if (clobbered_addr <= (ptr_t)(&(ohdr -> oh_sz))
172 || ohdr -> oh_string == 0) {
173 GC_err_printf1("<smashed>, appr. sz = %ld)\n",
174 GC_size((ptr_t)ohdr) - DEBUG_BYTES);
175 } else {
176 if (ohdr -> oh_string[0] == '\0') {
177 GC_err_puts("EMPTY(smashed?)");
178 } else {
179 GC_err_puts(ohdr -> oh_string);
181 GC_err_printf2(":%ld, sz=%ld)\n", (unsigned long)(ohdr -> oh_int),
182 (unsigned long)(ohdr -> oh_sz));
183 PRINT_CALL_CHAIN(ohdr);
187 void GC_check_heap_proc();
189 void GC_start_debugging()
191 GC_check_heap = GC_check_heap_proc;
192 GC_print_heap_obj = GC_debug_print_heap_obj_proc;
193 GC_debugging_started = TRUE;
194 GC_register_displacement((word)sizeof(oh));
197 # if defined(__STDC__) || defined(__cplusplus)
198 void GC_debug_register_displacement(GC_word offset)
199 # else
200 void GC_debug_register_displacement(offset)
201 GC_word offset;
202 # endif
204 GC_register_displacement(offset);
205 GC_register_displacement((word)sizeof(oh) + offset);
208 # ifdef GC_ADD_CALLER
209 # define EXTRA_ARGS word ra, char * s, int i
210 # define OPT_RA ra,
211 # else
212 # define EXTRA_ARGS char * s, int i
213 # define OPT_RA
214 # endif
216 # ifdef __STDC__
217 GC_PTR GC_debug_malloc(size_t lb, EXTRA_ARGS)
218 # else
219 GC_PTR GC_debug_malloc(lb, s, i)
220 size_t lb;
221 char * s;
222 int i;
223 # ifdef GC_ADD_CALLER
224 --> GC_ADD_CALLER not implemented for K&R C
225 # endif
226 # endif
228 GC_PTR result = GC_malloc(lb + DEBUG_BYTES);
230 if (result == 0) {
231 GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
232 (unsigned long) lb);
233 GC_err_puts(s);
234 GC_err_printf1(":%ld)\n", (unsigned long)i);
235 return(0);
237 if (!GC_debugging_started) {
238 GC_start_debugging();
240 ADD_CALL_CHAIN(result, ra);
241 return (GC_store_debug_info(result, (word)lb, s, (word)i));
244 # ifdef __STDC__
245 GC_PTR GC_debug_generic_malloc(size_t lb, int k, EXTRA_ARGS)
246 # else
247 GC_PTR GC_debug_malloc(lb, k, s, i)
248 size_t lb;
249 int k;
250 char * s;
251 int i;
252 # ifdef GC_ADD_CALLER
253 --> GC_ADD_CALLER not implemented for K&R C
254 # endif
255 # endif
257 GC_PTR result = GC_generic_malloc(lb + DEBUG_BYTES, k);
259 if (result == 0) {
260 GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
261 (unsigned long) lb);
262 GC_err_puts(s);
263 GC_err_printf1(":%ld)\n", (unsigned long)i);
264 return(0);
266 if (!GC_debugging_started) {
267 GC_start_debugging();
269 ADD_CALL_CHAIN(result, ra);
270 return (GC_store_debug_info(result, (word)lb, s, (word)i));
273 #ifdef STUBBORN_ALLOC
274 # ifdef __STDC__
275 GC_PTR GC_debug_malloc_stubborn(size_t lb, EXTRA_ARGS)
276 # else
277 GC_PTR GC_debug_malloc_stubborn(lb, s, i)
278 size_t lb;
279 char * s;
280 int i;
281 # endif
283 GC_PTR result = GC_malloc_stubborn(lb + DEBUG_BYTES);
285 if (result == 0) {
286 GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
287 (unsigned long) lb);
288 GC_err_puts(s);
289 GC_err_printf1(":%ld)\n", (unsigned long)i);
290 return(0);
292 if (!GC_debugging_started) {
293 GC_start_debugging();
295 ADD_CALL_CHAIN(result, ra);
296 return (GC_store_debug_info(result, (word)lb, s, (word)i));
299 void GC_debug_change_stubborn(p)
300 GC_PTR p;
302 register GC_PTR q = GC_base(p);
303 register hdr * hhdr;
305 if (q == 0) {
306 GC_err_printf1("Bad argument: 0x%lx to GC_debug_change_stubborn\n",
307 (unsigned long) p);
308 ABORT("GC_debug_change_stubborn: bad arg");
310 hhdr = HDR(q);
311 if (hhdr -> hb_obj_kind != STUBBORN) {
312 GC_err_printf1("GC_debug_change_stubborn arg not stubborn: 0x%lx\n",
313 (unsigned long) p);
314 ABORT("GC_debug_change_stubborn: arg not stubborn");
316 GC_change_stubborn(q);
319 void GC_debug_end_stubborn_change(p)
320 GC_PTR p;
322 register GC_PTR q = GC_base(p);
323 register hdr * hhdr;
325 if (q == 0) {
326 GC_err_printf1("Bad argument: 0x%lx to GC_debug_end_stubborn_change\n",
327 (unsigned long) p);
328 ABORT("GC_debug_end_stubborn_change: bad arg");
330 hhdr = HDR(q);
331 if (hhdr -> hb_obj_kind != STUBBORN) {
332 GC_err_printf1("debug_end_stubborn_change arg not stubborn: 0x%lx\n",
333 (unsigned long) p);
334 ABORT("GC_debug_end_stubborn_change: arg not stubborn");
336 GC_end_stubborn_change(q);
339 #endif /* STUBBORN_ALLOC */
341 # ifdef __STDC__
342 GC_PTR GC_debug_malloc_atomic(size_t lb, EXTRA_ARGS)
343 # else
344 GC_PTR GC_debug_malloc_atomic(lb, s, i)
345 size_t lb;
346 char * s;
347 int i;
348 # endif
350 GC_PTR result = GC_malloc_atomic(lb + DEBUG_BYTES);
352 if (result == 0) {
353 GC_err_printf1("GC_debug_malloc_atomic(%ld) returning NIL (",
354 (unsigned long) lb);
355 GC_err_puts(s);
356 GC_err_printf1(":%ld)\n", (unsigned long)i);
357 return(0);
359 if (!GC_debugging_started) {
360 GC_start_debugging();
362 ADD_CALL_CHAIN(result, ra);
363 return (GC_store_debug_info(result, (word)lb, s, (word)i));
366 # ifdef __STDC__
367 GC_PTR GC_debug_malloc_uncollectable(size_t lb, EXTRA_ARGS)
368 # else
369 GC_PTR GC_debug_malloc_uncollectable(lb, s, i)
370 size_t lb;
371 char * s;
372 int i;
373 # endif
375 GC_PTR result = GC_malloc_uncollectable(lb + DEBUG_BYTES);
377 if (result == 0) {
378 GC_err_printf1("GC_debug_malloc_uncollectable(%ld) returning NIL (",
379 (unsigned long) lb);
380 GC_err_puts(s);
381 GC_err_printf1(":%ld)\n", (unsigned long)i);
382 return(0);
384 if (!GC_debugging_started) {
385 GC_start_debugging();
387 ADD_CALL_CHAIN(result, ra);
388 return (GC_store_debug_info(result, (word)lb, s, (word)i));
391 #ifdef ATOMIC_UNCOLLECTABLE
392 # ifdef __STDC__
393 GC_PTR GC_debug_malloc_atomic_uncollectable(size_t lb, EXTRA_ARGS)
394 # else
395 GC_PTR GC_debug_malloc_atomic_uncollectable(lb, s, i)
396 size_t lb;
397 char * s;
398 int i;
399 # endif
401 GC_PTR result = GC_malloc_atomic_uncollectable(lb + DEBUG_BYTES);
403 if (result == 0) {
404 GC_err_printf1(
405 "GC_debug_malloc_atomic_uncollectable(%ld) returning NIL (",
406 (unsigned long) lb);
407 GC_err_puts(s);
408 GC_err_printf1(":%ld)\n", (unsigned long)i);
409 return(0);
411 if (!GC_debugging_started) {
412 GC_start_debugging();
414 ADD_CALL_CHAIN(result, ra);
415 return (GC_store_debug_info(result, (word)lb, s, (word)i));
417 #endif /* ATOMIC_UNCOLLECTABLE */
419 # ifdef __STDC__
420 void GC_debug_free(GC_PTR p)
421 # else
422 void GC_debug_free(p)
423 GC_PTR p;
424 # endif
426 register GC_PTR base = GC_base(p);
427 register ptr_t clobbered;
429 if (base == 0) {
430 GC_err_printf1("Attempt to free invalid pointer %lx\n",
431 (unsigned long)p);
432 if (p != 0) ABORT("free(invalid pointer)");
434 if ((ptr_t)p - (ptr_t)base != sizeof(oh)) {
435 GC_err_printf1(
436 "GC_debug_free called on pointer %lx wo debugging info\n",
437 (unsigned long)p);
438 } else {
439 clobbered = GC_check_annotated_obj((oh *)base);
440 if (clobbered != 0) {
441 if (((oh *)base) -> oh_sz == GC_size(base)) {
442 GC_err_printf0(
443 "GC_debug_free: found previously deallocated (?) object at ");
444 } else {
445 GC_err_printf0("GC_debug_free: found smashed object at ");
447 GC_print_smashed_obj(p, clobbered);
449 /* Invalidate size */
450 ((oh *)base) -> oh_sz = GC_size(base);
452 # ifdef FIND_LEAK
453 GC_free(base);
454 # else
456 register hdr * hhdr = HDR(p);
457 GC_bool uncollectable = FALSE;
459 if (hhdr -> hb_obj_kind == UNCOLLECTABLE) {
460 uncollectable = TRUE;
462 # ifdef ATOMIC_UNCOLLECTABLE
463 if (hhdr -> hb_obj_kind == AUNCOLLECTABLE) {
464 uncollectable = TRUE;
466 # endif
467 if (uncollectable) GC_free(base);
469 # endif
472 # ifdef __STDC__
473 GC_PTR GC_debug_realloc(GC_PTR p, size_t lb, EXTRA_ARGS)
474 # else
475 GC_PTR GC_debug_realloc(p, lb, s, i)
476 GC_PTR p;
477 size_t lb;
478 char *s;
479 int i;
480 # endif
482 register GC_PTR base = GC_base(p);
483 register ptr_t clobbered;
484 register GC_PTR result;
485 register size_t copy_sz = lb;
486 register size_t old_sz;
487 register hdr * hhdr;
489 if (p == 0) return(GC_debug_malloc(lb, OPT_RA s, i));
490 if (base == 0) {
491 GC_err_printf1(
492 "Attempt to reallocate invalid pointer %lx\n", (unsigned long)p);
493 ABORT("realloc(invalid pointer)");
495 if ((ptr_t)p - (ptr_t)base != sizeof(oh)) {
496 GC_err_printf1(
497 "GC_debug_realloc called on pointer %lx wo debugging info\n",
498 (unsigned long)p);
499 return(GC_realloc(p, lb));
501 hhdr = HDR(base);
502 switch (hhdr -> hb_obj_kind) {
503 # ifdef STUBBORN_ALLOC
504 case STUBBORN:
505 result = GC_debug_malloc_stubborn(lb, OPT_RA s, i);
506 break;
507 # endif
508 case NORMAL:
509 result = GC_debug_malloc(lb, OPT_RA s, i);
510 break;
511 case PTRFREE:
512 result = GC_debug_malloc_atomic(lb, OPT_RA s, i);
513 break;
514 case UNCOLLECTABLE:
515 result = GC_debug_malloc_uncollectable(lb, OPT_RA s, i);
516 break;
517 # ifdef ATOMIC_UNCOLLECTABLE
518 case AUNCOLLECTABLE:
519 result = GC_debug_malloc_atomic_uncollectable(lb, OPT_RA s, i);
520 break;
521 # endif
522 default:
523 GC_err_printf0("GC_debug_realloc: encountered bad kind\n");
524 ABORT("bad kind");
526 clobbered = GC_check_annotated_obj((oh *)base);
527 if (clobbered != 0) {
528 GC_err_printf0("GC_debug_realloc: found smashed object at ");
529 GC_print_smashed_obj(p, clobbered);
531 old_sz = ((oh *)base) -> oh_sz;
532 if (old_sz < copy_sz) copy_sz = old_sz;
533 if (result == 0) return(0);
534 BCOPY(p, result, copy_sz);
535 GC_debug_free(p);
536 return(result);
539 /* Check all marked objects in the given block for validity */
540 /*ARGSUSED*/
541 void GC_check_heap_block(hbp, dummy)
542 register struct hblk *hbp; /* ptr to current heap block */
543 word dummy;
545 register struct hblkhdr * hhdr = HDR(hbp);
546 register word sz = hhdr -> hb_sz;
547 register int word_no;
548 register word *p, *plim;
550 p = (word *)(hbp->hb_body);
551 word_no = HDR_WORDS;
552 if (sz > MAXOBJSZ) {
553 plim = p;
554 } else {
555 plim = (word *)((((word)hbp) + HBLKSIZE) - WORDS_TO_BYTES(sz));
557 /* go through all words in block */
558 while( p <= plim ) {
559 if( mark_bit_from_hdr(hhdr, word_no)
560 && GC_has_debug_info((ptr_t)p)) {
561 ptr_t clobbered = GC_check_annotated_obj((oh *)p);
563 if (clobbered != 0) {
564 GC_err_printf0(
565 "GC_check_heap_block: found smashed object at ");
566 GC_print_smashed_obj((ptr_t)p, clobbered);
569 word_no += sz;
570 p += sz;
575 /* This assumes that all accessible objects are marked, and that */
576 /* I hold the allocation lock. Normally called by collector. */
577 void GC_check_heap_proc()
579 # ifndef SMALL_CONFIG
580 if (sizeof(oh) & (2 * sizeof(word) - 1) != 0) {
581 ABORT("Alignment problem: object header has inappropriate size\n");
583 # endif
584 GC_apply_to_all_blocks(GC_check_heap_block, (word)0);
587 struct closure {
588 GC_finalization_proc cl_fn;
589 GC_PTR cl_data;
592 # ifdef __STDC__
593 void * GC_make_closure(GC_finalization_proc fn, void * data)
594 # else
595 GC_PTR GC_make_closure(fn, data)
596 GC_finalization_proc fn;
597 GC_PTR data;
598 # endif
600 struct closure * result =
601 (struct closure *) GC_malloc(sizeof (struct closure));
603 result -> cl_fn = fn;
604 result -> cl_data = data;
605 return((GC_PTR)result);
608 # ifdef __STDC__
609 void GC_debug_invoke_finalizer(void * obj, void * data)
610 # else
611 void GC_debug_invoke_finalizer(obj, data)
612 char * obj;
613 char * data;
614 # endif
616 register struct closure * cl = (struct closure *) data;
618 (*(cl -> cl_fn))((GC_PTR)((char *)obj + sizeof(oh)), cl -> cl_data);
622 # ifdef __STDC__
623 void GC_debug_register_finalizer(GC_PTR obj, GC_finalization_proc fn,
624 GC_PTR cd, GC_finalization_proc *ofn,
625 GC_PTR *ocd)
626 # else
627 void GC_debug_register_finalizer(obj, fn, cd, ofn, ocd)
628 GC_PTR obj;
629 GC_finalization_proc fn;
630 GC_PTR cd;
631 GC_finalization_proc *ofn;
632 GC_PTR *ocd;
633 # endif
635 ptr_t base = GC_base(obj);
636 if (0 == base || (ptr_t)obj - base != sizeof(oh)) {
637 GC_err_printf1(
638 "GC_register_finalizer called with non-base-pointer 0x%lx\n",
639 obj);
641 GC_register_finalizer(base, GC_debug_invoke_finalizer,
642 GC_make_closure(fn,cd), ofn, ocd);
645 # ifdef __STDC__
646 void GC_debug_register_finalizer_ignore_self
647 (GC_PTR obj, GC_finalization_proc fn,
648 GC_PTR cd, GC_finalization_proc *ofn,
649 GC_PTR *ocd)
650 # else
651 void GC_debug_register_finalizer_ignore_self
652 (obj, fn, cd, ofn, ocd)
653 GC_PTR obj;
654 GC_finalization_proc fn;
655 GC_PTR cd;
656 GC_finalization_proc *ofn;
657 GC_PTR *ocd;
658 # endif
660 ptr_t base = GC_base(obj);
661 if (0 == base || (ptr_t)obj - base != sizeof(oh)) {
662 GC_err_printf1(
663 "GC_register_finalizer_ignore_self called with non-base-pointer 0x%lx\n",
664 obj);
666 GC_register_finalizer_ignore_self(base, GC_debug_invoke_finalizer,
667 GC_make_closure(fn,cd), ofn, ocd);
670 # ifdef __STDC__
671 void GC_debug_register_finalizer_no_order
672 (GC_PTR obj, GC_finalization_proc fn,
673 GC_PTR cd, GC_finalization_proc *ofn,
674 GC_PTR *ocd)
675 # else
676 void GC_debug_register_finalizer_no_order
677 (obj, fn, cd, ofn, ocd)
678 GC_PTR obj;
679 GC_finalization_proc fn;
680 GC_PTR cd;
681 GC_finalization_proc *ofn;
682 GC_PTR *ocd;
683 # endif
685 ptr_t base = GC_base(obj);
686 if (0 == base || (ptr_t)obj - base != sizeof(oh)) {
687 GC_err_printf1(
688 "GC_register_finalizer_no_order called with non-base-pointer 0x%lx\n",
689 obj);
691 GC_register_finalizer_no_order(base, GC_debug_invoke_finalizer,
692 GC_make_closure(fn,cd), ofn, ocd);