This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug nptl/7008] New: pthread_condattr_setclock will modify the attribute of condition to PTHREAD_PROCESS_PRIVATE


When I make some tests for nptl, I found pthread_condattr_setclock will always 
modify the attribute of condition to PTHREAD_PROCESS_PRIVATE, even if the 
condition is set as PTHREAD_PROCESS_SHARED at first. So the program will be 
hung if condition is used for LWP.

The following line is wrong in nptl/pthread_condattr_setclock.c:

*valuep = ((*valuep & ~(1 << (COND_NWAITERS_SHIFT + 1)) & ~1)
	     | (clock_id << 1));

I think it should be correct as follows:

*valuep = ((*valuep & ~(1 << (COND_NWAITERS_SHIFT + 1)) & ~0)
	     | (clock_id << 1));

-- 
           Summary: pthread_condattr_setclock will modify the attribute of
                    condition to PTHREAD_PROCESS_PRIVATE
           Product: glibc
           Version: 2.8
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: chul at cn dot fujitsu dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86
  GCC host triplet: x86
GCC target triplet: x86


http://sourceware.org/bugzilla/show_bug.cgi?id=7008

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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