[Bug 1541014] Re: 'go vet' falls over on expressions like C.f(*p(**q))

Michael Hudson-Doyle michael.hudson+lp at canonical.com
Tue Feb 9 02:51:38 UTC 2016


I think this should be fixed in the golang 1.6~rc2 package, can you
confirm?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to golang in Ubuntu.
https://bugs.launchpad.net/bugs/1541014

Title:
  'go vet' falls over on expressions like C.f(*p(**q))

Status in golang package in Ubuntu:
  Confirmed

Bug description:
  This file is enough to cause it: http://pastebin.ubuntu.com/14858123/
  And this is the result:

  panic: runtime error: invalid memory address or nil pointer dereference
  [signal 0xb code=0x1 addr=0x28 pc=0x40b5a3]

  goroutine 1 [running]:
  main.cgoBaseType(0xc8200cc000, 0x7f5b327dec58, 0xc8200c63e0, 0x0, 0x0)
  	/usr/lib/go/src/cmd/vet/cgo.go:75 +0x2d3
  main.checkCgoCall(0xc8200cc000, 0x7f5b327de930, 0xc820013300)
  	/usr/lib/go/src/cmd/vet/cgo.go:42 +0x1ad
  main.(*File).Visit(0xc8200cc000, 0x7f5b327de930, 0xc820013300, 0x0, 0x0)
  	/usr/lib/go/src/cmd/vet/main.go:485 +0x1ba
  go/ast.Walk(0x7f5b327defd0, 0xc8200cc000, 0x7f5b327de930, 0xc820013300)
  	/usr/lib/go/src/go/ast/walk.go:52 +0x56
  go/ast.walkExprList(0x7f5b327defd0, 0xc8200cc000, 0xc8200c4380, 0x1, 0x1)
  	/usr/lib/go/src/go/ast/walk.go:26 +0xd5
  go/ast.Walk(0x7f5b327defd0, 0xc8200cc000, 0x7f5b327df028, 0xc8200c3a90)
  	/usr/lib/go/src/go/ast/walk.go:308 +0xf63
  go/ast.Walk(0x7f5b327defd0, 0xc8200cc000, 0x7f5b327dea50, 0xc820013340)
  	/usr/lib/go/src/go/ast/walk.go:331 +0x1f7d
  go/ast.walkDeclList(0x7f5b327defd0, 0xc8200cc000, 0xc8200c43b0, 0x1, 0x1)
  	/usr/lib/go/src/go/ast/walk.go:38 +0xd5
  go/ast.Walk(0x7f5b327defd0, 0xc8200cc000, 0x7f5b327ded70, 0xc820018600)
  	/usr/lib/go/src/go/ast/walk.go:353 +0x29b9
  main.(*File).walkFile(0xc8200cc000, 0x7ffc85f63ec0, 0x9, 0xc820018600)
  	/usr/lib/go/src/cmd/vet/main.go:454 +0x1f5
  main.doPackage(0x7a0178, 0x1, 0xc82000a490, 0x1, 0x1, 0x0)
  	/usr/lib/go/src/cmd/vet/main.go:353 +0xd97
  main.main()
  	/usr/lib/go/src/cmd/vet/main.go:243 +0x420
  exit status 2

  
  adding parentheses to that, i.e. C.f((*p(**q))), is enough to make go vet happy again.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: golang-go 2:1.6~beta2-0ubuntu1
  ProcVersionSignature: Ubuntu 4.3.0-5.16-generic 4.3.3
  Uname: Linux 4.3.0-5-generic x86_64
  ApportVersion: 2.19.4-0ubuntu1
  Architecture: amd64
  Date: Tue Feb  2 16:38:20 2016
  InstallationDate: Installed on 2014-04-27 (645 days ago)
  InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
  SourcePackage: golang
  SystemImageInfo: Error: command ['system-image-cli', '-i'] failed with exit code 2:
  UpgradeStatus: Upgraded to xenial on 2015-06-18 (228 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/golang/+bug/1541014/+subscriptions



More information about the foundations-bugs mailing list