php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: whdcksz at gmail dot com
New email:
PHP Version: OS:

 

 [2019-01-23 20:48 UTC] whdcksz at gmail dot com
Description:
------------
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. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-24 11:26 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2019-01-24 11:26 UTC] cmb@php.net
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 http://www.php.net/support.php 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 <http://www.phpinternalsbook.com/php7/memory_management/zend_memory_manager.html#the-two-main-kind-of-dynamic-memory-pools-in-php>.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun May 22 08:05:44 2022 UTC