[Lazarus] unexpected segmentation violation

Dr Engelbert Buxbaum engelbert_buxbaum at web.de
Tue Aug 16 17:27:13 CEST 2016


Hi,

the   following   little  test  program  compiles  fine  but causes an
exception "External: SIGSEGV" with Lazarus version # 1.6, Date 2016-02-14,
FPC version 3.0.0, SVN-Revision  51630, x86_64-win64-win32/win64, under Win10
Pro 1607 64 bit:

program test1;

const MaxCases = 1600;

type SimMatrix = array [1..MaxCases, 1..MaxCases] of double;

var r : double;

function ClusterAnalysis : double;

var Similarities  : SimMatrix;         // elimination of this line removes the problem

begin
  ClusterAnalysis := 1.0;
end;

begin
  r := ClusterAnalysis;
end.

Funnily enough, if I create the matrix not as a local but as a
global variable, everything runs fine.

-- 
Sincerely
Engelbert



More information about the Lazarus mailing list