diff options
Diffstat (limited to 'boehm-gc/tests')
-rw-r--r-- | boehm-gc/tests/test.c | 17 | ||||
-rw-r--r-- | boehm-gc/tests/test_cpp.cc | 2 | ||||
-rw-r--r-- | boehm-gc/tests/trace_test.c | 1 |
3 files changed, 8 insertions, 12 deletions
diff --git a/boehm-gc/tests/test.c b/boehm-gc/tests/test.c index cfe23c0efde..e1676aadead 100644 --- a/boehm-gc/tests/test.c +++ b/boehm-gc/tests/test.c @@ -208,7 +208,6 @@ sexpr y; #ifdef GC_GCJ_SUPPORT #include "gc_mark.h" -#include "private/dbg_mlc.h" /* For USR_PTR_FROM_BASE */ #include "gc_gcj.h" /* The following struct emulates the vtable in gcj. */ @@ -233,7 +232,7 @@ struct GC_ms_entry * fake_gcj_mark_proc(word * addr, sexpr x; if (1 == env) { /* Object allocated with debug allocator. */ - addr = (word *)USR_PTR_FROM_BASE(addr); + addr = (word *)GC_USR_PTR_FROM_BASE(addr); } x = (sexpr)(addr + 1); /* Skip the vtable pointer. */ mark_stack_ptr = GC_MARK_AND_PUSH( @@ -1256,9 +1255,11 @@ void run_one_test() FAIL; } if (!TEST_FAIL_COUNT(1)) { -# if!(defined(RS6000) || defined(POWERPC) || defined(IA64)) +# if!(defined(RS6000) || defined(POWERPC) || defined(IA64)) || defined(M68K) /* ON RS6000s function pointers point to a descriptor in the */ /* data segment, so there should have been no failures. */ + /* The same applies to IA64. Something similar seems to */ + /* be going on with NetBSD/M68K. */ (void)GC_printf0("GC_is_visible produced wrong failure indication\n"); FAIL; # endif @@ -1486,10 +1487,6 @@ void SetMinimumStack(long minSize) # endif n_tests = 0; -#if defined(__APPLE__) && defined(__MACH__) - GC_INIT(); -#endif - # if defined(DJGPP) /* No good way to determine stack base from library; do it */ /* manually on this platform. */ @@ -1501,7 +1498,7 @@ void SetMinimumStack(long minSize) /* Cheat and let stdio initialize toolbox for us. */ printf("Testing GC Macintosh port.\n"); # endif - GC_INIT(); /* Only needed if gc is dynamic library. */ + GC_INIT(); /* Only needed on a few platforms. */ (void) GC_set_warn_proc(warn_proc); # if (defined(MPROTECT_VDB) || defined(PROC_VDB)) \ && !defined(MAKE_BACK_GRAPH) @@ -1794,9 +1791,7 @@ main() (void)GC_printf0("pthread_default_stacksize_np failed.\n"); } # endif /* GC_HPUX_THREADS */ -# if defined(__APPLE__) && defined(__MACH__) - GC_INIT(); -# endif + GC_INIT(); pthread_attr_init(&attr); # if defined(GC_IRIX_THREADS) || defined(GC_FREEBSD_THREADS) \ diff --git a/boehm-gc/tests/test_cpp.cc b/boehm-gc/tests/test_cpp.cc index 7e50e8aa0fd..6661e411927 100644 --- a/boehm-gc/tests/test_cpp.cc +++ b/boehm-gc/tests/test_cpp.cc @@ -192,7 +192,7 @@ int APIENTRY WinMain( # endif #endif - GC_init(); + GC_INIT(); # if defined(MACOS) // MacOS char* argv_[] = {"test_cpp", "10"}; // doesn't diff --git a/boehm-gc/tests/trace_test.c b/boehm-gc/tests/trace_test.c index be9cb6ce6b6..870e38723a8 100644 --- a/boehm-gc/tests/trace_test.c +++ b/boehm-gc/tests/trace_test.c @@ -10,6 +10,7 @@ struct treenode { struct treenode * mktree(int i) { struct treenode * r = GC_MALLOC(sizeof(struct treenode)); if (0 == i) return 0; + if (1 == i) r = GC_MALLOC_ATOMIC(sizeof(struct treenode)); r -> x = mktree(i-1); r -> y = mktree(i-1); return r; |