-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[c++] ClientAsyncResponseReader placement operator delete does not match placement operator new #11301
Comments
I believe that this is not a problem. The That said, if a supported compiler is throwing an unneeded warning, we could add an empty function for this case. It seems like an overly zealous warning, though. I'm wondering why our test builds haven't triggered it since we build using VS 2015. |
ClientAsyncResponseReader had a breaking API change that we needed to adjust to. There also appears to be a bug with ClientAsyncResponseReader's placement new and placement delete operators, so we're consuming a slightly patched version (see chwarr/grpc@8bd0fb92ec for the delta). Upstream issue grpc/grpc#11301 has been opened about this problem.
I'm able to see the same build warning from the CMake build target "grpc++_test_util" using master as of commit 796d81b:
There's a similar warning coming from async_stream.h as well:
I suspect that it isn't failing in CI builds, as warnings don't appear to be treated as errors in the CMake-based build. And, yes, this is one of those warnings from MSVC where it tells you that it's following the standard. If the constructor is marked as I care about this because my consumers build What is the target level of warning "cleanliness" for gRPC/gRPC++ built with MSVC? Updated patch, if you just want to apply that:
|
ClientAsyncResponseReader had a breaking API change that we needed to adjust to. The gRPC zlib submodule is now conflicting with the system-wide zlib. When using CMake inside of Travis, we prefer the system-wide zlib package over the submodule. There also appears to be a bug with ClientAsyncResponseReader's placement new and placement delete operators, so we're consuming a slightly patched version (see chwarr/grpc@8bd0fb92ec for the delta). Upstream issue grpc/grpc#11301 has been opened about this problem.
ClientAsyncResponseReader had a breaking API change that we needed to adjust to. The gRPC zlib submodule is now conflicting with the system-wide zlib. When using CMake inside of Travis, we prefer the system-wide zlib package over the submodule. There also appears to be a bug with ClientAsyncResponseReader's placement new and placement delete operators, so we're consuming a slightly patched version (see chwarr/grpc@8bd0fb92ec for the delta). Upstream issue grpc/grpc#11301 has been opened about this problem.
Should this be an issue in the gRPC issue tracker?
Yes, I think.
What version of gRPC and what language are you using?
C++ as of tag v1.3.4 (but similar code is present in master as of 19fd924).
What operating system (Linux, Windows, …) and version?
Windows 10 Version 1703 (OS Build 15063.296)
What runtime / compiler are you using (e.g. python version or version of gcc)
Visual C++ 2015 (19.00.24215.1 for x64) built via CMake with the 'Visual Studio 14 2015 Win64' generator.
What did you do?
Attempted to compile some code that uses
grpc::ClientAsyncResponseReader
.A minimal repo can be found at https://github.com/chwarr/op-del-example.
What did you expect to see?
No build warnings.
What did you see instead?
Build warning C4291 about mismatched placement new and delete operators.
Anything else we should know about your project / environment?
ClientAsyncResponseReader
appears to have mismatched placement new and placement delete operators as of commit 5845091#diff-beb45446397f2b7b25dc902290938075 by @ctiller.operator new(std::size_t, T1, T2, ..., TN)
needs to be matched withoperator delete(void*, T1, T2, ... TN)
. So, the fix looks to beNB: I'm not currently in the position to submit this as a PR, hence the patch above.
The text was updated successfully, but these errors were encountered: