Project

General

Profile

« Previous | Next » 

Revision ed25f0bd

Added by peterzhu2118 (Peter Zhu) over 1 year ago

Make env_clone compaction safe

The original order of events is:

  1. Allocate new_body.
  2. Peform memcpy into new_body.
  3. Create new_env using new_body.

However, if GC compaction runs during step 3, then new_env would not
have yet been created and objects on new_body could move but it would
not be reference updated.

This commit changes the order of the last two events.