From f9d01f4722ac7ad91dbb796dc9a512562ab6acd0 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Tue, 16 Mar 2021 16:49:20 +0000 Subject: [PATCH 01/10] Return to engineering --- libraries/liblmdb/CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES index 2b81d4afbb..a12701bd75 100644 --- a/libraries/liblmdb/CHANGES +++ b/libraries/liblmdb/CHANGES @@ -1,5 +1,7 @@ LMDB 0.9 Change Log +LMDB 0.9.30 Engineering + LMDB 0.9.29 Release (2021/03/16) ITS#9461 refix ITS#9376 ITS#9500 fix regression from ITS#8662 From c4085fdfe67a234a67d6c9dfe4e9152b214dcd93 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 25 Oct 2021 17:17:42 +0100 Subject: [PATCH 02/10] ITS#9723 clear C_EOF on cursor with MDB_FIRST_DUP --- libraries/liblmdb/mdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 8cecdb2e69..3847ec62ba 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -6477,6 +6477,7 @@ fetchm: rc = MDB_NOTFOUND; break; } + mc->mc_flags &= ~C_EOF; { MDB_node *leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]); if (!F_ISSET(leaf->mn_flags, F_DUPDATA)) { From f5138f290fd1397bf33ea3a99fc321c778b26eb0 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Tue, 26 Oct 2021 16:34:16 +0000 Subject: [PATCH 03/10] ITS#9723 --- libraries/liblmdb/CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES index a12701bd75..4f7b931f7a 100644 --- a/libraries/liblmdb/CHANGES +++ b/libraries/liblmdb/CHANGES @@ -1,6 +1,7 @@ LMDB 0.9 Change Log LMDB 0.9.30 Engineering + ITS#9723 clear C_EOF on cursor with MDB_FIRST_DUP LMDB 0.9.29 Release (2021/03/16) ITS#9461 refix ITS#9376 From e2028b0d0158223dd8f56c14497e13cff41ddb54 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 9 Jun 2022 22:58:06 +0100 Subject: [PATCH 04/10] Fix spurious fallthru warning --- libraries/liblmdb/mdb_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb_dump.c b/libraries/liblmdb/mdb_dump.c index 671ec574d0..7ea72e8a9a 100644 --- a/libraries/liblmdb/mdb_dump.c +++ b/libraries/liblmdb/mdb_dump.c @@ -192,7 +192,7 @@ int main(int argc, char *argv[]) break; case 'l': list = 1; - /*FALLTHROUGH*/; + /*FALLTHROUGH*/ case 'a': if (subname) usage(prog); From 8a7645033683844c71f9f0068c85f69d453afdd2 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 13 Apr 2019 23:37:03 +0000 Subject: [PATCH 05/10] lmdb: catch non-LMDB negative errors before strerror That should hopefully shut coverity up --- libraries/liblmdb/mdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 3847ec62ba..527a47b8f1 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1517,6 +1517,8 @@ mdb_strerror(int err) NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE); return ptr; #else + if (err < 0) + return "Invalid error code"; return strerror(err); #endif } From 4bb20ed0823877289246eb220bf2e207affcc0db Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 6 Jun 2019 09:06:06 +0900 Subject: [PATCH 06/10] ITS#9030 - Use sys/cachectl.h rather than asm/cachectl.h on mips It also contains the cacheflush function declaration. --- libraries/liblmdb/mdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 527a47b8f1..f96dc5af95 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -77,8 +77,7 @@ #if defined(__mips) && defined(__linux) /* MIPS has cache coherency issues, requires explicit cache control */ -#include -extern int cacheflush(char *addr, int nbytes, int cache); +#include #define CACHEFLUSH(addr, bytes, cache) cacheflush(addr, bytes, cache) #else #define CACHEFLUSH(addr, bytes, cache) From b181666eec38a526da9bb913aa677649f1ec04d7 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Mon, 26 Sep 2022 16:52:55 +0000 Subject: [PATCH 07/10] ITS#9030 --- libraries/liblmdb/CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES index 4f7b931f7a..262b345597 100644 --- a/libraries/liblmdb/CHANGES +++ b/libraries/liblmdb/CHANGES @@ -2,6 +2,7 @@ LMDB 0.9 Change Log LMDB 0.9.30 Engineering ITS#9723 clear C_EOF on cursor with MDB_FIRST_DUP + ITS#9030 - Use sys/cachectl.h rather than asm/cachectl.h on mips LMDB 0.9.29 Release (2021/03/16) ITS#9461 refix ITS#9376 From abe36745d2fe40b1926fc57ed1e918334c4c247b Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 4 Feb 2022 08:48:06 +0900 Subject: [PATCH 08/10] ITS#9919 - Mark infrequently used functions as cold rather than manually putting them in a separate section --- libraries/liblmdb/mdb.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index f96dc5af95..b64e3a60d6 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -199,15 +199,21 @@ typedef SSIZE_T ssize_t; # error "Two's complement, reasonably sized integer types, please" #endif -#ifdef __GNUC__ -/** Put infrequently used env functions in separate section */ -# ifdef __APPLE__ -# define ESECT __attribute__ ((section("__TEXT,text_env"))) -# else -# define ESECT __attribute__ ((section("text_env"))) -# endif +#if (((__clang_major__ << 8) | __clang_minor__) >= 0x0302) || (((__GNUC__ << 8) | __GNUC_MINOR__) >= 0x0403) +/** Mark infrequently used env functions as cold. This puts them in a separate + * section, and optimizes them for size */ +#define ESECT __attribute__ ((cold)) #else -#define ESECT +/* On older compilers, use a separate section */ +# ifdef __GNUC__ +# ifdef __APPLE__ +# define ESECT __attribute__ ((section("__TEXT,text_env"))) +# else +# define ESECT __attribute__ ((section("text_env"))) +# endif +# else +# define ESECT +# endif #endif #ifdef _WIN32 From ca7128ad35188beaacfb34882218ca33e32dc09c Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Mon, 3 Oct 2022 16:40:10 +0000 Subject: [PATCH 09/10] ITS#9919 --- libraries/liblmdb/CHANGES | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES index 262b345597..44cbdfc8a8 100644 --- a/libraries/liblmdb/CHANGES +++ b/libraries/liblmdb/CHANGES @@ -1,7 +1,8 @@ LMDB 0.9 Change Log LMDB 0.9.30 Engineering - ITS#9723 clear C_EOF on cursor with MDB_FIRST_DUP + ITS#9919 - Mark infrequently used functions as cold + ITS#9723 - clear C_EOF on cursor with MDB_FIRST_DUP ITS#9030 - Use sys/cachectl.h rather than asm/cachectl.h on mips LMDB 0.9.29 Release (2021/03/16) From d87d682b6db9c04c1bee34e5cadbbcae4e6d9a67 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Tue, 4 Oct 2022 14:23:03 +0000 Subject: [PATCH 10/10] Prepare for release (0.9.30) --- libraries/liblmdb/CHANGES | 2 +- libraries/liblmdb/lmdb.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/liblmdb/CHANGES b/libraries/liblmdb/CHANGES index 44cbdfc8a8..68c1637279 100644 --- a/libraries/liblmdb/CHANGES +++ b/libraries/liblmdb/CHANGES @@ -1,6 +1,6 @@ LMDB 0.9 Change Log -LMDB 0.9.30 Engineering +LMDB 0.9.30 Release (2022/10/19) ITS#9919 - Mark infrequently used functions as cold ITS#9723 - clear C_EOF on cursor with MDB_FIRST_DUP ITS#9030 - Use sys/cachectl.h rather than asm/cachectl.h on mips diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index 69aa2751a2..30491cd04f 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -200,7 +200,7 @@ typedef int mdb_filehandle_t; /** Library minor version */ #define MDB_VERSION_MINOR 9 /** Library patch version */ -#define MDB_VERSION_PATCH 29 +#define MDB_VERSION_PATCH 30 /** Combine args a,b,c into a single integer for easy version comparisons */ #define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c)) @@ -210,7 +210,7 @@ typedef int mdb_filehandle_t; MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH) /** The release date of this library version */ -#define MDB_VERSION_DATE "March 16, 2021" +#define MDB_VERSION_DATE "October 19, 2021" /** A stringifier for the version info */ #define MDB_VERSTR(a,b,c,d) "LMDB " #a "." #b "." #c ": (" d ")"