[Lazarus] unexpected segmentation violation

DougC doug at moosemail.net
Tue Aug 16 17:49:49 CEST 2016


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 <engelbert_buxbaum at web.de>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



-- 

_______________________________________________

Lazarus mailing list

Lazarus at lists.lazarus-ide.org

http://lists.lazarus-ide.org/listinfo/lazarus






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160816/891e31b8/attachment.html>


More information about the Lazarus mailing list