v.24.2Improvement

Fix Stack Unwinding on macOS (Closes #53653)

Fix stack unwinding on Apple macOS. This closes #53653. #59690 (Nikita Mikhaylov).
Fix stack unwinding issues on Apple macOS platforms.

Why it matters

This fix resolves problems related to stack unwinding on macOS, which improves stability and debugging capabilities by ensuring proper exception handling and accurate stack traces on Apple systems.

How to use it

This fix is applied automatically upon updating to the version containing the fix. No additional configuration or user intervention is required.