|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74867 segment fault when use yar persistent call twice remote function
Submitted: 2017-07-06 12:38 UTC Modified: 2017-07-27 10:36 UTC
From: cl51287 at qq dot com Assigned: laruence (profile)
Status: Closed Package: yar (PECL)
PHP Version: 7.1.6 OS: CentOS Linux release 7.1.1503
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 - 21 = ?
Subscribe to this entry?

 [2017-07-06 12:38 UTC] cl51287 at qq dot com
when i use Yar's persistent, i got a segmentfault, and it can represent every time.
my php.ini as follow:

Test script:
$yar    = new Yar_Client('');
$yar->setOpt(YAR_OPT_PERSISTENT, true);
echo $yar->sum(1,2,3);
echo $yar->sum(1,2,3);

class Api
        public function sum($a, $b, $c)
                return $a + $b + $c;

$server = new Yar_Server(new Api);

Actual result:
#0  php_yar_curl_open (self=0x7ffff5e57310, address=0x7ffff5e57230, options=<optimized out>, msg=0x7fffffffb088) at /home/chenlong/src/yar-2.0.2/transports/curl.c:193
#1  0x00007fffef6cc9f8 in php_yar_client_handle (retval=0x7ffff5e140e0, params=0x7ffff5e14150, method=0x7ffff5e01480, client=<optimized out>, protocol=<optimized out>)
    at /home/chenlong/src/yar-2.0.2/yar_client.c:262
#2  zim_yar_client___call (execute_data=<optimized out>, return_value=0x7ffff5e140e0) at /home/chenlong/src/yar-2.0.2/yar_client.c:532
#3  0x000000000078d273 in ZEND_CALL_TRAMPOLINE_SPEC_HANDLER () at /home/chenlong/src/php-7.1.6/Zend/zend_vm_execute.h:2019
#4  0x000000000073cf2b in execute_ex (ex=<optimized out>) at /home/chenlong/src/php-7.1.6/Zend/zend_vm_execute.h:429
#5  0x0000000000790014 in zend_execute (op_array=0x7ffff5e7b000, op_array@entry=0xefbaf0 <executor_globals+1488>, return_value=return_value@entry=0x7ffff5e14030)
    at /home/chenlong/src/php-7.1.6/Zend/zend_vm_execute.h:474
#6  0x00000000006f81b4 in zend_execute_scripts (type=type@entry=8, retval=0x7ffff5e14030, retval@entry=0x0, file_count=file_count@entry=3) at /home/chenlong/src/php-7.1.6/Zend/zend.c:1476
#7  0x0000000000699300 in php_execute_script (primary_file=primary_file@entry=0x7fffffffd540) at /home/chenlong/src/php-7.1.6/main/main.c:2537
#8  0x000000000079219f in do_cli (argc=2, argv=0xf00790) at /home/chenlong/src/php-7.1.6/sapi/cli/php_cli.c:993
#9  0x000000000042cfe0 in main (argc=2, argv=0xf00790) at /home/chenlong/src/php-7.1.6/sapi/cli/php_cli.c:1381


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-27 10:36 UTC]
fixed in yar-2.0.3
 [2017-07-27 10:36 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 23 04:01:29 2024 UTC