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

DRAFT: Combine aarch64 testing with atomics fix #530

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

coldav
Copy link
Collaborator

@coldav coldav commented Sep 13, 2024

Overview

Provide a brief overview of what your changes do, summarizing their effects
and consequences.

Reason for change

Describe how the current behaviour of the project is causing problems for you
or is otherwise unsatisfactory for your use case.

Description of change

Describe the intended behaviour your changes are meant to introduce to the
project and explain how they resolve the problem stated above. Detail any
relevant changes that may affect other users of the project, such as
compilation options, runtime flags, expected inputs and outputs, API entry
points, etc.

If you have added new testing, provide details on what tests you have added
and what the purpose of them is.

Anything else we should know?

If there's any other relevant information we should know that may help us in
understanding and verifying your patch, please include it here.

Checklist

  • Read and follow the project Code of Conduct.
  • Make sure the project builds successfully with your changes.
  • Run relevant testing locally to avoid regressions.
  • Run clang-format-17 on all modified code.

hvdijk and others added 2 commits September 13, 2024 15:01
These tests test atomic_compare_exchange_weak_explicit which is allowed
to fail for no clear reason. The test tries to account for this by
detecting output differences, using that to set a weak_exchange_failed
boolean, and using that weak_exchange_failed boolean to detect where the
result of atomic_compare_exchange_weak_explicit does not match
expectations. That is, in output_reference, it does:

          if (value == expected_values[success_index]) {
            weak_exchange_failed = true;
            return true;
          }

Then, bool_output_reference is:

        [success_index, weak_exchange_failed](size_t index) {
          return index == success_index && !weak_exchange_failed;
        };

The problem here is that bool_output_reference is constructed capturing
weak_exchange_failed by value, so it will never pick up the updated
value even if it was detected that the weak exchange had failed. To fix
this, capture it by reference instead.
@coldav coldav force-pushed the colin/try_aarch64_atomics_fix branch from 5101827 to cd3ef85 Compare September 13, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants