Skip to content

Conversation

@BrettDong
Copy link

llvm::function_ref stores a reference but does not own a callable object [1]. LookupDomTree of that type is assigned to a local lambda object in VirtualCallTargets::run() and is used later in VirtualCallTargets::scanTypeTestUsers(), but the local lambda object is already out of scope at that time, and crashes the program on my computer. This pull request changes the type of LookupDomTree to std::function, which owns a callable object.

[1] LLVM reference


Signed-off-by: Binrui Dong [email protected]

@pahmann
Copy link
Contributor

pahmann commented Dec 14, 2022

@bulwahn do you agree to the fix. After merging the latest issue found by @henrirosten we can see that we rebase this PR in a way that the Travis CI will pass again.

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.

2 participants