Act nowcan affect a running systemThe raw payload contains four merge commits and 22 non-merge commits; every non-merge commit is covered below. It has no superseded_by markers and no deprecation notice. The three avoid windows come from explicit corrections or completion commits later in the same embedded build sequence.
Log startup deadlock fixed as TLS 1.3 and POSIX paths settle
A failed log-file creation could recursively log through an uninitialized writer and leave SynLogGlobalLock held, blocking every later logging thread. This edition also completes TLS 1.3 cipher-suite configuration, fixes Currency returns through interface dispatch on FPC POSIX, and removes a systemd /dev/null busy loop. POSIX callers that directly use WaitReadPending must adapt to its new integer result, and low-level x86-64 numeric-parser callers should review renamed SSSE3 entry points.
TL;DR
- Land on build 2.4.16922 at cdb7dad52a6989d41ce8405a15d26928e0829ca2; it includes the final logging and Linux shutdown fixes.
- TSynLog no longer deadlocks all logging threads when log-file creation fails while exception logging is enabled.
- OpenSSL backends now configure TLS 1.3 through TNetTlsContext.CipherSuites and SSL_CTX_set_ciphersuites.
- FPC POSIX interface dispatch now returns Currency through the x87 FP0 path instead of treating it as a binary64 result.
- WaitReadPending now returns -1, 0 or 1 on POSIX; direct callers must replace boolean use with an explicit comparison.
- Reused THttpRequestContext instances now clear AcceptEncoding, preventing compression preferences from leaking into the next request.
Upgrade advice
Take build 2.4.16922 at the current head. Skip build 2.4.16907 because its allocator-width correction lacks the nil guard added in 16908; skip 2.4.16913 because zoned log parsing is corrected in 16914; and do not stop on 2.4.16915 because the TLS 1.3 binding is only wired into TOpenSslNetTls in 16916. Rebuild each Delphi/FPC target and test failed log creation, interface-returned Currency, TLS 1.3 negotiation, systemd shutdown and reused HTTP request contexts.
22 of 22 entries · 26 commits upstream
1
Critical
Failed log-file creation no longer freezes every logging thread
TSynLog.LogFileInit saves the current thread-info flags, sets tiExceptionIgnore while fWriter is not ready, and restores the flags in its finally block. This prevents CreateLogWriter failures from recursively logging into the same instance before SynLogGlobalLock can be released.
Fixes
mormot.core.log
0165307d+39-0
core: fixed TSynLog deadlock when the log file can't be created
Impact
With ptIdentifiedInOneFile and exception logging enabled, an unwritable or missing log path no longer triggers an access violation before the unlock and block all other threads at their first log call.
Upgrade recommended
Upgrade logging deployments to build 2.4.16922 and test startup with an intentionally unwritable log directory while multiple threads emit their first messages.
Units
2
High
Numeric parsers move behind selectable Pascal and SSSE3 entry points
GetExtended now dispatches through GetExtendedStub, selecting GetExtendedSsse3 on capable ASMX64NOTPIC targets, while GetNumericVariantFromJson dispatches through GetNumericVariantStub and defaults to GetNumericVariantPas. The former low-level mormot.core.base assembly symbols are renamed with Ssse3 suffixes.
Breaking changes
mormot.core.base+3
acc10bf5+62-21
core: define GetExtended/GetNumericVariantFromJson as stubs
Impact
Normal callers of mormot.core.text.GetExtended and mormot.core.variants.GetNumericVariantFromJson keep the same signatures. Code that directly names the conditional assembly declarations in mormot.core.base will no longer compile until it uses the new Ssse3 symbols or the public wrappers.
Migration required
Search for qualified mormot.core.base.GetExtended and mormot.core.base.GetNumericVariantFromJson calls; use the wrappers in mormot.core.text and mormot.core.variants, or the new Ssse3 names when direct SIMD control is intentional.
Public API
mormot.core.base.GetExtendedrenamed — The conditional x86-64 assembly entry point is now GetExtendedSsse3; the usual mormot.core.text.GetExtended wrapper remains.mormot.core.base.GetNumericVariantFromJsonrenamed — The conditional x86-64 assembly entry point is now GetNumericVariantSsse3; the mormot.core.variants wrapper remains.TGetExtended / GetExtendedStubadded — Public function type and dispatch variable for selecting GetExtendedPas or GetExtendedSsse3.TGetNumericVariantFromJson / GetNumericVariantStubadded — Public function type and dispatch variable, defaulting to GetNumericVariantPas.
3
High
systemd stdin no longer drives ConsoleWaitForEnterKey to full CPU
POSIX WaitReadPending changes from boolean to integer and maps poll results to 1 for readable input, 0 for timeout and -1 for HUP, ERR or NVAL. ConsoleWaitForEnterKey sleeps after invalid polling or EOF instead of immediately retrying on systemd's /dev/null.
Breaking changes
mormot.core.os+1
c2f8bb0f+27-11
core: fixed ConsoleWaitForEnterKey() when run under systemd
Impact
POSIX services using ConsoleWaitForEnterKey under systemd stop burning a CPU core when stdin is /dev/null. Direct external callers of WaitReadPending have a source-breaking return-type change and must compare the result explicitly.
Migration required
Search POSIX code for WaitReadPending calls; use > 0 for readable input, = 0 for timeout and < 0 for HUP, ERR or NVAL. Deploy the complete 2.4.16922 shutdown sequence.
Public API
WaitReadPendingsignature-changed — The POSIX-only result changes from boolean to integer with -1, 0 and 1 states.
4
High
QuickJS stack-limit binding now accepts the runtime object
The public Pascal declaration of JS_SetMaxStackSize changes its first parameter from JSContext to JSRuntime, matching the QuickJS C API. The underlying external symbol and cdecl convention remain unchanged.
Breaking changes
mormot.lib.quickjs
37fa86b4+3-4
lib: fixed JS_SetMaxStackSize() definition
Impact
Code that passed a JSContext was supplying the wrong opaque object and must now pass its JSRuntime. Because the pointer types are distinct, typed Pascal call sites should surface the mismatch at compile time.
Migration required
Search for JS_SetMaxStackSize calls and replace the JSContext argument with the owning JSRuntime before rebuilding QuickJS integrations.
Public API
JS_SetMaxStackSizesignature-changed — The first parameter is JSRuntime instead of JSContext.
Units
5
High
TLS 1.3 gets a separate configurable cipher-suite list
TNetTlsContext gains CipherSuites for TLS 1.3. TOpenSslNetTls.SetupCtx fills an AES-hardware-aware default when empty, calls SSL_CTX_set_ciphersuites unless DisableTls13 is set, and enables server cipher preference with the OpenSSL ChaCha prioritization option where configured.
Fixes
mormot.lib.openssl11+1
7eb6b9e5+35-7
net: proper TLS 1.3 support
Impact
OpenSSL servers and clients can now control TLS 1.3 suites independently of the pre-TLS-1.3 CipherList. Existing CipherList-only policy no longer implies that TLS 1.3 uses the same names, so deployments with strict cipher policy should set and test CipherSuites explicitly.
Upgrade recommended
Upgrade to build 2.4.16916 or later, set TNetTlsContext.CipherSuites where policy is explicit, and verify TLS 1.2 and TLS 1.3 handshakes separately.
Public API
TNetTlsContext.CipherSuitesadded — Colon-separated TLS 1.3 suite names passed to SSL_CTX_set_ciphersuites; not used by SChannel.
6
High
A thread identifier ending in Z no longer empties parsed log files
TSynLogFile now checks LineBeg[fLineLevelOffset - 2] for the zoned-timestamp marker instead of the later byte that can belong to Int18ToText's encoded thread number. A regression test covers thread 58 with and without ZonedTimestamp.
Fixes
mormot.core.log
29b5fb26+38-3
core: fixed TSynLogFile zone layout
Impact
Log readers no longer misclassify an ordinary thread-id byte Z as the timezone marker, shift the level offset and load the file with zero parsed events.
Upgrade recommended
Use build 2.4.16914 or later for log viewers and rerun parsing tests with ZonedTimestamp disabled and high thread identifiers.
Units
7
High
FPC POSIX interface calls return Currency from the correct register
The assembly dispatch in mormot.core.interfaces stops grouping imvCurrency with floating-point Double and DateTime results. On FPC x86-64 SysV it now extracts Currency from x87 ST0 into TCallMethodArgs.res64; other ABIs leave the integer return register path intact.
Fixes
mormot.core.interfaces
6a27c07f+9-7
core: fixed currency result in mormot.core.interfaces
Impact
Backends invoking interface methods through this dispatcher on FPC POSIX can now receive the intended Currency value instead of reading it through the wrong result convention. Delphi and non-POSIX return paths are not changed by this fix.
Upgrade recommended
Upgrade FPC POSIX services that return Currency through mormot.core.interfaces and add an exact-value regression test for each supported CPU ABI.
Public API
Currency results through mormot.core.interfacesbehaviour-changed — FPC POSIX x86-64 reads imvCurrency from x87 ST0; other targets keep their native convention.
8
High
Reused HTTP request contexts no longer retain Accept-Encoding
THttpRequestContext.Reset now clears AcceptEncoding with FastAssignNew alongside UserAgent, Referer and other per-request strings. Compression state is then recalculated from the next request rather than from a retained header value.
Fixes
mormot.net.http
4c990d65+4-2
net: fixed Accept-Encoding issue
Impact
On persistent connections or pooled contexts, a request without Accept-Encoding no longer inherits the previous request's compression preference. This prevents response encoding from being negotiated against stale client capabilities.
Upgrade recommended
Upgrade HTTP servers that reuse THttpRequestContext and test consecutive requests with and without Accept-Encoding on one connection.
Public API
THttpRequestContext.Resetbehaviour-changed — Reset now clears AcceptEncoding between requests.
Units
9
High
DoubleToAscii initializes its fractional-generation flag
DoubleToAscii sets its local fl variable to zero before generating fractional digits. Previously only the CPU32-specific sticky variable was initialized at that point, leaving fl dependent on uninitialized stack contents.
Fixes
mormot.core.text
45ff2b23+3-2
core: fixed uninitialized flag in DoubleToAscii()
Impact
Floating-point text formatting no longer lets an uninitialized flag influence the fractional digit path. This affects Delphi and FPC backends that use this Pascal implementation, including JSON or textual serialization built on DoubleToAscii.
Upgrade recommended
Upgrade numeric-serialization workloads and rerun deterministic DoubleToAscii and JSON round-trip tests across each compiler and CPU target.
Units
10
Medium
Static-library allocation wrappers use pointer-sized lengths
The QuickJS and static-library pas_malloc, pas_realloc and pas_malloc_usable_size wrappers switch from 32-bit integer or cardinal lengths to PtrUInt or size_t-compatible types. pas_calloc also rejects n × size overflow before AllocMem.
Fixes
mormot.lib.quickjs+1
66d7d51c+31-28
lib: fixed pas_malloc() wrapper definition
Impact
FPC and Delphi static bindings now agree with the native size_t ABI on 64-bit targets and refuse wrapped calloc sizes. Build 16907 should not be used alone because its FPC usable-size wrapper receives a nil guard in 16908.
Upgrade recommended
Take this change together with build 2.4.16908 and rerun QuickJS and static-compression allocation tests on 64-bit Delphi and FPC.
11
Medium
Console shutdown avoids extra waits after termination
ConsoleWaitForEnterKey now checks SynDaemonTerminated before sleeping on poll failure, before reading stdin and after EOF. The OpenSSL edit in the same commit only clarifies the SSL_OP_PRIORITIZE_CHACHA comment.
Fixes
mormot.core.os.posix+1
be7dfd60+20-16
core: tuned ConsoleWaitForEnterKey() shutdown
Impact
POSIX console processes can leave the /dev/null fallback loop promptly once a termination signal is recorded. No public API changes beyond the preceding WaitReadPending signature change.
Upgrade recommended
Take this as part of the full 2.4.16922 Linux shutdown sequence rather than stopping at the initial systemd CPU fix.
12
Medium
Allocator-size lookup handles nil while numeric benchmarks are corrected
pas_malloc_usable_size now calls FPC MemSize only for a non-nil pointer and returns zero otherwise, matching QuickJS fallback expectations. The numeric benchmark also stops appending a zero after exponent forms by testing the generated input class correctly.
Fixes
mormot.lib.static
c54910c3+9-8
test: fixed number benchmark values generation
Impact
FPC QuickJS allocation code can query an unknown nil allocation without passing nil to MemSize. Application behavior is otherwise unchanged; the second half only repairs test-data generation.
Upgrade recommended
Use build 2.4.16908 or later rather than stopping on the preceding allocator-wrapper commit.
Units
13
Medium
Aborted LDAP searches release pending range state before returning
TLdapClient.SearchAllDocRaw now frees fSearchRange when fAborted is observed, after clearing the abort flag and before returning false, instead of leaving the paging-range object alive on the abort path.
Fixes
mormot.net.ldap
7fdb36cb+2-0
ldap - Fix exception if searchalldocraw aborted
Impact
LDAP clients that abort SearchAllDocRaw during ranged-attribute retrieval no longer retain stale range state that could raise an exception during cleanup or later processing.
Upgrade recommended
Upgrade if LDAP searches use SearchAllAbort or ranged attributes, then retest abort and immediate reuse of the client.
Units
14
Medium
POSIX termination signals wake Linux futex waiters
After assigning SynDaemonTerminated, SynDaemonSignal calls OsWakeAllOnValue when available. The public variable documentation now shows how Linux code can wait on its address with OsWaitOnValue.
New features
mormot.core.os+1
7000cacc+7-2
core: SynDaemonTerminated can be notified by Linux futex
Impact
Linux threads blocked on the termination value can wake immediately when SIGQUIT, SIGTERM or SIGINT is handled instead of relying on a polling interval. Other POSIX targets retain their previous behavior.
Public API
SynDaemonTerminatedbehaviour-changed — Signal assignment now wakes OsWaitOnValue waiters on Linux.
15
Medium
Console waiting shares the daemon termination futex
A new internal WaitForDaemonTermination helper waits up to one second on SynDaemonTerminated through OsWaitOnValue when available, otherwise sleeping. ConsoleWaitForEnterKey uses it after poll errors and EOF, and documentation warns that direct assignments must also wake waiters.
Performance
mormot.core.os+1
7e0e8d16+28-18
core: ConsoleWaitForEnterKey() use our shutdown futex
Impact
Linux console services respond to daemon termination without a fixed sleep-only loop while still avoiding the systemd /dev/null CPU spin. Code that manually assigns SynDaemonTerminated must follow the documented wake requirement.
Upgrade recommended
Deploy the complete build 2.4.16922 sequence and audit any direct SynDaemonTerminated assignments to call OsWakeAllOnValue as documented.
16
Low
OpenSSL loader exposes the TLS 1.3 cipher-suite function
mormot.lib.openssl11 adds SSL_CTX_set_ciphersuites to the direct and dynamic APIs, loads it as an optional symbol, and returns success when an OpenSSL 1.1.0 build lacks it. DTLS option aliases are also completed through SSL_OP_NO_DTLSv1_3.
New features
mormot.lib.openssl11
02bcae4a+53-32
lib: SSL_CTX_set_ciphersuites() support
Impact
The binding can configure TLS 1.3 suites on OpenSSL versions that export the function without breaking older 1.1.0 loading. TOpenSslNetTls does not call it until the following build.
Public API
SSL_CTX_set_ciphersuitesadded — Optional OpenSSL binding for the TLS 1.3 cipher-suite list.
Units
17
Low
A build switch can force SSSE3 JSON-number parsing
When FORCE_SSSE3_JSON and ASMX64NOTPIC are defined and cpuSSSE3 is available, initialization assigns GetNumericVariantStub to GetNumericVariantSsse3. Without that conditional, the stub continues to use GetNumericVariantPas because current regular-JSON tests find it faster.
New features
mormot.core.base.asmx64+1
e1036ba5+23-16
core: new FORCE_SSSE3_JSON conditional
Impact
Default Delphi/FPC behavior does not change. Teams can opt into the SSSE3 JSON parser at compile time for their own workload, but the commit provides no universal performance claim.
Worth a look
Enable FORCE_SSSE3_JSON only after benchmarking representative JSON number lengths on each x86-64 compiler target.
18
Low
Short scientific numbers bypass the general SSSE3 reduction path
The x86-64 implementations of GetExtended and GetNumericVariantFromJson add direct conversion paths for one- and two-digit integers, including forms such as 1E2 and 10E2, before entering the wider SIMD reduction code.
Performance
mormot.core.base.asmx64
d6709b01+76-45
core: direct 1/2 digit xEy xxEy patterns for x64 SSSE3 asm
Impact
Common short numeric tokens take fewer assembly steps on SSSE3 x86-64 targets. Public signatures and parsed values are unchanged, and other Delphi/FPC backends keep their existing paths.
19
Low
Linux daemon workers block on termination instead of polling
RunUntilSigTerminated keeps CheckSynchronize polling on the main thread, but a non-main FPC Linux thread now waits indefinitely with OsWaitOnValue when futex support is available. Other paths retain the 100 ms sleep loop.
Performance
mormot.core.os.posix
9247be3c+10-5
core: RunUntilSigTerminated() use an INFINITE futex on Linux
Impact
A daemon running this loop on a worker thread consumes no periodic wake-ups and is released by the signal-handler wake added earlier. Main-thread synchronization behavior and non-Linux backends are unchanged.
Public API
RunUntilSigTerminatedbehaviour-changed — Non-main FPC Linux callers use an infinite futex wait when available.
Units
20
Low
Mapped-text and log readers use one cached line pointer per operation
TMemoryMapText.GetLine, GetString, LineContains, LineSize and LineSizeSmallerThan cache fLines[aIndex] in a local pointer before calculating boundaries. TSynLogFile applies the same pattern, simplifies GetEventText length handling and expands related mapped-line tests.
Under the hood
mormot.core.buffers+2
d73cd49e+55-35
core: refactored TSynLogFile/TMemoryMapText
Impact
Public method signatures remain unchanged. Existing Delphi/FPC applications see only internal line-reading cleanup, but should take the next build as well because zoned-layout detection is corrected in 2.4.16914.
21
Low
Numeric benchmarks cover more token shapes and both parser APIs
TTestCoreBase broadens generated inputs from plain decimals to short integers, long fractions and exponent forms, then times and cross-checks both GetExtended and GetNumericVariantFromJson. The assembly edits only correct comments.
Tests
mormot.core.base.asmx64
3b77a2fe+96-42
tests: enhance performance tests
Impact
No backend behavior or public API changes. The larger performance harness gives maintainers broader evidence for future parser selection and optimization.
22
Low
Scientific-notation cases join the x86-64 numeric regression matrix
The numeric tests now pass DoubleToString output through both GetExtended and GetNumericVariantFromJson and add positive and negative one- and two-digit mantissas with exponents.
Tests
5f5bd051+25-4
tests: enhanced x64 asm numbers coverage
Impact
No application behavior changes. The added assertions guard the short scientific-notation assembly paths against value and end-pointer regressions.