-
Notifications
You must be signed in to change notification settings - Fork 24
Calling context
when not set segfaults
#15
Comments
Btw. also: $client = new \GearmanClient();
$client->setContext('_test_');
var_dump($client->context());
die;
which is not expected |
any interest? |
@SpacePossum i saw this issue via mail and mistakenly thought it was part of the thread for php7 support. I asked in that thread if anyone has created. We do not have an official PHP7 release yet. |
I'll close this one for now than and test when there is a RC for PHP7. |
@SpacePossum Current version is 2.0.1 on my branch (https://github.com/wcgallego/pecl-gearman). Can you give that a shot? |
I've cloned your repo @wcgallego, here are the results $ sudo make install
/bin/bash /home/possum/work/pecl-gearman/pecl-gearman/libtool --mode=install cp ./gearman.la /home/possum/work/pecl-gearman/pecl-gearman/modules
libtool: install: cp ./.libs/gearman.so /home/possum/work/pecl-gearman/pecl-gearman/modules/gearman.so
libtool: install: cp ./.libs/gearman.lai /home/possum/work/pecl-gearman/pecl-gearman/modules/gearman.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /home/possum/work/pecl-gearman/pecl-gearman/modules
----------------------------------------------------------------------
Libraries have been installed in:
/home/possum/work/pecl-gearman/pecl-gearman/modules
[.. snip ...]
----------------------------------------------------------------------
Installing shared extensions: /usr/lib/php/20151012/
$ php-config --extension-dir
/usr/lib/php/20151012 <?php
$client = new \GearmanClient();
$client->context(); $ php test.php
Segmentation fault (core dumped) |
sorry for the late response, and the screenshot (select-copy seems to be disabled, I'll report that to Ubuntu ;)) |
Ah, makes sense. I think I see the problem. Reopening, but look for the fix on my repo, @SpacePossum |
thanks and will do :) |
@SpacePossum Should be fixed there, both on master and the 2.0.1 tag. Your test script and the test suite (aside from an integration test that was failing before) looking like they're working. Can you let me know? |
<?php
$client = new \GearmanClient();
$a = $client->context();
var_dump($a);
$client->setContext('_test_');
$a = $client->context();
var_dump($a); $ php test.php
/home/possum/work/pecl-gearman/pecl-gearman/test.php:5:
string(0) ""
/home/possum/work/pecl-gearman/pecl-gearman/test.php:8:
string(6) "_test_" $ php -v
PHP 7.0.10-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.10-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans All works as a charm now :) |
👍 |
The text was updated successfully, but these errors were encountered: