diff options
author | Rickard Green <[email protected]> | 2017-06-01 19:24:27 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-06-01 19:24:27 +0200 |
commit | f4836a7883842f0e2ae20285ccedf9856c66b24a (patch) | |
tree | eafce805b520d57ccfbe021356dbe330c70e2fd1 /erts/emulator/beam/erl_gc.c | |
parent | d646221c59fbf57d5beac913248b46f5dbebfbe7 (diff) | |
download | otp-f4836a7883842f0e2ae20285ccedf9856c66b24a.tar.gz otp-f4836a7883842f0e2ae20285ccedf9856c66b24a.tar.bz2 otp-f4836a7883842f0e2ae20285ccedf9856c66b24a.zip |
Fix check_process_code() on hibernated process
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index 2f21111a2e..c22577a254 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -490,7 +490,7 @@ erts_garbage_collect(Process* p, int need, Eterm* objv, int nobj) esdp->gc_info.garbage_cols++; esdp->gc_info.reclaimed += reclaimed_now; - FLAGS(p) &= ~F_FORCE_GC; + FLAGS(p) &= ~(F_FORCE_GC|F_HIBERNATED); #ifdef CHECK_FOR_HOLES /* @@ -658,6 +658,8 @@ erts_garbage_collect_hibernate(Process* p) ErtsGcQuickSanityCheck(p); + p->flags |= F_HIBERNATED; + erts_smp_atomic32_read_band_nob(&p->state, ~ERTS_PSFLG_GC); } @@ -830,6 +832,7 @@ erts_garbage_collect_literals(Process* p, Eterm* literals, /* * Restore status. */ + p->flags &= ~F_HIBERNATED; erts_smp_atomic32_read_band_nob(&p->state, ~ERTS_PSFLG_GC); } |