diff options
author | Erlang/OTP <[email protected]> | 2016-06-29 17:42:53 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2016-06-29 17:42:53 +0200 |
commit | e998937ffc2275d9d4ac87acc9e47ffff1b24e00 (patch) | |
tree | a259dca70d068e0b8c190380f518f7adb090da99 | |
parent | a4c56b629456fa03e52952eadc37bbfcf53387a1 (diff) | |
parent | 6e9af06b17476cb680fbc33ae47dff173ea24204 (diff) | |
download | otp-e998937ffc2275d9d4ac87acc9e47ffff1b24e00.tar.gz otp-e998937ffc2275d9d4ac87acc9e47ffff1b24e00.tar.bz2 otp-e998937ffc2275d9d4ac87acc9e47ffff1b24e00.zip |
Merge branch 'rickard/set-gl-fix/OTP-13716' into maint-19
* rickard/set-gl-fix/OTP-13716:
Fix group_leader/2
-rw-r--r-- | erts/emulator/beam/bif.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index fc14061a44..d9048065c8 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -4305,8 +4305,9 @@ BIF_RETTYPE group_leader_2(BIF_ALIST_2) else { locks &= ~ERTS_PROC_LOCK_STATUS; erts_smp_proc_unlock(new_member, ERTS_PROC_LOCK_STATUS); - if (erts_smp_atomic32_read_nob(&new_member->state) - & !(ERTS_PSFLG_DIRTY_RUNNING|ERTS_PSFLG_DIRTY_RUNNING_SYS)) { + if (new_member == BIF_P + || !(erts_smp_atomic32_read_nob(&new_member->state) + & (ERTS_PSFLG_DIRTY_RUNNING|ERTS_PSFLG_DIRTY_RUNNING_SYS))) { new_member->group_leader = STORE_NC_IN_PROC(new_member, BIF_ARG_1); } @@ -4326,6 +4327,7 @@ BIF_RETTYPE group_leader_2(BIF_ALIST_2) BIF_ARG_1); bp->next = new_member->mbuf; new_member->mbuf = bp; + new_member->mbuf_sz += bp->used_size; } } } |