Segfault with block called from continuation
I'm getting a crash on OSX with 1.9.3-p385. I've also had the same crash on all the releases since at least -p194. I've seen some similar crash reports but nothing quite the same. Unfortunately this only happens intermittently when running my rails test suite and I haven't been able to make a simple reproduction.
The code where the crash occurs is in a model that uses the state_machine gem, specifically an around_transition which uses continuations internally. It's calling a block so given the intermittent nature of the crash perhaps the block is being GC'd at some point?
Our code looks like:
around_transition do |item, block|
item.changing_state = true
item.changing_state = false