From: hboehm Date: Mon, 2 Jul 2007 17:17:46 +0000 (+0000) Subject: 2007-07-02 Hans Boehm X-Git-Tag: gc7_0~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f165469dd058eea45b2615399f51979be7237bed;p=platform%2Fupstream%2Flibgc.git 2007-07-02 Hans Boehm * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on ARM/Linux. Check getcontext() return value. --- diff --git a/ChangeLog b/ChangeLog index a68569a..47f9275 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-02 Hans Boehm + + * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() + on ARM/Linux. Check getcontext() return value. + 2007-06-29 Hans Boehm * backgraph.c (per_object_func): Make argument types consistent. diff --git a/mach_dep.c b/mach_dep.c index eba019d..4f05843 100644 --- a/mach_dep.c +++ b/mach_dep.c @@ -174,10 +174,12 @@ void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *), # if defined(HAVE_PUSH_REGS) GC_push_regs(); -# elif defined(UNIX_LIKE) && !defined(DARWIN) +# elif defined(UNIX_LIKE) && !defined(DARWIN) && !defined(ARM32) /* Older versions of Darwin seem to lack getcontext(). */ + /* ARM Linux often doesn't support a real getcontext(). */ ucontext_t ctxt; - getcontext(&ctxt); + if (getcontext(&ctxt) < 0) + ABORT ("Getcontext failed: Use another register retrieval method?"); context = &ctxt; # if defined(SPARC) || defined(IA64) /* On a register window machine, we need to save register */