-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Describe the bug
Not all file handles support the select() API -- in particular on RTEMS it only works on sockets. The File implementation layer contains a boolean flag selectable for every file handle to indicate whether the file descriptor can be select'ed upon.
The implementation of this layer needs to confirm/check that the selectable flag is true before calling this API.
To Reproduce
Run the new select() API unit tests on an RTEMS platform, which call this API on regular files. When it does so, this actually causes an exception and results in kernel panic/abort.
Expected behavior
OSAL should return OS_ERR_NOT_IMPLEMENTED or otherwise avoid calling select() on filehandles which the kernel does not handle properly.
System observed on:
RTEMS 4.11.3 via QEMU/pc686 BSP.
Additional context
Kernel panic result here is rather extreme -- one would have expected that the select() call would simply return error and set an errno as usual. This probably also signifies an underlying bug in RTEMS.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.