KEMBAR78
fix index out of bounds when mutating empty constructor arguments by simonresch · Pull Request #962 · CodeIntelligenceTesting/jazzer · GitHub
Skip to content

Conversation

@simonresch
Copy link
Contributor

@simonresch simonresch commented Oct 7, 2025

The InPlaceProductMutator did not handle empty mutator lists in its writeExclusive implementation. Such a mutator is constructed for Beans with constructors that take no arguments.
If such a mutator was the last in the list of mutators this would lead to a Index -1 out of bounds for length 0.

This would trigger an index out of bounds if `writeExclusive` was called
on the product mutator for the no-arg constructor.
The getList method was missing and therefore only the empty constructor
executed.
@simonresch simonresch marked this pull request as ready for review October 7, 2025 14:26
Copy link
Contributor

@oetr oetr left a comment

Choose a reason for hiding this comment

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

LGTM!

@simonresch simonresch merged commit e5057ce into main Oct 8, 2025
8 checks passed
@simonresch simonresch deleted the CIF-1815-fix-no-args-product-mutator branch October 8, 2025 07:26
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.

2 participants