forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] serialization ref problem with array
Summary: When we serialize array with ref, we still check whether the ArrayData already exist in pointer map. If the same array happens to be serialized by value earlier, it will be treated as a ref to that array. This behavior is incorrect and can also manifest as an off-by-1 problem in unserialization when counting the sequence number. Test Plan: make fast_tests The newly added test case become: a:3:{i:0;a:1:{i:0;i:123;}i:1;a:1:{i:0;i:123;}i:2;R:4;} Without this diff: a:3:{i:0;a:1:{i:0;i:123;}i:1;R:2;i:2;R:4;} also tried dumping a huge stack in hphpd and verify the previous failed case worked Reviewers: mwilliams, myang Reviewed By: myang CC: gregschechte, andrewparoski, ps, mwilliams, qigao, myang Differential Revision: 338346
- Loading branch information
qigao
authored and
macvicar
committed
Oct 18, 2011
1 parent
dea256f
commit b1e3c15
Showing
6 changed files
with
28 additions
and
7 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
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