thread_cleanup: set CFP to NULL before clearing ec's stack
We clear the CFP first so that if a sampling profiler interrupts the current thread during rb_ec_set_vm_stack, thread_profile_frames returns early instead of trying to walk the stack that's no longer set on the ec.
The early return in thread_profile_frames was introduced at eab7f4623fb.
thread_cleanup: set CFP to NULL before clearing ec's stack
We clear the CFP first so that if a sampling profiler interrupts the current thread during
rb_ec_set_vm_stack,thread_profile_framesreturns early instead of trying to walk the stack that's no longer set on the ec.The early return in
thread_profile_frameswas introduced at eab7f4623fb.Fixes [Bug #21441]