You are not logged in.
Pages: 1
mormot sample 15 - External DB performance
var U:RawUTF8;
...
U := 'Namee ';
PWord(@U[4])^ := $a9c3; // some 'e'acute to test UTF-8 encoding //Here D7 run OK, but FPC will raise Exception External: SIGSEGV
Can anyone explian this situaion, or is FPC had some problem on dealing RawUTF8 ?
Offline
U := 'Namee ';
UniqueString(U); //Add this line FPC will OK
PWord(@U[4])^ := $a9c3; // some 'e'acute to test UTF-8 encoding
after doing some research on ASM code & Syncomms.pas, I found that add UniqueString() seems work fine. But I'm not sure whether it will cause memory leak ?
Offline
Yes, this is a FPC inconsistency in respect to Delphi: @aString[] does not call UniqueString.
Please check https://synopse.info/fossil/info/dcfa37ee3f
The fix won't cause a memory leak.
Offline
@ab did we have any bugreport on FPC mantis for this?
best regards,
Maciej Izak
Offline
@ab got it , thank you
Offline
Pages: 1