Pop call frame before boxing result
After reflective method calls, primitive results need to be boxed
up in an appropriate object. This generally requires allocating an
object of the appropriate type. We were doing this before popping
the call frame, which meant that if the allocation caused a GC we
would be scanning results out of a "dead" stack frame.
We hit a case where a register went from holding a reference to
holding a primitive right before the method returned. The exported
PC was pointing at the last GC point, where the register was expected
to hold a reference, so precise GC was getting very confused.
(cherry-pick from dalvik-dev)
2 files changed