Bug #74962 [Fbk->Opn]: protobuf extension bug
| From: | roczpwu at gmail dot com | Date: | Fri, 21 Jul 2017 11:14:35 +0000 |
| Subject: | Bug #74962 [Fbk->Opn]: protobuf extension bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210164@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74962&edit=1
ID: 74962
User updated by: roczpwu at gmail dot com
Reported by: roczpwu at gmail dot com
Summary: protobuf extension bug
-Status: Feedback
+Status: Open
Type: Bug
Package: *General Issues
Operating System: mac osx
PHP Version: 7.1.7
Block user comment: N
Private report: N
New Comment:
backtrace is shown as below:
additionaly, protobuf extension version is 3.3.2
=================================================
Core was generated by `php Client.php'.
Program terminated with signal 11, Segmentation fault.
#0 stringdata_handler (closure=0x600000002, hd=0x322d2f0,
str=0x7efe59462419 "hello", len=5, handle=0x7fff883d3820)
at /root/protobuf-3.3.2/encode_decode.c:325
325 /root/protobuf-3.3.2/encode_decode.c: No such file or directory.
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.26-20.el7_2.x86_64
glibc-2.17-157.el7_3.5.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.14.1-27.el7_3.x86_64
libcom_err-1.42.9-9.el7.x86_64 libcurl-7.29.0-35.el7.centos.x86_64 libidn-1.28-4.el7.x86_64
libjpeg-turbo-1.2.90-5.el7.x86_64 libmcrypt-2.5.8-13.el7.x86_64 libpng-1.5.13-7.el7_2.x86_64
libselinux-2.5-6.el7.x86_64 libssh2-1.4.3-10.el7_2.1.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64
nspr-4.13.1-1.0.el7_3.x86_64 nss-3.28.4-1.2.el7_3.x86_64 nss-softokn-freebl-3.16.2.3-14.4.el7.x86_64
nss-util-3.28.4-1.0.el7_3.x86_64 openssl-libs-1.0.1e-60.el7_3.1.x86_64 pcre-8.32-15.el7_2.1.x86_64
xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-17.el7.x86_64
Previous Comments:
------------------------------------------------------------------------
[2017-07-21 09:57:34] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2017-07-21 09:42:36] roczpwu at gmail dot com
Description:
------------
I generate php files using my pro file, when I invoke serializeToString method, Segment fault: 11
error occurred.
Test script:
---------------
proto file:
syntax = "proto3";
package com;
message A
{
string str = 1;
}
message B
{
A a = 307001;
string json_body_req = 308000;
}
===================================
php test file:
<?php
$b = new \Com\B();
$a = new \Com\A();
$a->setStr("hello");
$b->setJsonBodyReq("world");
$b->setA($a);
$str = $b->serializeToString();
$b = new \Com\B();
$b->mergeFromString($str);
var_dump($b->getA()->getStr());
Expected result:
----------------
string(5) "hello"
Actual result:
--------------
Segmentation fault: 11
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74962&edit=1