-
Notifications
You must be signed in to change notification settings - Fork 187
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
internal error: entered unreachable code at semantics/src/traversal/expressions.rs:141:5 #211
Comments
Thanks for the report! Will look into these bugs and the fuzzer 😄 |
Quick question @g-r-a-n-t -- should I be running the solc backend? I figure you don't totally care about any crashes there, but maybe it malformed or mis-handled YUL would be of interest, whoever's "fault" it is... |
I think that would reveal some meaningful errors. It's possible for us to create Yul code with things like invalid identifiers or missing function parameters. I run into these issues pretty frequently while debugging new features. Thank you very much for doing this. |
Sure! |
Ok, one is running with the solc backend. Will solc crash, or just fail with an error, if given invalid Yul? If the latter, fuzzing with afl won't catch it without some code changes to the compiler(s). |
Ah, yeah. It will return an error. We should be crashing though. Opened a PR to fix this and will merge soon. |
merged! |
Great! I'll grab and restart fuzzers later with this. Do you think there's a big overhead for having solc do codegen? Faster fuzzing is better, but if the difference is not too big, maybe just hitting codegen with all runs is worth the hit, to find more problems. |
Hard for me to say.. looks like you've already found some insightful crashes. |
Yeah, I did a little experimenting, and due to almost all runs not getting through the parser, even with our tricks to make that less common, it's basically free, so I just have five running full blast on the whole enchilada. |
I see you all added msg.sender and such, but I'll give these a few days to hammer on the version I started on before switching over. I do a kind of saturation check based on which bugs which fuzzer instances found, and six of the 12 currently being found are only found by one fuzzer run (vs only 3 every fuzzer run has found) so I think it needs a week or so of getting deeper to pull out more subtle stuff. |
Related variant, I believe:
on latest, code location has moved (but is same as above now produces) but backtrace differs:
|
The original error already has been resolved and the last variant will be fixed by #336 |
Compiling this file:
On latest github master, built with
for fuzzing. Using https://github.com/agroce/afl-compiler-fuzzer (we've found more than 50 bugs (that were worth fixing, and have been fixed) in solc using this afl variant) + afl.rs.
This might be a more interesting type of bug, if you think fe is ready for fuzzing at all.
The text was updated successfully, but these errors were encountered: