helix
helix copied to clipboard
GC issues
If we:
- heap allocate a struct-based helix object (e.g.
Duration::new) - GC runs
It will GC the Ruby object associated with the helix object, because the GC couldn't see the VALUE pointer on the stack
See https://github.com/sparklemotion/nokogiri/commit/0a1556a7c0ac1dc58c074a06f639bba3ddabab3f and http://blog.reverberate.org/2016/06/12/native-extensions-memory-management-part1-ruby-mri.html
Seems like we should be able to write a failing test for this, right?
@chancancode @wycats is this still an issue?
Until we allow calling back into the Ruby VM (thus opening up the possibility of triggering a GC pass mid-rust-frame), I don't think this could happen