git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeffrey Walton <noloader@gmail.com>
To: Todd Zullinger <tmz@pobox.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: One failed self test on Fedora 29
Date: Sat, 9 Mar 2019 08:12:05 -0500	[thread overview]
Message-ID: <CAH8yC8kn=EmEm_UPrnpwaofv97S42Se6FC+hWcm0EHCX-4rewQ@mail.gmail.com> (raw)
In-Reply-To: <CAH8yC8mg3vjPoof5SDemQ_YiL+7e1ak535U2nFnPbaWJ8xSWOA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2342 bytes --]

On Sat, Mar 9, 2019 at 7:34 AM Jeffrey Walton <noloader@gmail.com> wrote:
>
> 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

[-- Attachment #2: git.patch --]
[-- Type: application/octet-stream, Size: 966 bytes --]

--- 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*/

  reply	other threads:[~2019-03-09 13:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 10:48 One failed self test on Fedora 29 Jeffrey Walton
2019-03-08 17:43 ` Todd Zullinger
2019-03-09 12:34   ` Jeffrey Walton
2019-03-09 13:12     ` Jeffrey Walton [this message]
2019-03-11  2:00       ` Junio C Hamano
2019-03-11  2:16         ` Jeffrey Walton
2019-03-11  3:37         ` disabling sha1dc unaligned access, was " Jeff King
2019-03-11 10:40           ` Jeffrey Walton
2019-03-11 18:19             ` Jeff King
2019-03-11 11:58           ` Duy Nguyen
2019-03-11 18:15             ` Thomas Braun
2019-03-11 18:23               ` Jeff King
2019-03-12  7:27                 ` Junio C Hamano
2019-03-12 10:51                   ` Jeff King
2019-03-13 11:47                     ` Thomas Braun
2019-03-13 15:39                       ` Jeff King
2019-03-13 16:00                         ` Ævar Arnfjörð Bjarmason
2019-03-12  8:53                 ` Ævar Arnfjörð Bjarmason
2019-03-12 11:05                   ` Jeff King
2019-03-12 12:09                     ` Ævar Arnfjörð Bjarmason
2019-03-12 21:01                       ` Jeff King
2019-03-12 21:06           ` [PATCH] Makefile: fix unaligned loads in sha1dc with UBSan Jeff King
2019-03-12 21:17             ` Ævar Arnfjörð Bjarmason
2019-03-12 21:19               ` Jeff King
2019-03-11  3:29     ` One failed self test on Fedora 29 Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH8yC8kn=EmEm_UPrnpwaofv97S42Se6FC+hWcm0EHCX-4rewQ@mail.gmail.com' \
    --to=noloader@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tmz@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).