-
Notifications
You must be signed in to change notification settings - Fork 215
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
Getting LLVM ERROR: Branch target out of insn range #1367
Comments
Hey @kupermind, |
Hi @LucasSte, Please checkout the following branch:
The build must fail with the specified error. Thanks a lot! |
Thanks @kupermind, I was able to replicate the error. I'll look into it and keep you posted. |
I am still investigating the problem, but I've found some options that make your contract work, so you can continue your development until we find a fix. You can use the If you care about them for testing, use the |
That is great! Thank you very much for the hints!! |
I've found the problem and a fix: #1386. I can't merge that yet because your contract also causes a stack overflow in constant folding, so I need to solve this first. |
Hey @LucasSte, Great and thanks a lot for the update! We were happy with your previous |
Hi guys! When compiling a code for solana via solang I am getting the following error if I add one more state variable in the contract:
The working code is located here:
https://github.com/valory-xyz/autonolas-registries/tree/solana
Steps to reproduce the working code:
Now try to declare a single variable on line 66, for example,
address public var
, in the following file:https://github.com/valory-xyz/autonolas-registries/tree/573ced9e1d1d3d070bc26a58da8b6b04e5291be6/integrations/solana/contracts/ServiceRegistrySolana.sol
Then try to recompile with
npm run build
or a custom solang build command, and the build will fail with the specified error.The Solang version is v0.3.0, the platform is MacOs, although tried on the latest Linux as well and got the same result.
In order to make it work with that additional state variable, I need to comment the code out starting from the line 797, which might point to some contract size issues. Although if I were to add mapping instead of a primitive variable, then the original code would compile, just increasing the bytes account data. So the issue is really related to the primitive state variables.
Thanks a lot for your help!
The text was updated successfully, but these errors were encountered: