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
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,
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
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
/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
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
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