Bug #69904 [NEW]: ???

From: Date: Mon, 22 Jun 2015 19:48:24 +0000
Subject: Bug #69904 [NEW]: ???
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193768@lists.php.net to get a copy of this message
From: gamelaster at outlook dot com Operating system: Linux Debian Jessie PHP version: 5.6.10 Package: *General Issues Bug Type: Bug Bug description:??? 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 bug report at https://bugs.php.net/bug.php?id=69904&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69904&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69904&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69904&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69904&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69904&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69904&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69904&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69904&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69904&r=support Expected behavior: https://bugs.php.net/fix.php?id=69904&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69904&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69904&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69904&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69904&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69904&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69904&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69904&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69904&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69904&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69904&r=mysqlcfg

« previous php.bugs (#193768) next »