git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: One failed self test on Fedora 29

From
JWJeffrey Walton <noloader@gmail.com>
Date
Mar 9, 2019, 13:12 UTC
Message-ID
<CAH8yC8kn=EmEm_UPrnpwaofv97S42Se6FC+hWcm0EHCX-4rewQ@mail.gmail.com>
In-Reply-To
<CAH8yC8mg3vjPoof5SDemQ_YiL+7e1ak535U2nFnPbaWJ8xSWOA@mail.gmail.com>
On Sat, Mar 9, 2019 at 7:34 AM Jeffrey Walton <noloader@gmail.com> wrote:
Show 48 quoted lines
>
> On Fri, Mar 8, 2019 at 12:43 PM Todd Zullinger <tmz@pobox.com> 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*/
Previous: Jeffrey WaltonNext: Junio C Hamano
Message 4 of 25 in “One failed self test on Fedora 29”
  1. Jeffrey WaltonMar 8, 2019
  2. Todd ZullingerMar 8, 2019
  3. Jeffrey WaltonMar 9, 2019
  4. Jeffrey WaltonMar 9, 2019
  5. Junio C HamanoMar 11, 2019
  6. Jeffrey WaltonMar 11, 2019
  7. disabling sha1dc unaligned access, was Re: One failed self test on Fedora 29Jeff King, Mar 11, 2019
  8. Jeffrey WaltonMar 11, 2019
  9. Jeff KingMar 11, 2019
  10. Duy NguyenMar 11, 2019
  11. Thomas BraunMar 11, 2019
  12. Jeff KingMar 11, 2019
  13. Junio C HamanoMar 12, 2019
  14. Jeff KingMar 12, 2019
  15. Thomas BraunMar 13, 2019
  16. Jeff KingMar 13, 2019
  17. Ævar Arnfjörð BjarmasonMar 13, 2019
  18. Ævar Arnfjörð BjarmasonMar 12, 2019
  19. Jeff KingMar 12, 2019
  20. Ævar Arnfjörð BjarmasonMar 12, 2019
  21. Jeff KingMar 12, 2019
  22. Makefile: fix unaligned loads in sha1dc with UBSanJeff King, Mar 12, 2019
  23. Ævar Arnfjörð BjarmasonMar 12, 2019
  24. Jeff KingMar 12, 2019
  25. Jeff KingMar 11, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.