Skip to content

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

@RobertHenry6bev

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions