Project

General

Profile

« Previous | Next » 

Revision 85092ecd

Added by alanwu (Alan Wu) almost 2 years ago

Fix imemo_env corruption under auto compaction

Previously, vm_make_env_each() did:

  1. ALLOC env_body
  2. Copy locals into env_body
  3. Allocate imemo_env
  4. Set up imemo_env with env_body

If compaction runs during (3), locals copied to env_body could be
moved and the imemo_env could end up with invalid references.

Move (2) down so it reads references after potential movement.