Thanks for your reply,

If I'm not confused, the implementation of Go race detector is written in 
go/src/runtime/race.go and its TSAN implementation (in C/C++) is dynamic 
linked to target programs by a shared library. Could I simply add race.go 
to gofrontend then link the target programs by the TSAN shared library to 
make the race detector enabled? I know integrating the race detector to 
gccgo/gollvm can't be done as easily as the aforementioned method, but what 
problems will I encounter when I do this.

Thanks, Ting

On Saturday, August 8, 2020 at 12:36:54 AM UTC+8, Ian Lance Taylor wrote:
>
> On Thu, Aug 6, 2020 at 11:33 PM Yuan Ting <yuan...@ict.ac.cn <javascript:>> 
> wrote: 
> > 
> > I know from README that gollvm does not support race detector. Is there 
> any technical problem? Is it possible to use ThreadSanitizer in LLVM to 
> implement a workaround race detector in gollvm? 
>
> ThreadSanitizer knows a great deal about the behavior of C library 
> functions.  In order to use it with GoLLVM, it would be necessary to 
> teach it about the behavior of Go library functions.  This is not 
> impossible--the same work was done for the Go race detector--but 
> somebody would have to do the work. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c6d696b5-4918-4926-9068-ff3cd2ae1118o%40googlegroups.com.

Reply via email to