Project

General

Profile

Actions

Bug #46584

closed

FAL: Segfault with some PHP versions in copy/move operations

Added by Andreas Wolf about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-03-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review about 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

Actions #2

Updated by Gerrit Code Review about 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

Actions #3

Updated by Gerrit Code Review about 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

Actions #4

Updated by Anonymous about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF