Skip to content

Avoid infinite recursion in getLifetimeVariable#1634

Merged
danmar merged 2 commits into
cppcheck-opensource:masterfrom
pfultz2:crash-lifetime-reference-recursive
Jan 31, 2019
Merged

Avoid infinite recursion in getLifetimeVariable#1634
danmar merged 2 commits into
cppcheck-opensource:masterfrom
pfultz2:crash-lifetime-reference-recursive

Conversation

@pfultz2
Copy link
Copy Markdown
Contributor

@pfultz2 pfultz2 commented Jan 30, 2019

This should fix the issue in #1631.

@pfultz2 pfultz2 changed the title Avoid inifinte recursion in getLifetimeVariable Avoid infinite recursion in getLifetimeVariable Jan 30, 2019
Comment thread lib/valueflow.h
}

const Variable *getLifetimeVariable(const Token *tok, ValueFlow::Value::ErrorPath &errorPath);
const Variable *getLifetimeVariable(const Token *tok, ValueFlow::Value::ErrorPath &errorPath, int depth=20);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit off-topic: is there a specific reason why those functions are declared within this header but outside the namespace?

@danmar danmar merged commit c176775 into cppcheck-opensource:master Jan 31, 2019
@pfultz2 pfultz2 deleted the crash-lifetime-reference-recursive branch May 19, 2019 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants