Skip to content

krun: use of invalid errno #2157

Description

@eriksjolund
  1. To get some more insight of the crun source code I ran the command
     git grep -20 " errno" src
    
    There were quite many search results, but I tried to go through the result to find some suspicious uses of errno. I saw this line that looked a bit suspicious:
    return crun_make_error (err, errno, "start passt");

    in case this code returned -1
    waitpid (pid, &status, 0);
    if (! (WIFEXITED (status)) || WEXITSTATUS (status) != 0)
    return -1;
  2. To get a second opinion, I typed the following in claude web interface claude.ai (claude opus 5)
    Could you check if errno at this line
    https://github.com/containers/crun/blob/46cedc0c4a7342a7bd76f36b7fd7ab01869074e4/src/libcrun/handlers/krun.c#L710
    has been set by a failure beforehand?
    
    As usual claude responded with a lot of text, but in the output it looked like claude concluded that it was invalid use of errno.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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