Increase stylo stack size in asan and debug builds#42115
Merged
jschwe merged 2 commits intoservo:mainfrom Jan 28, 2026
Merged
Conversation
mrobinson
requested changes
Jan 24, 2026
python/servo/build_commands.py
Outdated
Comment on lines
+146
to
+150
| if build_type.is_dev(): | ||
| # Increase stylo thread stack size to 2 MiB for debug builds since the stack usage is higher | ||
| # and crashes have been reported. The default is 512 KiB. | ||
| # Note: This is placed after `build_sanitizer_env()` so that the higher stack size with ASAN takes | ||
| # priority over the debug build stack size, which matters for ASAN builds with the debug profile. |
Member
There was a problem hiding this comment.
We should be setting all environment variables in one place instead of many places. I think you can do this by passing in an optional sanitizer argument to build_env() and calling build_sanitizer_env from there. Sorry that I have not spotted this earlier.
Setting up the environment in one place makes it easier understand where environment variables get set.
Member
Author
There was a problem hiding this comment.
I generally agree with you, but (partially) moving build_sanitizer_env into build_env() is not trivial and might require more time than I can currently spare. I moved this part into build_env() though, since it's easy enough.
mrobinson
approved these changes
Jan 27, 2026
Stylo servo/stylo#269 recently added the option to configure the stack size of the style threads. We increase the stack size for asan and debug builds. Signed-off-by: Jonathan Schwender <[email protected]>
Signed-off-by: Jonathan Schwender <[email protected]>
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.
This bumps stylo to allow configuring the stack size of the stylo threads, which fixes crashes with asan and debug builds.
Testing: Manual testing with
--with-asanand with the debug profile.Fixes: #40814