Upping the stack size to 64*1000*1000 to avoid stack overflow with recursive SDS regexes#836
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits intomainfrom Mar 6, 2026
Conversation
…cursive SDS regexes
This comment has been minimized.
This comment has been minimized.
jasonforal
previously approved these changes
Mar 3, 2026
| // Stack size is set explicitly to 64MB for the dd-sds scanner's regex matching depth. | ||
| let rayon_pool = rayon::ThreadPoolBuilder::new() | ||
| .num_threads(0) | ||
| .stack_size(64 * 1024 * 1024) |
Collaborator
There was a problem hiding this comment.
Can you please revert this, since it's used by the IDE (so runs in the background on user machines). We currently don't support Secrets scanning in the IDE (@alonam is currently working on this so will need to come up with a solution for this
| // Stack size is set explicitly to 64MB for the dd-sds scanner's regex matching depth. | ||
| rayon::ThreadPoolBuilder::new() | ||
| .num_threads(configuration.get_num_threads()) | ||
| .stack_size(64 * 1024 * 1024) |
Collaborator
There was a problem hiding this comment.
Could we check whether secrets is enabled or not and only bump the stack size if it is?
jasonforal
approved these changes
Mar 5, 2026
Collaborator
Author
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem are you trying to solve?
Some secrets scans fail with a stack overflow due to the recursive nature of the SDS scans.
What is your solution?
Increase the stack size to allow for more recursion.
Alternatives considered
What the reviewer should know