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

stackoverflow can't be correctly caught inside of qemu user #2192

Open
Avimitin opened this issue Feb 15, 2023 · 1 comment
Open

stackoverflow can't be correctly caught inside of qemu user #2192

Avimitin opened this issue Feb 15, 2023 · 1 comment

Comments

@Avimitin
Copy link
Contributor

Avimitin commented Feb 15, 2023

What happened

test-c-stack.sh, test-sigsegv-catch-stackoverflow1 and test-sigsegv-catch-stackoverflow2, these gnulib tests in packages diffutils and m4 will fail because the unexpected behavior of signal handling in qemu user.

These three tests will try to capture signal SIGSEGV and find out if the signal is triggered by the stack overflow exception. However, because of some unknown reason, the tests fail to capture the segmentation fault and so all of the tests will fail.

How to reproduce:

Here is a small reproduce example: https://github.com/Avimitin/stackoverflow-recover.

git clone https://github.com/Avimitin/stackoverflow-recover.git
cd stackoverflow-recover
make run

Current behavior

  • On normal x86_64 machine (Work as expected)
starting recursion
Stack overflow caught.
All done
  • On SiFive Unmatched (Work as expected)
starting recursion
Stack overflow caught.
All done
  • On QEMU-User (Failed)
starting recursion
Segmentation fault (core dumped)

Conclusion

The reason why those tests fail is still unknown, but we can confirm that this unexpected behavior will occur in qemu-user only. In my opinion, we can just add those packages to the qemu user blacklist now as it is really hard to find out the reason.

Avimitin added a commit to Avimitin/archriscv-packages that referenced this issue Feb 15, 2023
Details: felixonmars#2192

Signed-off-by: Avimitin <[email protected]>
@Avimitin
Copy link
Contributor Author

Related: #2193 #2172

felixonmars pushed a commit that referenced this issue Feb 15, 2023
Details: #2192

Signed-off-by: Avimitin <[email protected]>
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

1 participant