Skip to content

get -Wformat-truncation and -Wformat-overflow re-enabled #343

@nickdesaulniers

Description

@nickdesaulniers

Looks like Linus just turned this off in bd664f6.

I suspect that Linus was hitting https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78512#c7 (i.e. the kernel's use of %p with additional non-standard modifiers) which was eventually disabled in GCC.

We hit this in ClangBuiltLinux#1923 because clang had the same checks under a different flag name -Wfortify-source. This is getting fixed in llvm/llvm-project#65969.

These issues still persist (compile time detection of the use of snprintf that result in unconditional truncation). These should be fixed; they're not compiler specfic though, as noted by @nathanchance here. So filing this TODO here so that we can close ClangBuiltLinux#1923 once llvm/llvm-project#65969 lands.

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