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: 2021-04-19 10:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
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.)


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