go-ceph/internal/cutil
Sven Anderson c8f26a841b rbd: eliminate invalid unsafe.Pointers
Although it seems to be stable with the current Go versions,
unsafe.Pointers that are created by applying arithmetic on nil
pointers are explicitly not allowed[1], and could potentially lead to
panics by the garbage collector.  To be on the safe side, this change
goes back to minimal inline wrappers for the callback registrations,
which should be zero-cost.  For the callbacks themselves fortunately
no wrappers are required, because CGo happily converts void* to
uintptr arguments.  The potentially problematic VoidPtr helper is
removed again.

[1] https://golang.org/pkg/unsafe/#Pointer

Signed-off-by: Sven Anderson <sven@redhat.com>
2020-11-09 08:58:22 +00:00
..
command_input.go cutil: add a new internal package for c+go utility functions 2020-05-12 17:18:08 -04:00
command_input_test.go cutil: add a new internal package for c+go utility functions 2020-05-12 17:18:08 -04:00
command_output.go cutil: allow passing free functions to command output type 2020-05-12 17:18:08 -04:00
command_output_test.go cutil: allow passing free functions to command output type 2020-05-12 17:18:08 -04:00
iovec.go cutil: add Iovec type wrapping C struct iovec arrays 2020-08-28 10:07:34 -04:00
iovec_test.go cutil: add Iovec type wrapping C struct iovec arrays 2020-08-28 10:07:34 -04:00
splitbuf.go cutil: add SplitBuffer and SplitSparseBuffer helper functions 2020-07-23 16:38:39 -04:00
splitbuf_test.go cutil: add SplitBuffer and SplitSparseBuffer helper functions 2020-07-23 16:38:39 -04:00
type_aliases.go cutil: allow passing free functions to command output type 2020-05-12 17:18:08 -04:00