concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.38k stars 313 forks source link

ck-0.7.1 fails validate/ck_sequence test in 1-core VM #181

Closed bmwiedemann closed 2 years ago

bmwiedemann commented 3 years ago

I tested that this PoC-patch avoids the trouble

+++ ck-0.7.1/regressions/ck_sequence/validate/ck_sequence.c
@@ -124,6 +124,7 @@ main(int argc, char *argv[])

    n_threads = atoi(argv[1]) - 1;
        if (n_threads <= 0) {
+               return 0;
                ck_error("ERROR: Number of threads must be greater than 0\n");
        }

This bug was found while working on reproducible builds for openSUSE.