Skip to content

MethodSignature undefined use of reference binding to null pointer type (per gcc -fsanitize=undefined) #73088

Closed

Description

@RobertHenry6bev

Description

The constructors for MethodSignature allow for member m_pSubst to be assigned NULL.

Later, MethodSignature::GetSubstition is called, which returns a const reference to the contents of m_pSubst. You can't take a reference of a NULL object, as that is undefined behavior.

It probably all works out, through the maze of * and &.

Reproduction Steps

Run gcc -fsanitize=undefined

Expected behavior

This is undefined behavior.

Actual behavior

It probably all works out for this code.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jul 29, 2022
  2. added this to the 7.0.0 milestone on Jul 30, 2022
  3. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jul 30, 2022
  4. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jul 31, 2022
  5. ghost locked as resolved and limited conversation to collaborators on Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions