8000 Protect against sketchy modifications of the standard library · Issue #980 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

Protect against sketchy modifications of the standard library #980

Open

Description

@dominikh

Our checks make assumptions about functions in the standard library, such as that strconv.ParseFloat has two arguments.
However, it is possible for the user to use a modified copy of the standard library, with arbitrary changes applied.

While breaking the standard library APIs in such a way is an extremely weird thing to do, it still shouldn't cause Staticcheck to panic.

It may still cause false positives, as we have no idea of knowing what the modified standard library is doing, but that's not a problem compared to index out of bounds, nil dereferences, or a number of other panics.

Activity

  1. added this to the Reliability milestone on May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0