Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing cxx::expected which contains a value or error leads to UB if the contrary is accessed #1750

Closed
mossmaurice opened this issue Oct 18, 2022 · 0 comments · Fixed by #1754
Assignees
Labels
bug Something isn't working globex
Milestone

Comments

@mossmaurice
Copy link
Contributor

Required information

Operating system:
Ubuntu 20.04.3 LTS

Compiler version:
GCC 8.4.0

Observed result or behaviour:
Accessing cxx::expected which contains a value or error leads to UB if the contrary is accessed.

Expected result or behaviour:
Defined behaviour aka call to error handler via cxx::Expects.

Conditions where it occurred / Performed steps:

auto sut = expected<Foo, Bar>::create_value(VALID_VALUE);
auto foo = sut.get_error();
// or
auto sut = expected<Foo, Bar>::create_error(Bar::VALID_ERROR);
auto foo = sut.value();
sut->memberVariableOfFoo;
@mossmaurice mossmaurice added bug Something isn't working globex labels Oct 18, 2022
@mossmaurice mossmaurice added this to the High prio milestone Oct 18, 2022
@mossmaurice mossmaurice self-assigned this Oct 18, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 19, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 19, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 19, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 20, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 25, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 25, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 25, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 25, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 25, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 25, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 26, 2022
mossmaurice added a commit to ApexAI/iceoryx that referenced this issue Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working globex
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant