aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-01-11 19:02:01 +0100
committerSverker Eriksson <[email protected]>2012-01-11 19:02:01 +0100
commitaf99d9a501ede4af09517f27dde2897577aaba4a (patch)
treef6b1c5e6e2f7699eba246bd45695eafb32ebd127 /erts/emulator/beam
parentabdafb962fb1387d1c3cac95be1c524026e6067a (diff)
parent9a939eb85807b41aaaeff795293a6de5a29870bd (diff)
downloadotp-af99d9a501ede4af09517f27dde2897577aaba4a.tar.gz
otp-af99d9a501ede4af09517f27dde2897577aaba4a.tar.bz2
otp-af99d9a501ede4af09517f27dde2897577aaba4a.zip
Merge branch 'sverk/hipe-hibernate-sparc-bug' into maint
* sverk/hipe-hibernate-sparc-bug: erts: Make GC tolerate hibernated process without hipe stack
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_gc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index eb2b945877..9590aa4a74 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -910,7 +910,18 @@ minor_collection(Process* p, int need, Eterm* objv, int nobj, Uint *recl)
* XXX: WARNING: If HiPE starts storing other non-Erlang values on the
* nstack, such as floats, then this will have to be changed.
*/
-#define offset_nstack(p,offs,area,area_size) offset_heap_ptr(hipe_nstack_start((p)),hipe_nstack_used((p)),(offs),(area),(area_size))
+static ERTS_INLINE void offset_nstack(Process* p, Sint offs,
+ char* area, Uint area_size)
+{
+ if (p->hipe.nstack) {
+ ASSERT(p->hipe.nsp && p->hipe.nstend);
+ offset_heap_ptr(hipe_nstack_start(p), hipe_nstack_used(p),
+ offs, area, area_size);
+ }
+ else {
+ ASSERT(!p->hipe.nsp && !p->hipe.nstend);
+ }
+}
#else /* !HIPE */