From: Jeffrey Walton Date: Sat, 09 Mar 2019 13:12:05 GMT Subject: Re: One failed self test on Fedora 29 Message-ID: In-Reply-To: On Sat, Mar 9, 2019 at 7:34 AM Jeffrey Walton wrote: > > On Fri, Mar 8, 2019 at 12:43 PM Todd Zullinger wrote: > > > > Jeffrey Walton wrote: > > > Fedora 29, x86_64. One failed self test: > > > > > > *** t0021-conversion.sh *** > > [...] > > > not ok 13 - disable filter with empty override > > > # > > > # test_config_global filter.disable.smudge false && > > > # test_config_global filter.disable.clean false && > > > # test_config filter.disable.smudge false && > > > # test_config filter.disable.clean false && > > > # > > > # echo "*.disable filter=disable" >.gitattributes && > > > # > > > # echo test >test.disable && > > > # git -c filter.disable.clean= add test.disable 2>err && > > > # test_must_be_empty err && > > > # rm -f test.disable && > > > # git -c filter.disable.smudge= checkout -- test.disable 2>err && > > > # test_must_be_empty err > > > # > > [...] > > > # failed 1 among 26 test(s) > > > 1..26 > > > gmake[2]: *** [Makefile:56: t0021-conversion.sh] Error 1 > > > > > > Does anyone need a config.log or other test data? > > > > It would probably help to know what commit you're building. > > The verbose test output would also be useful, e.g.: > > I built with CFLAGS += -fsanitize=undefined. It looks like the > misaligned accesses generate UBsan findings, which is causing > t0021-conversion to fail. > > git-2.21.0$ grep -IR 'runtime error' > t/trash directory.t0021-conversion/err:sha1dc/sha1.c:392:2: runtime > error: load of misaligned address 0x0000024fc245 for type 'const > uint32_t', which requires 4 byte alignment > t/trash directory.t0021-conversion/err:sha1dc/sha1.c:397:2: runtime > error: load of misaligned address 0x0000024fc245 for type 'const > uint32_t', which requires 4 byte alignment > t/trash directory.t0021-conversion/err:sha1dc/sha1.c:402:2: runtime > error: load of misaligned address 0x0000024fc245 for type 'const > uint32_t', which requires 4 byte alignment I think this is the patch for sha1dc/sha1.c . It stops using unaligned accesses by default, but still honors SHA1DC_FORCE_UNALIGNED_ACCESS for those who want it. Folks who want the undefined behavior have to do something special. Jeff --- sha1dc/sha1.c +++ sha1dc/sha1.c @@ -26,14 +26,6 @@ #include "sha1.h" #include "ubc_check.h" -#if (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || \ - defined(i386) || defined(__i386) || defined(__i386__) || defined(__i486__) || \ - defined(__i586__) || defined(__i686__) || defined(_M_IX86) || defined(__X86__) || \ - defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__) || defined(__INTEL__) || \ - defined(__386) || defined(_M_X64) || defined(_M_AMD64)) -#define SHA1DC_ON_INTEL_LIKE_PROCESSOR -#endif - /* Because Little-Endian architectures are most common, we only set SHA1DC_BIGENDIAN if one of these conditions is met. @@ -124,7 +116,7 @@ #endif /*ENDIANNESS SELECTION*/ -#if defined(SHA1DC_FORCE_UNALIGNED_ACCESS) || defined(SHA1DC_ON_INTEL_LIKE_PROCESSOR) +#if defined(SHA1DC_FORCE_UNALIGNED_ACCESS) #define SHA1DC_ALLOW_UNALIGNED_ACCESS #endif /*UNALIGNMENT DETECTION*/