From 5179013c183b4df13c0ca2b11885adc55a77e9f0 Mon Sep 17 00:00:00 2001 From: Phil Miller Date: Wed, 21 Jul 2021 15:56:28 -0600 Subject: [PATCH] #1507: Reset epoch_stack_size_ in TD::resume() in case underlying stack has changed from when TD::suspend() was called --- src/vt/context/runnable_context/td.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vt/context/runnable_context/td.cc b/src/vt/context/runnable_context/td.cc index 0c60feff71..4f8d61eaa7 100644 --- a/src/vt/context/runnable_context/td.cc +++ b/src/vt/context/runnable_context/td.cc @@ -102,6 +102,9 @@ void TD::suspend() { void TD::resume() { theMsg()->pushEpoch(ep_); + auto& epoch_stack = theMsg()->getEpochStack(); + base_epoch_stack_size_ = epoch_stack.size(); + for (auto it = suspended_epochs_.rbegin(); it != suspended_epochs_.rend(); ++it) {