Consultor Eletrônico



Kbase P156067: Crash involving recursive procedure
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   24/11/2009
Status: Unverified

SYMPTOM(s):

Crash involving recursive procedure

SYSTEM ERROR: stkpush: stack overflow. Increase the -s parameter. (279)

Same procedure or function appears many times in ABL stack trace found in Protrace file.

FACT(s) (Environment):

OpenEdge 10.1C
OpenEdge 10.2x
All Supported Operating Systems
OpenEdge Category: Language (4GL/ABL)

CAUSE:

Infinite recursion triggers a stack overflow because each iteration of the function/procedure will take up space on the stack.

In this case, the infinite recursion is caused by a bad record in a self-referring table; the record is marked as a parent of itself. When the recursive function starts processing this record, it sees the same record as the next to be processed. The recursion spins out of control at this point as the same record is processed over and over until the stack overflow is hit.

FIX:

Make sure the data being processed recursively does not contain any circular references or records parented to themselves.

Alternatively, rewrite the recursive procedure so that it enforces a maximum limit to the number of iterations or detects that the data is looping