[llvm-bugs] [Bug 48439] New: Allocator propagation broken for std::string move assignment

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 8 03:54:00 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=48439

            Bug ID: 48439
           Summary: Allocator propagation broken for std::string move
                    assignment
           Product: libc++
           Version: 10.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: oliver.rosten at googlemail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

Consider the case where

propagate on container copy assignment = true
propagate on container move assignment = false

and focus on move assignment.

Suppose that the (stateful) instances of the allocators are not equal to one
another.

In this case, __move_assign delegates to assign. As far as I can tell, this
delegates to copy assignment. However, the latter considers propagation on
container copy and not container move.

This gives the wrong outcome in the case described.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201208/f73b78d9/attachment.html>


More information about the llvm-bugs mailing list