Bug #74962 [Opn->Fbk]: protobuf extension bug
| From: | requinix@php.net | Date: | Fri, 21 Jul 2017 09:57:38 +0000 |
| Subject: | Bug #74962 [Opn->Fbk]: protobuf extension bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210162@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
Updated by: requinix@php.net
Reported by: roczpwu at gmail dot com
Summary: protobuf extension bug
-Status: Open
+Status: Feedback
Type: Bug
-Package: PHP Language Specification
+Package: *General Issues
Operating System: mac osx
PHP Version: 7.1.7
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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