public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/29304] New: mq_timedreceive does not handle 64 bit syscall return correct for !__ASSUME_TIME64_SYSCALLS
@ 2022-06-30 11:18 adhemerval.zanella at linaro dot org
  2022-06-30 13:58 ` [Bug libc/29304] " adhemerval.zanella at linaro dot org
  0 siblings, 1 reply; 2+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-06-30 11:18 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29304

            Bug ID: 29304
           Summary: mq_timedreceive does not handle 64 bit syscall return
                    correct for !__ASSUME_TIME64_SYSCALLS
           Product: glibc
           Version: 2.32
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: adhemerval.zanella at linaro dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

On the code path for builds without 64 bit time_t default syscall, the check to
fallback to 32 bit is wrong:

 38   bool need_time64 = abs_timeout != NULL
 39                      && !in_time_t_range (abs_timeout->tv_sec);
 40   if (need_time64)
 41     {
 42       int r = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr,
msg_len,
 43                               msg_prio, abs_timeout);
 44       if (r == 0 || errno != ENOSYS)
 45         return r;
 46       __set_errno (EOVERFLOW);
 47       return -1;
 48     }

It should check if 'r >= 0'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libc/29304] mq_timedreceive does not handle 64 bit syscall return correct for !__ASSUME_TIME64_SYSCALLS
  2022-06-30 11:18 [Bug libc/29304] New: mq_timedreceive does not handle 64 bit syscall return correct for !__ASSUME_TIME64_SYSCALLS adhemerval.zanella at linaro dot org
@ 2022-06-30 13:58 ` adhemerval.zanella at linaro dot org
  0 siblings, 0 replies; 2+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-06-30 13:58 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29304

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |adhemerval.zanella at linaro dot o
                   |                            |rg
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |2.36
         Resolution|---                         |FIXED

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Fixed on 2.36.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-30 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 11:18 [Bug libc/29304] New: mq_timedreceive does not handle 64 bit syscall return correct for !__ASSUME_TIME64_SYSCALLS adhemerval.zanella at linaro dot org
2022-06-30 13:58 ` [Bug libc/29304] " adhemerval.zanella at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).