Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

checkptr: unsafe pointer conversion on go 1.14 (macos) #261

Closed
mhrabovcin opened this issue Mar 2, 2020 · 2 comments · Fixed by #284
Closed

checkptr: unsafe pointer conversion on go 1.14 (macos) #261

mhrabovcin opened this issue Mar 2, 2020 · 2 comments · Fixed by #284
Labels
bug Something isn't working

Comments

@mhrabovcin
Copy link

This package does not work with golang 1.14 (macos) due to the following issue:

fatal error: checkptr: unsafe pointer conversion

goroutine 1 [running, locked to thread]:
runtime.throw(0x37148d5, 0x23)
        /usr/local/Cellar/go/1.14/libexec/src/runtime/panic.go:1112 +0x72 fp=0xc00079ed68 sp=0xc00079ed38 pc=0x1074412
runtime.checkptrAlignment(0xc0007abc00, 0x35dc5c0, 0x1)
        /usr/local/Cellar/go/1.14/libexec/src/runtime/checkptr.go:18 +0xb7 fp=0xc00079ed98 sp=0xc00079ed68 pc=0x1045df7
github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk.(*Scanner).Scan(0xc0002e63f0, 0xc0007b4620)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/karrick/godirwalk/scandir_unix.go:120 +0xe3 fp=0xc00079ee68 sp=0xc00079ed98 pc=0x2f5dc73
github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk.ReadDirents(0xc00005e004, 0x53, 0x0, 0x0, 0x0, 0x0, 0x203000, 0x203000, 0x9426c98, 0x0)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/karrick/godirwalk/readdir.go:26 +0xa9 fp=0xc00079ef28 sp=0xc00079ee68 pc=0x2f5cb99
github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk.newSortedScanner(0xc00005e004, 0x53, 0xc0007b4000, 0x0, 0x0)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/karrick/godirwalk/scanner.go:21 +0x6f fp=0xc00079efb8 sp=0xc00079ef28 pc=0x2f5e2af
github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk.walk(0xc00005e004, 0x53, 0xc0007b4000, 0xc00079f1b8, 0x0, 0x0)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/karrick/godirwalk/walk.go:257 +0x9b4 fp=0xc00079f080 sp=0xc00079efb8 pc=0x2f5f8c4
github.com/gobuffalo/packr/v2/internal/takeon/github.com/karrick/godirwalk.Walk(0xc00005e004, 0x53, 0xc00079f1b8, 0xe, 0xc00079f198)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/karrick/godirwalk/walk.go:200 +0x209 fp=0xc00079f118 sp=0xc00079f080 pc=0x2f5ebe9
github.com/gobuffalo/packr/v2/jam/parser.(*finder).findAllGoFiles.func1()
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/jam/parser/finder.go:50 +0x1b9 fp=0xc00079f200 sp=0xc00079f118 pc=0x2f8d6e9
sync.(*Once).doSlow(0xc0003d0280, 0xc00079f3e8)
        /usr/local/Cellar/go/1.14/libexec/src/sync/once.go:66 +0x104 fp=0xc00079f2d0 sp=0xc00079f200 pc=0x10c5dc4
sync.(*Once).Do(0xc0003d0280, 0xc00079f3e8)
        /usr/local/Cellar/go/1.14/libexec/src/sync/once.go:57 +0x69 fp=0xc00079f2f0 sp=0xc00079f2d0 pc=0x10c5ca9
github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer.Do(0xc0000fe2c0, 0xa5, 0xc00079f3e8)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/markbates/oncer/oncer.go:12 +0x116 fp=0xc00079f350 sp=0xc00079f2f0 pc=0x2f6a896
github.com/gobuffalo/packr/v2/jam/parser.(*finder).findAllGoFiles(0xc000610060, 0xc00005e004, 0x53, 0x15, 0xc00079f5b8, 0x2, 0x2, 0x0)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/jam/parser/finder.go:29 +0x200 fp=0xc00079f458 sp=0xc00079f350 pc=0x2f87950
github.com/gobuffalo/packr/v2/jam/parser.(*finder).findAllGoFilesImports.func1()
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/jam/parser/finder.go:93 +0x35f fp=0xc00079f6c8 sp=0xc00079f458 pc=0x2f8dabf
sync.(*Once).doSlow(0xc000240ab0, 0xc00079f8b0)
        /usr/local/Cellar/go/1.14/libexec/src/sync/once.go:66 +0x104 fp=0xc00079f798 sp=0xc00079f6c8 pc=0x10c5dc4
sync.(*Once).Do(0xc000240ab0, 0xc00079f8b0)
        /usr/local/Cellar/go/1.14/libexec/src/sync/once.go:57 +0x69 fp=0xc00079f7b8 sp=0xc00079f798 pc=0x10c5ca9
github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer.Do(0xc0000fe160, 0xac, 0xc00079f8b0)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/markbates/oncer/oncer.go:12 +0x116 fp=0xc00079f818 sp=0xc00079f7b8 pc=0x2f6a896
github.com/gobuffalo/packr/v2/jam/parser.(*finder).findAllGoFilesImports(0xc000610060, 0xc00005e004, 0x53, 0x0, 0x0, 0x2, 0x2, 0x1)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/jam/parser/finder.go:62 +0x200 fp=0xc00079f920 sp=0xc00079f818 pc=0x2f87bf0
github.com/gobuffalo/packr/v2/jam/parser.NewFromRoots(0xc0003cf2b0, 0x1, 0x1, 0xc0002e3ec0, 0xc00079fd18, 0x1045dcf, 0xc0004aa67f)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/jam/parser/roots.go:70 +0xb72 fp=0xc00079fcc8 sp=0xc00079f920 pc=0x2f89ec2
github.com/gobuffalo/packr/v2.glob..func1()
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/packr.go:15 +0x61 fp=0xc00079fd98 sp=0xc00079fcc8 pc=0x2f95801
github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe.Run.func1(0xc00079fdc8, 0x3672ae0)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/markbates/safe/safe.go:12 +0x3e fp=0xc00079fdb8 sp=0xc00079fd98 pc=0x2f6d63e
github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe.RunE(0xc00079fe50, 0x0, 0x0)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/markbates/safe/safe.go:32 +0x71 fp=0xc00079fe28 sp=0xc00079fdb8 pc=0x2f6d5b1
github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/safe.Run(0x37bfb00, 0x25, 0x0)
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/internal/takeon/github.com/markbates/safe/safe.go:11 +0x57 fp=0xc00079fe70 sp=0xc00079fe28 pc=0x2f6d4f7
github.com/gobuffalo/packr/v2.init()
        /Users/martinhrabovcin/Workspace/go/pkg/mod/github.com/gobuffalo/packr/[email protected]/packr.go:14 +0xae fp=0xc00079fec8 sp=0xc00079fe70 pc=0x2f96ffe
runtime.doInit(0x4d1be40)
        /usr/local/Cellar/go/1.14/libexec/src/runtime/proc.go:5414 +0x8a fp=0xc00079fef8 sp=0xc00079fec8 pc=0x108398a
runtime.doInit(0x4d04dc0)
        /usr/local/Cellar/go/1.14/libexec/src/runtime/proc.go:5409 +0x57 fp=0xc00079ff28 sp=0xc00079fef8 pc=0x1083957
runtime.doInit(0x4d298c0)
        /usr/local/Cellar/go/1.14/libexec/src/runtime/proc.go:5409 +0x57 fp=0xc00079ff58 sp=0xc00079ff28 pc=0x1083957
runtime.doInit(0x4d0eb20)
        /usr/local/Cellar/go/1.14/libexec/src/runtime/proc.go:5409 +0x57 fp=0xc00079ff88 sp=0xc00079ff58 pc=0x1083957
runtime.main()
        /usr/local/Cellar/go/1.14/libexec/src/runtime/proc.go:190 +0x1ce fp=0xc00079ffe0 sp=0xc00079ff88 pc=0x1076a1e
runtime.goexit()
        /usr/local/Cellar/go/1.14/libexec/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc00079ffe8 sp=0xc00079ffe0 pc=0x10a8b71

which seems to be complaining about https://github.com/gobuffalo/packr/blob/master/v2/internal/takeon/github.com/karrick/godirwalk/scandir_unix.go#L120

It is possible to disable the golang check to get this temporarily working

-gcflags=all=-d=checkptr=0
@br-lewis
Copy link

br-lewis commented Mar 2, 2020

More context for what changed to cause this: https://golang.org/doc/go1.14#compiler

@mdempsky
Copy link

This issue has been fixed upstream: karrick/godirwalk#51

It looks like this project just needs to update its dependencies.

ed255 added a commit to hermeznetwork/hermez-node that referenced this issue Dec 22, 2020
Update packr to 2.8.1 which fixes this issue:
gobuffalo/packr#261 which I encountered while running
a test with `-race`
ed255 added a commit to hermeznetwork/hermez-node that referenced this issue Dec 22, 2020
Update packr to 2.8.1 which fixes this issue:
gobuffalo/packr#261 which I encountered while running
a test with `-race`
ed255 added a commit to hermeznetwork/hermez-node that referenced this issue Dec 22, 2020
Update packr to 2.8.1 which fixes this issue:
gobuffalo/packr#261 which I encountered while running
a test with `-race`
ed255 added a commit to hermeznetwork/hermez-node that referenced this issue Dec 22, 2020
Update packr to 2.8.1 which fixes this issue:
gobuffalo/packr#261 which I encountered while running
a test with `-race`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants