Skip to content

[clang-tidy] bugprone-signal-handler only looks for signal(), not sigaction() #153112

@tavianator

Description

@tavianator

I tried to use the bigprone-signal-handler check to find signal safety issues, but it didn't find any, even when I added malloc(1) into my signal handler. Looking closer, it seems to check for signal() calls, but not sigaction() calls:

auto SignalFunction = functionDecl(hasAnyName("::signal", "::std::signal"),
parameterCountIs(2), isStandardFunction());

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions