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
runtime/race: incorrect line number in race report #8053
Labels
Milestone
Comments
Sorry I don't have time to boil this down to a smaller example, but here is a complete program that reproduces the bug in go1.3beta2 on linux x86_64: glycerine/goq@b8bd5ad this isn't the tip, because I don't want to leave the race in the code, but if you check out that commit it will reproduce. do: go test -v -race to see the race report on line immo_test.go:42, when the bug is on immo_test.g:41. |
Labels changed: added repo-main, racedetector. Owner changed to @dvyukov. Status changed to Accepted. |
I took a quick look, it will require updating all syso files which is painful and risky at this stage. I should have been bundled this fix this something else, but I forget about it. Let's move this to 1.5, it does not seem to be super critical. Labels changed: added release-go1.5, removed release-go1.4. |
dvyukov
added a commit
that referenced
this issue
Feb 20, 2015
In most cases we pass return PC to race detector, and race runtime subtracts one from them. However, in manual instrumentation in runtime we pass function start PC to race runtime. Race runtime can't distinguish these cases and so it does not subtract one from top PC. This leads to bogus line numbers in some cases. Make it consistent and always pass what looks like a return PC, so that race runtime can subtract one and still get PC in the same function. Also delete two unused functions. Update #8053 Change-Id: I4242dec5e055e460c9a8990eaca1d085ae240ed2 Reviewed-on: https://go-review.googlesource.com/4902 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: