Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builds using compiler 1.4+ fail randomly while using 1.2 works correctly #12637

Closed
jdmontenegro opened this issue Sep 16, 2015 · 2 comments
Closed

Comments

@jdmontenegro
Copy link

Hi all,
Sorry for creating a new issue here, but the last one got closed before I could reply.

I have rerun my program using the race detector and there is no complain from the race detector

@jdmontenegro
Copy link
Author

Sorry got sent before I could finish.

the command line used was:

go run -race myprogram -flag1 file1 -flag2 file2 -out outfile -threads 4

and the program starts. It writes the expected things to STDERR but no complain form the race detector.
To test if the race detector was working correctly I ran the example shown here:

https://golang.org/doc/articles/race_detector.html

and the race detector did show the expected error.
Does this mean that my program does not have a race? Or I cannot see the race detector output because my program is writing to STDERR?

I look forward to your suggestions.

Best regards,

Juan Montenegro

@minux minux closed this as completed Sep 16, 2015
@minux
Copy link
Member

minux commented Sep 16, 2015

Hi, please ask questions like this on the golang-nuts mailing list.
the issue tracker is for bugs in Go itself and proposals for new
features.

To answer your question, writing to stderr won't interfere with
the race detector. But the race detector can only detect the
race if it actually happens, so you need to run the program
multiple times with various inputs and work loads. (And note
that while the race detector can show races, it can never prove
that the code is free of any data races.)

Thanks.

@golang golang locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants