Bug 140487
| Summary: | [RHAS2.1] Bad declaration of __syscall_poll can cause bogus values for timeout to be passed to the kernel | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 2.1 | Reporter: | Manish Singh <manish.singh> | ||||||
| Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 2.1 | CC: | fweimer | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | ia64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2005-04-28 15:16:04 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Manish Singh
2004-11-23 01:09:22 UTC
Created attachment 107271 [details]
Test case
Compile with test case:
gcc -O0 -o testpoll testpoll.c
(-O0 is important)
Run. This is supposed to be an 8 millisecond timeout. It hangs, and the alarm
fires. If you strace:
poll(0, 0, 4294967304
) = -1 EINTR (Interrupted system call)
Created attachment 107272 [details]
Patch to glibc to fix this.
This just makes the declaration match reality, so the compiler knows generate
the code to turn an int into a long safely.
Wonder why kernel chose long when POSIX requires int. Anyway, fix scheduled for U7. Should be fixed in glibc-2.2.4-32.19 in dist-2.1AS-errata-candidate. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2005-261.html |