Skip to content

Potential Bug in MLK Bug Detection Logic #22

@Feng-Jay

Description

@Feng-Jay

Hi! @chengpeng-wang !

While running RepoAudit on MLK bugs, I noticed that it failed to detect a memory leak in a single-function bug, such as this commit.

Specifically, the leak in this line was not reported:
Line#76 at the buggy version:adis->xfer = kcalloc(scan_count + 1, sizeof(*adis->xfer), GFP_KERNEL);

I checked the logs and found that the LLM inference was actually correct. This led me to suspect there might be an issue in the logic of collect potential buggy path

It seems that this line:

if not path_set:

should be:

if not path_set or len(path_set) == 0:

At this line, if the source node meets no sink under the MLK setting, it returns an empty set, which may currently be misinterpreted.

After making this change locally, RepoAudit was able to correctly detect the bug.

Could you help me confirm if this is indeed a bug?
I’ve noticed that the same logic appears in both the artifact branch and the main branch.

Thanks!

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