Skip to content

feat(opcache): relocate intersection/union type lists in cache binaries #112

Closed

Description

@lisachenko

Follow-up to the OpCache binary-file API (#111, merged).

PayloadRelocator currently refuses zend_type_list shapes: (un)serializeType() throws OpCacheException::unsupportedPayload('intersection/union type-list relocation') (src/OpCache/PayloadRelocator.php:511, :522). Any cached script with a union or intersection parameter/return/property type therefore cannot be read or patched.

Scope: port the ZEND_TYPE_HAS_LIST branch of zend_file_cache_(un)serialize_type — relocate the zend_type_list pointer and recurse into each zend_type entry, both directions, preserving byte-identity round-trip.

Acceptance: a fixture with A|B and A&B types round-trips byte-for-byte and executes from the patched cache.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestopcacheIssue is related to opcache integration. Either doesn't work well or behaves incorrect.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions