Giter VIP home page Giter VIP logo

Comments (5)

Shuenhoy avatar Shuenhoy commented on May 17, 2024 1

I can confirm that the tests compile on GCC 11.1 (via Docker image gcc:11.1) with -DCMAKE_BUILD_TYPE=Debug but meet the same error as @zxhcho with -DCMAKE_BUILD_TYPE=Release.

from proxy.

zxhcho avatar zxhcho commented on May 17, 2024 1

@zxhcho Thank you for your feedback! We already have pipelines running on Ubuntu (see Actions) that build the tests with GCC and did not notice any issue so far. As you mentioned MSVC, are you using GCC on Windows? If so, could you double check if CMake is properly configured with your compiler? If this issue persists and the environment is confirmed to be good, please feel free to let us know more about how your compiler and toolchains are configured so that we can repro it and help investigate further.

Ok, I build it on Ubuntu 22.04 with gcc-11.2 and Release version. When I switch to Debug, the error will not occur as @Shuenhoy

from proxy.

mingxwa avatar mingxwa commented on May 17, 2024

@zxhcho Thank you for your feedback! We already have pipelines running on Ubuntu (see Actions) that build the tests with GCC and did not notice any issue so far. As you mentioned MSVC, are you using GCC on Windows? If so, could you double check if CMake is properly configured with your compiler? If this issue persists and the environment is confirmed to be good, please feel free to let us know more about how your compiler and toolchains are configured so that we can repro it and help investigate further.

from proxy.

frederick-vs-ja avatar frederick-vs-ja commented on May 17, 2024

proxy/proxy.h

Lines 420 to 429 in 531dfcc

proxy& operator=(proxy&& rhs) noexcept(HasNothrowMoveAssignment)
requires(HasMoveAssignment) {
if constexpr (HasNothrowMoveAssignment) {
this->~proxy();
} else {
reset(); // For weak exception safety
}
new(this) proxy(std::move(rhs));
return *this;
}

Currently self-move-assignment can result in reading *this when *this is destroyed, which is UB. I think we should perform the operations only if this != std::addressof(rhs).

from proxy.

mingxwa avatar mingxwa commented on May 17, 2024

@frederick-vs-ja I did not notice it is a UB of proxy to move-assign to itself. Thank you for the investigation!

from proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.