Updates
160,000 USDC
View results
Submission Details
Severity: low
Valid

compiler crash du to ASTTokens instantiation

Summary

Instantiating the asttokens.ASTTokens class causes the compiler to crash even for a valid contract.

Vulnerability Details

Suppose the following program:

#@version ^0.3.9
import test5 as T
b: public(uint256)
event Transfer:
random: indexed(uint256)
shi: uint256
@external
def transfer():
log Transfer(T(self).b(), 10)
return

Compiling it causes the following error:

IndexError: list index out of range

The crash happens after executing the line:
https://github.com/vyperlang/vyper/blob/3b310d5292c4d1448e673d7b3adb223f9353260e/vyper/ast/annotation.py#L272

Impact

A valid program can't be compiled.

Tools Used

Manual testing.

Recommendations

We don't know what is the true cause of the crash and thus can't provide recommendation.

Updates

Lead Judging Commences

patrickalphac Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

compiler crash du to ASTTokens instantiation

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.