Re: not ok 41 - test ident field is working
- From
Jeff King <peff@peff.net>
- Date
- May 3, 2019, 20:50 UTC
- Message-ID
- <20190503205052.GA17551@sigill.intra.peff.net>
- In-Reply-To
- <CAH8yC8kqHDDqsu++3an69Oq--hhabV8LGawD3uccykFYQDFvsw@mail.gmail.com>
On Fri, May 03, 2019 at 04:18:02PM -0400, Jeffrey Walton wrote:
> I'm catching one failed self test under a sanitizer build. It looks > like there's some latent UB present during 'make check'
How are you providing sanitizer options? If you're just putting -fsanitize=undefined in the compiler flags, that is known to fail. For example, on some platforms we'll default to unaligned loads when it's faster and well-defined on that platform.
And that's what you're seeing here:
> read-cache.c:1943:22: runtime error: load of misaligned address 0x7fba278d61ab f > or type 'unsigned int', which requires 4 byte alignment
since this is a get_be32() call.
You can can add -DNO_UNALIGNED_LOADS to fix this. However, we have some Makefile logic for doing this already, and:
make SANITIZE=undefined test
should work. My normal test for memory problems is:
make SANITIZE=address,undefined test
-Peff