Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pointer checkptr when using -race flag #11

Closed
wants to merge 7 commits into from
Closed

Fix pointer checkptr when using -race flag #11

wants to merge 7 commits into from

Conversation

lcostantino
Copy link

This is just a sample PR, since actually the uint32 can be improved.

Basically it does 2 things:

1- Bump version to 1.18 (at least should be 1.17 to use unsafe.Slice)
2- Remove panic from runtime ptr check when using -race flag.

Sample error:

fatal error: checkptr: pointer arithmetic computed bad pointer value

goroutine 22 [running]:
runtime.throw({0x903beb?, 0x4083ed?})
C:/Program Files/Go/src/runtime/panic.go:992 +0x76 fp=0xc00008bc60 sp=0xc00008bc30 pc=0x438336
runtime.checkptrArithmetic(0xc000016070?, {0x0?, 0xc00008bcc8?, 0x40efc7?})
C:/Program Files/Go/src/runtime/checkptr.go:53 +0xbb fp=0xc00008bc90 sp=0xc00008bc60 pc=0x4085bb
github.com/bi-zone/etw.(*Session).processEvents.func1(0xc00022a360, 0x1)
C:/Users/lcostant/go/pkg/mod/github.com/bi-zone/etw@v0.0.0-20210519083747-fe9042eb0ea8/session.go:324 +0x7e fp=0xc00008bcd8 sp=0xc00008bc90 pc=0x75295e
github.com/bi-zone/etw.(*Session).processEvents(0xc00022a360?, 0x0?)
C:/Users/lcostant/go/pkg/mod/github.com/bi-zone/etw@v0.0.0-20210519083747-fe9042eb0ea8/session.go:324 +0x11a fp=0xc00008bd98 sp=0xc00008bcd8 pc=0x75273a
github.com/bi-zone/etw.(*Session).Process(0xc00022a360, 0xc000040000)
C:/Users/lcostant/go/pkg/mod/github.com/bi-zone/etw@v0.0.0-20210519083747-fe9042eb0ea8/session.go:126 +0x1c7 fp=0xc00008be80 sp=0xc00008bd98 pc=0x751ae7
github.com/lcostantino/Panoptes/panoptes.(*Client).Start.func1({0xc0000c0360, 0x26}, {0xc0000a9535, 0xb}, {0xbb60b0, 0x0, 0x0})
C:/Users/lcostant/repos/panoptes/panoptes/client.go:81 +0x265 fp=0xc00008bf58 sp=0xc00008be80 pc=0x754ea5
github.com/lcostantino/Panoptes/panoptes.(*Client).Start.func4()
C:/Users/lcostant/repos/panoptes/panoptes/client.go:110 +0xaf fp=0xc00008bfe0 sp=0xc00008bf58 pc=0x754bef
runtime.goexit()
C:/Program Files/Go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc00008bfe8 sp=0xc00008bfe0 pc=0x467001
created by github.com/lcostantino/Panoptes/panoptes.(*Client).Start
C:/Users/lcostant/repos/panoptes/panoptes/client.go:79 +0x16e

goroutine 1 [chan receive]:
main.main()
C:/Users/lcostant/repos/panoptes/app/panoptes.go:291 +0x141a

@lcostantino lcostantino deleted the sample-etw branch July 13, 2022 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant