mORMot2 DailyDaily read of upstream commits

Log inspection preserves MAB files and gains cross-platform caller tracing

This edition hardens the tools around TSynLog rather than changing backend protocols. Log readers no longer crash on empty profiler data or plain-text selections, and TDebugFile no longer deletes an unreadable external .mab file. FreeBSD, FPC and Android builds receive socket and POSIX compatibility repairs, while caller-symbol discovery now works through TDebugFile on every supported compiler.

TL;DR

  • Land on build 2.4.17019 at fc996116ae8a2534c5e763ac180649cdb78013ab.
  • TDebugFile.Create no longer deletes an unreadable external .mab file supplied as aExeName.
  • TSynLogFile and TSynLogFileView now handle logs without sllEnter data, plain-text clipboard rows and an empty level filter safely.
  • FreeBSD UNIX-domain socket sizing and follow-up FPC, BSD and Android compilation fixes are complete in the final build.
  • TDebugFile.AppendCallerShort is new, and TSynLog.Enter or Log calls without text now resolve caller information on FPC as well as Delphi.
  • The Lazarus package now retains mormot.crypt.pkcs11 when it regenerates mormot2.pas.

Upgrade advice

Land on build 2.4.17019. Upgrade sooner if LogView opens external .mab files, if log files may lack sllEnter events, or if FreeBSD, FPC BSD or Android is a supported target. Rebuild every platform package, test plain-text clipboard and empty-filter behavior, and verify whether automatic caller symbols change log volume or hot-path cost. The raw payload has no superseded_by markers, so no avoid window is asserted.

Build2.4.17002 → 2.4.17019
Commits13
Lines+796 -383
Read3 min

8 of 8 entries · 13 commits upstream

Stories
# Entry Category Units
1 High Empty and plain-text logs no longer break the viewer TSynLogFile.SetLogProcMerged now skips profiler-array access when no sllEnter event exists. TSynLogFileView.GetLineForClipboard returns a raw line when fLevels is nil, and Select clears fSelectedCount before handling an empty event filter. TTestCoreBase.Debugging adds regression coverage. Fixes mormot.core.log a01ae51e+56-8

core: fixed TSynLogFile/TSynLogFileView edge cases found by the LogView tool

Impact

LogView and custom analyzers avoid out-of-range or nil dereferences on logs without method profiling, can copy plain-text rows, and correctly display no rows after every level is unchecked.

Public API

  • TSynLogFile.SetLogProcMergedbehaviour-changed — Enabling merged profiling on a log without sllEnter now leaves an empty profiler instead of dereferencing empty arrays.
  • TSynLogFileView.GetLineForClipboardbehaviour-changed — Plain-text files now return the raw selected line and out-of-range rows return an empty string.

Sven Harazim · 05:49 UTC · view the commit on GitHub →

2 High Unreadable external MAB files are no longer deleted TDebugFile.Create still attempts LoadMab when the cache timestamp matches, but it no longer calls DeleteFile when loading yields no blocks or symbols. Fixes mormot.core.log 4ca916cb+1-3

core: TDebugFile.Create() won't delete an unreadable .mab file

Impact

Passing a user-selected .mab as aExeName, as LogView does, can no longer destroy that file merely because it is unreadable, malformed or incompatible. Failed cache loads still fall back to .map or .dbg parsing.

Public API

  • TDebugFile.Createbehaviour-changed — An unreadable MAB is preserved instead of being deleted before fallback symbol loading.

Sven Harazim · 09:29 UTC · view the commit on GitHub →

3 High BSD, FPC and Android compile paths converge after the platform merge The follow-up uses CPUAARCH64 for CPU_ARCH_TEXT, makes PosixStatFS accept pointer on both compilers, selects Android st_ino fields by DELPHIPOSIX, repairs conditional socket syntax and an FPC shift cast, and loads getifaddrs through LibraryOpen and LibraryResolve. Compiler & platform mormot.core.os+4 e68dce4a+17-20

all: some fixes after #598

Impact

The merged Delphi Android work and the FreeBSD socket-size change compile correctly across Delphi and FPC POSIX targets. Android file identifiers use the RTL-specific field, and FPC no longer depends on direct dlopen declarations here.

Public API

  • PosixStatFSsignature-changed — The Info parameter is now pointer on FPC as well as Delphi instead of PStatfs on FPC.

Arnaud Bouchez · 12:16 UTC · PR #598 · view the commit on GitHub →

4 Medium The Lazarus package keeps PKCS #11 support packages/lazarus/mormot2.lpk adds mormot.crypt.pkcs11 as item 114 and shifts the remaining package items, increasing the declared file count from 123 to 124. Fixes mormot.crypt.pkcs11 7b98b09a+24-20

packages: added mormot.crypt.pkcs11 to the Lazarus package

Impact

Opening or rebuilding the Lazarus package no longer regenerates mormot2.pas without mormot.crypt.pkcs11. Direct unit users and Delphi projects are unaffected.

