peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.31k stars 201 forks source link

when php google/protobuf is used, generated binary php file cause exception after compiled to dll #1123

Open chrislam1987 opened 9 months ago

chrislam1987 commented 9 months ago

when php google/protobuf is used, generated binary php file cause exception after compiled to dll

as the generated binary is mixed up?

Hello, World! Unhandled exception. Google\Protobuf\Internal\GPBDecodeException: Error occurred during parsing: Fail to push limit. in D:\ClassLibrary1\ClassLibrary1\vendor\google\protobuf\src\Google\Protobuf\Internal\CodedInputStream.php(339,12) Stack trace:

0 D:\ClassLibrary1\ClassLibrary1\vendor\google\protobuf\src\Google\Protobuf\Internal\CodedInputStream.php(362,8): CodedInputStream->pushLimit($byte_limit)

1 D:\ClassLibrary1\ClassLibrary1\vendor\google\protobuf\src\Google\Protobuf\Internal\GPBWire.php(285,8): CodedInputStream->incrementRecursionDepthAndPushLimit($byte_limit, $old_limit, $recursion_budget)

2 D:\ClassLibrary1\ClassLibrary1\vendor\google\protobuf\src\Google\Protobuf\Internal\Message.php(436,20): GPBWire::readMessage($input, $message)