Add const ref to prevent segfaults.

This commit is contained in:
Daniel Kirchner 2020-12-03 22:40:30 +01:00
parent a27d7707c8
commit cb72d76aaf
3 changed files with 3 additions and 2 deletions

View File

@ -16,6 +16,7 @@ Bugfixes:
* Code generator: Do not pad empty string literals with a single 32-byte zero field in the ABI coder v1.
* SMTChecker: Fix internal compiler error when doing bitwise compound assignment with string literals.
* SMTChecker: Fix internal error when trying to generate counterexamples with old z3.
* SMTChecker: Fix segmentation fault that could occur on certain SMT-enabled sources when no SMT solver was available.
* Yul Optimizer: Fix a bug in NameSimplifier where a new name created by NameSimplifier could also be created by NameDispenser.
* Yul Optimizer: Removed NameSimplifier from optimization steps available to users.

View File

@ -36,7 +36,7 @@ using namespace solidity::frontend;
using namespace solidity::smtutil;
CHCSmtLib2Interface::CHCSmtLib2Interface(
map<h256, string> _queryResponses,
map<h256, string> const& _queryResponses,
ReadCallback::Callback _smtCallback,
optional<unsigned> _queryTimeout
):

View File

@ -33,7 +33,7 @@ class CHCSmtLib2Interface: public CHCSolverInterface
{
public:
explicit CHCSmtLib2Interface(
std::map<util::h256, std::string> _queryResponses = {},
std::map<util::h256, std::string> const& _queryResponses = {},
frontend::ReadCallback::Callback _smtCallback = {},
std::optional<unsigned> _queryTimeout = {}
);