aboutsummaryrefslogtreecommitdiff
path: root/src/nissy.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-10-05 23:00:08 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-10-05 23:00:08 +0200
commit1272e304b6367c7dd94d25acf88b2843adabb93a (patch)
treee269e86cf131f3d5ed7c03a201418804257be06d /src/nissy.c
parent6f338b97a222dee630c9b13896cf443254667dfb (diff)
downloadnissy-core-1272e304b6367c7dd94d25acf88b2843adabb93a.tar.gz
nissy-core-1272e304b6367c7dd94d25acf88b2843adabb93a.zip
Fix rare data race
I had some misconception about how _Atomic and const worked. This means the previous commit (expected distribution) could be incorrect.
Diffstat (limited to 'src/nissy.c')
-rw-r--r--src/nissy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nissy.c b/src/nissy.c
index 44efb83..561ef53 100644
--- a/src/nissy.c
+++ b/src/nissy.c
@@ -75,7 +75,7 @@ checkdata(const void *buf, const tableinfo_t *info)
75 getdistribution_cocsep( 75 getdistribution_cocsep(
76 (uint32_t *)((char *)buf + INFOSIZE), distr); 76 (uint32_t *)((char *)buf + INFOSIZE), distr);
77 } else if (!strncmp(info->solver, "h48", 3)) { 77 } else if (!strncmp(info->solver, "h48", 3)) {
78 getdistribution_h48((uint8_t *)buf + INFOSIZE, distr, 78 getdistribution_h48((_Atomic uint8_t *)buf + INFOSIZE, distr,
79 info->h48h, info->bits); 79 info->h48h, info->bits);
80 } else { 80 } else {
81 LOG("checkdata: unknown solver %s\n", info->solver); 81 LOG("checkdata: unknown solver %s\n", info->solver);

Generated with cgit - Back to sebastiano.tronto.net