Description
For the impl::InstanceIdentifier::Create() functionality, impl::InstanceIdentifier needs access to the configuration, which is also being used/setup by the impl::Runtime.
Currently impl::InstanceIdentifier::SetConfiguration() is being called with a pointer to a configuration, which gets "dangling" after the impl::Runtime::getInstanceInternal() get called for the 1st time. It moves the configuration to a an Runtime internal member, thus the access later by impl::InstanceIdentifier becomes a "use after move".
The solution:
impl::InstanceIdentifier shall instead get a pointer to the configuration AFTER the move happened. This is a stable location for the whole lifetime of the score::mw::com app/Runtime.
Error Occurrence Rate
Reproducible
How to reproduce
No response
Supporting Information
No response
Classification
minor
Affected Version
0.5
Expected Closure Version
0.5
Category
Description
For the impl::InstanceIdentifier::Create() functionality, impl::InstanceIdentifier needs access to the configuration, which is also being used/setup by the impl::Runtime.
Currently impl::InstanceIdentifier::SetConfiguration() is being called with a pointer to a configuration, which gets "dangling" after the impl::Runtime::getInstanceInternal() get called for the 1st time. It moves the configuration to a an Runtime internal member, thus the access later by impl::InstanceIdentifier becomes a "use after move".
The solution:
impl::InstanceIdentifier shall instead get a pointer to the configuration AFTER the move happened. This is a stable location for the whole lifetime of the score::mw::com app/Runtime.
Error Occurrence Rate
Reproducible
How to reproduce
No response
Supporting Information
No response
Classification
minor
Affected Version
0.5
Expected Closure Version
0.5
Category