diff --git a/test/tools/ossfuzz/solarithprotoToSol.cpp b/test/tools/ossfuzz/solarithprotoToSol.cpp index 23b5e2d9a..e1d41ccb0 100644 --- a/test/tools/ossfuzz/solarithprotoToSol.cpp +++ b/test/tools/ossfuzz/solarithprotoToSol.cpp @@ -168,10 +168,18 @@ string ProtoConverter::visit(Expression const& _expr) switch (_expr.expr_oneof_case()) { case Expression::kV: + { solAssert(varAvailable(), "Sol arith fuzzer: Varref unavaileble"); - return visit(_expr.v()); + string v = visit(_expr.v()); + if (!m_exprSignMap.count(&_expr)) + m_exprSignMap.emplace(&_expr, m_varTypeMap[v].first); + } case Expression::kBop: - return visit(_expr.bop()); + { + string b = visit(_expr.bop()); + if (!m_exprSignMap.count(&_expr)) + m_exprSignMap.emplace(&_expr, m_varTypeMap[v].first); + } case Expression::EXPR_ONEOF_NOT_SET: return "v0"; } diff --git a/test/tools/ossfuzz/solarithprotoToSol.h b/test/tools/ossfuzz/solarithprotoToSol.h index 4326320a5..a8efa2398 100644 --- a/test/tools/ossfuzz/solarithprotoToSol.h +++ b/test/tools/ossfuzz/solarithprotoToSol.h @@ -108,7 +108,8 @@ private: unsigned m_varCounter = 0; std::shared_ptr m_rand; - std::map m_varTypeMap; + std::map> m_varTypeMap; + std::map m_exprSignMap; std::string m_returnType; }; } \ No newline at end of file