[fpc-pascal] More Filter Madness

J├╝rgen Hestermann juergen.hestermann at gmx.de
Sun Oct 16 11:55:09 CEST 2011

Alberto Narduzzi schrieb:
 > Recursion is for other things, such as expression parsing etc. where 
you don't (and neither possibly can't) actually know how deep may the 

Well, I would advice only to use it if you *know* the maximum nesting 
depth. Otherwise it can crash easily.

A good example of stack overflow crashes is a (Pascal) software happened 
in a huge railway signal box in germany (near Hamburg) in 1995 
(http://catless.ncl.ac.uk/Risks/17.02.html#subj3). The software worked 
ok on testing but on go live it crashed with stack overflow because 
suddenly the data amount (and therefore the nesting depth) was 
significantly larger than in the tests. It is much harder to judge the 
stack memory use than the heap use and often the stack is more limited 
than the heap so you run into such issues easier.

More information about the fpc-pascal mailing list