Skip to content

Limit for memory allocation? #645

@ben

Description

@ben

I've been looking into using GoJa to evaluate simple JS expressions that can be provided by users, and part of that is ensuring that bad inputs can't bring down the entire server process. The ability to interrupt execution after a certain amount of time is great, thanks for that, and the omission of a standard library is also pretty great.

Have you considered how one might set a limit on memory allocation? Currently evaluating an expression like this can cause a Kubernetes pod to be OOM killed:

'x'.repeat(1024*1024*1024*1024)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions