From 3b9c20da40041127300c327821b9c7ce5af33169 Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Fri, 23 Dec 2022 17:24:53 +0100 Subject: [PATCH] [bls-signatures] Improve blst MSAN build (#9269) This is the correct way to build without assembly optimizations, according to the maintainer, and this will resolve https://oss-fuzz.com/testcase-detail/5324515452518400 --- projects/bls-signatures/build.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/projects/bls-signatures/build.sh b/projects/bls-signatures/build.sh index e44da683c..5b7bcdf49 100755 --- a/projects/bls-signatures/build.sh +++ b/projects/bls-signatures/build.sh @@ -113,17 +113,7 @@ fi function build_blst() { if [[ "$SANITIZER" == "memory" ]] then - # Patch to disable assembly - touch new_no_asm.h - echo "#if LIMB_T_BITS==32" >>new_no_asm.h - echo "typedef unsigned long long llimb_t;" >>new_no_asm.h - echo "#else" >>new_no_asm.h - echo "typedef __uint128_t llimb_t;" >>new_no_asm.h - echo "#endif" >>new_no_asm.h - cat src/no_asm.h >>new_no_asm.h - mv new_no_asm.h src/no_asm.h - - CFLAGS="$CFLAGS -D__BLST_NO_ASM__ -D__BLST_PORTABLE__" ./build.sh + CFLAGS="$CFLAGS -D__BLST_NO_ASM__ -D__BLST_PORTABLE__ -Dllimb_t=__uint128_t -D__builtin_assume(x)=(void)(x)" ./build.sh else ./build.sh fi