[mono][debugger] Don't pass uninitialized context to debugger (#86625)
authorVlad Brezae <brezaevlad@gmail.com>
Thu, 25 May 2023 15:37:56 +0000 (18:37 +0300)
committerGitHub <noreply@github.com>
Thu, 25 May 2023 15:37:56 +0000 (18:37 +0300)
commitc6ece91b85e27492be26eacebf9682fe25e603e8
tree81c29872152ab0f303821f3282b654c9b6266591
parent8d2c3658303e086fc3dccad4956002913d6ab64e
[mono][debugger] Don't pass uninitialized context to debugger (#86625)

mono_dbg_debugger_agent_user_break first tries to initialize a context before sending it to the debugger machinery. If, during unwinding, we don't have a saved context, we were passing uninitialized data (with interpreter for example). On some architectures this was making unwinding break in mono_walk_stack_full, because the stack pointer was invalid. This change makes it so we at least pass a valid context.
src/mono/mono/component/debugger-agent.c