`this == nullptr` results in undefined behavior · Issue #6978 · chakra-core/ChakraCore · GitHub
Skip to content

this == nullptr results in undefined behavior #6978

Open

Description

@ShortDevelopment

Issue

‘this’ pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true

Tasks

Activity

  1. ppenzin commented on Apr 17, 2024

    @ppenzin
    Member

    This warning should now be enabled in Clang by default, though didn't catch this earlier due to -Werror, I suspect it wasn't enabled in the version from the package manager.

  2. ShortDevelopment commented on Apr 18, 2024

    @ShortDevelopment
    ContributorAuthor

  3. rhuanjl commented on Apr 19, 2024

    @rhuanjl
    Collaborator

    I had a look IR.cpp and the invalid check is being done part of a Debug only feature; so it's not as critical a concern as ImmutableList.

    I've also done a sequence of searches in the codebase and I don't think there's anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions