Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-08

unexpected segmentation violation

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dr Engelbert Buxbaum

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

Reply by email

DougC
to Dr Engelbert Buxbaum

You have exceeded the stack size limit. The global variable does not have such a limit. Try increasing the maximum stack for the project.

---- On Tue, 16 Aug 2016 11:27:13 -0400 Dr Engelbert Buxbaum <>wrote ----

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 --

Reply by email