Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/xenium-0.0.2+ds/benchmarks/benchmark.cpp Examining data/xenium-0.0.2+ds/benchmarks/benchmark.hpp Examining data/xenium-0.0.2+ds/benchmarks/config.hpp Examining data/xenium-0.0.2+ds/benchmarks/descriptor.hpp Examining data/xenium-0.0.2+ds/benchmarks/execution.cpp Examining data/xenium-0.0.2+ds/benchmarks/execution.hpp Examining data/xenium-0.0.2+ds/benchmarks/hash_map_benchmark.cpp Examining data/xenium-0.0.2+ds/benchmarks/hash_maps.hpp Examining data/xenium-0.0.2+ds/benchmarks/main.cpp Examining data/xenium-0.0.2+ds/benchmarks/queue_benchmark.cpp Examining data/xenium-0.0.2+ds/benchmarks/queues.hpp Examining data/xenium-0.0.2+ds/benchmarks/reclaimers.hpp Examining data/xenium-0.0.2+ds/benchmarks/report.cpp Examining data/xenium-0.0.2+ds/benchmarks/report.hpp Examining data/xenium-0.0.2+ds/benchmarks/workload.cpp Examining data/xenium-0.0.2+ds/benchmarks/workload.hpp Examining data/xenium-0.0.2+ds/test/chase_work_stealing_deque_test.cpp Examining data/xenium-0.0.2+ds/test/concurrent_ptr_test.cpp Examining data/xenium-0.0.2+ds/test/harris_michael_hash_map_test.cpp Examining data/xenium-0.0.2+ds/test/harris_michael_list_based_set_test.cpp Examining data/xenium-0.0.2+ds/test/kirsch_bounded_kfifo_queue_test.cpp Examining data/xenium-0.0.2+ds/test/kirsch_kfifo_queue_test.cpp Examining data/xenium-0.0.2+ds/test/left_right_test.cpp Parsing failed to find end of parameter list; semicolon terminated it in ([](int v) { ASSERT_EQ(42, v); }); } TEST(LeftRight, read_can_return_value) { xenium::left_right<int> lr{42}; auto v = lr.read([](int v) { return v; }); ASSERT_EQ(42, v); } TEST(LeftRigh Parsing failed to find end of parameter list; semicolon terminated it in ([](int v) { return v; }); ASSERT_EQ(42, v); } TEST(LeftRight, read_provides_updated_value) { xenium::left_right<int> lr{0}; lr.update([](int& v) { v = 42; }); lr.read([](int v) { ASSERT_ Parsing failed to find end of parameter list; semicolon terminated it in ([](int v) { ASSERT_EQ(42, v); }); lr.update([](int& v) { ++v; }); lr.read([](int v) { ASSERT_EQ(43, v); }); } TEST(LeftRight, parallel_usage) { constexpr int MaxIterations = 8000; Parsing failed to find end of parameter list; semicolon terminated it in ([](int v) { ASSERT_EQ(43, v); }); } TEST(LeftRight, parallel_usage) { constexpr int MaxIterations = 8000; xenium::left_right<int> lr{0}; std::vector<std::thread> threads; for (int i Parsing failed to find end of parameter list; semicolon terminated it in ([&last_value](const int& v) { EXPECT_GE(v, last_value); last_value = v; }); } } })); } for (auto& thread : threads) thread.join(); } } Examining data/xenium-0.0.2+ds/test/main.cpp Examining data/xenium-0.0.2+ds/test/marked_ptr_test.cpp Examining data/xenium-0.0.2+ds/test/michael_scott_queue_test.cpp Examining data/xenium-0.0.2+ds/test/parameter_test.cpp Examining data/xenium-0.0.2+ds/test/ramalhete_queue_test.cpp Examining data/xenium-0.0.2+ds/test/reclamation/generic_epoch_based_test.cpp Examining data/xenium-0.0.2+ds/test/reclamation/hazard_eras_test.cpp Examining data/xenium-0.0.2+ds/test/reclamation/hazard_pointer_test.cpp Examining data/xenium-0.0.2+ds/test/reclamation/lock_free_ref_count_test.cpp Examining data/xenium-0.0.2+ds/test/reclamation/quiescent_state_based_test.cpp Examining data/xenium-0.0.2+ds/test/reclamation/stamp_it_test.cpp Examining data/xenium-0.0.2+ds/test/sanitize_test.cpp Examining data/xenium-0.0.2+ds/test/seqlock_test.cpp Examining data/xenium-0.0.2+ds/test/vyukov_bounded_queue_test.cpp Examining data/xenium-0.0.2+ds/test/vyukov_hash_map_test.cpp Examining data/xenium-0.0.2+ds/xenium/acquire_guard.hpp Examining data/xenium-0.0.2+ds/xenium/aligned_object.hpp Examining data/xenium-0.0.2+ds/xenium/backoff.hpp Examining data/xenium-0.0.2+ds/xenium/chase_work_stealing_deque.hpp Examining data/xenium-0.0.2+ds/xenium/detail/fixed_size_circular_array.hpp Examining data/xenium-0.0.2+ds/xenium/detail/growing_circular_array.hpp Examining data/xenium-0.0.2+ds/xenium/detail/hardware.hpp Examining data/xenium-0.0.2+ds/xenium/detail/pointer_queue_traits.hpp Examining data/xenium-0.0.2+ds/xenium/detail/port.hpp Examining data/xenium-0.0.2+ds/xenium/harris_michael_hash_map.hpp Examining data/xenium-0.0.2+ds/xenium/harris_michael_list_based_set.hpp Examining data/xenium-0.0.2+ds/xenium/hash.hpp Examining data/xenium-0.0.2+ds/xenium/impl/vyukov_hash_map.hpp Examining data/xenium-0.0.2+ds/xenium/impl/vyukov_hash_map_traits.hpp Examining data/xenium-0.0.2+ds/xenium/kirsch_bounded_kfifo_queue.hpp Examining data/xenium-0.0.2+ds/xenium/kirsch_kfifo_queue.hpp Examining data/xenium-0.0.2+ds/xenium/left_right.hpp Examining data/xenium-0.0.2+ds/xenium/marked_ptr.hpp Examining data/xenium-0.0.2+ds/xenium/michael_scott_queue.hpp Examining data/xenium-0.0.2+ds/xenium/parameter.hpp Examining data/xenium-0.0.2+ds/xenium/policy.hpp Examining data/xenium-0.0.2+ds/xenium/ramalhete_queue.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/detail/allocation_tracker.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/detail/concurrent_ptr.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/detail/deletable_object.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/detail/guard_ptr.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/detail/orphan.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/detail/perf_counter.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/detail/retire_list.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/detail/thread_block_list.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/generic_epoch_based.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/hazard_eras.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/hazard_pointer.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/impl/generic_epoch_based.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/impl/hazard_eras.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/impl/hazard_pointer.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/impl/lock_free_ref_count.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/impl/quiescent_state_based.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/impl/stamp_it.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/lock_free_ref_count.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/quiescent_state_based.hpp Examining data/xenium-0.0.2+ds/xenium/reclamation/stamp_it.hpp Examining data/xenium-0.0.2+ds/xenium/seqlock.hpp Examining data/xenium-0.0.2+ds/xenium/utils.hpp Examining data/xenium-0.0.2+ds/xenium/vyukov_bounded_queue.hpp Examining data/xenium-0.0.2+ds/xenium/vyukov_hash_map.hpp FINAL RESULTS: data/xenium-0.0.2+ds/xenium/kirsch_bounded_kfifo_queue.hpp:232:42: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. const uint64_t random_index = utils::random() % k_; data/xenium-0.0.2+ds/xenium/kirsch_kfifo_queue.hpp:263:42: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. const uint64_t random_index = utils::random() % k; data/xenium-0.0.2+ds/xenium/utils.hpp:83:24: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. inline std::uint64_t random() { data/xenium-0.0.2+ds/xenium/detail/pointer_queue_traits.hpp:22:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(&result, &val, sizeof(value_type)); data/xenium-0.0.2+ds/xenium/detail/pointer_queue_traits.hpp:28:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(&target, &val, sizeof(value_type)); data/xenium-0.0.2+ds/xenium/kirsch_bounded_kfifo_queue.hpp:86:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char padding[std::max(padding_bytes, 1u)]; data/xenium-0.0.2+ds/xenium/kirsch_kfifo_queue.hpp:89:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char padding[std::max(padding_bytes, 1u)]; data/xenium-0.0.2+ds/xenium/reclamation/lock_free_ref_count.hpp:152:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char padding[64 - sizeof(unpadded_header)]; data/xenium-0.0.2+ds/test/left_right_test.cpp:14:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lr.read([](int v) { data/xenium-0.0.2+ds/test/left_right_test.cpp:22:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto v = lr.read([](int v) { return v; }); data/xenium-0.0.2+ds/test/left_right_test.cpp:30:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lr.read([](int v) { data/xenium-0.0.2+ds/test/left_right_test.cpp:34:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lr.read([](int v) { data/xenium-0.0.2+ds/test/left_right_test.cpp:62:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lr.read([&last_value](const int& v) { data/xenium-0.0.2+ds/xenium/left_right.hpp:83:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto read(Func&& func) const { ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 17178 in approximately 0.43 seconds (40391 lines/second) Physical Source Lines of Code (SLOC) = 12297 Hits@level = [0] 0 [1] 6 [2] 5 [3] 3 [4] 0 [5] 0 Hits@level+ = [0+] 14 [1+] 14 [2+] 8 [3+] 3 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.13849 [1+] 1.13849 [2+] 0.650565 [3+] 0.243962 [4+] 0 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.