|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71956 sem_get: creating an infinite amount of semaphores
Submitted: 2016-04-04 09:30 UTC Modified: -
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:-1 (-100.0%)
From: kakkau at grr dot la Assigned:
Status: Open Package: Semaphore related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: kakkau at grr dot la
New email:
PHP Version: OS:


 [2016-04-04 09:30 UTC] kakkau at grr dot la
1. run sem_get(0,0) multiple times
2. check ipcs -s
3. see there are multiple semaphores created

For any other integer <> 0 sem_get works as expected.
It returns a resource w/o creating another semaphore.

Test script:



Expected result:
No creation of another semaphore.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Feb 24 09:01:25 2020 UTC