Skip to content

Commit 57f3d07

Browse files
authored
Fix: xgenerator reports memory overlap to avoid in-place assignment corruption (#2936)
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. Co-authored-by: Tyagiquamar <Tyagiquamar@users.noreply.github.com>
1 parent d48f2d6 commit 57f3d07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/xtensor/generators/xgenerator.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace xt
8787
{
8888
static bool check_overlap(const E&, const memory_range&)
8989
{
90-
return false;
90+
return true;
9191
}
9292
};
9393

0 commit comments

Comments
 (0)