This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
Race condition in global g_spacemesh_api_abort_flag
#79
Labels
g_spacemesh_api_abort_flag
#79
g_spacemesh_api_abort_flag
(defined here https://github.com/spacemeshos/gpu-post/blob/develop/src/api_internal.cpp#L15) is used as a termination condition to stop calculation of hashes early (e.g. here https://github.com/spacemeshos/gpu-post/blob/develop/src/cuda/driver-cuda.cpp#L220).This global variable isn't protected from concurrent access, so stopping a running process is inherently unsafe at the moment. This should be fixed by protecting
g_spacemesh_api_abort_flag
with mutexes.The text was updated successfully, but these errors were encountered: