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

Re: [PATCH] attr: fix msan issue in read_attr_from_index

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 17, 2024, 21:14 UTC
Message-ID
<xmqqwmmn46ge.fsf@gitster.g>
In-Reply-To
<xmqqcyof5n2t.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> Having said all that ...
>
>> Make the call to `read_attr_from_buf` conditional on `buf` being
>> non-NULL, ensuring that `size` is not read if it's never set.
>
> ... this makes the logic at the caller crystal clear, so even if
> there are suboptimal checker that bothers us with false positives,
> the change itself justifies itself, I would say.

Well, "even if there were *no* MSAN or other issues wrt usage of size" was what I wanted to say. Sorry for a noise.

Show 9 quoted lines
>>  	} else {
>>  		buf = read_blob_data_from_index(istate, path, &size);
>> -		stack = read_attr_from_buf(buf, size, path, flags);
>> +		if (buf)
>> +			stack = read_attr_from_buf(buf, size, path, flags);
>>  	}
>>  	return stack;
>
> Thanks.
Previous: Junio C HamanoNext: Kyle Lippincott
Message 4 of 6 in “attr: fix msan issue in read_attr_from_index”
  1. attr: fix msan issue in read_attr_from_indexKyle Lippincott via GitGitGadget, Jun 17, 2024
  2. Junio C HamanoJun 17, 2024
  3. Junio C HamanoJun 17, 2024
  4. Junio C HamanoJun 17, 2024
  5. Kyle LippincottJun 17, 2024
  6. Jeff KingJun 18, 2024

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.