persona_scope destructor corrupts active_with_caller()

Issue #205 resolved
john bachan created an issue

The persona_scope::~persona_scope() destructor is not properly setting the metadata for the exiting persona if that persona was already present deeper in the stack. This will lead persona::active_with_caller() to mis-report false, which could affect many asserts littered throughout the codebase.

This will incorrectly fail:

{
upcxx::persona_scope ps1(upcxx::master_persona());

{ upcxx::persona_scope ps2(upcxx::master_persona()); }

UPCXX_ASSERT_ALWAYS(upcxx::master_persona().active_with_caller());
}

Comments (3)

  1. Dan Bonachea

    fix issue #205: incorrect metadata handling in ~persona_scope()

    persona_scope::~persona_scope() wasn't properly resetting metadata that would lead to the persona::active_with_caller() query to fail. This may have been responsible for some confusing mis-ASSERT's in SEQ mode.

    → <<cset 83277c8e659d>>

  2. Log in to comment