Re: mq_send(-1, ...) segfaults instead of failing with EBADF

2025-01-15 Thread Mark Geisert via Cygwin
Hi Christian, On 1/14/2025 7:37 AM, Christian Franke via Cygwin wrote: Found with 'stress-ng --mq 1 -v': If an invalid fd is passed to mq_send() and other mq_* functions, a segfault occurs instead of returning -1 with errno=EBADF. Depending on optimization, the segfault is not visible in the

mq_send(-1, ...) segfaults instead of failing with EBADF

2025-01-14 Thread Christian Franke via Cygwin
Found with 'stress-ng --mq 1 -v': If an invalid fd is passed to mq_send() and other mq_* functions, a segfault occurs instead of returning -1 with errno=EBADF. Depending on optimization, the segfault is not visible in the exit status. Testcase: $ uname -r 3.5.5-1.x86_64 $ gcc --version gcc