Skip to content

recvmsg01.c doesn't have error checking in many places #1020

@dimakuv

Description

@dimakuv

I detected this deficiency while working on gramineproject/gramine#1210 on the Gramine project. Gramine LibOS currently doesn't support ancillary data (cmsg).

recvmsg01.c test uses ancillary data in the setup process, in particular this:

The problem is on line 526 -- sendmsg() sends a message with the SCM_RIGHTS file descriptor. There is no error checking. Thus, the sender doesn't notice if this syscall fails (like it happens in Gramine). After that, the reader process is hanged on the blocking recvmsg() here. And the whole test gets broken because of this one case (this setup happens for subtest 8).

Could you add error handling? At least for this sendmsg()? But in general, there are several other places in this test that call non-trivial syscalls and do not check their return values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions