|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2149 System V semaphores do not work properly
Submitted: 1999-08-25 12:46 UTC Modified: 1999-08-28 06:08 UTC
From: mcafee at umich dot edu Assigned:
Status: Closed Package: Other
PHP Version: 3.0.12 OS: AIX 4.2
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: mcafee at umich dot edu
New email:
PHP Version: OS:


 [1999-08-25 12:46 UTC] mcafee at umich dot edu
<? $sem = sem_get(999); ?>

This results in the following error on AIX 4.2:

Warning: semctl(SETVAL) failed for key 0x3e7: Result too large in /home/nsadmin/apache/htdocs/a.php on line 1

This is because of the following system call in functions/sysvsem.c:

semctl(semid, SYSVSEM_SEM, SETVAL, &max_acquire)

AIX's semctl expects the SETVAL value to be passed directly as the fourth argument, not indirectly via pointer.

The fix is very simple; just replace the code that reads



#if defined(_AIX)
...  /* same as #else case, but remove ampersand before max_acquire */

The fix is trivial, but I'd be happy to submit a patch if necessary.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-28 06:08 UTC] sas at cvs dot php dot net
fixed in CVS. Thanks for the hint.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 21:01:31 2024 UTC