Skip to content
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

Properly resize arrays when adding #5872

Merged
merged 2 commits into from
Dec 6, 2020
Merged

Conversation

joeduffy
Copy link
Member

@joeduffy joeduffy commented Dec 6, 2020

The current logic attempts to update the array but, because
append may need to allocate a new array with adequate space,
the code can currently leave dest referring to the old,
under-sized array. The solution is to use the set(dest)
logic that already exists and is used for the IsNull case.

Added a test case that would fail before this fix and now passes.

This fixes #5871.

The current logic attempts to update the array but, because
append may need to allocate a new array with adequate space,
the code can currently leave dest referring to the old,
under-sized array. The solution is to use the set(dest)
logic that already exists and is used for the IsNull case.

Added a test case that would fail before this fix and now passes.

This fixes #5871.
@stack72
Copy link
Contributor

stack72 commented Dec 6, 2020

Thank you so much!!

@stack72 stack72 merged commit a5c30f1 into master Dec 6, 2020
@pulumi-bot pulumi-bot deleted the joeduffy/5871_import_panic branch December 6, 2020 21:23
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.

Panics during imports: index out of range [X] with length Y
3 participants