geos
geos copied to clipboard
`GEOS_init_r` writes to shared data without thread synchronization
I'm getting ThreadSanitizer failures when calling GEOS_init_r concurrently from multiple threads. The problem comes down to geom::util::Interrupt::cancel which is writing to a global variable called requested in src/geos/util/Interrupt.cpp without any thread synchronization. Is GEOS_init_r meant to be thread-safe or do users need to do their own synchronization to prevent data races? I suspect fixing this could be as simple as using std::atomic_flag for the requested variable.
Did you try that fix?
No I did not