Re: [libvirt-rust PATCH 1/1] Make creating safe wrapper from raw pointer unsafe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 25, 2019 at 04:36:16PM +0000, Linus Färnstrand wrote:
Giving an invalid pointer to the safe wrapper types causes
undefined behavior when methods are later called on said wrapper

Properly document safety contract of using unsafe constructor
---

Ideally it should not be exposed at all because there already is a method for
getting the proper structure.  And that method (or those methods) already use ::new() so with this patch it just fails.  Tests, examples, etc.  Instead of fixing that I would, probably, just not expose them.  I don't see a reason for them being public.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux