diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-12-04 14:02:56 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-12-05 08:42:25 -0500 |
| commit | 674eb7df7f409099f33da77293d9658e09b470d6 (patch) | |
| tree | ae4531d1f01a61ad8e3d7425f058046f0fe1555a /test/ruby | |
| parent | ed25f0bd5a4fb936eddde080b90446e7d55afb2d (diff) | |
Make env_copy compaction safe
The original order of events is:
1. Allocate env_body.
2. Fill env_body using elements in src_env, and it performs operations
that can trigger a GC.
3. Create the copied_env using vm_env_new.
However, if GC compaction runs during step 2, then copied_env would not
have yet been created and objects on env_body could move but it would
not be reference updated.
This commit changes the the order to be (1), (3), (2).
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions
