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

Fix incorrect use of atomic variable in src/perf_trace.rs #47

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

AsterNighT
Copy link
Contributor

@AsterNighT AsterNighT commented Dec 12, 2023

Description

This PR changed a few lines in src/perf_trace.rs on atomic variable accessing and modifying. As far as I can see these duplicated fetch_adds makes the entire macro non-atomic and should be merged into one.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

I could use some suggestions on how such unit test can be designed. And I believe this is a merely bug fix and no relevant documentation needs to be updated.

Copy link
Member

@Pratyush Pratyush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Pratyush Pratyush merged commit ed2cf48 into arkworks-rs:master Oct 17, 2024
4 checks passed
@Pratyush
Copy link
Member

Hm actually this seems to have introduced a bug because fetch_sub return the old values before the change. Reverting this for now.

cc @mmagician I think we might need to release a 0.5.1 fixing this.

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