Skip to content

libmdbx: bump v0.14.3 -> v0.14.4 - #259

Merged
AskAlexSharov merged 1 commit into
masterfrom
libmdbx-0.14.4
Sep 24, 2026
Merged

AskAlexSharov merged 1 commit into
masterfrom
libmdbx-0.14.4

Conversation

@AskAlexSharov

Copy link
Copy Markdown
Collaborator

Re-vendors the amalgamation via make cp LIBMDBX_REF=v0.14.4. Upstream "Skynet Eve" is a bugfix release of the stable branch; the public C API is unchanged (the mdbx.h diff is documentation only), so the bindings need no adaptation.

Notable upstream changes:

  • Windows: stricter checks for network, shared and layered volumes, to prevent database corruption and data loss. Placing a database on such a volume can now fail with MDBX_EREMOTE (ERROR_REMOTE_STORAGE_MEDIA_ERROR) — upstream lists this as a backward-compatibility break.
  • Fixed a missing sub-page header check in page_check(), which could SIGSEGV while checking a corrupted database.
  • Fixed a regression returning MDBX_BAD_TXN instead of MDBX_OUSTED.
  • Fixed division truncation in default_rp_augment_limit(), which yielded a too low and "stepwise" default MDBX_opt_rp_augment_limit.
  • Refined mdbx_get_sysraminfo(): sysinfo() + MemAvailable on Linux, host_statistics64() on macOS.

One local fix on top of v0.14.4

The new macOS path passes HOST_VM_INFO_COUNT (15) to host_statistics64(HOST_VM_INFO64, ...), which wants HOST_VM_INFO64_COUNT (104) and returns KERN_FAILURE otherwise. So on a straight v0.14.4 mdbx_get_sysraminfo() fails with MDBX_ENOSYS on every macOS build — TestGetSysRamInfo fails, and libmdbx's own default_dp_limit() falls back to its worst-case estimate. One-token fix, marked mdbx-go local fix in libmdbx/mdbx.c; drop it once upstream takes it.

Re-vendor gotcha, now in the README

mdbx pulls in libmdbx/mdbx.c through a cgo #include across package directories, which the Go build cache does not track — after a re-vendor a plain go test happily re-runs the old C. Rebuild with go build -a. (Verified: with the macOS fix reverted, go test -count=1 ./mdbx still passed.)

go test and go test -race pass on darwin/arm64; make tools builds.

Re-vendors the amalgamation via `make cp LIBMDBX_REF=v0.14.4`. Upstream
"Skynet Eve" is a bugfix release of the stable branch; the public C API is
unchanged (mdbx.h diff is documentation only), so the bindings need no
adaptation. Notable upstream changes:

- Windows: stricter checks for network, shared and layered volumes, to prevent
  database corruption and data loss. Placing a database on such a volume can
  now fail with MDBX_EREMOTE (ERROR_REMOTE_STORAGE_MEDIA_ERROR).
- Fixed a missing sub-page header check in page_check(), which could SIGSEGV
  while checking a corrupted database.
- Fixed a regression returning MDBX_BAD_TXN instead of MDBX_OUSTED.
- Fixed division truncation in default_rp_augment_limit(), which yielded a too
  low and "stepwise" default MDBX_opt_rp_augment_limit.
- Refined mdbx_get_sysraminfo(): sysinfo()/MemAvailable on Linux,
  host_statistics64() on macOS.

Carries one local fix on top of v0.14.4: the new macOS path passes
HOST_VM_INFO_COUNT (15) to host_statistics64(HOST_VM_INFO64), which wants
HOST_VM_INFO64_COUNT (104) and fails with KERN_FAILURE otherwise, so
mdbx_get_sysraminfo() returned MDBX_ENOSYS on every macOS build -- failing
TestGetSysRamInfo and degrading libmdbx's own default dirty-page limit. The
deviation is marked "mdbx-go local fix" in libmdbx/mdbx.c and is reported
upstream; drop it once upstream takes it.

Also notes in the README that a re-vendor wipes such local fixes, and that
rebuilding after one needs `go build -a`: the mdbx package pulls libmdbx/mdbx.c
in through a cgo #include across package directories, which the Go build cache
does not track, so a plain `go test` happily re-runs the old C.

`go test` and `go test -race` pass on darwin/arm64.
@AskAlexSharov
AskAlexSharov merged commit 3310def into master Sep 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants