From 6d3550454af10d553fd8a29ec96c64e7016792a3 Mon Sep 17 00:00:00 2001 From: Kris Kwiatkowski Date: Mon, 21 Jun 2021 09:55:39 +0100 Subject: [PATCH] msan: in msan mode disable bench for kyber INDCPA encryption --- test/bench/kyber.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/bench/kyber.cc b/test/bench/kyber.cc index 97676bf5..593b6855 100644 --- a/test/bench/kyber.cc +++ b/test/bench/kyber.cc @@ -59,6 +59,7 @@ static void BenchKyberKeygen(benchmark::State &st) { cpucycle(st, total); } +#ifndef PQC_MEMSAN_BUILD static void BenchKyberEncaps(benchmark::State &st) { int64_t t, total = 0; uint8_t sk[1632]; @@ -91,6 +92,7 @@ static void BenchKyberDecaps(benchmark::State &st) { } cpucycle(st, total); } +#endif static void BenchKyberBaseMulAVX(benchmark::State &st) { int64_t t, total = 0; @@ -120,7 +122,11 @@ static void BenchKyberNttAVX(benchmark::State &st) { BENCHMARK(BenchKyberMatK2); BENCHMARK(BenchKyberRejSampling); BENCHMARK(BenchKyberKeygen); -BENCHMARK(BenchKyberEncaps); -BENCHMARK(BenchKyberDecaps); BENCHMARK(BenchKyberBaseMulAVX); BENCHMARK(BenchKyberNttAVX); + +// TODO: not sure why but memcheck fails in INDCPA encryption +#ifndef PQC_MEMSAN_BUILD +BENCHMARK(BenchKyberEncaps); +BENCHMARK(BenchKyberDecaps); +#endif