[go-nuts] Why the following code is data race free ?

2021-11-16 Thread Ting Yuan
I wrote a simple function and hope it has a race alarm under the `-race` flag: package main import ( "fmt" "time" ) func main() { a := 1 go func() { fmt.Println(a) // If I remove this instruction, the detector will report a data race

[go-nuts] Does GOMAXPROCS(1) means run a program deterministically

2020-11-01 Thread Ting Yuan
I find it is tricky to debug a concurrency Go program in multi-core systems, so I wonder if there is a way to make the program run in deterministically. Can I assume a program with GOMAXPROCS(1) can be deterministically executed ? Here a deterministic execution means once the input is given,

Re: [go-nuts] Why gollvm not support race detector?

2020-08-11 Thread Ting Yuan
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

Re: [go-nuts] Could someone tell me how to build gollvm?

2019-05-08 Thread Ting Yuan
AM UTC+8, Than McIntosh wrote: > > Agree, the embedded space looks fishy. > > I also note that your shell is set to zsh -- you might try instead using > SHELL=/bin/sh to see if that works better. > > Thanks, Than > > > > > On Wed, May 8, 2019 at 12:04 PM T

Re: [go-nuts] Could someone tell me how to build gollvm?

2019-05-08 Thread Ting Yuan
/llvm/tools/gollvm/gofrontend/libgo/go/cmd/buildid/buildid.go > /root/llvm/tools/gollvm/gofrontend/libgo/go/cmd/buildid/doc.go > toolfiles ) > > I am thinking that maybe there is something going wrong with the > invocation of 'match.sh' in your case that is throwing things

Re: [go-nuts] Could someone tell me how to build gollvm?

2019-05-08 Thread Ting Yuan
d be that you don't have "sed" installed on your > system? > > Thanks, Than > > > On Tue, May 7, 2019 at 9:56 PM Ting Yuan > > wrote: > >> Hello Than, >> when I using ninja to build gollvm, just like >> >> % cmake -DCMAKE_INSTAL

Re: [go-nuts] Could someone tell me how to build gollvm?

2019-05-07 Thread Ting Yuan
Hello Than, when I using ninja to build gollvm, just like % cmake -DCMAKE_INSTALL_PREFIX=/home/yt/LLVMsvn/install - DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold -G "Ninja" ../llvm % ninja gollvm the build system still reports an error: ninja: error: '/home/yt/LLVM