Skip to content

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

@janvorli

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
//

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions