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

[PATCH 0/1] midx: prevent writing a bitmap with zero objects

From
Taylor Blau <me@ttaylorr.com>
Date
Feb 9, 2022, 19:26 UTC
Message-ID
<cover.1644434802.git.me@ttaylorr.com>

Here is a small patch I wrote after getting an alert that we tried to call pack_pos_to_midx(..., 0) on a MIDX that contained zero objects.

The patch causes us to no longer write a bitmap for such a MIDX. More detailed notes are within, and this is based on tb/midx-bitmap-corruption-fix. (The only reason is that both this topic and that one add a new test to t5326, so merging this one after that avoids a textual conflict).

Thanks in advance for your review.
Taylor Blau (1):
  midx: prevent writing a .bitmap without any objects
 midx.c                        |  9 +++++++++
 t/t5326-multi-pack-bitmaps.sh | 22 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)
-- 
2.35.1.73.gccc5557600
Next: Taylor Blau
Message 1 of 3 in “midx: prevent writing a bitmap with zero objects”
  1. 0/1 midx: prevent writing a bitmap with zero objectsTaylor Blau, Feb 9, 2022
  2. 1/1 midx: prevent writing a .bitmap without any objectsTaylor Blau, Feb 9, 2022
  3. Derrick StoleeFeb 10, 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.