-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
arch-arm32area-NativeAOT-coreclrquestionAnswer questions and provide assistance, not an issue with source code or documentation.Answer questions and provide assistance, not an issue with source code or documentation.
Milestone
Description
I am now continuing to work on the porting of nativeaot+rtos:
I'm encountering an infinite loop in the stack unwinding logic when calling Environment.StackTrace in a minimal C# program. After resolving TLS-related issues (--enable-tls confirmed working), the stack frame iterator enters an infinite loop during stack unwinding.
main()
{
var stacktrace = Environment.StackTrace;
}
Observed Behavior:
The call stack enters an infinite loop in StackFrameIterator::Next() because IsValid() persistently returns true. When examining the ControlPC values during unwinding, I observe the following pattern:
1.S_P_CoreLib_System_Runtime_RuntimeExports__RhGetCurrentThreadStackTrace
2.S_P_CoreLib_System_Diagnostics_StackTrace__InitializeForCurrentThread
3.S_P_CoreLib_System_Diagnostics_StackTrace___ctor_0
4.S_P_CoreLib_System_Environment__get_StackTrace
5.Helloworld_Helloworld_Program__Main
6.__managed__Main
7.__managed__Main (repeated)
8.__managed__Main (repeated)
Problem Location:
The infinite loop occurs in RhpCalculateStackTraceWorker():
RhpCalculateStackTraceWorker()
{
while (frameIter.Next()){ ....}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arch-arm32area-NativeAOT-coreclrquestionAnswer questions and provide assistance, not an issue with source code or documentation.Answer questions and provide assistance, not an issue with source code or documentation.
Type
Projects
Status
No status