Bug #69904 [Opn->Nab]: ???
| From: | kalle@php.net | Date: | Tue, 23 Jun 2015 20:21:26 +0000 |
| Subject: | Bug #69904 [Opn->Nab]: ??? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-193817@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69904&edit=1
ID: 69904
Updated by: kalle@php.net
Reported by: gamelaster at outlook dot com
Summary: ???
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Linux Debian Jessie
PHP Version: 5.6.10
Block user comment: N
Private report: N
New Comment:
Hi!
This is not a support forum, just for pure bug reporting, but fear not! You should be able to find
some internals support help on channels like #php.pecl on EFNet (IRC) or our mailing lists
internals@ or pecl-dev@ (see http://php.net/mailinglists)
Previous Comments:
------------------------------------------------------------------------
[2015-06-22 19:48:23] gamelaster at outlook dot com
Description:
------------
Good day,
first, this is a first forum where i though i can write my trouble, so if im wrong, + move or
delete. Thanks
To topic, i trying to run a (relative) old DBUS library for PHP
(https://github.com/GAMELASTER/php-dbus - my fork and upgrade for success building) and SkypePHP
library (https://github.com/fujimoto/php-skype). I successfully fixed a DBUS (just trivial forgot of
rename) and builded. When i execute skype_bot.php from console as root, its little work but then PHP
throw Segmentation fault. Im not a newbie in programming and linux, but with c++ and linux
building-debugging i dont have some skills. But i gets a GDB dump and found the root of trouble.
So trouble is in zend_hash_find... As i said, i dont have so much experiences but... :-) I tryied to
print a zv, key, element, on_error ... But i dont knowed the values of zend_hash_find so i cant
fprintf (my low skills in C++). So, what to do now?
Thanks
P.S. If im fully wrong, where i can ask to this problem? (I tryied ask a author of PHP DBUS but he
is inactive... :/ )
Test script:
---------------
#define dbus_objprop_get(zv, key, element, on_error) { \
fprintf(stderr, "execute dbus_objprop_get\n");\
if (zend_hash_find(Z_OBJPROP(zv), key, strlen(key)+1, (void**)&element) != SUCCESS) { \
fprintf(stderr, "all good\n");\
php_error_docref(NULL TSRMLS_CC, E_WARNING, "property [%s] is not set", key); \
fprintf(stderr, "good2\n");\
element = NULL; \
on_error; \
} \
}
/* {{{ _dbus_message_resource */
static DBusMessage* _dbus_message_resource(zval *obj TSRMLS_DC) {
zval **tmp;
int resource_type;
if (obj == NULL) {
return NULL;
}
dbus_objprop_get(*obj, "message", tmp, 0); // line 308
if (tmp == NULL) {
return NULL;
}
void *message = (void*)zend_list_find(Z_LVAL_PP(tmp), &resource_type);
if (message == NULL || resource_type != le_dbus_message) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "message identifier not found");
return NULL;
}
return message;
}
Expected result:
----------------
just work
Actual result:
--------------
GDB pastebins
http://pastebin.com/aXnumw74
http://pastebin.com/kWsKkipV
Segmentation Fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69904&edit=1