mORMot2 DailyDaily read of upstream commits

libcurl ABI and Windows IOCP reliability are repaired

This batch repairs two production-facing network paths: libcurl’s C ABI, especially on AArch64, and the Windows IOCP accept lifecycle. It also changes several public callback and cryptographic context declarations, so Delphi and FPC applications with low-level integrations should recompile and check the named symbols. ISO-8601 fractional-second parsing and several pure-Pascal hot paths receive focused fixes and optimizations.

TL;DR

  • Use build 2.4.17634 for the complete Windows IOCP accept and shutdown repair sequence.
  • libcurl C long values and callback sizes now use ABI-correct types, with the largest impact on AArch64.
  • TOnHttpProxyServerRequest gains a ProxyUrl argument and existing callback methods must be updated.
  • AES, SHA-1/SHA-2 and SHA-3 context storage is now typed; three public size constants disappear.
  • ISO-8601 fractions with one or two digits now map correctly to 100 ms and 10 ms units.
  • TBigInt.Square, SynLZ and numeric formatting receive Delphi/FPC performance work without format changes.

Upgrade advice

Land on build 2.4.17634 rather than an intermediate IOCP or linger revision. Recompile libcurl callbacks and proxy handlers, replace AES_CONTEXT_SIZE, SHA_CONTEXT_SIZE and SHA3_CONTEXT_SIZE with SizeOf of their typed records, then exercise AArch64 libcurl, Windows IOCP overload/shutdown and ISO-8601 parsing on every Delphi/FPC target you ship.

Build2.4.17609 → 2.4.17634
Commits23
Lines+1385 -1022
Read5 min

23 of 23 entries · 23 commits upstream

# Entry Category Units
1 High libcurl bindings use ABI-correct scalar and callback widths mormot.lib.curl adds TCurlLong, changes read/write callback sizes and results to PtrUInt, types global flags and timeouts as C long, and wraps varargs easy_setopt/share_setopt plus long-valued easy_getinfo calls. Breaking changes mormot.lib.curl+1 071b81b4+181-67

lib: fixed libcurl ABI especially on aarch64

Impact

AArch64 and other 64-bit POSIX builds stop truncating size_t and C long values at the libcurl boundary. Custom callbacks or direct TLibCurl field access may no longer compile until signatures are updated.

Migration required

Recompile every libcurl target; update custom read/write callbacks to PtrUInt sizes/results and use the typed TLibCurl wrappers instead of raw varargs fields.

Public API

  • TCurlLongadded — Represents C long as 32-bit on Windows and pointer-sized on POSIX.
  • curl_write_callback/curl_read_callbacksignature-changed — size, count and result values now use PtrUInt to match size_t.
  • TLibCurl.easy_setoptsignature-changed — Raw varargs storage is private-named and public calls use typed overloads.

Arnaud Bouchez · 10:05 UTC · view the commit on GitHub →

2 High Windows IOCP setup closes failed accept sockets deterministically Windows SetLinger restores l_onoff for non-negative values, IOCP subscription resets linger, and failed IocpCreate or AcceptEx preparation paths release their subscription or accept socket. Fixes mormot.net.sock+1 b7312847+43-24

net: fixed Windows IOCP/linger calls

Impact

Windows services avoid stale linger settings and leaked accept resources during IOCP setup failures; this directly affects long-running asynchronous servers.

Arnaud Bouchez · 15:18 UTC · view the commit on GitHub →

3 High Socket close and linger now follow each platform’s failure rules TNetSocketWrap.Close and SetLinger move into POSIX and Windows implementations: POSIX avoids retrying close after EINTR, Darwin uses its SO_LINGER value, and Windows retries WSAEWOULDBLOCK after disabling linger. Fixes mormot.net.sock+2 71d679fb+48-15

net: rewritten TNetSocketWrap.Close/SetLinger methods

Impact

Socket shutdown reports real POSIX close errors without risking a reused descriptor and can recover from a blocking Windows close; network behavior changes without an API signature change.

Public API

  • TNetSocketWrap.Closebehaviour-changed — Close now returns platform errors and has platform-specific recovery rules.

Arnaud Bouchez · 14:27 UTC · view the commit on GitHub →

4 High Async server shutdown no longer tears down live IOCP state TAsyncServer shutdown now terminates only the IOCP accept queue, and DoExecute separates overload rejection, termination and nil-client error paths before closing a socket. Fixes mormot.net.async c35132cf+28-33

net: some async server logic fixes

Impact

Windows asynchronous servers avoid unsubscribing shared IOCP state during shutdown and avoid invalid client closes while overloaded; Delphi and FPC application APIs are unchanged.

Arnaud Bouchez · 20:29 UTC · view the commit on GitHub →

5 High Failed IOCP re-arming no longer leaks an accepted connection TAsyncServer.DoExecute always posts the next AcceptEx after a completion and closes the accepted socket when re-arming or MakeAsync fails; TLS setup remains blocking until initialized. Fixes mormot.net.async+1 83116892+37-13

net: fixed IOCP accept failure

Impact

Windows IOCP servers keep accepting after individual setup failures and release failed clients instead of leaking descriptors or stalling the accept pipeline.

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

6 High IOCP accept errors now release both the socket and queue lock TWinIocp.GetNextAccept initializes its output socket to nil and routes invalid state, address extraction and SO_UPDATE_ACCEPT_CONTEXT failures through AcceptSocketCloseAndUnlock. Fixes mormot.net.sock.windows 19d3bcef+16-8

net: fixed TWinIocp.GetNextAccept against errors

Impact

Windows backends avoid descriptor leaks and a retained accept lock when completion data is invalid or the accepted socket cannot inherit its listener context.

Arnaud Bouchez · 17:59 UTC · view the commit on GitHub →

7 Medium TAes now owns its typed key schedule and state directly The hidden implementation-only TAesContext is folded into public TAes fields, AES_CONTEXT_SIZE is removed, block constants are renamed to AES_SHIFT and AES_MOD, and KeyBits becomes a field. Breaking changes mormot.crypt.core+1 e421a7ea+328-376

crypt: removed TAesContext confusing structure

Impact

Applications that used AES_CONTEXT_SIZE or depended on the binary layout must migrate and recompile; normal TAes method calls retain their source-level behavior.

Migration required

Replace AES_CONTEXT_SIZE with SizeOf(TAes), replace AesBlockShift/AesBlockMod if referenced, and rebuild all modules sharing TAes records.

Public API

  • AES_CONTEXT_SIZEremoved — Typed TAes storage replaces the opaque byte-size constant.
  • AesBlockShift/AesBlockModrenamed — The constants are now AES_SHIFT and AES_MOD.

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

8 Medium SHA-3’s raw Keccak context becomes a public typed record mormot.crypt.core publishes TSha3Context, PSha3Context and Keccak size constants, stores TSha3 state in that record, and removes SHA3_CONTEXT_SIZE. Breaking changes mormot.crypt.core+1 c771bc8a+54-59

crypt: made TSha3Context public

Impact

Code that allocates buffers with SHA3_CONTEXT_SIZE no longer compiles; low-level users can now name and operate the SHA-3 context directly on Delphi and FPC.

Migration required

Replace SHA3_CONTEXT_SIZE with SizeOf(TSha3Context) and review any code that depended on opaque TSha3 storage.

Public API

  • TSha3Contextadded — The raw SHA-3/Keccak state and methods are now public.
  • SHA3_CONTEXT_SIZEremoved — Use SizeOf(TSha3Context) for typed context storage.

Arnaud Bouchez · 14:29 UTC · view the commit on GitHub →

9 Medium SHA-1 and SHA-2 share a public typed context mormot.crypt.core publishes TShaContext, replaces the opaque byte arrays inside TSha1 and TSha256 with that record, and removes SHA_CONTEXT_SIZE. Breaking changes mormot.crypt.core e2cd4cb4+32-47

crypt: made TShaContext public

Impact

Code referring to SHA_CONTEXT_SIZE stops compiling; low-level Delphi/FPC integrations can now allocate or inspect the shared SHA state by type.

Migration required

Replace SHA_CONTEXT_SIZE with SizeOf(TShaContext); recompile code that embeds TSha1 or TSha256 in fixed layouts.

Public API

  • TShaContextadded — The shared SHA-1/SHA-2 state record is now public.
  • SHA_CONTEXT_SIZEremoved — Use SizeOf(TShaContext) instead of the removed byte count.

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

10 Medium HTTP proxy callbacks receive their matched proxy configuration TOnHttpProxyServerRequest gains a ProxyUrl: THttpProxyUrl parameter. Callback sources take precedence over Source configuration, and OnExecute passes the matched route object after method and reject checks. Breaking changes mormot.net.async 4cec12d3+16-17

net: enhanced THttpProxyServer callback support

Impact

Existing object methods assigned as proxy callbacks no longer match the declaration and must accept the fourth parameter; callbacks can now inspect their route configuration directly.

Migration required

Search for TOnHttpProxyServerRequest and OnRequest handlers, then add ProxyUrl: THttpProxyUrl to every method signature.

Public API

  • TOnHttpProxyServerRequestsignature-changed — A fourth ProxyUrl: THttpProxyUrl argument identifies the matched route.

Arnaud Bouchez · 11:29 UTC · view the commit on GitHub →

11 Medium Short ISO-8601 fractions now scale to milliseconds correctly A shared Iso8601FractionToMS helper makes .1 mean 100 ms, .13 mean 130 ms and truncates longer fractions to three digits in date-time and time-only parsers. Fixes mormot.core.datetime fdb335f8+50-21

core: fixed millisecond time parsing

Impact

Backends parsing one- or two-digit fractional seconds no longer produce values ten or one hundred times too small; serialized input and function signatures are unchanged.

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

12 Medium SetLinger becomes a best-effort shutdown operation TNetSocketWrap.SetLinger calls setsockopt directly, clamps negative values for the POSIX linger field and no longer raises during shutdown; POSIX still enables address/port reuse for positive linger. Fixes mormot.net.sock+2 eb342ae9+7-6

net: fixed TNetSocketWrap.SetLinger behavior

Impact

Socket cleanup no longer turns a failed linger option into an exception, changing failure handling on Windows and POSIX without requiring application source changes.

Public API

  • TNetSocketWrap.SetLingerbehaviour-changed — setsockopt failure is now ignored as best effort instead of raising.

Arnaud Bouchez · 12:01 UTC · view the commit on GitHub →

13 Medium libcurl form fields finish moving to C long widths TCurlLong uses integer on Windows and PtrInt on POSIX, while TCurlHttpPost name, content, buffer lengths and flags all switch to TCurlLong; an extra TBigInt.Square ownership test is added. Compiler & platform mormot.lib.curl+1 bb92b883+17-8

lib: minor cleaning after previous commits

Impact

The libcurl record layout now matches C long on LLP64 Windows and LP64 POSIX, completing the preceding ABI repair for Delphi and FPC callers.

Arnaud Bouchez · 10:16 UTC · view the commit on GitHub →

14 Low SynLZ’s Pascal compression pass is split into a typed context A TSynLzContext record and SynLZcompress1passub helper reorganize SynLZcompress1pas state so Delphi and FPC can generate tighter pure-Pascal code. Performance mormot.core.base 30287319+112-107

core: enhanced SynLZcompress1pas() pure pascal version

Impact

Compression format and APIs do not change; non-assembly targets may see faster compression after the internal state and loop refactor.

Arnaud Bouchez · 18:16 UTC · view the commit on GitHub →

15 Low TBigInt.Square gets dedicated diagonal assembly helpers ARM32, ARM64, x86 and x64 add _xasmsquarediagonal, and TBigInt.Square computes off-diagonal products before combining doubled terms with diagonal squares in one pass. Performance mormot.core.base+2 08ea9628+122-27

crypt: slightly optimized TBigInt.Square with proper asm

Impact

Large integer squaring used by RSA becomes faster across Delphi/FPC CPU targets; arithmetic results and public method signatures stay unchanged.

Arnaud Bouchez · 09:14 UTC · view the commit on GitHub →

16 Low Numeric and date formatting replace divisions with reciprocal math Core numeric writers add reciprocal division-by-ten paths and wider stores across integer text conversion, Gregorian/ISO formatting, log timestamps and TBigInt.IntDivMod10. Performance mormot.core.base+2 f0a6942d+69-56

core: enhanced numbers to text conversion routine

Impact

Common formatting and big-integer decimal conversion can execute faster on Delphi/FPC targets; emitted text and public APIs are intended to remain identical.

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

17 Low Pure-Pascal SynLZ copies larger chunks with less setup The Pascal SynLZ compressor skips offset-table clearing for short inputs, while decompression introduces MoveByPtr and pointer-sized copy paths for matches. Performance mormot.core.base 9c55b5c6+53-67

core: optimized SynLZ compression/decompression in pure pascal

Impact

Delphi and FPC targets using the fallback implementation can compress and decompress faster; the SynLZ wire format and public functions remain unchanged.

Worth a look

Run existing SynLZ corpus and cross-version round-trip tests on targets that use pure Pascal.

Arnaud Bouchez · 17:03 UTC · view the commit on GitHub →

18 Low Hash-table adjustment exposes a better Pascal code-generation shape DynArrayHashTableAdjust stores the shifted hash value in a local variable before masking and writing it back, helping ARM-oriented Delphi/FPC code generation. Performance mormot.core.base 1b025768+27-21

core: optimized DynArrayHashTableAdjust() pure pascal code

Impact

Dynamic-array hash-table maintenance may compile to fewer instructions on pure-Pascal targets; application behavior and public APIs do not change.

Arnaud Bouchez · 15:17 UTC · view the commit on GitHub →

19 Low ISO fraction parsing removes repeated digit-range checks Iso8601FractionToMS reuses unsigned digit offsets while parsing the first three fractional digits, reducing comparisons after the preceding correctness fix. Performance mormot.core.datetime e00d96b1+13-8

core: slightly optimized previous commit

Impact

Delphi/FPC ISO-8601 parsing keeps the corrected millisecond semantics with slightly less work; there is no public API change.

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

20 Low Internal records avoid forced packing where alignment is safe Several internal records in interfaces, logging, task queues and ZIP handling drop packed, while TSynLogThreadInfo retains conditional packing and tests assert fundamental record sizes. Compiler & platform mormot.core.interfaces+3 995b4338+13-13

core: avoid "packed record" definition unless really needed

Impact

Compiler-native alignment is restored on affected Delphi/FPC targets; these records are used internally and application code should not require changes.

Arnaud Bouchez · 14:26 UTC · view the commit on GitHub →

21 Low SynLZ’s Pascal compressor uses exact-width length stores SynLZcompress1pas replaces wider PInteger writes with PWord stores for two-byte length fields and consolidates the final pure-Pascal compressor cleanup. Under the hood mormot.core.base 2bae6951+14-15

core: final SynLZ code cleanup

Impact

Compressed stream format and public calls stay unchanged; Delphi and FPC builds receive narrower, clearer memory writes in the fallback implementation.

Arnaud Bouchez · 20:21 UTC · view the commit on GitHub →

22 Low Big-integer squaring gains boundary and ownership tests The crypto test suite compares TBigInt.Square with multiplication across empty, single-limb, multi-limb, random and shared/unshared storage cases, including RSA-related buffers. Tests mormot.crypt.core+1 85e4b8d6+97-5

tests: validate TBigInt.Square algorithm

Impact

No application code changes; the optimized square implementation receives broader regression coverage for Delphi/FPC ownership and arithmetic boundaries.

Arnaud Bouchez · 09:37 UTC · view the commit on GitHub →

23 Low Record alignment and support-tool cleanup follow the crypto refactor TSynLogThreadInfo packing is restricted to Intel, TSynHasher stores TSha3 directly, Windows linger logic is adjusted, and mget simplifies its output-path initialization. Housekeeping mormot.core.log+2 ebaba4a4+8-9

all: small fixes and refactoring

Impact

This is mostly internal alignment and cleanup; the temporary Windows linger change is completed by the later IOCP/linger fix in build 2.4.17628.

Arnaud Bouchez · 14:41 UTC · view the commit on GitHub →

Upstream activity commits per day · last 60 days
Commits1007
Active days49/60
Busiest2026-09-30
Peak60
2026-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: 12 commits2026-10-11: 2 commits2026-10-12: 40 commits2026-10-13: 31 commits2026-10-14: 23 commits2026-10-15: 16 commits2026-10-16: 27 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 3 commits2026-10-23: 6 commits2026-10-24: 29 commits2026-10-25: 7 commits2026-10-26: 25 commits2026-10-27: 4 commits2026-10-28: 8 commits2026-10-29: 17 commits2026-10-30: 20 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 16 commits2026-11-03: 32 commits2026-11-04: 15 commits2026-11-05: 32 commits2026-11-06: 26 commits2026-11-07: 19 commits2026-11-08: 2 commits2026-11-09: 29 commits2026-11-10: 17 commits2026-11-11: 8 commits2026-11-12: 38 commits2026-11-13: 39 commits2026-11-14: 9 commits2026-11-15: 6 commits2026-11-16: 21 commits2026-11-17: 30 commits2026-11-18: 37 commits2026-11-19: 28 commits2026-11-20: 31 commits2026-11-21: 0 commits2026-11-22: 0 commits2026-11-23: 1 commit2026-11-24: 6 commits2026-11-25: 3 commits2026-11-26: 3 commits2026-11-27: 0 commits2026-11-28: 0 commits
2026-09-302026-11-28