Worth a look

Rebuild the Lazarus package and confirm mormot.crypt.pkcs11 remains in the generated umbrella unit.

Sven Harazim · 09:31 UTC · view the commit on GitHub →

5 Medium UNIX socket addresses use the native FreeBSD size TSockAddrUnix uses a 104-byte sun_path on platforms with sun_len and 108 bytes elsewhere. SOCKADDR_SIZE follows that layout, while TNetAddr.Size and SetFamily handle AF_UNIX explicitly. Fixes mormot.net.sock+1 b6262622+22-9

net: fixed TSockAddrUnix size for FreeBSD

Impact

FreeBSD and other sun_len targets no longer pass an oversized sockaddr_un buffer or report the generic storage size for AF_UNIX. Linux and Windows layouts are unchanged.

Public API

  • SOCKADDR_SIZEbehaviour-changed — The public constant is 106 rather than 110 on platforms whose socket records include sun_len.

Arnaud Bouchez · 07:50 UTC · view the commit on GitHub →

6 Medium Caller symbols can be appended without heap allocation TDebugFile.AppendCallerShort captures up to 62 raw frames, removes duplicates and appends resolved locations into a ShortString. RawStackTrace is shared with StackTrace, and guards intercepted exceptions while probing frames on Delphi and FPC. New features mormot.core.log 19b48603+186-111

core: new TDebugFile.AppendCallerShort method

Impact

Logging and diagnostic code can obtain compact caller locations on FPC as well as Delphi without constructing a RawUtf8 result. Symbol quality still depends on available .map, .gdb or .mab data.

Public API

  • TDebugFile.AppendCallerShortadded — This new class procedure appends aSkip/aDepth resolved stack locations into a caller-provided ShortString.

Arnaud Bouchez · 13:23 UTC · view the commit on GitHub →

7 Medium No-text TSynLog entries identify their caller on every target TSynLog.Enter with a nil aMethodName and TSynLog.Log(Level) call TDebugFile.AppendCallerShort before taking the writer lock. LogEnter accepts a precomputed PShortString location, and the previous Delphi-only address capture is removed. New features mormot.core.log fc996116+74-145

core: TSynLog.Enter/Log with no text nor method name will use caller info

Impact

FPC logs can now include the same caller symbol context as Delphi when debug data is available. Calls that intentionally omit text perform a stack capture and may emit more text, so hot logging paths should be measured.

Worth a look

Review no-text Enter and Log calls, confirm the new caller text is wanted, and benchmark high-frequency paths with production debug artifacts.

Public API

  • TSynLog.Enterbehaviour-changed — A nil aMethodName now triggers TDebugFile caller resolution on FPC as well as Delphi.
  • TSynLog.Logbehaviour-changed — The overload taking only a level now appends the resolved caller location when available.

Arnaud Bouchez · 13:24 UTC · view the commit on GitHub →

8 Low POSIX host records match the native C field type The internal hostent.h_length declaration changes from TSockLen to cint, matching the C ABI. A sockaddr_dl comment is clarified without changing its layout. Compiler & platform mormot.net.sock.posix de2e5034+4-4

net: minor cleanup after latest PR

Impact

POSIX name-resolution bindings use the native integer type on FPC and Delphi. Application APIs and Windows behavior do not change.

Arnaud Bouchez · 08:02 UTC · view the commit on GitHub →

Upstream activity commits per day · last 60 days
Commits977
Active days44/60
Busiest2026-09-30
Peak60
2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 26 commits2026-08-28: 11 commits2026-08-29: 10 commits2026-08-30: 1 commit2026-08-31: 23 commits2026-09-01: 0 commits2026-09-02: 20 commits2026-09-03: 29 commits2026-09-04: 35 commits2026-09-05: 13 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 23 commits2026-09-09: 10 commits2026-09-10: 17 commits2026-09-11: 23 commits2026-09-12: 14 commits2026-09-13: 9 commits2026-09-14: 7 commits2026-09-15: 4 commits2026-09-16: 24 commits2026-09-17: 26 commits2026-09-18: 21 commits2026-09-19: 59 commits2026-09-20: 13 commits2026-09-21: 5 commits2026-09-22: 34 commits2026-09-23: 17 commits2026-09-24: 57 commits2026-09-25: 22 commits2026-09-26: 26 commits2026-09-27: 0 commits2026-09-28: 2 commits2026-09-29: 19 commits2026-09-30: 60 commits2026-10-01: 26 commits2026-10-02: 30 commits2026-10-03: 32 commits2026-10-04: 15 commits2026-10-05: 1 commit2026-10-06: 26 commits2026-10-07: 37 commits2026-10-08: 27 commits2026-10-09: 35 commits2026-10-10: 33 commits2026-10-11: 9 commits2026-10-12: 11 commits2026-10-13: 35 commits
2026-08-152026-10-13