feat: build-parameter for handler stack size #1049
Open
+57
−42
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 allows users to change the currently hard-coded handler stack size during the build.
Summary:
sigaltstack
setup on the signal-handler side, we only configure the thread stack if no one else has done that before us.sentry__reserve_thread_stack()
is only called from the backend initialization for a static build. Dynamic libraries install aDllMain
that sets the thread stack for each thread starting after our library is loaded.I could imagine providing two more build parameters:
DllMain
).For the sake of simplicity, I would like to defer this decision until we have a case where someone needs to configure the stack size and can not use these mechanisms.
Beyond the configurable stack size, most users prefer not to configure any of these subtle configurations themselves. Introducing any of these build parameters later can be done non-breakingly.