diff options
author | Patrik Nyblom <[email protected]> | 2012-11-23 16:19:03 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-11-23 16:19:03 +0100 |
commit | a22418d1e18deb952bb065e52fda1f25309314a9 (patch) | |
tree | b9d3799792c0af6737034099f1786ead088b04a0 /erts/emulator/beam | |
parent | d8d53aefc3234a37ad9308949d122c265f90cca9 (diff) | |
parent | b628ebe21a7b449eea27ada811dfbb007afe6d0b (diff) | |
download | otp-a22418d1e18deb952bb065e52fda1f25309314a9.tar.gz otp-a22418d1e18deb952bb065e52fda1f25309314a9.tar.bz2 otp-a22418d1e18deb952bb065e52fda1f25309314a9.zip |
Merge branch 'pan/bs_append_crash' into maint
* pan/bs_append_crash:
Teach erts_bs_append not to dump core
OTP-10590
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index 52a6e52e6c..e2689f58c3 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -336,6 +336,19 @@ erts_gc_after_bif_call(Process* p, Eterm result, Eterm* regs, Uint arity) return result; } +static ERTS_INLINE void reset_active_writer(Process *p) +{ + struct erl_off_heap_header* ptr; + ptr = MSO(p).first; + while (ptr) { + if (ptr->thing_word == HEADER_PROC_BIN) { + ProcBin *pbp = (ProcBin*) ptr; + pbp->flags &= ~PB_ACTIVE_WRITER; + } + ptr = ptr->next; + } +} + /* * Garbage collect a process. * @@ -395,6 +408,7 @@ erts_garbage_collect(Process* p, int need, Eterm* objv, int nobj) DTRACE2(gc_minor_end, pidbuf, reclaimed_now); } } + reset_active_writer(p); /* * Finish. @@ -2181,7 +2195,6 @@ link_live_proc_bin(struct shrink_cand_data *shrink, if (pbp->flags & PB_ACTIVE_WRITER) { - pbp->flags &= ~PB_ACTIVE_WRITER; shrink->no_of_active++; } else { /* inactive */ |