You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
sigsegv_handler: handle case when it is called on original stack (#16276)
* CatchHardwareExceptionHolder: use GetCurrentPalThread instead of
InternalGetCurrentThread in IsEnabled method.
InternalGetCurrentThread tries to create pal thread if it doesn't
exist for the current thread. It's unnecessary because in this case
there are no hardware exception handlers for such thread.
Also CatchHardwareExceptionHolder::IsEnable is called from signal
handlers and during pal thread creation non-async-signal-safe
function are called.
* vm/threads: change tls model for gCurrentThreadInfo variable
We should use initial-exec tls model to avoid memory allocations
during first access to this variable because it may ocuur in
signal handlers.
* sigsegv_handler: handle case when it is called on original stack
If sigsegv_handler is called on original stack (for example, if segmentation
fault occurs in native application's thread that hasn't alternate signal stack)
we should call common_signal_handler directly othersize sigsegv_handler's
stackframe will be corrupted.
0 commit comments