go-ceph/rbd
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
..
diff_iterate.go rbd: eliminate invalid unsafe.Pointers 2020-11-09 08:58:22 +00:00
diff_iterate_test.go rbd: rename error type's Errno method to ErrorCode 2020-08-10 13:03:24 -04:00
doc.go rbd: use correct style for package doc comment 2019-12-12 11:34:51 -05:00
errors.go rbd: use FormatErrorCode for formatting rbd errors 2020-08-10 13:03:24 -04:00
errors_test.go rbd: use FormatErrorCode for formatting rbd errors 2020-08-10 13:03:24 -04:00
features.go rbd: make RBDError type unexported 2020-07-17 13:47:32 -04:00
features_mimic.go rbd/features: add FeatureSet for mapping features between bits and names 2020-02-24 16:28:03 -05:00
features_mimic_test.go rbd/features: add FeatureSet for mapping features between bits and names 2020-02-24 16:28:03 -05:00
features_nautilus.go rbd/features: add FeatureSet for mapping features between bits and names 2020-02-24 16:28:03 -05:00
features_nautilus_test.go rbd/features: add FeatureSet for mapping features between bits and names 2020-02-24 16:28:03 -05:00
features_test.go rbd: convert uses of RbdImageOptionX to ImageOptionX 2020-03-23 10:09:25 -04:00
metadata.go rbd: add ListMetadata implementing rbd_metadata_list 2020-11-04 14:01:51 +00:00
metadata_test.go rbd: add ListMetadata implementing rbd_metadata_list 2020-11-04 14:01:51 +00:00
namespace_nautilus.go rbd: convert NamespaceList for nautilus to use cutil.SplitSparseBuffer 2020-07-23 16:38:39 -04:00
namespace_nautilus_test.go rbd: add wrapper for rbd_namespace_list() function. 2020-06-15 13:43:26 -04:00
options.go rbd: add RBD_IMAGE_OPTION_FLATTEN for Mimic 2020-06-09 08:54:33 -04:00
options_mimic.go rbd: moved ImageOptionCloneFormat to rbd/options_mimic.go 2020-07-24 10:20:27 -04:00
options_octopus.go rbd: add RBD_IMAGE_OPTION_MIRROR_IMAGE_MODE for Octopus 2020-06-09 08:54:33 -04:00
options_test.go rbd: rename uses of RbdImageOptions to ImageOptions 2020-03-23 10:09:25 -04:00
pool_nautilus.go rbd: add constants for pool stat options and wrapper for rbd_pool_stats_get() 2020-07-24 10:35:57 -04:00
pool_nautilus_test.go rbd: add constants for pool stat options and wrapper for rbd_pool_stats_get() 2020-07-24 10:35:57 -04:00
rbd.go rbd: move image metadata functions to new go file 2020-11-04 14:01:51 +00:00
rbd_mimic.go rbd: convert GetImageNames for mimic to use cutil.SplitSparseBuffer 2020-07-23 16:38:39 -04:00
rbd_nautilus.go rbd: add Sparsify implementing rbd_sparsify 2020-08-27 14:22:52 -04:00
rbd_nautilus_test.go rbd: add wrapper for rbd_snap_set_by_id() 2020-09-24 14:03:01 -04:00
rbd_test.go rbd: move TestImageMetadata function to a new test file 2020-11-04 14:01:51 +00:00
snapshot.go rbd: add wrapper for rbd_snap_get_timestamp() 2020-09-24 14:03:01 -04:00
snapshot_mimic.go rbd: convert ListChildren for mimic to use cutil.SplitSparseBuffer 2020-07-23 16:38:39 -04:00
snapshot_namespace.go rbd: add wrapper for function rbd_snap_get_trash_namespace() 2020-07-24 10:20:27 -04:00
snapshot_namespace_test.go rbd: add wrapper for function rbd_snap_get_trash_namespace() 2020-07-24 10:20:27 -04:00
snapshot_nautilus.go rbd: add wrapper for rbd_snap_set_by_id() 2020-09-24 14:03:01 -04:00
snapshot_octopus.go rbd: add snapshot ID related functions 2020-09-24 14:03:01 -04:00
snapshot_octopus_test.go rbd: add snapshot ID related functions 2020-09-24 14:03:01 -04:00
snapshot_test.go rbd: add wrapper for rbd_snap_get_timestamp() 2020-09-24 14:03:01 -04:00
watchers_mimic.go rbd: eliminate invalid unsafe.Pointers 2020-11-09 08:58:22 +00:00
watchers_mimic_test.go rbd: add a UpdateWatch test case with multiple watches and go channels 2020-07-23 13:19:57 -04:00