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

Ensure correct handling of errors from thread-local storage #63

Open
jonasfj opened this issue Nov 2, 2022 · 0 comments
Open

Ensure correct handling of errors from thread-local storage #63

jonasfj opened this issue Nov 2, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@jonasfj
Copy link
Member

jonasfj commented Nov 2, 2022

BoringCrypto exposes ERR_clear_error() which clears the thread-local error stack.

For any function in BoringCrypto which may set error state, we must read the error stack, before we do any async/await, as this may trigger the code to continue running on a different thread.

Perhaps, we have to use _Scope.sync for everything, and ensure that we check/clear the error stack at the end of every _Scope.sync block.
Or maybe we have to invent a new block form.

@jonasfj jonasfj added the bug Something isn't working label Nov 2, 2022
@jonasfj jonasfj changed the title Wrap BoringCrypto calls to ensure correct handling of errors from thread-local storage Ensure correct handling of errors from thread-local storage Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant