Bug #46584
closedFAL: Segfault with some PHP versions in copy/move operations
100%
Description
Due to a (meanwhile fixed) bug in PHP 5.4 < 5.4.6 (?), object comparisons can lead to segfaults. See https://bugs.php.net/bug.php?id=61557 for details.
We experienced this in the ResourceStorage class in copy/move operations, where the source and target storages have to be compared to check if the operation is within the same or between two different storages.
The segfaults occured on these environments:- Linux, PHP 5.4.6, mod_php
- Windows, PHP 5.4.8, FastCGI
The fix is simple: Use strict object comparison (===) for comparing the storages. This only checks the internal object identifier, not the object properties (see http://php.net/manual/en/language.oop5.object-comparison.php). The only problem is that this will fail if there are two objects for the same storage - but this is an unsupported behaviour that should not arise when the FAL API (Repositories, Factories) are properly used.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19209
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/19316
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/19316
Updated by Anonymous over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7279443b6d74b3c14380199af505590bbd25bbbf.
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed