You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parent: 19024:e2f19c96b7e2 tip, darwin/amd64
$ hg clpatch 55100044
$ ./make.bash
$ go run -race pkg/runtime/race/testdata/cgo_test_main.go
crashes with random failures depending on revision number.
The root cause is that runtime.racefuncenter calls to a random address instead of
__tsan_func_enter.
If
CALL __tsan_func_enter(SB)
is replaced with:
MOVQ $__tsan_func_enter(SB), AX
CALL AX
then it works correctly.
The difference that I see between these versions is:
machoreloc1 rs->name=__tsan_read r->type=120
machoreloc1 rs->name=__tsan_read r->type=247
120 refers to D_ADDR and works, 247 refers to D_PCREL and does not work.
Not sure where to dig further.
The text was updated successfully, but these errors were encountered:
My suggestion is to keep using that workaround for now.
We can look at this for Go 1.4, but I don't want to make linker changes now, and you've
got a way to make it work.
It looks to me like later refactoring of the code has removed even the possibility of writing the alternate form, so there's not much left to do here. I don't know why the PC-relative instruction failed, but it has to do with relocations and linking and probably magic indirections, so it's not surprising there is a detail wrong somewhere.
The text was updated successfully, but these errors were encountered: