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

Can't perform stack-replacing clone() in trap context #5

Open
stephenrkell opened this issue Mar 16, 2021 · 3 comments
Open

Can't perform stack-replacing clone() in trap context #5

stephenrkell opened this issue Mar 16, 2021 · 3 comments

Comments

@stephenrkell
Copy link
Owner

stephenrkell commented Mar 16, 2021

This is a known problem. I have seen this work successfully, but it is not reliable because the compiler doesn't know what we're doing. Once the stack is zapped, any locals not held in registers will be lost, and the compiler doesn't let us tell it to refrain from using the stack.

Although "rewrite in assembly" has been my tentative solution, it may be possible to clean up the code and retain a C-like solution by aggressive use of __asm__("rdx") and similar annotations on locals.

@stephenrkell stephenrkell changed the title Can't trap clone() Can't perform clone() in trap context Mar 16, 2021
@stephenrkell stephenrkell changed the title Can't perform clone() in trap context Can't perform stack-replacing clone() in trap context Mar 16, 2021
@stephenrkell
Copy link
Owner Author

This code has been overhauled in 7e070fb, and now has more chance of working, but is not yet tested.

@stephenrkell
Copy link
Owner Author

Following further fixes, this now passes a basic test as of 2ed8ffd -- still needs testing on 64-bit and in greater depth generally.

@stephenrkell
Copy link
Owner Author

This is now tested a bit more and some issues fixed as of 0b7ff5b. It seems to work on 64-bit. Still not well-tested.

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