helix icon indicating copy to clipboard operation
helix copied to clipboard

GC issues

Open chancancode opened this issue 8 years ago • 3 comments

If we:

  1. heap allocate a struct-based helix object (e.g. Duration::new)
  2. 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

chancancode avatar Mar 16 '17 01:03 chancancode

Seems like we should be able to write a failing test for this, right?

wagenet avatar Mar 16 '17 03:03 wagenet

@chancancode @wycats is this still an issue?

wagenet avatar Apr 27 '17 15:04 wagenet

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

chancancode avatar Oct 10 '17 05:10 chancancode