Vyper: `AttributeError: 'Attribute' object has no attribute 'id'` on constants

Created on 4 Jan 2020  路  7Comments  路  Source: vyperlang/vyper

Version Information

  • vyper Version (output of vyper --version): 0.1.0b14+commit.4ac5ef5
    OS: osx
  • Python Version (output of python --version): 3.7.5
  • Environment (output of pip freeze): same as previous TSTL issues

What's your issue about?

Compiling:

cv0: constant(address) = block.coinbase.balance

produces:

Error compiling: vfile.67808.vy
AttributeError: 'Attribute' object has no attribute 'id'
Easy Pickings bug

Most helpful comment

Ok, you're clean on current tests, and I have to hack AFL and a mutation testing tool before I start a more serious attack :)

Will keep you posted if anything new comes up.

All 7 comments

(this is new on latest git pull; confirm some other issues fixed, my regressions mostly down to that CompilerPanic on ranges)

I know this is just a bad error message, at heart, but I don't want to filter out AttributeErrors from the testing so a fix eventually would be good to aid fuzzing.

And "you can't make a constant from a call" would obviously be more user-friendly.

Great find! Hopefully, the fact that we haven't had an issue from you in a while means we're doing better 馃ぃ

You guys have definitely got less to find now.

However, I'm up to some new tricks maybe soon. :)

Have you used python-afl to fuzz vyper any, by the way?

Well, half of us are American, we're mostly fuzzy, and I think at least one of us is a lop, so fairly familiar with it but haven't used it against the codebase yet.

We did start fuzzing the grammar using Hypothesis and Lark though

Ok, you're clean on current tests, and I have to hack AFL and a mutation testing tool before I start a more serious attack :)

Will keep you posted if anything new comes up.

Was this page helpful?
0 / 5 - 0 ratings