Cross-thread Stack Access
If present, represents the location and associated call stack where the accessed stack memory was allocated.
Represents the location and associated call stack where the thread owning the stack was created.
Stack cross access
Represents the location and associated call stack where the stack memory was accessed by a different thread.
- Keep stack variables private to each thread.
- Avoid publishing addresses of stack variables and storing shared data on thread's stack. Instead, store shared data on the heap or in static variables.
- If you cannot avoid accessing a different thread's stack, establish a handshaking protocol between the owning thread and accessing thread to prevent accidental corruption or the reading of unexpected or garbage stack data.