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 libc/13144] New: Incorrect x86-64 bits/sem.h


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

             Bug #: 13144
           Summary: Incorrect x86-64 bits/sem.h
           Product: glibc
           Version: 2.14
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: hjl.tools@gmail.com
    Classification: Unclassified


sysdeps/unix/sysv/linux/x86_64/bits/sem.h has

/* Data structure describing a set of semaphores.  */
struct semid_ds
{
  struct ipc_perm sem_perm;        /* operation permission struct */
  __time_t sem_otime;            /* last semop() time */
  unsigned long int __unused1;
  __time_t sem_ctime;            /* last time changed by semctl() */
  unsigned long int __unused2;
  unsigned long int sem_nsems;        /* number of semaphores in set */
  unsigned long int __unused3;
  unsigned long int __unused4;
};

But kernel include/asm-generic/sembuf.h has

struct semid64_ds {
        struct ipc64_perm sem_perm;     /* permissions .. see ipc.h */
        __kernel_time_t sem_otime;      /* last semop time */
#if __BITS_PER_LONG != 64
        unsigned long   __unused1;
#endif
        __kernel_time_t sem_ctime;      /* last change time */
#if __BITS_PER_LONG != 64
        unsigned long   __unused2;
#endif
        unsigned long   sem_nsems;      /* no. of semaphores in array */
        unsigned long   __unused3;
        unsigned long   __unused4;
};

unused1 and unused2 fields should be protected with

#if __WORDSIZE == 32
#endif

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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