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

SSA integrity verification failed when loading composer classmaps with more than 11k elements #12953

Closed
danog opened this issue Dec 13, 2023 · 2 comments

Comments

@danog
Copy link
Contributor

danog commented Dec 13, 2023

Description

Ping @dstogov, reproducer 13 at https://github.com/danog/jit_bugs issues an SSA integrity verification failed assertion if opcache is enabled.

PHP Version

PHP 8.2.14 (2b8c008), master

Operating System

No response

@nielsdos
Copy link
Member

nielsdos commented Dec 13, 2023

This is a false positive.
cycle in uses of 1 (CV $vendorDir)
This is because the cycle detection code stops at 10000 uses and assumes a cycle has happened:

		FOREACH_USE(var, use) {
			if (++c > 10000) {
				FAIL("cycle in uses of " VARFMT "\n", VAR(i));
				goto finish;
			}

Increase the limit or patch that out and you'll see it works.

nielsdos added a commit to nielsdos/php-src that referenced this issue Dec 14, 2023
…ser classmaps with more than 11k elements

This is a false positive. The cycle detection code stops at 10.000
iterations. Instead of stopping at a fixed amount, make it more robust
by implementing Floyd's cycle detection algorithm.
@nielsdos
Copy link
Member

I implemented a solution in #12954 by using a cycle detection algorithm instead of a counter.

nielsdos added a commit that referenced this issue Dec 18, 2023
* PHP-8.2:
  Fix GH-12953: SSA integrity verification failed when loading composer classmaps with more than 11k elements
nielsdos added a commit that referenced this issue Dec 18, 2023
* PHP-8.3:
  Fix GH-12953: SSA integrity verification failed when loading composer classmaps with more than 11k elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants