msgpack-php icon indicating copy to clipboard operation
msgpack-php copied to clipboard

Unserialize invalid random data [tests/034.phpt] fails on alpine linux with php 7.3

Open ncopa opened this issue 5 years ago • 2 comments

PHP         : /usr/bin/php7                                                                                                                                                                                                                                                                                                                         
PHP_SAPI    : cli                                                                                                                                                                                                                                                                                                                                   
PHP_VERSION : 7.3.6                                                        
ZEND_VERSION: 3.3.6                                                                                                                                                                                                                                                                                                                                 
PHP_OS      : Linux - Linux ncopa-edge-x86_64 4.9.65 #1-Alpine SMP Fri Nov 24 17:48:25 GMT 2017 x86_64                                                                                                                                                                                                                                              
INI actual  : /home/ncopa/aports/community/php7-pecl-msgpack/src/msgpack-2.0.3/tmp-php.ini                                                                                
More .INIs  :                                                                                                                                                                                                                                                                                                                                       
CWD         : /home/ncopa/aports/community/php7-pecl-msgpack/src/msgpack-2.0.3                                                                                                                                                                                                                                                                      
Extra dirs  :                                                                      
VALGRIND    : Not used                                                        
...

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   14
---------------------------------------------------------------------

Number of tests :  115               111
Tests skipped   :    4 (  3.5%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (  0.9%) (  0.9%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :  110 ( 95.7%) ( 99.1%)
---------------------------------------------------------------------
Time taken      :    5 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Unserialize invalid random data [tests/034.phpt]
=====================================================================

ncopa avatar Jun 14 '19 11:06 ncopa

FWIW this is also causing a segfault. For example here's a simplified reproducer script:

<?php
  // Program terminated with signal SIGSEGV, Segmentation fault.
  // #0  0x00000000af8ce5df in zend_unmangle_property_name_ex ()
  $data = '85000101020203a774657374696e6779d5c8a1b6a90677721846a830d89af7918852c1fb84e6e66987e3f8d180';
  msgpack_unserialize(hex2bin($data));

travispaul avatar Apr 13 '20 07:04 travispaul

That's still valid but thanks for XFAIL

TEST 37/136 [tests/034.phpt]
========DIFF========
001+ 
001- OK
========DONE========
XFAIL Unserialize invalid random data [tests/034.phpt]   XFAIL REASON: REGRESSION

andypost avatar Nov 27 '20 18:11 andypost