Skip to content

Corrected field example (#3369) - #3375

Merged
christophe-murphy merged 2 commits into
arrayfire:masterfrom
willyborn:field3369
Jan 7, 2025
Merged

christophe-murphy merged 2 commits into
arrayfire:masterfrom
willyborn:field3369

Conversation

@willyborn

@willyborn willyborn commented Mar 14, 2023 •

Copy link
Copy Markdown
Contributor

Uninitialized buffer used to collect partial join (2D -> 3D)
Join now accepts any buffer as out array, as long as it is large enough.

Description

  • This is a BUG fix reported in issue 3369
  • The array provided to join was insufficient dimensioned, resulting in buffer overflow and wrong results.
  • This can be back-ported to 3.8.3 (where the issue is first reported)
  • No new functions added, only corrected.

Fixes: #3369

Changes to Users

Non

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [-] Functions added to unified API
  • [-] Functions documented

Comment thread src/api/c/vector_field.cpp Resolved
Comment thread src/api/c/vector_field.cpp Resolved
@willyborn
willyborn force-pushed the field3369 branch 2 times, most recently from 1771cce to 9d72403 Compare March 28, 2023 21:31
@christophe-murphy christophe-murphy self-assigned this Aug 30, 2024
@christophe-murphy
christophe-murphy marked this pull request as draft August 30, 2024 00:14
@christophe-murphy
christophe-murphy marked this pull request as ready for review August 30, 2024 00:15
@christophe-murphy
christophe-murphy self-requested a review August 30, 2024 00:15
@christophe-murphy christophe-murphy removed their assignment Aug 30, 2024
@christophe-murphy

Copy link
Copy Markdown
Contributor

@9prady9 , I'll pick up this review if you have no objections

@christophe-murphy

Copy link
Copy Markdown
Contributor

@willyborn I'm happy with the changes you have made to the setup_vector_field routine. The field example is working with that fix. I see that you have made other changes to the join method to check the dimensions and handle the case where the stride is not 1 in the first dimension. I think there is more work to be done on the other versions of the join routine to fully support this. There should probably also be additional tests added to the join test suite for this. I suggest that we just merge the setup_vector_field changes here and open a separate issue for the join method changes.

@willyborn

willyborn commented Aug 30, 2024 via email

Copy link
Copy Markdown
Contributor Author

Comment thread examples/graphics/field.cpp Resolved
@willyborn

willyborn commented Oct 3, 2024 via email

Copy link
Copy Markdown
Contributor Author

@christophe-murphy
christophe-murphy merged commit d8a176f into arrayfire:master Jan 7, 2025
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.

field.cpp example on Arch linux breaks on all backends

3 participants