php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56191 Possible race condition in apc_sma_malloc() ?
Submitted: 2004-09-15 11:23 UTC Modified: 2004-09-16 00:52 UTC
From: swen dot thuemmler at telefonica dot de Assigned: rasmus (profile)
Status: Closed Package: APC (PECL)
PHP Version: Irrelevant OS: Solaris 2.8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
32 - 23 = ?
Subscribe to this entry?

 
 [2004-09-15 11:23 UTC] swen dot thuemmler at telefonica dot de
Description:
------------
I'm not sure, but shouldnt the UNLOCK come after the assignment?

[...]
        if (off != -1) {
            void* p = (void *)(((char *)(sma_shmaddrs[i])) + off);
--->            UNLOCK(sma_lock);
--->            sma_lastseg = i;
            return p;
        }
[...]


--Swen



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-16 00:52 UTC] rasmus@php.net
I suppose there could be a race in a multithreaded environment.  I have flipped those around.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC