From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB32F3842AD9; Thu, 30 Jun 2022 11:18:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB32F3842AD9 From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/29304] New: mq_timedreceive does not handle 64 bit syscall return correct for !__ASSUME_TIME64_SYSCALLS Date: Thu, 30 Jun 2022 11:18:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.32 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2022 11:18:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29304 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 chec= k to fallback to 32 bit is wrong: 38 bool need_time64 =3D abs_timeout !=3D NULL 39 && !in_time_t_range (abs_timeout->tv_sec); 40 if (need_time64) 41 { 42 int r =3D SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len, 43 msg_prio, abs_timeout); 44 if (r =3D=3D 0 || errno !=3D ENOSYS) 45 return r; 46 __set_errno (EOVERFLOW); 47 return -1; 48 } It should check if 'r >=3D 0'. --=20 You are receiving this mail because: You are on the CC list for the bug.=