Closed maxsam4 closed 2 years ago
btw, Native solc is able to compile this and even bigger source codes.
Which version of the compiler are you using? And through what tools it this done? Via truffle?
Which version of the compiler are you using? And through what tools it this done? Via truffle?
I am using v0.4.24
. I haven't really tried this on 0.5.X
because I just started using native solc as its faster anyway.
This source code was generated by https://github.com/sc-forks/solidity-coverage . solidity-coverage works by adding events after every branch to measure coverage of tests. This plethora of events caused the source code to be this large.
Is solidity-coverage
doing the compilation also? If not, how do you execute the compiler?
Is
solidity-coverage
doing the compilation also? If not, how do you execute the compiler?
Solidity-coverage calls truffle compile
(configurable) to compile the contracts. I have included the input passed by truffle to solcjs in https://github.com/maxsam4/solc-bug-sample.
From the initial stack trace it really looks like a limitation/bug in Emscripten or the Javascript engine.
I remember I tried converting Uint8 to Uint32 and the error went away but the compilation never finished. A silent error probably. I didn't look further as native solc worked and is anyway a better choice than solcjs.
I remember I tried converting Uint8 to Uint64 and the error went away
I'm not sure what you mean by that, but Uint8Array
above is a Javascript construct, how solc is translated into Javascript.
I remember I tried converting Uint8 to Uint64 and the error went away
I'm not sure what you mean by that, but
Uint8Array
above is a Javascript construct, how solc is translated into Javascript.
I just replaced Uint8Array
with Uint32Array
and prayed lol. It did not work.
It shouldn't :)
Closing this for inactivity.
When trying to compile large codebase, the below error is shown
The errorsome contracts can be found at https://github.com/PolymathNetwork/polymath-core/tree/compilation-bug They are huge because solidity-coverage adds tons of events to track coverage.
To make testing easier, I have added the huge source and compile script to https://github.com/maxsam4/solc-bug-sample with instructions to reproduce.