Skip to content

'variant' has undefined behavior for assignment operator of underlying value #2414

@elBoberido

Description

@elBoberido

Required information

Operating system:
any

Compiler version:
any

Eclipse iceoryx version:
all

Observed result or behaviour:

This leads to undefined behavior since the memory is not initialized with a Foo but the implementation calls the assignment operator of Foo with the uninitialized memory as left hand side.

variant<Foo> f;
f = Foo{};

Expected result or behaviour:

No undefined behavior.

Conditions where it occurred / Performed steps:

code review

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions