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)
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: