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 Mon, Oct 10, 2011 at 3:37 PM, Delesley Hutchins <delesley@google.com> wrote:
>
> --- gcc/tree-threadsafe-analyze.c ? ? ? (revision 179771)
> +++ gcc/tree-threadsafe-analyze.c ? ? ? (working copy)
> @@ -1830,14 +1830,27 @@ remove_lock_from_lockset (tree lockable, struct po

This feels like a bug in lock_set_contains(), not
remove_lock_from_lockset().  I'd modify lock_set_contains() as
follows:

1) During the universal lock conditional, remove the return statement.
 Instead, set default_lock = lock (where default_lock is a new
variable initialized to NULL_TREE).

2) Anywhere NULL_TREE is returned later, replace it with default_lock.

Ollie


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