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

USE_ZEND_ALLOC=0 to mitigate SIGSEGV in zend_hash_str_find() #689

Closed
ghost opened this issue Jul 17, 2018 · 5 comments
Closed

USE_ZEND_ALLOC=0 to mitigate SIGSEGV in zend_hash_str_find() #689

ghost opened this issue Jul 17, 2018 · 5 comments
Labels

Comments

@ghost
Copy link

ghost commented Jul 17, 2018

A known php allocator bug causes occasional crashes of PHP unless USE_ZEND_ALLOC=0 is set in the environment. A reproducer was provided and will hopefully allow this rather old problem to be fixed.

In the meantime I suggest USE_ZEND_ALLOC=0 is set to mitigate the problem.

@tianon
Copy link
Member

tianon commented Jul 17, 2018 via email

@ghost
Copy link
Author

ghost commented Jul 17, 2018

@tianon I'm not familiar with the details of the zend allocator implementation and cannot usefully comment.

@tianon
Copy link
Member

tianon commented Jul 20, 2018

From https://secure.php.net/manual/en/internals2.memory.management.php:

Note: USE_ZEND_ALLOC=0 in the environment will stop the memory manager from functioning, all allocations fall back on the default system allocators which can be useful for debugging leaks, and should only be used for this purpose.

So, I don't think it's a good idea for us to enable this unilaterally (this is a pretty strong statement from upstream).

Looking at the first comment in https://bugs.php.net/bug.php?id=75375 from laruence, I think they're probably still very interested in finding a minimal reproducer (nextcloud/server#10241 is definitely good, but it's nowhere near minimal, and would be a bit of a pain for them to replicate with updated PHP builds while trying to actually develop a fix, which is why they want something closer to a 10-20 line script).

@ghost
Copy link
Author

ghost commented Jul 20, 2018

@tianon right. Getting a reproducer for such an elusive bug is the hard part and I stumbled into nextcloud/server#10241 by chance. But there still is work to go from this reproducer to an actual fix.

@tianon
Copy link
Member

tianon commented Sep 4, 2018

Closing in favor of upstream's bug tracking this issue: https://bugs.php.net/bug.php?id=75375

@tianon tianon closed this as completed Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants