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

Re: LSan curiosity in t1300

From
Jeff King <peff@peff.net>
Date
Sep 8, 2022, 18:15 UTC
Message-ID
<YxoxRus2NjsYmM63@coredump.intra.peff.net>
In-Reply-To
<xmqq8rmtrbfq.fsf@gitster.g>
On Thu, Sep 08, 2022 at 11:03:05AM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> > But if you run this in a debugger, you'll find that under -O2 the "key"
> > variable has been optimized out! So LSan is producing the wrong result
> > due to the optimization. It doesn't know that "key" is conceptually
> > still reachable.
> 
> Yikes.  
> 
> Is that related to the cause of the other patch from you, i.e.
> wanting to get "registers" but unable to?  If they manage to get the
> value of the register that holds 'key', would this disappear, I
> wonder?

I don't think so. t1300 fails consistently for me with -O2, and it doesn't have the "register" message (and never came up as one of the racy losers). I think the "register" thing is mostly just a harmless warning that doesn't change the output, but simply confuses our "did lsan produce any logs" check.

-Peff
Previous: Junio C Hamano
Message 8 of 8 in “LSan curiosity in t1300”
  1. Jeff KingSep 8, 2022
  2. tests: opt "git --config-env" test out of SANITIZE=leakÆvar Arnfjörð Bjarmason, Sep 8, 2022
  3. Jeff KingSep 8, 2022
  4. Ævar Arnfjörð BjarmasonSep 23, 2022
  5. Jeff KingSep 23, 2022
  6. Ævar Arnfjörð BjarmasonSep 26, 2022
  7. Junio C HamanoSep 8, 2022
  8. Jeff KingSep 8, 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.