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
Check unsafe.Pointer
use with go 1.14 -d=checkptr
compiler option
#10133
Comments
This pulls in several unsafe.Pointer usage fixes found in these packages using the Go 1.14 `-d=checkptr` compiler flag. Updates #10133 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
I also started checking our dependencies and sent some PRs already:
Probably more to come. |
@tklauser Cool, have you already tried compiling with |
@brb not yet, so far I only ran it with the tests. Will try cilium-agent next. |
This pulls in several unsafe.Pointer usage fixes found in these packages using the Go 1.14 `-d=checkptr` compiler flag. Updates #10133 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
DO NOT MERGE, testing only. Check `unsafe.Pointer` using the Go 1.14 `-d=checkptr` compiler option in CI test builds. For #10133 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The fsnotify package suggests to use the github.com/fsnotify/fsnotify package patch, see fsnotify/fsnotify#108. While at it also update to the current master of github.com/fsnotify/fsnotify in order to fix an unsafe pointer conversion for #10133 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
The fsnotify package suggests to use the github.com/fsnotify/fsnotify package patch, see fsnotify/fsnotify#108. While at it also update to the current master of github.com/fsnotify/fsnotify in order to fix an unsafe pointer conversion for #10133 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This issue has not seen any activity since it was marked stale. Closing. |
The upcoming Go 1.14 release will include
-d=checkptr
as a compile-time option for adding instrumentation to check that Go code is followingunsafe.Pointer
safety rules dynamically. This might help in finding problematic uses ofunsafe.Pointer
in Cilium's code base, e.g. causing memory corruption.This option should probably not be enabled by default, but could e.g. be run as part of CI.
Also see https://tip.golang.org/doc/go1.14#compiler for details.
/cc @brb
The text was updated successfully, but these errors were encountered: