Skip to content

Avoid dl() in run-tests.php #16126

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

Merged
merged 1 commit into from
Oct 3, 2024
Merged

Avoid dl() in run-tests.php #16126

merged 1 commit into from
Oct 3, 2024

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Sep 29, 2024

Prior to running the tests, the test runner checks for all generally available extensions; it does this by scanning the extension_dir for files matching the typical extension pattern, but verifies that the file is actually a PHP extension by calling dl(). However, dl() has known issues[1]. On Windows CI we always get an ugly "zend_mm_heap corrupted" message, and we even can't dl() ext/mysql when OPcache is enabled[2]. So we better avoid the double-check with dl(), which is unlikely to be necessary anyway.

[1] #9196
[2] #8508

Prior to running the tests, the test runner checks for all generally
available extensions; it does this by scanning the `extension_dir` for
files matching the typical extension pattern, but verifies that the
file is actually a PHP extension by calling `dl()`.  However, `dl()`
has known issues[1].  On Windows CI we always get an ugly "zend_mm_heap
corrupted" message, and we even can't `dl()` ext/mysql when OPcache is
enabled[2].  So we better avoid the double-check with `dl()`, which is
unlikely to be necessary anyway.

[1] <php#9196>
[2] <php#8508>
@cmb69 cmb69 marked this pull request as ready for review September 29, 2024 22:41
@cmb69 cmb69 requested a review from TimWolla as a code owner September 29, 2024 22:41
@TimWolla TimWolla removed their request for review September 30, 2024 08:32
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this, especially if we want to remove dl in the future.

@cmb69 cmb69 merged commit 3e9f2fa into php:master Oct 3, 2024
9 of 10 checks passed
@cmb69 cmb69 deleted the cmb/run-tests-no-dl branch October 3, 2024 10:58
@cmb69
Copy link
Member Author

cmb69 commented Oct 4, 2024

It seems this patch uncovered an issue with our PDO_Firebird builds on x86 Windows; previously, they were skipped, now they fail because pdo_firebird.dll can't be loaded. I'll have a look soon. (cc @iluuu1994)

PS: see #16223.

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.

2 participants