Open fasmat opened 1 year ago
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).
g_spacemesh_api_abort_flag
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.
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.