Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect gigant memory usage for nested array structures #13003

Closed
dawehner opened this issue Dec 16, 2014 · 1 comment
Closed

Protect gigant memory usage for nested array structures #13003

dawehner opened this issue Dec 16, 2014 · 1 comment

Comments

@dawehner
Copy link
Contributor

FlattenException itself has a protectection against deeply nested array structures ... but it doesn't have any protection against both wide and deep arrays.

Example case: Drupal uses arrays to store its form structures, as it turns out, that in case
a big form structure, is part of an exception, the FlattenException code needs too much time and
memory, so PHP fatals out, see https://www.drupal.org/node/2386571

@dawehner
Copy link
Contributor Author

Note: Drupal itself will just not use the flattened exception, given that the backtrace rendering does not need it anyway.

fabpot added a commit that referenced this issue Dec 17, 2014
…hner)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #13004).

Discussion
----------

add a limit and a test to FlattenExceptionTest.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13003
| License       | MIT
| Doc PR        |

Commits
-------

c6bcf05 add a limit and a test to FlattenExceptionTest.
@fabpot fabpot closed this as completed Dec 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants