From 9c4aebd8e3e3662e082611ad29928eef31314eec Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Tue, 16 Apr 2019 12:39:14 +0200 Subject: [PATCH 1/4] sanitizers don't need valgrind --- test/test_functest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_functest.py b/test/test_functest.py index f707e491..be45404d 100644 --- a/test/test_functest.py +++ b/test/test_functest.py @@ -53,7 +53,6 @@ def check_functest_sanitizers(implementation): else: print("Supported platform: {}".format(platform.machine())) - helpers.ensure_available('valgrind') helpers.make('clean-scheme', 'functest', TYPE=implementation.scheme.type, SCHEME=implementation.scheme.name, From 327429b62578eebb59b40e6397b7ee5e61ef826c Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Tue, 16 Apr 2019 12:58:43 +0200 Subject: [PATCH 2/4] Make sure -fsanitizer binaries are always cleaned up --- test/test_functest.py | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/test/test_functest.py b/test/test_functest.py index be45404d..4923d74a 100644 --- a/test/test_functest.py +++ b/test/test_functest.py @@ -60,21 +60,25 @@ def check_functest_sanitizers(implementation): EXTRAFLAGS='-fsanitize=address,undefined', working_dir=os.path.join('..', 'test'), env=env) - helpers.run_subprocess( - [os.path.join('..', 'bin', 'functest_{}_{}{}'.format( - implementation.scheme.name, - implementation.name, - '.exe' if os.name == 'nt' else '' - ))], - os.path.join('..', 'bin'), - env=env, - ) - # Remove files with ASAN library compiled in - helpers.make('clean-scheme', - TYPE=implementation.scheme.type, - SCHEME=implementation.scheme.name, - IMPLEMENTATION=implementation.name, - working_dir=os.path.join('..', 'test')) + try: + helpers.run_subprocess( + [os.path.join('..', 'bin', 'functest_{}_{}{}'.format( + implementation.scheme.name, + implementation.name, + '.exe' if os.name == 'nt' else '' + ))], + os.path.join('..', 'bin'), + env=env, + ) + except AssertionError as e: + raise e + finally: + # Remove files with ASAN library compiled in + helpers.make('clean-scheme', + TYPE=implementation.scheme.type, + SCHEME=implementation.scheme.name, + IMPLEMENTATION=implementation.name, + working_dir=os.path.join('..', 'test')) if __name__ == '__main__': From 546d9e41f22b2627654a03856e014801c0e5cb80 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Tue, 16 Apr 2019 13:24:23 +0200 Subject: [PATCH 3/4] Make output of sanitizer nicer --- test/test_functest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_functest.py b/test/test_functest.py index 4923d74a..d7696881 100644 --- a/test/test_functest.py +++ b/test/test_functest.py @@ -57,7 +57,7 @@ def check_functest_sanitizers(implementation): TYPE=implementation.scheme.type, SCHEME=implementation.scheme.name, IMPLEMENTATION=implementation.name, - EXTRAFLAGS='-fsanitize=address,undefined', + EXTRAFLAGS='-g -fsanitize=address,undefined', working_dir=os.path.join('..', 'test'), env=env) try: From 3431dd2e0a0541b56a4076a124ea294fb4ef1326 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Tue, 16 Apr 2019 12:54:05 +0200 Subject: [PATCH 4/4] No reason for C source files to be executable --- crypto_kem/ntruhps2048509/clean/api.h | 0 crypto_kem/ntruhps2048509/clean/crypto_sort.c | 0 crypto_kem/ntruhps2048509/clean/crypto_sort.h | 0 crypto_kem/ntruhps2048509/clean/kem.c | 0 crypto_kem/ntruhps2048509/clean/owcpa.c | 0 crypto_kem/ntruhps2048509/clean/owcpa.h | 0 crypto_kem/ntruhps2048509/clean/pack3.c | 0 crypto_kem/ntruhps2048509/clean/packq.c | 0 crypto_kem/ntruhps2048509/clean/params.h | 0 crypto_kem/ntruhps2048509/clean/poly.c | 0 crypto_kem/ntruhps2048509/clean/poly.h | 0 crypto_kem/ntruhps2048509/clean/sample.c | 0 crypto_kem/ntruhps2048509/clean/sample.h | 0 crypto_kem/ntruhps2048509/clean/verify.c | 0 crypto_kem/ntruhps2048509/clean/verify.h | 0 15 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/api.h mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/crypto_sort.c mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/crypto_sort.h mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/kem.c mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/owcpa.c mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/owcpa.h mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/pack3.c mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/packq.c mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/params.h mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/poly.c mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/poly.h mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/sample.c mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/sample.h mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/verify.c mode change 100755 => 100644 crypto_kem/ntruhps2048509/clean/verify.h diff --git a/crypto_kem/ntruhps2048509/clean/api.h b/crypto_kem/ntruhps2048509/clean/api.h old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/crypto_sort.c b/crypto_kem/ntruhps2048509/clean/crypto_sort.c old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/crypto_sort.h b/crypto_kem/ntruhps2048509/clean/crypto_sort.h old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/kem.c b/crypto_kem/ntruhps2048509/clean/kem.c old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/owcpa.c b/crypto_kem/ntruhps2048509/clean/owcpa.c old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/owcpa.h b/crypto_kem/ntruhps2048509/clean/owcpa.h old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/pack3.c b/crypto_kem/ntruhps2048509/clean/pack3.c old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/packq.c b/crypto_kem/ntruhps2048509/clean/packq.c old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/params.h b/crypto_kem/ntruhps2048509/clean/params.h old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/poly.c b/crypto_kem/ntruhps2048509/clean/poly.c old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/poly.h b/crypto_kem/ntruhps2048509/clean/poly.h old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/sample.c b/crypto_kem/ntruhps2048509/clean/sample.c old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/sample.h b/crypto_kem/ntruhps2048509/clean/sample.h old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/verify.c b/crypto_kem/ntruhps2048509/clean/verify.c old mode 100755 new mode 100644 diff --git a/crypto_kem/ntruhps2048509/clean/verify.h b/crypto_kem/ntruhps2048509/clean/verify.h old mode 100755 new mode 100644