Closed ghost closed 3 years ago
Thanks; I think this is known/expected behavior. In our code, these variables are just "abort" flags, and we just care that we eventually quit if they are set; we don't need thread-level synchronization. @manodeep, do you agree?
Thank you @markbcahill for your report. While the specific vpf
example is single-threaded only, that pattern does exist in other multi-threaded routines that you have highlighted. However, as @lgarrison said - we just need the value to be updated by the thread for the desired functionality. (I thought I had put an inline comment to indicate this intentionality but I don't see it - ohh well)
Thank you for the quick reply! It can be hard to tell what is intended or not, since I'm not in the head of whoever originally programmed it
General information
Issue description
Data races exist with the variables with the prefixes
interrupt_status
in the following files:An example from
countspheres_impl_float.c
:Here, we have a situation where one thread may attempt to read
interrupt_status_vpf_float
before another thread changes its value toEXIT_FAILURE
.This data race was discovered using the Coderrect Scanner https://coderrect.com/