Craig Topper via llvm-dev
2017-Apr-02 19:28 UTC
[llvm-dev] Do we still need the self move protection in APInt's move assignment operator?
The comment says it was added due to a bug in MSVC 2013 implementation of stable_sort. Newer versions of MSVC have fixed this bug in stable_sort according to this webpage record https://connect.microsoft.com/VisualStudio/feedback/details/886652 Can we remove the check now? ~Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170402/9ca3fa05/attachment.html>
陳韋任 via llvm-dev
2017-Apr-02 22:10 UTC
[llvm-dev] Do we still need the self move protection in APInt's move assignment operator?
I think so. Besides, recommended VS version is VS 2015 [1], the bug should be long gone. [1] http://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library Regards, chenwj -- Wei-Ren Chen (陳韋任) Homepage: https://people.cs.nctu.edu.tw/~chenwj 2017-04-03 3:28 GMT+08:00 Craig Topper via llvm-dev <llvm-dev at lists.llvm.org>:> The comment says it was added due to a bug in MSVC 2013 implementation of > stable_sort. Newer versions of MSVC have fixed this bug in stable_sort > according to this webpage record > https://connect.microsoft.com/VisualStudio/feedback/details/886652 > > Can we remove the check now? > > ~Craig > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Craig Topper via llvm-dev
2017-Apr-03 21:35 UTC
[llvm-dev] Do we still need the self move protection in APInt's move assignment operator?
The way the code is currently written we only do the self-move check on the multiword case. But on if we do a self move on a single word, we'll end up calling a memcpy with src and dest the same which is UB. So either way this code needs to change. We need to either move it up to cover single word too or remove it entirely. ~Craig On Sun, Apr 2, 2017 at 3:10 PM, 陳韋任 <chenwj.cs97g at g2.nctu.edu.tw> wrote:> I think so. Besides, recommended VS version is VS 2015 [1], the bug > should be long gone. > > [1] http://llvm.org/docs/GettingStarted.html#host-c- > toolchain-both-compiler-and-standard-library > > Regards, > chenwj > > > -- > Wei-Ren Chen (陳韋任) > Homepage: https://people.cs.nctu.edu.tw/~chenwj > > > 2017-04-03 3:28 GMT+08:00 Craig Topper via llvm-dev < > llvm-dev at lists.llvm.org>: > > The comment says it was added due to a bug in MSVC 2013 implementation of > > stable_sort. Newer versions of MSVC have fixed this bug in stable_sort > > according to this webpage record > > https://connect.microsoft.com/VisualStudio/feedback/details/886652 > > > > Can we remove the check now? > > > > ~Craig > > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170403/bbe689cc/attachment.html>