apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48535] New: Data race detection tools report a potential data race on allocator->max_index in allocator_alloc()
Date Wed, 13 Jan 2010 12:36:13 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48535

           Summary: Data race detection tools report a potential data race
                    on allocator->max_index in allocator_alloc()
           Product: APR
           Version: 1.3.9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: bart.vanassche@gmail.com


When analyzing a multithreaded program that calls both allocator_alloc() and
allocator_free() with a data race detection tool, these tools report a
potential data race on the accesses of allocator->index at the start of
allocator_alloc(). While these conflicting accesses seem harmless to me because
allocator->index is reread after having locked the allocator mutex, this is
annoying.

A straightforward workaround is to move the allocator->mutex locking /
unlocking statements from inside the if-statement to outside the if-statement.
But I'm afraid that doing this would decrease performance.

This issue has been reported previously on the apr-dev mailing list -- see also
http://mail-archives.apache.org/mod_mbox/apr-dev/200908.mbox/%3C4A81D0F4.90406@ruppert-it.de%3E

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message