|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77510 zend_hash_str_find_ptr causes segfault
Submitted: 2019-01-23 20:48 UTC Modified: 2019-01-24 11:26 UTC
From: whdcksz at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: Unknown/Other Function
PHP Version: 7.2.14 OS: Ubuntu 18.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
44 - 5 = ?
Subscribe to this entry?

 [2019-01-23 20:48 UTC] whdcksz at gmail dot com
Hi everyone, I'm a noob developer and developing a extension and I am experiencing very strange problem that I don't understand.

Everytime I call zend_hash_str_find_ptr to a HashTable which is initialized in PHP_GINIT_FUNCTION, it crashes with segfault. If I move initialization of HashTable into PHP_RINIT_FUNCTION, it worked. Also, if I use malloc instead of ALLOC_HASHTABLE, it worked, too. And also, if I set USE_ZEND_ALLOC=0, it worked, too. 

It looks like a bug related GC but I can't pretty sure. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-24 11:26 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2019-01-24 11:26 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

See <>.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Jun 27 10:05:44 2022 UTC