Worth a looka fix or feature you may wantThe raw payload contains five merge commits and eight non-merge commits; every non-merge commit is covered below. It contains no superseded_by marker and no deprecation notice. Version-only files are ignored.
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.
8 of 8 entries · 13 commits upstream
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.
Upgrade recommended
Upgrade log-analysis tools and test plain-text files, logs without sllEnter and clearing every level filter.
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.
Units
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.
Upgrade recommended
Upgrade every tool that opens user-supplied MAB files, and test malformed and read-only inputs before allowing file selection.
Public API
TDebugFile.Createbehaviour-changed — An unreadable MAB is preserved instead of being deleted before fallback symbol loading.
Units
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.
Upgrade recommended
Use build 2.4.17019 for Delphi Android, FPC BSD or AArch64 builds and rerun the full compile matrix rather than cherry-picking the earlier platform commits.
Public API
PosixStatFSsignature-changed — The Info parameter is now pointer on FPC as well as Delphi instead of PStatfs on FPC.
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.
Units
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.
Upgrade recommended
Use build 2.4.17019 for FreeBSD or BSD UNIX-domain sockets and rerun bind/connect tests with maximum path lengths.
Public API
SOCKADDR_SIZEbehaviour-changed — The public constant is 106 rather than 110 on platforms whose socket records include sun_len.
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.
Units
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.
Units
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.