Skip to content

Conversation

@smonicas
Copy link
Collaborator

Before the AOR mutator could crash when an array was accessed through multi levels such as as a value of a mapping because the ir_expression.called.expression would be an Index operator. Removing the specific checks on the Identifier being an ArrayType make it works for all the possible cases with no practical downsides, maybe it could be a problem if there is a library with custom functions called pop and push used with the using-for directive

contract Counter {
    mapping(uint => uint[]) p;

    function s() public {
       p[1].push(2);
   }
}

@smonicas smonicas requested a review from montyly as a code owner January 31, 2025 13:57
--output-dir OUTPUT_DIR
Name of output directory (by default 'mutation_campaign')
-v, --verbose log mutants that are caught as well as those that are uncaught
-vv, --very-verbose log mutants that are caught, uncaught, and fail to compile. And more!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this removal expected?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It was done here but the the CLI arg and README were not updated

@montyly montyly merged commit cacf6f6 into dev Jan 31, 2025
46 checks passed
@montyly montyly deleted the dev-fix-AOR-mutator branch January 31, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants