-
Notifications
You must be signed in to change notification settings - Fork 438
-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std.strReplace max stack frames exceeded #531
Comments
Ahh, I see the current implementation is in jsonnet and is recursive so reaches max stack frame on a long string. I guess implementing it natively would solve the issue. |
It's missing tailstrict in the recursive calls, that's how you avoid stack overflow in lazy functional languages:
|
Can you try adding those 2 keywords, rebuild the jsonnet executable and see if it fixes it |
ah yes, that fixes it indeed. Should I submit a PR for it? |
Yes please! |
This is to avoid running into this bug: google/jsonnet#531
This is to avoid running into this bug: google/jsonnet#531
This is to avoid running into this bug: google/jsonnet#531
I am trying to import this file: https://github.com/SpiderLabs/ModSecurity/blob/v3/master/modsecurity.conf-recommended and output it as a multiline json string (without visible \n), not succeeding with it and on the way seemed to have stumbled on a bug. I am passing it in via
-ext-str-file modsecurity_conf=modsecurity.conf
and in my jsonnet file haveI get the following error:
The example above is slightly simplified but should show off the case. I have no idea why this happens.
The text was updated successfully, but these errors were encountered: