x86: select CONFIG_THREAD_STACK_INFO for exception stack trace

When CONFIG_X86_EXCEPTION_STACK_TRACE is enabled, also forcibly
enable CONFIG_THREAD_STACK_INFO. Without the thread stack info,
it is possible the stack unwinding would go out of the thread
stack and into unknown memory, resulting in hard fault.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2024-06-11 13:25:59 -07:00 committed by Anas Nashif
parent f4531d21f5
commit da702463b9
2 changed files with 2 additions and 0 deletions

View file

@ -167,6 +167,7 @@ config X86_EXCEPTION_STACK_TRACE
bool
default y
select DEBUG_INFO
select THREAD_STACK_INFO
depends on !OMIT_FRAME_POINTER
help
Internal config to enable runtime stack traces on fatal exceptions.

View file

@ -33,6 +33,7 @@ config X86_EXCEPTION_STACK_TRACE
bool
default y
select DEBUG_INFO
select THREAD_STACK_INFO
depends on !OMIT_FRAME_POINTER
depends on NO_OPTIMIZATIONS
help