Hi, I'm not sure how well supported threadsanitizer is by LDC(it seems to work OK,) but using atomicOp!"" on the same variable seems to cause tsan to think it's a data race.
I'm not 100% sure this is a bug, as I'm not an expert with atomics.
I think it has to do with it not detecting atomicLoad as an atomic operation(??) as it says cas contains an atomic write, but it just calls atomicLoad a regular load.
Hi, I'm not sure how well supported threadsanitizer is by LDC(it seems to work OK,) but using atomicOp!"" on the same variable seems to cause tsan to think it's a data race.
I'm not 100% sure this is a bug, as I'm not an expert with atomics.
I think it has to do with it not detecting atomicLoad as an atomic operation(??) as it says cas contains an atomic write, but it just calls atomicLoad a regular load.
Happens in both LDC 0.15.1 and a HEAD build.
example:
compile with: ldc -sanitize=thread filename.d
(BTW, this seems to output errors related to a potential deadlock aswell. I'm unsure if that's related to this bug.)