forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing write barrier bug in ArrayStorage::pop_back
Summary: There was a bug in `ArrayStorage::pop_back`, where it decreases the array length without notifying the GC. Due to the way Hades uses a Snapshot at the Beginning write barrier, it needs to know when an object might have become unreachable. Reducing the array length is semantically equivalent to writing a null over an existing pointer, so it needs a write barrier. Other `resize`-like APIs are also vulnerable to this as well, and must be careful to use write barriers whenever the length decreases, and fill uninitialized memory when the length increases. Reviewed By: neildhar Differential Revision: D23355076 fbshipit-source-id: aa3f4292a72671ac9f8cec9bf29b522feb5bb3d4
- Loading branch information
1 parent
c60f962
commit b61de9d
Showing
3 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters