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

Integer overflow in PHP 8.1.19 for macOS #730

Closed
danepowell opened this issue May 19, 2023 · 3 comments
Closed

Integer overflow in PHP 8.1.19 for macOS #730

danepowell opened this issue May 19, 2023 · 3 comments

Comments

@danepowell
Copy link

danepowell commented May 19, 2023

On several unrelated projects using setup-php in GitHub Actions, upgrading from PHP 8.1.18 to 8.1.19 in macOS runners caused an integer overflow when running phpstan:

PHP Fatal error: Possible integer overflow in memory allocation (2147483648 * 32 + 32) in phar:///Users/runner/work/composer-stager/composer-stager/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/DependencyChecker.php on line 47

For instance, on the acquia-php-sdk-v2 project, here's the last good build from two weeks ago, and the first failing build after that. Pretty much the only change is the bump from PHP 8.1.18 to PHP 8.1.19.

Here's another failing build on the composer-stager project.

Running the same script locally on macOS 13.3.1 works fine, as does the same script in Ubuntu, or in PHP 8.0 or 8.2.

Obviously this could be a bug in PHP core or the phpstan libraries, but the extreme specificity of it leads me to believe that it could be a problem with this particular PHP build in GitHub Actions. I know setup-php uses its own homebrew PHP builds, is it possible the PHP 8.1.19 macOS build was corrupted somehow?

@danepowell danepowell changed the title Memory leak in PHP 8.1.19 for macOS Integer overflow in PHP 8.1.19 for macOS May 19, 2023
@shivammathur
Copy link
Owner

shivammathur commented May 19, 2023

@danepowell I have rebuilt php 8.1, please try restarting the CI job.

@danepowell
Copy link
Author

Incredibly that worked!

typhonius/acquia-php-sdk-v2#393

I'm going to have my colleagues verify on their projects as well.

I'm quite curious about what might have been wrong with the build.

@shivammathur
Copy link
Owner

PHP 8.1 was retagged in php-src mostly likely for this bug.
Ref: php/web-php-distributions@a5e260c

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

No branches or pull requests

2 participants