Skip to content

Conversation

@rascani
Copy link
Contributor

@rascani rascani commented Feb 9, 2026

Summary

The validate_dim_order function only checked that values were in bounds, allowing invalid inputs like {0, 0, 0} to pass. This caused uninitialized memory access in dim_order_to_stride_nocheck.

Fix by using a bitmask to detect duplicates. Also adds test fixture with runtime_init() for error logging and removes duplicate include.

Test plan

./test/run_oss_cpp_tests.sh

The validate_dim_order function only checked that values were in bounds,
allowing invalid inputs like {0, 0, 0} to pass. This caused uninitialized
memory access in dim_order_to_stride_nocheck.

Fix by using a bitmask to detect duplicates. Also adds test fixture with
runtime_init() for error logging and removes duplicate include.

Co-authored-by: Claude <noreply@anthropic.com>
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 9, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17314

Note: Links to docs will display an error until the docs builds have been completed.

❌ 11 New Failures, 2 Pending

As of commit 7621021 with merge base 977a57d (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@rascani rascani added the release notes: none Do not include this in the release notes label Feb 9, 2026
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 9, 2026
Copy link
Contributor

@lucylq lucylq left a comment

Choose a reason for hiding this comment

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

Thanks!

@rascani
Copy link
Contributor Author

rascani commented Feb 10, 2026

Failures are unrelated.

@rascani rascani merged commit 90e6e4c into pytorch:main Feb 10, 2026
148 of 159 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes security-fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants