You are not logged in.
Pages: 1
Hi,
I tested the latest mORMot benchmark with Delphi 13.1 (64-bit). Everything works fine except for one function.
When using the Windows heap manager directly (for example, https://github.com/RDP1974/DelphiMSHeap), the following test:
`procedure TTestCoreBase.Utf8Slow(Context: TObject);`
raises memory-related exceptions, such as:
`UTF-8TDynArray: #2421041 EAccessViolation`
Feel free to check the code and let me know if you find anything relevant.
Thank you.
R.
just for talk, win2025 server desktop requires 1m40secs, same vm win 2025 core requires 1m05secs
Last edited by RObyDP (2026-07-09 20:12:52)
Offline
Neither the Delphi MM, nor the FPC MM, nor both in debug/extended mode do trigger such error.
It is very likely that something is missing in your DelphiMSHeap logic, like handling of a nil pointer or a size <= 0.
Offline
Sorry to bother you.
I checked all integer values for zero or negative numbers, as well as all pointers for "nil", but nothing was reported.
In Debug mode everything works fine. In Release mode the issue is intermittent: sometimes no error is reported, but quite often this function raises an "EAccessViolation".
best regards
Offline
In my custom RTL for Delphi 7 I used something like this for the Win heap usage:
https://gist.github.com/synopse/d7f6307 … 62b317c93c
Anyway, we need more info about how it happens.
Offline
Hi,
I hope this helps.
With tbbmalloc (https://github.com/RDP1974/Delphi64RTL) (both 32-bit and 64-bit), all tests pass 100%.
Using Microsoft Heap API (https://github.com/RDP1974/DelphiMSHeap), the 32-bit version also passes 100% of the tests. However, the 64-bit version consistently fails in one function with an EAccessViolation in UTF8 TDynArray.
Best regards.
R.
btw. win64 1m05s, win32 1m45s (tbbmalloc)
Last edited by RObyDP (Yesterday 21:27:16)
Offline
Line that fails:
https://github.com/synopse/mORMot2/blob … .pas#L6906
i.e. if I comment this line, all tests are passed.
I think that on invalid UTF-8 sequence function StrPosIReference may read past of string, at line:
https://github.com/synopse/mORMot2/blob … pas#L12324
and can raise EAccessViolation.
Error message from console:
EAccessViolation for 29[<8L$c3$a3$c3$8f4QJX+7awvq/Z$c3$abco~S<V$c3$af]25
Offline
Please try with
https://github.com/synopse/mORMot2/commit/ebf12e975
Such invalid UTF-8 sequence should be detected now.
But the test code should not generate invalid UTF-8. And in fact, the value displayed seems fine.
Perhaps the test code itself is wrong. ![]()
Offline
Pages: 1