File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/cmd/compile/internal/ssagen Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ GOROOT=/path/to/go-panikint /path/to/go-panikint/bin/go test -v .
119119```
120120
121121Note: 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.
122123When running `cmd/internal/testdir` (for example via `src/all.bash`), we disable overflow instrumentation using `GOPANIKINT_DISABLE_OVERFLOW=1 `.
123124
124125### Examples
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments