diff options
author | Sverker Eriksson <[email protected]> | 2013-06-12 15:33:08 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-06-12 15:33:08 +0200 |
commit | 5abf95afb89eb6c2a93f68c08694710e23bab546 (patch) | |
tree | 523d017b1629989468f97af70eae1c192853f7b7 /erts/emulator/beam/erl_gc.c | |
parent | b16dc3553bb2c5618169ede09fe479d83f7bcf40 (diff) | |
parent | 1f8d9f43766fea0e706db8923075ab65a7677daf (diff) | |
download | otp-5abf95afb89eb6c2a93f68c08694710e23bab546.tar.gz otp-5abf95afb89eb6c2a93f68c08694710e23bab546.tar.bz2 otp-5abf95afb89eb6c2a93f68c08694710e23bab546.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index 0d12e658d9..8ba94d89e9 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -1964,6 +1964,17 @@ setup_rootset(Process *p, Eterm *objv, int nobj, Rootset *rootset) ++n; } + /* + * A trapping BIF can add to rootset by setting the extra_root + * in the process_structure. + */ + if (p->extra_root != NULL) { + roots[n].v = p->extra_root->objv; + roots[n].sz = p->extra_root->sz; + ++n; + } + + ASSERT((is_nil(p->seq_trace_token) || is_tuple(follow_moved(p->seq_trace_token)) || is_atom(p->seq_trace_token))); @@ -2541,6 +2552,12 @@ offset_one_rootset(Process *p, Sint offs, char* area, Uint area_size, p->dictionary->used, offs, area, area_size); } + if (p->extra_root != NULL) { + offset_heap_ptr(p->extra_root->objv, + p->extra_root->sz, + offs, area, area_size); + } + offset_heap_ptr(&p->fvalue, 1, offs, area, area_size); offset_heap_ptr(&p->ftrace, 1, offs, area, area_size); offset_heap_ptr(&p->seq_trace_token, 1, offs, area, area_size); |