Skip to content

Commit 0322930

Browse files
committed
(fix) no more broken CI
1 parent 7c9dbcf commit 0322930

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ GOROOT=/path/to/go-panikint /path/to/go-panikint/bin/go test -v .
119119
```
120120
121121
Note: the upstream Go distribution tests in `$GOROOT/test` intentionally rely on integer wrap-around.
122+
The go-panikint unit tests live in `$GOROOT/tests` (plural) and should run with overflow checks enabled.
122123
When running `cmd/internal/testdir` (for example via `src/all.bash`), we disable overflow instrumentation using `GOPANIKINT_DISABLE_OVERFLOW=1`.
123124
124125
### Examples

src/cmd/compile/internal/ssagen/ssa.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5698,13 +5698,18 @@ func isStandardLibraryFile(filename string) bool {
56985698
return false
56995699
}
57005700

5701+
filename = filepath.Clean(filename)
5702+
57015703
// Check if file is from GOROOT (standard library)
57025704
if buildcfg.GOROOT != "" {
5703-
gorootSrc := filepath.Join(buildcfg.GOROOT, "src")
5705+
sep := string(filepath.Separator)
5706+
5707+
gorootSrc := filepath.Join(buildcfg.GOROOT, "src") + sep
57045708
if strings.HasPrefix(filename, gorootSrc) {
57055709
return true
57065710
}
5707-
gorootTest := filepath.Join(buildcfg.GOROOT, "test")
5711+
5712+
gorootTest := filepath.Join(buildcfg.GOROOT, "test") + sep
57085713
if strings.HasPrefix(filename, gorootTest) {
57095714
return true
57105715
}

0 commit comments

Comments
 (0)