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

Re: [PATCH 5/5] Makefile: disable unaligned loads with UBSan

From
René Scharfe <l.s.r@web.de>
Date
Jul 16, 2017, 11:02 UTC
Message-ID
<840f246f-e735-2a84-d9b9-95d8e4a9d99c@web.de>
In-Reply-To
<20170716101744.2g3x7v2dtasg45ll@sigill.intra.peff.net>
Am 16.07.2017 um 12:17 schrieb Jeff King:
Show 15 quoted lines
> On Sat, Jul 15, 2017 at 07:18:56PM +0200, René Scharfe wrote:
> 
>> -- >8 --
>> Subject: [PATCH] Makefile: allow combining UBSan with other sanitizers
>>
>> Multiple sanitizers can be specified as a comma-separated list.  Set
>> the flag NO_UNALIGNED_LOADS even if UndefinedBehaviorSanitizer is not
>> the only sanitizer to build with.
> 
> Nice, I didn't know you could do comma-separation here. ;)
> 
> I always just built the various sanitizers separately since I was
> testing whether each one worked. But if we can get UBSan to build
> cleanly, I agree that "make SANITIZE=address,undefined test" would be a
> nice thing to run periodically.

There are *some* restrictions: You can only use one of address, memory and thread, as mentioned here:

http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
Combining ASan and UBSan works fine.
René
Previous: Jeff KingNext: Jeff King
Message 14 of 18 in “building git with clang/gcc address sanitizer”
  1. 0/5 building git with clang/gcc address sanitizerJeff King, Jul 10, 2017
  2. 1/5 test-lib: set ASAN_OPTIONS variable before we run gitJeff King, Jul 10, 2017
  3. 3/5 Makefile: add helper for compiling with -fsanitizeJeff King, Jul 10, 2017
  4. Junio C HamanoJul 10, 2017
  5. Jeff KingJul 10, 2017
  6. Junio C HamanoJul 10, 2017
  7. Ramsay JonesJul 10, 2017
  8. Jeff KingJul 11, 2017
  9. 2/5 test-lib: turn on ASan abort_on_error by defaultJeff King, Jul 10, 2017
  10. Junio C HamanoJul 10, 2017
  11. 5/5 Makefile: disable unaligned loads with UBSanJeff King, Jul 10, 2017
  12. René ScharfeJul 15, 2017
  13. Jeff KingJul 16, 2017
  14. René ScharfeJul 16, 2017
  15. 4/5 Makefile: turn off -fomit-frame-pointer with sanitizersJeff King, Jul 10, 2017
  16. Jeff KingJul 10, 2017
  17. Lars SchneiderJul 10, 2017
  18. Jeff KingJul 10, 2017

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.