mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11371 from ethereum/fix-asan-issue-in-functioncallgraph
Use a local instead of a temporary as an argument to valueOrDefault
This commit is contained in:
commit
58bec9f6c4
@ -96,7 +96,8 @@ CallGraph FunctionCallGraphBuilder::buildDeployedGraph(
|
||||
// All functions present in internal dispatch at creation time could potentially be pointers
|
||||
// assigned to state variables and as such may be reachable after deployment as well.
|
||||
builder.m_currentNode = CallGraph::SpecialNode::InternalDispatch;
|
||||
for (CallGraph::Node const& dispatchTarget: valueOrDefault(_creationGraph.edges, CallGraph::SpecialNode::InternalDispatch, {}))
|
||||
set<CallGraph::Node, CallGraph::CompareByID> defaultNode;
|
||||
for (CallGraph::Node const& dispatchTarget: valueOrDefault(_creationGraph.edges, CallGraph::SpecialNode::InternalDispatch, defaultNode))
|
||||
{
|
||||
solAssert(!holds_alternative<CallGraph::SpecialNode>(dispatchTarget), "");
|
||||
solAssert(get<CallableDeclaration const*>(dispatchTarget) != nullptr, "");
|
||||
|
Loading…
Reference in New Issue
Block a user