Go 1.13 support (#1546)

* tests: fix tests for Go 1.13

- Go 1.13 doesn't autogenerate init functions anymore, tests that
  expected that now fail and should be skipped.
- Plugin tests now need -gcflags'all=-N -l' now, we were probably
  getting lucky with -gcflags='-N -l' before.

* proc: allow signed integers as shift counts

Go1.13 allows signed integers to be used as the right hand side of a
shift operator, change eval to match.

* goversion: update maximum supported version

* travis: force Go to use vendor directory

Travis scripts get confused by "go: downloading" lines, the exact
reason is not clear. Testing that the vendor directory is up to date is
a good idea anyway.
This commit is contained in:
Alessandro Arzilli
2019-06-30 19:34:47 +02:00
committed by Derek Parker
parent a25d2a2b24
commit 55eed318fd
7 changed files with 32 additions and 14 deletions

View File

@ -927,8 +927,8 @@ func negotiateType(op token.Token, xv, yv *Variable) (godwarf.Type, error) {
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
// ok
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
if yv.DwarfType != nil || constant.Sign(yv.Value) < 0 {
return nil, fmt.Errorf("shift count type %s, must be unsigned integer", yv.Kind.String())
if constant.Sign(yv.Value) < 0 {
return nil, fmt.Errorf("shift count must not be negative")
}
default:
return nil, fmt.Errorf("shift count type %s, must be unsigned integer", yv.Kind.String())