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

[PATCH v3 12/22] reftable/reader: handle allocation failures in `reader_init_iter()`

From
Patrick Steinhardt <ps@pks.im>
Date
Sep 30, 2024, 08:08 UTC
Message-ID
<9b5fd52862bf9ee4367481e285990883e8547ab4.1727680272.git.ps@pks.im>
In-Reply-To
<cover.1727680272.git.ps@pks.im>

Handle allocation failures in `reader_init_iter()`. This requires us to also adapt `reftable_reader_init_*_iterator()` to bubble up the new error codes. Adapt callers accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 reftable/merged.c                   |  4 +++-
 reftable/reader.c                   | 28 +++++++++++++++---------
 reftable/reader.h                   |  6 ++---
 reftable/reftable-reader.h          |  8 +++----
 t/unit-tests/t-reftable-readwrite.c | 34 +++++++++++++++++++----------
 5 files changed, 50 insertions(+), 30 deletions(-)
diff --git a/reftable/merged.c b/reftable/merged.c
index 5a8ea8ae77..741f62ea63 100644
--- a/reftable/merged.c
+++ b/reftable/merged.c
@@ -244,7 +244,9 @@ int merged_table_init_iter(struct reftable_merged_table *mt,
 
 	for (size_t i = 0; i < mt->readers_len; i++) {
 		reftable_record_init(&subiters[i].rec, typ);
-		reader_init_iter(mt->readers[i], &subiters[i].iter, typ);
+		ret = reader_init_iter(mt->readers[i], &subiters[i].iter, typ);
+		if (ret < 0)
+			goto out;
 	}
 
 	REFTABLE_CALLOC_ARRAY(mi, 1);
diff --git a/reftable/reader.c b/reftable/reader.c
index 485ee085da..f696e992df 100644
--- a/reftable/reader.c
+++ b/reftable/reader.c
@@ -554,32 +554,37 @@ static void iterator_from_table_iter(struct reftable_iterator *it,
 	it->ops = &table_iter_vtable;
 }
 
-void reader_init_iter(struct reftable_reader *r,
-		      struct reftable_iterator *it,
-		      uint8_t typ)
+int reader_init_iter(struct reftable_reader *r,
+		     struct reftable_iterator *it,
+		     uint8_t typ)
 {
 	struct reftable_reader_offsets *offs = reader_offsets_for(r, typ);
 
 	if (offs->is_present) {
 		struct table_iter *ti;
 		REFTABLE_ALLOC_ARRAY(ti, 1);
+		if (!ti)
+			return REFTABLE_OUT_OF_MEMORY_ERROR;
+
 		table_iter_init(ti, r);
 		iterator_from_table_iter(it, ti);
 	} else {
 		iterator_set_empty(it);
 	}
+
+	return 0;
 }
 
-void reftable_reader_init_ref_iterator(struct reftable_reader *r,
-				       struct reftable_iterator *it)
+int reftable_reader_init_ref_iterator(struct reftable_reader *r,
+				      struct reftable_iterator *it)
 {
-	reader_init_iter(r, it, BLOCK_TYPE_REF);
+	return reader_init_iter(r, it, BLOCK_TYPE_REF);
 }
 
-void reftable_reader_init_log_iterator(struct reftable_reader *r,
-				       struct reftable_iterator *it)
+int reftable_reader_init_log_iterator(struct reftable_reader *r,
+				      struct reftable_iterator *it)
 {
-	reader_init_iter(r, it, BLOCK_TYPE_LOG);
+	return reader_init_iter(r, it, BLOCK_TYPE_LOG);
 }
 
 int reftable_reader_new(struct reftable_reader **out,
@@ -689,7 +694,10 @@ static int reftable_reader_refs_for_indexed(struct reftable_reader *r,
 	struct indexed_table_ref_iter *itr = NULL;
 
 	/* Look through the reverse index. */
-	reader_init_iter(r, &oit, BLOCK_TYPE_OBJ);
+	err = reader_init_iter(r, &oit, BLOCK_TYPE_OBJ);
+	if (err < 0)
+		goto done;
+
 	err = iterator_seek(&oit, &want);
 	if (err != 0)
 		goto done;
diff --git a/reftable/reader.h b/reftable/reader.h
index 3710ee09b4..02d10c5d37 100644
--- a/reftable/reader.h
+++ b/reftable/reader.h
@@ -56,9 +56,9 @@ struct reftable_reader {
 
 const char *reader_name(struct reftable_reader *r);
 
-void reader_init_iter(struct reftable_reader *r,
-		      struct reftable_iterator *it,
-		      uint8_t typ);
+int reader_init_iter(struct reftable_reader *r,
+		     struct reftable_iterator *it,
+		     uint8_t typ);
 
 /* initialize a block reader to read from `r` */
 int reader_init_block_reader(struct reftable_reader *r, struct block_reader *br,
diff --git a/reftable/reftable-reader.h b/reftable/reftable-reader.h
index a600452b56..6a2d0b693f 100644
--- a/reftable/reftable-reader.h
+++ b/reftable/reftable-reader.h
@@ -46,12 +46,12 @@ void reftable_reader_incref(struct reftable_reader *reader);
 void reftable_reader_decref(struct reftable_reader *reader);
 
 /* Initialize a reftable iterator for reading refs. */
-void reftable_reader_init_ref_iterator(struct reftable_reader *r,
-				       struct reftable_iterator *it);
+int reftable_reader_init_ref_iterator(struct reftable_reader *r,
+				      struct reftable_iterator *it);
 
 /* Initialize a reftable iterator for reading logs. */
-void reftable_reader_init_log_iterator(struct reftable_reader *r,
-				       struct reftable_iterator *it);
+int reftable_reader_init_log_iterator(struct reftable_reader *r,
+				      struct reftable_iterator *it);
 
 /* returns the hash ID used in this table. */
 uint32_t reftable_reader_hash_id(struct reftable_reader *r);
diff --git a/t/unit-tests/t-reftable-readwrite.c b/t/unit-tests/t-reftable-readwrite.c
index e1b235a5f1..acca927a2c 100644
--- a/t/unit-tests/t-reftable-readwrite.c
+++ b/t/unit-tests/t-reftable-readwrite.c
@@ -206,7 +206,8 @@ static void t_log_write_read(void)
 	err = reftable_reader_new(&reader, &source, "file.log");
 	check(!err);
 
-	reftable_reader_init_ref_iterator(reader, &it);
+	err = reftable_reader_init_ref_iterator(reader, &it);
+	check(!err);
 
 	err = reftable_iterator_seek_ref(&it, names[N - 1]);
 	check(!err);
@@ -221,8 +222,8 @@ static void t_log_write_read(void)
 	reftable_iterator_destroy(&it);
 	reftable_ref_record_release(&ref);
 
-	reftable_reader_init_log_iterator(reader, &it);
-
+	err = reftable_reader_init_log_iterator(reader, &it);
+	check(!err);
 	err = reftable_iterator_seek_log(&it, "");
 	check(!err);
 
@@ -296,7 +297,8 @@ static void t_log_zlib_corruption(void)
 	err = reftable_reader_new(&reader, &source, "file.log");
 	check(!err);
 
-	reftable_reader_init_log_iterator(reader, &it);
+	err = reftable_reader_init_log_iterator(reader, &it);
+	check(!err);
 	err = reftable_iterator_seek_log(&it, "refname");
 	check_int(err, ==, REFTABLE_ZLIB_ERROR);
 
@@ -325,7 +327,8 @@ static void t_table_read_write_sequential(void)
 	err = reftable_reader_new(&reader, &source, "file.ref");
 	check(!err);
 
-	reftable_reader_init_ref_iterator(reader, &it);
+	err = reftable_reader_init_ref_iterator(reader, &it);
+	check(!err);
 	err = reftable_iterator_seek_ref(&it, "");
 	check(!err);
 
@@ -376,7 +379,8 @@ static void t_table_read_api(void)
 	err = reftable_reader_new(&reader, &source, "file.ref");
 	check(!err);
 
-	reftable_reader_init_ref_iterator(reader, &it);
+	err = reftable_reader_init_ref_iterator(reader, &it);
+	check(!err);
 	err = reftable_iterator_seek_ref(&it, names[0]);
 	check(!err);
 
@@ -419,7 +423,8 @@ static void t_table_read_write_seek(int index, int hash_id)
 	}
 
 	for (i = 1; i < N; i++) {
-		reftable_reader_init_ref_iterator(reader, &it);
+		err = reftable_reader_init_ref_iterator(reader, &it);
+		check(!err);
 		err = reftable_iterator_seek_ref(&it, names[i]);
 		check(!err);
 		err = reftable_iterator_next_ref(&it, &ref);
@@ -435,7 +440,8 @@ static void t_table_read_write_seek(int index, int hash_id)
 	strbuf_addstr(&pastLast, names[N - 1]);
 	strbuf_addstr(&pastLast, "/");
 
-	reftable_reader_init_ref_iterator(reader, &it);
+	err = reftable_reader_init_ref_iterator(reader, &it);
+	check(!err);
 	err = reftable_iterator_seek_ref(&it, pastLast.buf);
 	if (err == 0) {
 		struct reftable_ref_record ref = { 0 };
@@ -534,7 +540,8 @@ static void t_table_refs_for(int indexed)
 	if (!indexed)
 		reader->obj_offsets.is_present = 0;
 
-	reftable_reader_init_ref_iterator(reader, &it);
+	err = reftable_reader_init_ref_iterator(reader, &it);
+	check(!err);
 	err = reftable_iterator_seek_ref(&it, "");
 	check(!err);
 	reftable_iterator_destroy(&it);
@@ -593,7 +600,8 @@ static void t_write_empty_table(void)
 	err = reftable_reader_new(&rd, &source, "filename");
 	check(!err);
 
-	reftable_reader_init_ref_iterator(rd, &it);
+	err = reftable_reader_init_ref_iterator(rd, &it);
+	check(!err);
 	err = reftable_iterator_seek_ref(&it, "");
 	check(!err);
 
@@ -802,7 +810,8 @@ static void t_write_multiple_indices(void)
 	 * Seeking the log uses the log index now. In case there is any
 	 * confusion regarding indices we would notice here.
 	 */
-	reftable_reader_init_log_iterator(reader, &it);
+	err = reftable_reader_init_log_iterator(reader, &it);
+	check(!err);
 	err = reftable_iterator_seek_log(&it, "");
 	check(!err);
 
@@ -858,7 +867,8 @@ static void t_write_multi_level_index(void)
 	/*
 	 * Seeking the last ref should work as expected.
 	 */
-	reftable_reader_init_ref_iterator(reader, &it);
+	err = reftable_reader_init_ref_iterator(reader, &it);
+	check(!err);
 	err = reftable_iterator_seek_ref(&it, "refs/heads/199");
 	check(!err);
 
-- 
2.46.2.852.g229c0bf0e5.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 77 of 151 in “reftable: handle allocation errors”
  1. 00/22 reftable: handle allocation errorsPatrick Steinhardt, Sep 16, 2024
  2. 01/22 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Sep 16, 2024
  3. 02/22 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Sep 16, 2024
  4. 03/22 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Sep 16, 2024
  5. 04/22 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Sep 16, 2024
  6. Junio C HamanoSep 21, 2024
  7. Patrick SteinhardtSep 24, 2024
  8. Patrick SteinhardtSep 24, 2024
  9. Junio C HamanoSep 24, 2024
  10. 05/22 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Sep 16, 2024
  11. 06/22 reftable/record: handle allocation failures on copyPatrick Steinhardt, Sep 16, 2024
  12. 07/22 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Sep 16, 2024
  13. 08/22 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Sep 16, 2024
  14. 09/22 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Sep 16, 2024
  15. 10/22 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Sep 16, 2024
  16. 11/22 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Sep 16, 2024
  17. 12/22 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Sep 16, 2024
  18. 13/22 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Sep 16, 2024
  19. 14/22 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Sep 16, 2024
  20. 15/22 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Sep 16, 2024
  21. 16/22 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Sep 16, 2024
  22. 17/22 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Sep 16, 2024
  23. Junio C HamanoSep 22, 2024
  24. Patrick SteinhardtSep 24, 2024
  25. 18/22 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Sep 16, 2024
  26. 19/22 reftable/block: handle allocation failuresPatrick Steinhardt, Sep 16, 2024
  27. 20/22 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Sep 16, 2024
  28. 21/22 reftable/tree: handle allocation failuresPatrick Steinhardt, Sep 16, 2024
  29. 22/22 reftable: handle trivial allocation failuresPatrick Steinhardt, Sep 16, 2024
  30. 00/22 reftable: handle allocation errorsPatrick Steinhardt, Sep 24, 2024
  31. 01/22 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Sep 24, 2024
  32. 02/22 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Sep 24, 2024
  33. 03/22 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Sep 24, 2024
  34. 04/22 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Sep 24, 2024
  35. Junio C HamanoSep 24, 2024
  36. Patrick SteinhardtSep 26, 2024
  37. Junio C HamanoSep 26, 2024
  38. Patrick SteinhardtSep 27, 2024
  39. Han-Wen NienhuysSep 27, 2024
  40. Junio C HamanoSep 27, 2024
  41. 05/22 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Sep 24, 2024
  42. René ScharfeSep 24, 2024
  43. Patrick SteinhardtSep 26, 2024
  44. 06/22 reftable/record: handle allocation failures on copyPatrick Steinhardt, Sep 24, 2024
  45. 07/22 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Sep 24, 2024
  46. 08/22 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Sep 24, 2024
  47. 09/22 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Sep 24, 2024
  48. 10/22 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Sep 24, 2024
  49. 11/22 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Sep 24, 2024
  50. 12/22 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Sep 24, 2024
  51. 13/22 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Sep 24, 2024
  52. 14/22 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Sep 24, 2024
  53. 15/22 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Sep 24, 2024
  54. 16/22 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Sep 24, 2024
  55. 17/22 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Sep 24, 2024
  56. 18/22 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Sep 24, 2024
  57. 19/22 reftable/block: handle allocation failuresPatrick Steinhardt, Sep 24, 2024
  58. 20/22 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Sep 24, 2024
  59. 21/22 reftable/tree: handle allocation failuresPatrick Steinhardt, Sep 24, 2024
  60. 22/22 reftable: handle trivial allocation failuresPatrick Steinhardt, Sep 24, 2024
  61. 00/22 refatble: handle allocation errorsPatrick Steinhardt, Sep 30, 2024
  62. 01/22 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Sep 30, 2024
  63. 02/22 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Sep 30, 2024
  64. 03/22 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Sep 30, 2024
  65. 04/22 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Sep 30, 2024
  66. 05/22 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Sep 30, 2024
  67. René ScharfeSep 30, 2024
  68. 06/22 reftable/record: handle allocation failures on copyPatrick Steinhardt, Sep 30, 2024
  69. 07/22 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Sep 30, 2024
  70. 08/22 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Sep 30, 2024
  71. 09/22 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Sep 30, 2024
  72. René ScharfeSep 30, 2024
  73. Patrick SteinhardtSep 30, 2024
  74. Junio C HamanoSep 30, 2024
  75. 10/22 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Sep 30, 2024
  76. 11/22 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Sep 30, 2024
  77. 12/22 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Sep 30, 2024
  78. 13/22 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Sep 30, 2024
  79. 14/22 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Sep 30, 2024
  80. 15/22 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Sep 30, 2024
  81. 16/22 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Sep 30, 2024
  82. 17/22 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Sep 30, 2024
  83. 18/22 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Sep 30, 2024
  84. 19/22 reftable/block: handle allocation failuresPatrick Steinhardt, Sep 30, 2024
  85. 20/22 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Sep 30, 2024
  86. 21/22 reftable/tree: handle allocation failuresPatrick Steinhardt, Sep 30, 2024
  87. 22/22 reftable: handle trivial allocation failuresPatrick Steinhardt, Sep 30, 2024
  88. Junio C HamanoSep 30, 2024
  89. 00/25 reftable: handle allocation errorsPatrick Steinhardt, Oct 1, 2024
  90. 01/25 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Oct 1, 2024
  91. 02/25 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Oct 1, 2024
  92. 03/25 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Oct 1, 2024
  93. 04/25 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Oct 1, 2024
  94. 05/25 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Oct 1, 2024
  95. 06/25 reftable/record: handle allocation failures on copyPatrick Steinhardt, Oct 1, 2024
  96. 07/25 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Oct 1, 2024
  97. 08/25 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Oct 1, 2024
  98. 09/25 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Oct 1, 2024
  99. 10/25 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Oct 1, 2024
  100. 11/25 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Oct 1, 2024
  101. 12/25 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Oct 1, 2024
  102. 13/25 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Oct 1, 2024
  103. 14/25 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Oct 1, 2024
  104. 15/25 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Oct 1, 2024
  105. 16/25 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Oct 1, 2024
  106. 17/25 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Oct 1, 2024
  107. 18/25 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Oct 1, 2024
  108. 19/25 reftable/block: handle allocation failuresPatrick Steinhardt, Oct 1, 2024
  109. 20/25 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Oct 1, 2024
  110. 21/25 reftable/tree: handle allocation failuresPatrick Steinhardt, Oct 1, 2024
  111. 22/25 reftable: handle trivial allocation failuresPatrick Steinhardt, Oct 1, 2024
  112. 23/25 reftable: fix calls to free(3P)Patrick Steinhardt, Oct 1, 2024
  113. 24/25 reftable: introduce `REFTABLE_FREE_AND_NULL()`Patrick Steinhardt, Oct 1, 2024
  114. 25/25 reftable/basics: ban standard allocator functionsPatrick Steinhardt, Oct 1, 2024
  115. Junio C HamanoOct 1, 2024
  116. Patrick SteinhardtOct 2, 2024
  117. Junio C HamanoOct 1, 2024
  118. René ScharfeOct 1, 2024
  119. Junio C HamanoOct 1, 2024
  120. Patrick SteinhardtOct 2, 2024
  121. Junio C HamanoOct 2, 2024
  122. 00/25 reftable: handle allocation errorsPatrick Steinhardt, Oct 2, 2024
  123. 01/25 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Oct 2, 2024
  124. 02/25 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Oct 2, 2024
  125. 03/25 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Oct 2, 2024
  126. 04/25 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Oct 2, 2024
  127. 05/25 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Oct 2, 2024
  128. Eric SunshineOct 2, 2024
  129. Patrick SteinhardtOct 4, 2024
  130. Eric SunshineOct 4, 2024
  131. 06/25 reftable/record: handle allocation failures on copyPatrick Steinhardt, Oct 2, 2024
  132. 07/25 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Oct 2, 2024
  133. 08/25 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Oct 2, 2024
  134. 09/25 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Oct 2, 2024
  135. 10/25 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Oct 2, 2024
  136. 11/25 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Oct 2, 2024
  137. 12/25 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Oct 2, 2024
  138. 13/25 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Oct 2, 2024
  139. 14/25 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Oct 2, 2024
  140. 15/25 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Oct 2, 2024
  141. 16/25 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Oct 2, 2024
  142. 17/25 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Oct 2, 2024
  143. 18/25 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Oct 2, 2024
  144. 19/25 reftable/block: handle allocation failuresPatrick Steinhardt, Oct 2, 2024
  145. 20/25 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Oct 2, 2024
  146. 21/25 reftable/tree: handle allocation failuresPatrick Steinhardt, Oct 2, 2024
  147. 22/25 reftable: handle trivial allocation failuresPatrick Steinhardt, Oct 2, 2024
  148. 23/25 reftable: fix calls to free(3P)Patrick Steinhardt, Oct 2, 2024
  149. 24/25 reftable: introduce `REFTABLE_FREE_AND_NULL()`Patrick Steinhardt, Oct 2, 2024
  150. 25/25 reftable/basics: ban standard allocator functionsPatrick Steinhardt, Oct 2, 2024
  151. Junio C HamanoOct 2, 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.