Tsan support for mach sempaphores

Hi,

I just got bit by TSan does not support mach semaphores (on macOS) · Issue #1384 · google/sanitizers · GitHub for the umpteenth time and wanted to try my hand at adding support for them into TSAN. I wanted to check in first if there’s been attempts at this in the past/something that would make this a particularly bad first issue.

thanks,
kwasi

@DanBlackwell who works on sanitizers at Apple

Hi kwasi, I think that would be a valuable contribution; I’d be happy to review it! I don’t think there have been any previous attempts to add support for these.

I think the right place for the new interceptors would be llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp at main · llvm/llvm-project · GitHub .