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

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
Previous: Jeffrey Walton
Message 2 of 2 in “not ok 41 - test ident field is working”
  1. Jeffrey WaltonMay 3, 2019
  2. Jeff KingMay 3, 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.