This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [Annotalysis] Bugfix for spurious thread safety warnings with shared mutexes


On Wed, Oct 12, 2011 at 9:58 AM, Delesley Hutchins <delesley@google.com> wrote:
>
> I don't think that will fix this bug. ?The bug occurs if:
> (1) The exclusive lock set has error_mark_node.
> (2) The shared lock set has the actual lock.

Oh, I see.  This change looks fine for google/gcc-4_6, then.

> If I understand your suggested fix correctly, lock_set_contains would
> still return non-null when the universal lock was present, which is
> not what we want. ?IMHO, lock_set_contains is operating correctly; it
> was just passed the wrong arguments.

I still think there may be a bug in lock_set_contains, but my
knowledge of the code is insufficient to know if this can lead to
problems in practice.  Suppose the lock set contains both the supplied
lock and the universal lock, and ignore_universal_lock is false.  Then
lock_set_contains() will return the lock directly.  However, it
*should* return the canonicalized version of the lock.

Ollie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]