Skip to content

StackOverflow in recursive functions possible #263

@mschessler

Description

@mschessler

MathParser.org-mXparser verssion: v.5.0.5
Framework: java

Functions such as:

  • org.mariuszgromada.math.mxparser.mathcollection.MathFunctions#eulerNumber(int, int)
  • org.mariuszgromada.math.mxparser.mathcollection.MathFunctions#lucasNumber(int)
  • org.mariuszgromada.math.mxparser.mathcollection.MathFunctions#fibonacciNumber(int)
  • and more

Have no max recursion depth and easily can lead to a Stackoverflow.
There seems to be a recursion counter set by org.mariuszgromada.math.mxparser.mXparser#setMaxAllowedRecursionDepth() which is only used for user defined Arguments. It needs to either be expanded to include these functions, or they just need to catch the exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions