Bug 1097272 - Ruby bindings should use RB_GC_GUARD (instead of volatile) for enhanced safety
Summary: Ruby bindings should use RB_GC_GUARD (instead of volatile) for enhanced safety
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-13 13:06 UTC by Richard W.M. Jones
Modified: 2025-10-17 12:52 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-10-17 00:10:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-05-13 13:06:23 UTC
Description of problem:

libguestfs Ruby bindings currently use volatile to ensure
the compiler spills pointers to live data onto the stack.
Which is probably fine for GCC, maybe not for other compilers.
In any case it could be better to use the RB_GC_GUARD macro
for this purpose.

Version-Release number of selected component (if applicable):

libguestfs, all recent versions

Additional info:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/60741
https://github.com/libguestfs/libguestfs/blob/6cc521dc4533d10659214cc660f31239de9e28e7/generator/ruby.ml#L62

Thanks: Vít Ondruch

Comment 1 Richard W.M. Jones 2014-05-13 13:08:15 UTC
(BTW before using this macro, we should probably look at what
it actually does to ensure it is sane.)

Comment 2 Red Hat Bugzilla 2025-10-17 00:10:10 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.

Comment 3 Alasdair Kergon 2025-10-17 12:52:13 UTC
Reopening because Virtualization Tools has not been discontinued.


Note You need to log in before you can comment on or make changes to this bug.