Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing library template parameter in IR codegen on EOF #15606

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

cameel
Copy link
Member

@cameel cameel commented Dec 2, 2024

Fixes a small bug that went unnoticed in #15512 because we don't run most tests on EOF yet: the IR codegen template is missing a parameter.

Running tests for immutables without the fix results in:

semanticTests/immutable/stub.sol: Unhandled exception during test: /solidity/libsolutil/Whiskers.cpp(213): Throw in function solidity::util::Whiskers::replace(const std::string&, const StringMap&, const std::map<std::__cxx11::basic_string<char>, bool>&, const std::map<std::__cxx11::basic_string<char>, std::vector<std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > > >&)::<lambda(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > >)>
Dynamic exception type: boost::wrapexcept<solidity::util::WhiskersError>
std::exception::what: WhiskersError
[solidity::util::tag_comment*] = Condition parameter library not set.

I'm also including a commit that makes the test mentioned in #15550 (review) actually run on EOF too.

@cameel cameel added the EOF label Dec 2, 2024
@cameel cameel requested a review from clonker December 2, 2024 17:55
@cameel cameel self-assigned this Dec 2, 2024
@cameel
Copy link
Member Author

cameel commented Dec 2, 2024

Oh, looks like that wasn't the only bug here:

/solidity/test/soltest.cpp(120): error: in "semanticTests/immutable/stub": Exception during extracted test: /solidity/libsolidity/codegen/ir/IRGenerationContext.cpp(103): Throw in function size_t solidity::frontend::IRGenerationContext::immutableMemoryOffset(const solidity::frontend::VariableDeclaration&) const
Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>
std::exception::what: Unknown immutable variable: x
[solidity::util::tag_comment*] = Unknown immutable variable: x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant