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

static_assert(sizeof(qsbr_epoch_t) == 8, "expected 64-bit counter") #12

Open
clausecker opened this issue Dec 15, 2022 · 0 comments
Open

Comments

@clausecker
Copy link

This assertion checks if qsbr_epoch_t is a 64 bit type:

static_assert(sizeof(qsbr_epoch_t) == 8, "expected 64-bit counter")

However, the code defines qsbr_epoch_t to be of type

typedef unsigned long qsbr_epoch_t;

which may be a 32 bit type. Please change the code such that qsbr_epoch_t is instead a 64 bit type:

typedef unsigned long long qsbr_epoch_t;
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Oct 27, 2023
The fix is to make qsbr_epoch_t a 64 bit integer in any case.  The fix
is carefully designed not to change the API on platforms where it is so
already.  Unfortunately this fix requires FreeBSD 13 or newer due to the
old LLVM version included in FreeBSD 12.

While we are at it, hook up test target.

See also:	rmind/libqsbr#12
Approved by:	portmgr (build fix blanket)
MFH:		2023Q4
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Oct 27, 2023
The fix is to make qsbr_epoch_t a 64 bit integer in any case.  The fix
is carefully designed not to change the API on platforms where it is so
already.  Unfortunately this fix requires FreeBSD 13 or newer due to the
old LLVM version included in FreeBSD 12.

While we are at it, hook up test target.

See also:	rmind/libqsbr#12
Approved by:	portmgr (build fix blanket)
MFH:		2023Q4

(cherry picked from commit f4fd442)
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

No branches or pull requests

1 participant