Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build with php 8 #148

Merged
merged 2 commits into from Sep 23, 2020
Merged

fix build with php 8 #148

merged 2 commits into from Sep 23, 2020

Conversation

remicollet
Copy link
Contributor

Obviously not enough, just for start

Some still failing

TEST 9/132 [tests/009.phpt]
========DIFF========
048+     *RECURSION*
048-     &array(1) {
049-       [0]=>
050-       *RECURSION*
051-     }
========DONE========
FAIL Check for reference serialization [tests/009.phpt] 

TEST 27/132 [tests/026.phpt]
========DIFF========
033+     *RECURSION*
033-     array(1) {
034-       ["foo"]=>
035-       *RECURSION*
036-     }
========DONE========
FAIL Cyclic array test [tests/026.phpt] 

TEST 131/132 [tests/issue137.phpt]
========DIFF========
001+ Termsig=11
001- object(DateTimeImmutable)#%d (3) {
002-   ["date"]=>
003-   string(26) "%d-%d-%d %d:%d:%f"
004-   ["timezone_type"]=>
005-   int(%d)
006-   ["timezone"]=>
007-   string(%d) "%s"
008- }
009- OK
========DONE========
FAIL Issue #137 (DateTime(Immutable) serialization doesn't work with php 7.4) [tests/issue137.phpt] 

Last being the more annoying....

@remicollet
Copy link
Contributor Author

Addition info

(gdb) bt
#0  zend_array_dup (source=0x6365726964207369) at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/Zend/zend_hash.c:2056
#1  0x000055555578f955 in date_object_get_properties_for (object=0x7ffff74141d0, purpose=<optimized out>)
    at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/ext/date/php_date.c:1797
#2  0x00007ffff7f9ee43 in msgpack_serialize_array (buf=0x7fffffff9080, val=<optimized out>, var_hash=0x7ffff7403498, object=1 '\001', 
    class_name=0x555555fa3628 "DateTimeImmutable", name_len=17, incomplete_class=0 '\000') at /work/GIT/pecl-and-ext/msgpack/msgpack_pack.c:226
#3  0x00007ffff7f9e3d8 in msgpack_serialize_object (incomplete_class=<optimized out>, name_len=<optimized out>, class_name=0x555555fa3628 "DateTimeImmutable", 
    var_hash=0x7ffff7403498, val=0x7ffff74141d0, buf=0x7fffffff9080) at /work/GIT/pecl-and-ext/msgpack/msgpack_pack.c:437
#4  msgpack_serialize_zval (buf=buf@entry=0x7fffffff9080, val=val@entry=0x7ffff74141d0, var_hash=0x7ffff7403498) at /work/GIT/pecl-and-ext/msgpack/msgpack_pack.c:521
#5  0x00007ffff7f9d3bd in php_msgpack_serialize (buf=buf@entry=0x7fffffff9080, val=0x7ffff74141d0) at /work/GIT/pecl-and-ext/msgpack/msgpack.c:204
#6  0x00007ffff7f9d43d in zif_msgpack_serialize (execute_data=<optimized out>, return_value=0x7ffff7414090) at /work/GIT/pecl-and-ext/msgpack/msgpack.c:261
#7  0x00005555559a091c in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/Zend/zend_vm_execute.h:1288
#8  execute_ex (ex=0x7ffff7400040) at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/Zend/zend_vm_execute.h:52035
#9  0x00005555559a6569 in zend_execute (op_array=0x7ffff748a2a0, return_value=0x0) at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/Zend/zend_vm_execute.h:56143
#10 0x000055555591c965 in zend_execute_scripts (type=type@entry=8, retval=0x7ffff74700c0, retval@entry=0x0, file_count=-146718688, file_count@entry=3)
    at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/Zend/zend.c:1662
#11 0x00005555558be188 in php_execute_script (primary_file=<optimized out>) at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/main/main.c:2584
#12 0x00005555559a8777 in do_cli (argc=70, argv=0x555555f75830) at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/sapi/cli/php_cli.c:956
#13 0x000055555578a128 in main (argc=70, argv=0x555555f75830) at /usr/src/debug/php80-php-8.0.0~DEV.20200415-3.fc31.remi.x86_64/sapi/cli/php_cli.c:1351

@m6w6
Copy link
Collaborator

m6w6 commented Apr 16, 2020

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2020

Codecov Report

Merging #148 into master will increase coverage by 0.19%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
+ Coverage   85.79%   85.99%   +0.19%     
==========================================
  Files           8        8              
  Lines        1345     1342       -3     
==========================================
  Hits         1154     1154              
+ Misses        191      188       -3     
Impacted Files Coverage Δ
msgpack_unpack.c 83.06% <50.00%> (+0.65%) ⬆️
msgpack_convert.c 74.09% <57.14%> (ø)
msgpack_class.c 87.43% <100.00%> (ø)
msgpack_pack.c 94.38% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec63358...780b0b4. Read the comment docs.

@remicollet
Copy link
Contributor Author

A second commit are more fix, but still lot of segfault....
need to investigate if can be related to "no_separation" option removed.

  s. The zend_fcall_info no_separation flag has been removed, and separation is
      never allowed. If you wish to pass (or allow passing) arguments by
      reference, explicitly create those arguments as references using
      ZEND_MAKE_REF. This removal also affects call_user_function_ex(), which
      should be replaced by call_user_function().

@m6w6 m6w6 merged commit 31e98e4 into msgpack:master Sep 23, 2020
@remicollet remicollet deleted the issue-php8 branch September 23, 2020 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants