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

Re: [PATCH] tests: make SANITIZE=address imply TEST_NO_MALLOC_CHECK

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 12, 2022, 07:44 UTC
Message-ID
<220412.867d7uivuh.gmgdl@evledraar.gmail.com>
In-Reply-To
<xmqqk0bvfcd6.fsf@gitster.g>
On Mon, Apr 11 2022, Junio C Hamano wrote:
Show 16 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> I wonder why we have to justify that we'll only turn on
>> TEST_NO_MALLOC_CHECK if it's SANITIZE=address.
>>
>> I.e. we also have SANITIZE=undefined, wouldn't it be more future-proof
>> to just say that these analysis options are mutually exclusive by
>> default?
>
> Given that the SANITIZE mechanism itself allows more than one to be
> requested at the same time, it is unclear to me why other checks
> like undefined needs to exclude checks done by other mechanisms like
> MALLOC_CHECK_ by default.  If I correctly read under-the-three-dash
> commentary Phillip wrote, it's not like that use of MALLOC_CHECK_
> inherently interferes with the way SANITIZE=undefined wants to work,
> no?
Because:
 * It makes it slower, and part of the utility of these checks is that
   they run in a timely fashion.
 * We add these glibc checks because we'd like to catch malloc()/free()
   issues, and run the test suite with them by default.
   Someone using the SANITIZE=* feature is almost certain to be also
   doing a "normal" test run, so I don't think we're getting anything
   extra by combining the two, except needlessly slowing it down.
 * Even though SANITIZE=leak,address & valgrind are strictly speaking
   incompatible with the glibc check, having inject itself into other
   sanitize modes is surely going to make debugging harder until you
   discover that we're also injecting the custom malloc.
Previous: Junio C Hamano
Message 5 of 5 in “tests: make SANITIZE=address imply TEST_NO_MALLOC_CHECK”
  1. tests: make SANITIZE=address imply TEST_NO_MALLOC_CHECKPhillip Wood via GitGitGadget, Apr 9, 2022
  2. Junio C HamanoApr 11, 2022
  3. Ævar Arnfjörð BjarmasonApr 11, 2022
  4. Junio C HamanoApr 11, 2022
  5. Ævar Arnfjörð BjarmasonApr 12, 2022

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.