Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/thread_float fails on native #17170

Open
maribu opened this issue Nov 9, 2021 · 2 comments
Open

tests/thread_float fails on native #17170

maribu opened this issue Nov 9, 2021 · 2 comments

Comments

@maribu
Copy link
Member

maribu commented Nov 9, 2021

Description

tests/thread_float since #16901 checks mainly for correct backup and restore of the FPU state during context switches. The two threads will perform the same calculation over and over again and print the result. On native, both threads occasionally print a different result (namely nan). But obviously, the same calculation should reliably yield the same result.

Steps to reproduce the issue

Run tests/thread_float on native (after #16901 is merged) over and over again. Eventually, it will fail.

Expected results

The test passes 100% of the time.

Actual results

The test fails every now and then.

Versions

RIOT master after #16901 is merged.

@kaspar030
Copy link
Contributor

I think this is a duplicate: #495

Please re-open if you disagree.

@maribu
Copy link
Member Author

maribu commented Nov 10, 2021

I tend to disagree: #495 describes an issue with the FPU state being corrupted when using the FPU in IRQs. This requires backing up and restoring the FPU state at the ISR preamble / epilogue and likely is a bug that we could fix (even though it would require assembly in the signal handlers simulating the ISRs). The issue with the FPU state getting corrupted by using makecontext() / setcontext() for context switches is IMO an issue with the standard C lib not backing up the FPU state and restoring it. Here, we can only report upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants