Skip to content

Utest: Default copy constructor for "struct failure_t" doesn't work as expected #2508

Closed
@adbridge

Description

@adbridge

Description

  • Type: Bug
  • Priority: Major
    In utest_types.h the struct failure_t has multiple overloaded constructors but no copy constructor. When variables of this type are being passed by value , one or more of the internal fields is getting an incorrect value. This points to an issue with the compiler default copy constructor introducing unexpected side effects. The fix for this issue somehow got omitted from the 5.1 release.

Bug

mbed-os sha
mbed-os-5.0.1-epr-16-gf4790ce

mbed-cli version
version 0.8.0

This bug is currently only likely to be observed internally within utest.

Proposed fix

Add a custom copy constructor to the struct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions