Skip to content

Comment on stack needs of the runtime in Thread::CLRSetThreadStackGuarantee are stale #118401

Open

Description

@janvorli

We should either remove them or make them match reality.

// Free Build EH Stack Stats:
// --------------------------------
// currently the maximum stack usage we'll face while handling a SO includes:
// 4.3k for the OS (kernel32!RaiseException, Rtl EH dispatch code, RtlUnwindEx [second pass])
// 1.2k for the CLR EH setup (NakedThrowHelper*)
// 4.5k for other heavy CLR stack creations (2x CONTEXT, 1x REGDISPLAY)
// ~1.0k for other misc CLR stack allocations
// -----
// 11.0k --> ~2.75 pages for CLR SO EH dispatch
//
// -plus we might need some more for debugger EH dispatch, Watson, etc...
// -also need to take into account that we can lose up to 1 page of the guard region
// -additionally, we need to provide some region to hosts to allow for lock acquisition in a hosted scenario
//

Activity

  1. added this to the 11.0.0 milestone on Aug 5, 2025
  2. dotnet-policy-service commented on Aug 5, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @mangod9
    See info in area-owners.md if you want to be subscribed.

  3. modified the milestones: 11.0.0, Future on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    No status

Relationships

None yet

Development

No branches or pull requests

Issue actions