File: make-lmdb-allocation-smaller-in-mipsel.patch

package info (click to toggle)
neomutt 20250510%2Bdfsg-2~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 23,392 kB
  • sloc: ansic: 171,734; sh: 5,357; perl: 1,121; tcl: 1,065; python: 443; makefile: 48
file content (36 lines) | stat: -rw-r--r-- 1,373 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Sergio Durigan Junior <sergiodj@debian.org>
Date: Sat, 10 May 2025 19:48:44 -0300
Subject: make lmdb allocation smaller in mipsel

We were seeing build failures on mipsel in bookworm-backports after the tests
were activated. After a debugging session, we pin-pointed the failures to the
lmdb DB allocation failing. Decreasing the memory allocation solved the
problem. Since we are talking about a 32-bit exotic architecture for today
standards, it seems fine to decrease the DB size in general and not only for
the tests.

Forwarded: not-needed
Last-Update: 2025-05-10
---
 store/lmdb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/store/lmdb.c b/store/lmdb.c
index fccff8b..8726221 100644
--- a/store/lmdb.c
+++ b/store/lmdb.c
@@ -41,8 +41,14 @@
 /** The maximum size of the database file (2GiB).
  * The file is mmap(2)'d into memory. */
 #if (UINTPTR_MAX == 0xffffffff)
+#ifdef __MIPSEL__
+/// mipsel buildd is failing to alloc this size for tests, so let's make it smaller
+/// Maximum LMDB database size: 32-bit, limit to 256MiB
+static const size_t LMDB_DB_SIZE = 2147483648 / 8;
+#else
 /// Maximum LMDB database size: 32-bit, limit to 2GiB
 static const size_t LMDB_DB_SIZE = 2147483648;
+#endif
 #elif (UINTPTR_MAX == 0xffffffffffffffff)
 /// Maximum LMDB database size: 64 bit, limit to 100GiB
 static const size_t LMDB_DB_SIZE = 107374182400;