0xKitsune / solstat

A Solidity static analyzer to identify contract vulnerabilities and gas efficiencies.
426 stars 36 forks source link

Panic while analyzing paraspace-core #77

Open GopherJ opened 1 year ago

GopherJ commented 1 year ago

While analyzing https://github.com/para-space/paraspace-core, it paniced

0xKitsune commented 1 year ago

Thanks for opening up an issue. Ill take a look at this a little later today.

dijkstra-dev commented 1 year ago

I was taking a look at this issue. It seems I was able to isolate where the problem is. Basically, where it breaks is in the file ParaProxyLib.sol#L345. But, apparently, the error is thrown by the solang-parser library and the problem is that the Paraspace library uses error as a variable name.

There were discussions about whether or not to add it as a keyword. If, for example, you change error to _error by hand, it doesn't break anymore (actually it does break again, but it's an Overflow bug in a latter check - maybe I'll post a fix later to discuss about this case).

Perhaps it can be modified so that instead of breaking and stopping all other checks, it shows which file(s) were left out of certain checks? or just show the error without breaking completely?

dijkstra-dev commented 1 year ago

A discussion about it: https://github.com/ethereum/solidity/issues/11743

In Code4rena, it has been classified as Non critical link