facebook / facebook/hhvm

SplDoublyLinkedList: clone's behaviour should mimic PHP5

Open
#6,802 2 comments 0 reactions 0 assignees View on GitHub
mid-pri php5 incompatibility probably easy
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

Discovered an issue in HHVM's reimplementation of SplDoublyLinkedList. It appears because it relies on SplDoublyLinkedNode's, a deep clone is required to prevent the clone from being mutated post creation.

In PHP, the SplDoublyLinkedList class comes from the SPL extension written in C. I suspect the divergence comes from reimplementing the class in PHP/HHVM, and cloning without special handling (since the internals are totally different)

I will follow up with a pull request 'fixing this' as best I see it. Raising the issue to remind me and to request feedback on this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.