FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix: xgenerator reports memory overlap to avoid in-place assignment corruption by Tyagiquamar · Pull Request #2936 · xtensor-stack/xtensor · GitHub

Repository navigation

Fix: xgenerator reports memory overlap to avoid in-place assignment corruption - #2936

Merged
JohanMabille merged 1 commit into
xtensor-stack:masterfrom
Tyagiquamar:fix-xgenerator-overlap-2819
Oct 20, 2026
Merged

JohanMabille merged 1 commit into
xtensor-stack:masterfrom
Tyagiquamar:fix-xgenerator-overlap-2819

Conversation

Copy link
Copy Markdown
Contributor

Fixes #2819. xgenerator's overlapping_memory_checker_traits returned false unconditionally, so assignment from an xgenerator reading its resized target (e.g. xt::concatenate into itself) could read uninitialized memory. Report true so a temporary is used. Root cause analysis in BYTEASK.md.

Tyagiquamar force-pushed the fix-xgenerator-overlap-2819 branch from 80a1441 to e8acbeb Compare October 12, 2026 12:50

codspeed Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ 1 benchmark measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. This result is not comparable, so it counts as unchanged.

Preventing compiler optimizations

✅ 255 untouched benchmarks


Comparing Tyagiquamar:fix-xgenerator-overlap-2819 (e8acbeb) with master (d9a57b6)

JohanMabille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Approving it since it fixes an issue, but I find this solution too cautious. Most generators do not read values and will suffer a performance hit with this change.
However fixing it properly required more involve changes that should be done in a dedicated PR.

JohanMabille merged commit 57f3d07 into xtensor-stack:master Oct 20, 2026
40 of 41 checks passed

Tyagiquamar commented Oct 20, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

I'll look into more, thanks for merging this PR

However fixing it properly required more involve changes that should be done in a dedicated PR.

Copy link
Copy Markdown
Member

I'll look into more

Do not hesitate if you have questions, the issue I opened to track it is not very detailed.

And thanks again for the fix!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Avoiding temporary fails with xt::concatenate

2 participants


Back | FazBrowse Home | New Git URL