You are not logged in.
Pages: 1
Hi Arnaud,
after update (since Februar) I got under linux/fpc 3.2.0 with -02/-03 following av:
An unhandled exception occurred at $000000000052D2F4:
EAccessViolation: Access violation
$000000000052D2F4 CASECOPY, line 7632 of ../../mORMot2/src/core/mormot.core.unicode.pas
$0000000000415F24
$0000000000CA7401 ADDIMPLEMENTATION, line 1803 of ../../mORMot2/src/soa/mormot.soa.server.pas
$000000000051ADAA SERVICEREGISTER, line 7400 of ../../mORMot2/src/rest/mormot.rest.server.pas
With -01 it works. Under Windows/Delphi 10.4 it works too.
Greetings,
Daniel
Offline
Weird.
I am not able to reproduce it here.
What is the interface type name?
Do the mormot2tests regressions pass with this compiler?
Try to disable inlining of this function in mormot.core.unicode.pas by adding a comment:
function LowerCase(const S: RawUtf8): RawUtf8;
// {$ifdef HASINLINE} inline; {$endif}
and/or in mormot.core.base.pas:
function FastNewString(len: PtrInt; codepage: PtrInt = CP_RAWBYTESTRING): pointer;
// {$ifdef HASINLINE}inline;{$endif}
Offline
disable inlining in FastNewString was it! Thanks a lot.
(mormot2tests doesn't compile, I don't know what's wrong. No error, just Error in ./build_fpc.sh on line 117)
Offline
Seems like a compiler bug to me.
Weird that it was not reported sooner.
Please try with
https://github.com/synopse/mORMot2/commit/e56527786
Offline
Perfect!
Test are also successfully.
(mget was missing, in build_fpc.sh before compiling test a line for building mget works for me:
>fpc -MDelphi -Sci -Ci -g -gl -gw2 -Xg -k'-rpath=$ORIGIN' -k-L$BIN \
...
-B -Se1 "$LIB2/src/tools/mget/mget.dpr"
But some memleaks were reported:
WARNING! THIS PROGRAM LEAKS MEMORY!
Memory Status:
Small: 33/5KB including tiny<=128B arenas=8 fed from Medium
Medium: 13MB/117MB peak=53MB current=11 alloc=94 free=83 sleep=4
Large: 0B/4GB peak=27MB current=0 alloc=2K free=2K sleep=0
Total Sleep: count=4
Small Blocks since beginning: 54M/5GB (as small=45/46 tiny=56/56)
48=19M 64=10M 16=5M 80=4M 96=2M 528=1M 112=1M 32=1M
Small Blocks current: 33/5KB
128=10 32=8 160=4 304=2 48=2 288=2 112=2 352=2
Offline
Memleak reported comes from TTestCoreEcc
Offline
It looks like heaptrc...
Memory Status:
Small: 1/880B including tiny<=128B arenas=8 fed from Medium
Medium: 2MB/132MB peak=53MB current=2 alloc=106 free=104 sleep=3
Large: 0B/4GB peak=27MB current=0 alloc=3K free=3K sleep=0
Total Sleep: count=3
Small Blocks since beginning: 46M/4GB (as small=45/46 tiny=56/56)
48=16M 64=9M 16=5M 80=4M 96=2M 112=1M 528=1M 32=1M
Small Blocks current: 1/880B
880=1
Leaks Identified:
small block leak x1 of size=880 (getmem=10373 freemem=10372)
Total small block leaks = 1
probable TEccCertificateSecret leak (808/880 bytes) at $00007FF4FD390CE0
Total objects leaks = 1
Offline
fpc -iW shows
3.2.0-r45643
Offline
Pages: 1