Segmentation faults when calling __toString() magic method implicitly
|Assignee:||Jesús García Crespo||% Done:|
|Target version:||Release 1.3|
|Google Code Legacy ID:||atom-1995||Tested version:|
In some situations, specially under fastcgi in prod mode, PHP segfaults trying to call __toString() implicitly. Calling this method explicitly fix the problem, but we have many calls like this in different parts of our code.
It's curious that running in debug mode solves the problem.
It would be interesting to isolate this problem and try running recent PHP versions to check if the problem was solved or trying to track the bug in the PHP project, if exists.
Typical fix, replace this line:
if (1 > strlen($title = $this->resource))
if (1 > strlen($title = $this->resource->__toString()))
#3 Updated by Jesús García Crespo almost 9 years ago
- Priority changed from Low to High
We have been calling __toString() explicitly where this problem was reported. We should also check if this problem can be reproduced with the latest PHP releases.
[g] Labels added: Priority-High
[g] Labels removed: Priority-Low