[PATCH] D43025: [tsan] Add support for linux/powerpc64 in buildgo.sh

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 10:16:15 PST 2018


dvyukov added a comment.

Is there an upstream Go bug for race on powerpc? Please CC me on it.



================
Comment at: lib/tsan/go/buildgo.sh:153
+	if [ "$SUFFIX" = "linux_ppc64le" ]; then
+		FLAGS="$FLAGS -DSANITIZER_DEBUG=0 -O3 -mcpu=power8 -fomit-frame-pointer -fno-function-sections"
+	elif [ "$SUFFIX" = "linux_amd64" ]; then
----------------
Please dedup the common part "-DSANITIZER_DEBUG=0 -O3 -fomit-frame-pointer" and then add arch-specific flags separately.


================
Comment at: lib/tsan/rtl/tsan_platform.h:420
+0f00 0000 0000 - 0f00 0000 0000: -
+0f00 0000 0000 - 0f50 0000 0000: heap
+0f50 0000 0000 - 0f60 0000 0000: -
----------------
I see that Go heap always starts at 0x00c0 on powerpc:
```
			switch {
			case GOARCH == "arm64" && GOOS == "darwin":
				p = uintptr(i)<<40 | uintptrMask&(0x0013<<28)
			case GOARCH == "arm64":
				p = uintptr(i)<<40 | uintptrMask&(0x0040<<32)
			default:
				p = uintptr(i)<<40 | uintptrMask&(0x00c0<<32)
			}
```
And you don't cover this region, instead it's occupied by shadow.
How does this work?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D43025





More information about the llvm-commits mailing list