You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: