[fpc-pascal] access violations on new ARM hardware
Björn Schreiber
news.bs at drigus.de
Wed Jan 28 16:44:20 CET 2015
Am 28.01.2015 um 11:21 schrieb Sven Barth:
> As said by Marco: please try to reproduce it by copying parts of
> SysUtils (e.g. GetLocaleStr) into an empty program (and using that code
> of course ^^) to find an example code that shows the problem.
I narrowed it down to the following minimal program:
--- Schnipp On ---
program test;
var
AString: String;
function AFunction: String;
var
S: WideString;
begin
S := 'Test';
AFunction := S;
end;
begin
AString := AFunction;
end.
--- Schnipp Off ---
Compiled with a fresh install of FPC 2.6.4 with the command line
fpc -Twince -Parm test.pas
runs without any problem on the old hardware (Cortex-A8) but produces a
runtime error 216 on the new hardware (Cortex-A5).
This code follows SysUtils.GetLocalStr, called by
SysUtils.GetFormatSettings. The error doesn't occur if S is defined as
String instead WideString or if I do it without the function call.
Regards,
Björn
--
Björn Schreiber
DRIGUS GmbH
More information about the fpc-pascal
mailing list