Skip to content

Bug: impl::InstanceIdentifier works on dangling configuration pointer #680

Description

@crimson11

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

  • Safety Related
  • Security Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions