NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/38602: sigtimedwait modifies parameter marked 'restrict'

>Number:         38602
>Category:       kern
>Synopsis:       sigtimedwait modifies parameter marked 'restrict'
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 07 09:20:00 +0000 2008
>Originator:     Andrew Doran
>Release:        4.99.62
The NetBSD Project
sys_sigtimedwait() takes an interval encoded as a timespec. In order
to handle ERESTART and preserve the correct timeout, it copies back
the timeout parameter to userspace after subtracting the time spent
in the kernel waiting for a signal to arrive.

The timeout parameter to sigtimedwait() is marked with 'restrict',
meaning that the system call shouldn't change it. Modifying it could
confuse applications that expect it not to be modified, or could break
assumptions made by the compiler.

Code inspection.
Not known.

Home | Main Index | Thread Index | Old Index