diff options
author | Rickard Green <[email protected]> | 2012-06-14 15:37:23 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-06-18 22:57:55 +0200 |
commit | 2e5c1dbb32cfe4be0a782216953b4630338edabc (patch) | |
tree | 791e5bb82419c7eaaad4fee2c78a7fb181d76ecb /erts/emulator/beam/erl_thr_progress.c | |
parent | cfea5eea406ba3af96588ff458e55de9a149d9c5 (diff) | |
download | otp-2e5c1dbb32cfe4be0a782216953b4630338edabc.tar.gz otp-2e5c1dbb32cfe4be0a782216953b4630338edabc.tar.bz2 otp-2e5c1dbb32cfe4be0a782216953b4630338edabc.zip |
Fix faulty use of thread progress in handle_aux_work()
As an optimization old thread progress data was kept and used in
handle_aux_work() in erl_process.c. This could cause memory to be
deallocated at a later time than intended, which is quite harmless.
This has, however, now been fixed.
Diffstat (limited to 'erts/emulator/beam/erl_thr_progress.c')
-rw-r--r-- | erts/emulator/beam/erl_thr_progress.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_thr_progress.c b/erts/emulator/beam/erl_thr_progress.c index 9ef83746c5..88524bdd4c 100644 --- a/erts/emulator/beam/erl_thr_progress.c +++ b/erts/emulator/beam/erl_thr_progress.c @@ -891,16 +891,16 @@ has_reached_wakeup(ErtsThrPrgrVal wakeup) ErtsThrPrgrVal limit; /* * erts_thr_progress_later() returns values which are - * equal to 'current + 2'. That is, users should never - * get a hold of values larger than that. + * equal to 'current + 2', or 'current + 3'. That is, users + * should never get a hold of values larger than that. * - * That is, valid values are values less than 'current + 3'. + * That is, valid values are values less than 'current + 4'. * * Values larger than this won't work with the wakeup * algorithm. */ - limit = current + 3; + limit = current + 4; if (limit == ERTS_THR_PRGR_VAL_WAITING) limit = 0; else if (limit < current) /* Wrapped */ |