|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: whdcksz at gmail dot com
New email:
PHP Version: OS:


 [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: Fri Jul 01 17:05:45 2022 UTC