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

Generic pack() test for 64-bit #14014

Closed
wants to merge 3,945 commits into from
Closed

Generic pack() test for 64-bit #14014

wants to merge 3,945 commits into from

Conversation

ranvis
Copy link
Contributor

@ranvis ranvis commented Apr 20, 2024

Edit: I'm sorry for all the irrelevant commits and pings. Please ignore this.

Generic pack() test for 64-bit.
Also add some test cases for better coverage.

  • Add headers to generic pack test:
    To make the output easier to read.

  • Add generic pack test for 64bit:
    Split int size-dependent test cases.

  • Add missing test cases for generic pack() test:
    Add tests for uncovered lines. (For one uncovered part, I'd like to make a code fix later day...)
    Locally the coverage increased as follows with the third commit on master:

    Before After
    Lines: 87.9 % 98.1 %
    Functions: 100.0 % 100.0 %
    Branches: 68.1 % 76.1 %
    make test TESTS="$(printf 'ext/standard/tests/strings/%s.phpt ' bug35817 \
      bug36148 bug38770 bug61764 bug69522 bug70487 bug78833 gh10940 htmlentities17 \
      htmlentities20 htmlentities_html4 htmlentities_html5 pack pack64 pack64_32 \
      pack_A pack_arrays pack_float pack_int pack_int_64bit pack_Z unpack_bug68225 \
      unpack_error unpack_offset)"
    

nielsdos and others added 30 commits March 24, 2024 13:58
* PHP-8.2:
  [ci skip] NEWS
  Fix incorrect check in fpm_shm_free() (php#13797)
* PHP-8.3:
  [ci skip] NEWS
  Fix incorrect check in fpm_shm_free() (php#13797)
* PHP-8.2:
  [ci skip]
  Adjust GC threshold if num_roots is higher than gc_threshold after collection (php#13758)
* PHP-8.3:
  [ci skip]
  [ci skip]
  Adjust GC threshold if num_roots is higher than gc_threshold after collection (php#13758)
* PHP-8.2:
  Tests are not repeatable
* PHP-8.3:
  Tests are not repeatable
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.19-dev
* PHP-8.3:
  PHP-8.2 is now for PHP 8.2.19-dev
…sing opcache.preload

This regressed in 9a250cc, which allowed static properties to get
overridden by a trait during inheritance. In particular, because of the
change to the loop in zend_update_parent_ce(), it's not guaranteed that
all indirects are after one another.

This means that during persisting the zvals of the static members table,
some static properties may be skipped. In case of the test code, this
means that the array in the trait will keep referring to the old, new
freed, stale value. To solve this, we check the type for IS_INDIRECT,
which is the same as what zend_persist_calc() is already doing anyway.

Since 2543e61 we can check for IS_INDIRECT to see if it should be
persisted or not.

Closes phpGH-13794.
* PHP-8.3:
  Fix phpGH-13433: Segmentation Fault in zend_class_init_statics when using opcache.preload
IR commit: 87cba9af675afd2ca20cbaab397ad1c83d700475
This adds all root build directories in one call. PEAR directory is
created only when enabled and duplicated Zend directory creation is
removed, because it was intended for the zend_config.h when building
out-of-source or using the config.status manually before the
PHP_ADD_BUILD_DIR was introduced in the build system.
Useful to control how many SYN packets the client will send to the
server before giving up establishing a connection if the server does
not respond (usually 5 or 6 by default).

Close phpGH-13816
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment