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
dnsdist: aligned atomics #9455
dnsdist: aligned atomics #9455
Conversation
Maybe also update the atomics in |
@rgacogne if you're happy with the general direction, I'll continue with separating this class out into a |
Yes, the general approach seems good to me. Perhaps we should template this, since we have mostly |
BTW, I'm wondering if this is worth it for all atomic vars or only for the ones that are updated very often. OTOH, memory is cheap I'm told. |
UBSan is not happy, reporting alignment issues :-/:
|
It's probably only worth it for some very specific atomic vars, yes. I'll review the changes to make sure we are not increasing the size of a problematic struct. |
storage causes unaligned access according to UBSan???, possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60734
I believe we can move this from a draft to a regular pull request now? :) |
I'm attempting to rebase this PR on master because I would really like to merge it, but g++ 10.2.0 is complaining about the placement new and I'm not sure whether this is a real issue:
For what it is worth, clang 11.0.0 does not complain. |
I don't get warnings anymore after rebasing this PR on top of the current master, likely thanks to the move to C++17 :-) |
Otto, do you mind if a push a rebased branch? I'd like to merge this before 1.6.0-alpha1 :) |
Superseded by #9998. |
Short description
An approach to fix #9451
Checklist
I have: