Skip to content

linux: do_mount() returns fd instead of ms_move_fd #2140

Description

@eriksjolund

Claude Sonnet 5 pointed out that do_mount() returns fd instead of ms_move_fd here

crun/src/libcrun/linux.c

Lines 1425 to 1427 in fb54bc0

ms_move_fd = open_mount_target (container, target, err);
if (UNLIKELY (ms_move_fd < 0))
return fd;

Click here for details about my Claude Sonnet 5 interaction

I got the idea that I could ask Claude Sonnet 5 to find some bugs. (Usually I have been using tools like less and git grep when searching for bugs).

In the web interface https://claude.ai/ I wrote

I wrote a patch for the crun project:
https://github.com/containers/crun/pull/2127/changes/83e7e40f0831780086a8faa625e4f499e6491907
Do you see any need for adding more crun_error_get_errno() in the crun source code?

A lot of text was generated but no bugs were found. The text ended with:

If you want, I can look at a specific area of the code (mounts, cgroups, seccomp, etc.) more deeply rather than a repo-wide grep pass.

I then entered

If you want, I can look at a specific area of the code (mounts, cgroups, seccomp, etc.) more deeply rather than a repo-wide grep pass.

yes, check mounts

Claude Sonnet 5 did not find any bugs related to crun_error_get_errno() but pointed out an unrelated bug about do_mount() returning fd instead of ms_move_fd.

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