Skip to content

Prevents tests from leaking System V IPC objects - #22912

Open
NickSdot wants to merge 2 commits into
php:masterfrom
NickSdot:fix/test-ipc-probe-cleanup
Open

Prevents tests from leaking System V IPC objects #22912
NickSdot wants to merge 2 commits into
php:masterfrom
NickSdot:fix/test-ipc-probe-cleanup

Conversation

@NickSdot

Copy link
Copy Markdown
Contributor

The two tests leave System V IPC objects behind. Repeated test-suite runs can exhaust platform IPC limits and cause unrelated SysV tests to fail. Happened on macOS where the message queue limit is relatively low.

1) arginfo_zpp_mismatch.phpt
Calls every internal function with 0..8 null arguments. Means, 4 System V IPC functions create 3 queues, 3 shared-memory segments, and 4 semaphore sets per run -- these survive the process that created them.

The 4 affected functions are now handled early with a helper. The argument counts stay the same, but sem_get() and shm_attach() use 0600 for their permission argument, because null becomes 0000 which can create non-removable objects.

2) gh16592.phpt
created a message queue without removing it; now uses a private queue and cleans up after it.

@NickSdot

NickSdot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@iliaal since this one is related to the other one you just looked at, please allow me to ping you here (no code owner here, too).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant