From cc6f1d6195c457dc744ff23ac06ccd3a2d948aca Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 25 Oct 2019 16:10:56 -0400 Subject: DRTVWR-476: Use shared_ptr to manage lifespan of coprocedure queue. Since the consuming coroutine LLCoprocedurePool::coprocedureInvokerCoro() has been observed to outlive the LLCoprocedurePool instance that owns the CoprocQueue_t, closing that queue isn't enough to keep the coroutine from crashing at shutdown: accessing a deleted CoprocQueue_t is fatal whether or not it's been closed. Make LLCoprocedurePool store a shared_ptr to a heap CoprocQueue_t instance, and pass that shared_ptr by value to consuming coroutines. That way the CoprocQueue_t instance is guaranteed to live as long as the last interested party. --- indra/llmessage/llcoproceduremanager.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llmessage/llcoproceduremanager.h') diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h index 299ec6742f..c9b853fc4c 100644 --- a/indra/llmessage/llcoproceduremanager.h +++ b/indra/llmessage/llcoproceduremanager.h @@ -32,6 +32,7 @@ #include "llcoros.h" #include "llcorehttputil.h" #include "lluuid.h" +#include class LLCoprocedurePool; -- cgit v1.2.3