mirror of https://github.com/grpc/grpc.git
Merge pull request #9421 from htuch/grpc-buffer-writer-fix
Fix read from uninitialized memory bug in GrpcBufferWriter.pull/9631/head
commit
547974e478
10 changed files with 681 additions and 2 deletions
@ -0,0 +1,93 @@ |
|||||||
|
/*
|
||||||
|
* |
||||||
|
* Copyright 2017, Google Inc. |
||||||
|
* All rights reserved. |
||||||
|
* |
||||||
|
* Redistribution and use in source and binary forms, with or without |
||||||
|
* modification, are permitted provided that the following conditions are |
||||||
|
* met: |
||||||
|
* |
||||||
|
* * Redistributions of source code must retain the above copyright |
||||||
|
* notice, this list of conditions and the following disclaimer. |
||||||
|
* * Redistributions in binary form must reproduce the above |
||||||
|
* copyright notice, this list of conditions and the following disclaimer |
||||||
|
* in the documentation and/or other materials provided with the |
||||||
|
* distribution. |
||||||
|
* * Neither the name of Google Inc. nor the names of its |
||||||
|
* contributors may be used to endorse or promote products derived from |
||||||
|
* this software without specific prior written permission. |
||||||
|
* |
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||||
|
* |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <grpc++/impl/codegen/proto_utils.h> |
||||||
|
#include <grpc++/impl/grpc_library.h> |
||||||
|
#include <gtest/gtest.h> |
||||||
|
|
||||||
|
namespace grpc { |
||||||
|
namespace internal { |
||||||
|
|
||||||
|
static GrpcLibraryInitializer g_gli_initializer; |
||||||
|
|
||||||
|
// Provide access to GrpcBufferWriter internals.
|
||||||
|
class GrpcBufferWriterPeer { |
||||||
|
public: |
||||||
|
explicit GrpcBufferWriterPeer(internal::GrpcBufferWriter* writer) |
||||||
|
: writer_(writer) {} |
||||||
|
bool have_backup() const { return writer_->have_backup_; } |
||||||
|
const grpc_slice& backup_slice() const { return writer_->backup_slice_; } |
||||||
|
const grpc_slice& slice() const { return writer_->slice_; } |
||||||
|
|
||||||
|
private: |
||||||
|
GrpcBufferWriter* writer_; |
||||||
|
}; |
||||||
|
|
||||||
|
class ProtoUtilsTest : public ::testing::Test {}; |
||||||
|
|
||||||
|
// Regression test for a memory corruption bug where a series of
|
||||||
|
// GrpcBufferWriter Next()/Backup() invocations could result in a dangling
|
||||||
|
// pointer returned by Next() due to the interaction between grpc_slice inlining
|
||||||
|
// and GRPC_SLICE_START_PTR.
|
||||||
|
TEST_F(ProtoUtilsTest, BackupNext) { |
||||||
|
// Ensure the GrpcBufferWriter internals are initialized.
|
||||||
|
g_gli_initializer.summon(); |
||||||
|
|
||||||
|
grpc_byte_buffer* bp; |
||||||
|
GrpcBufferWriter writer(&bp, 8192); |
||||||
|
GrpcBufferWriterPeer peer(&writer); |
||||||
|
|
||||||
|
void* data; |
||||||
|
int size; |
||||||
|
// Allocate a slice.
|
||||||
|
ASSERT_TRUE(writer.Next(&data, &size)); |
||||||
|
EXPECT_EQ(8192, size); |
||||||
|
// Return a single byte. Before the fix that this test acts as a regression
|
||||||
|
// for, this would have resulted in an inlined backup slice.
|
||||||
|
writer.BackUp(1); |
||||||
|
EXPECT_TRUE(!peer.have_backup()); |
||||||
|
// On the next allocation, the slice is non-inlined.
|
||||||
|
ASSERT_TRUE(writer.Next(&data, &size)); |
||||||
|
EXPECT_TRUE(peer.slice().refcount != NULL); |
||||||
|
|
||||||
|
// Cleanup.
|
||||||
|
g_core_codegen_interface->grpc_byte_buffer_destroy(bp); |
||||||
|
} |
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
} // namespace grpc
|
||||||
|
|
||||||
|
int main(int argc, char** argv) { |
||||||
|
::testing::InitGoogleTest(&argc, argv); |
||||||
|
return RUN_ALL_TESTS(); |
||||||
|
} |
@ -0,0 +1,248 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" /> |
||||||
|
<ItemGroup Label="ProjectConfigurations"> |
||||||
|
<ProjectConfiguration Include="Debug|Win32"> |
||||||
|
<Configuration>Debug</Configuration> |
||||||
|
<Platform>Win32</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Debug|x64"> |
||||||
|
<Configuration>Debug</Configuration> |
||||||
|
<Platform>x64</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Release|Win32"> |
||||||
|
<Configuration>Release</Configuration> |
||||||
|
<Platform>Win32</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Release|x64"> |
||||||
|
<Configuration>Release</Configuration> |
||||||
|
<Platform>x64</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
</ItemGroup> |
||||||
|
<PropertyGroup Label="Globals"> |
||||||
|
<ProjectGuid>{D55F5F6B-BAB1-C421-7138-CDC08C686DCF}</ProjectGuid> |
||||||
|
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected> |
||||||
|
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir> |
||||||
|
</PropertyGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||||
|
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration"> |
||||||
|
<PlatformToolset>v100</PlatformToolset> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration"> |
||||||
|
<PlatformToolset>v110</PlatformToolset> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> |
||||||
|
<PlatformToolset>v120</PlatformToolset> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration"> |
||||||
|
<PlatformToolset>v140</PlatformToolset> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> |
||||||
|
<ConfigurationType>Application</ConfigurationType> |
||||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> |
||||||
|
<ConfigurationType>Application</ConfigurationType> |
||||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||||
|
<ImportGroup Label="ExtensionSettings"> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\cpptest.props" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\global.props" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\openssl.props" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\protobuf.props" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" /> |
||||||
|
</ImportGroup> |
||||||
|
<PropertyGroup Label="UserMacros" /> |
||||||
|
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> |
||||||
|
<TargetName>proto_utils_test</TargetName> |
||||||
|
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||||
|
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib> |
||||||
|
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||||
|
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)'=='Release'"> |
||||||
|
<TargetName>proto_utils_test</TargetName> |
||||||
|
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||||
|
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib> |
||||||
|
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||||
|
<Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl> |
||||||
|
</PropertyGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||||
|
<ClCompile> |
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<Optimization>Disabled</Optimization> |
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||||
|
<TreatWarningAsError>true</TreatWarningAsError> |
||||||
|
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||||
|
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Console</SubSystem> |
||||||
|
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||||
|
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||||
|
<ClCompile> |
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<Optimization>Disabled</Optimization> |
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||||
|
<TreatWarningAsError>true</TreatWarningAsError> |
||||||
|
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||||
|
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Console</SubSystem> |
||||||
|
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||||
|
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||||
|
<ClCompile> |
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<Optimization>MaxSpeed</Optimization> |
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||||
|
<TreatWarningAsError>true</TreatWarningAsError> |
||||||
|
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||||
|
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Console</SubSystem> |
||||||
|
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||||
|
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||||
|
<ClCompile> |
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<Optimization>MaxSpeed</Optimization> |
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||||
|
<TreatWarningAsError>true</TreatWarningAsError> |
||||||
|
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||||
|
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Console</SubSystem> |
||||||
|
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||||
|
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
|
||||||
|
<ItemGroup> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\create_auth_context.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\metadata_map.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\slice.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\exec_ctx_fwd.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_slice.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h" /> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClCompile Include="$(SolutionDir)\..\test\cpp\codegen\proto_utils_test.cc"> |
||||||
|
</ClCompile> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj"> |
||||||
|
<Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project> |
||||||
|
</ProjectReference> |
||||||
|
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc\grpc.vcxproj"> |
||||||
|
<Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project> |
||||||
|
</ProjectReference> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<None Include="packages.config" /> |
||||||
|
</ItemGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||||
|
<ImportGroup Label="ExtensionTargets"> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||||
|
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||||
|
</ImportGroup> |
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
||||||
|
<PropertyGroup> |
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
||||||
|
</PropertyGroup> |
||||||
|
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" /> |
||||||
|
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" /> |
||||||
|
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" /> |
||||||
|
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" /> |
||||||
|
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" /> |
||||||
|
</Target> |
||||||
|
</Project> |
||||||
|
|
@ -0,0 +1,200 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||||
|
<ItemGroup> |
||||||
|
<ClCompile Include="$(SolutionDir)\..\test\cpp\codegen\proto_utils_test.cc"> |
||||||
|
<Filter>test\cpp\codegen</Filter> |
||||||
|
</ClCompile> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\create_auth_context.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\metadata_map.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen\security</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\slice.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\exec_ctx_fwd.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_slice.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h"> |
||||||
|
<Filter>include\grpc\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h"> |
||||||
|
<Filter>include\grpc++\impl\codegen</Filter> |
||||||
|
</ClInclude> |
||||||
|
</ItemGroup> |
||||||
|
|
||||||
|
<ItemGroup> |
||||||
|
<Filter Include="include"> |
||||||
|
<UniqueIdentifier>{cc3989e4-cb32-e89b-2d05-41ad6dd1dfdf}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="include\grpc"> |
||||||
|
<UniqueIdentifier>{59dc67c7-fb18-960b-db77-99ea8e6c0a5f}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="include\grpc++"> |
||||||
|
<UniqueIdentifier>{6c2c28e0-a57f-8eb7-4897-41ec191373f9}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="include\grpc++\impl"> |
||||||
|
<UniqueIdentifier>{6740e44a-b709-0cb2-faa4-c1a792d909c5}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="include\grpc++\impl\codegen"> |
||||||
|
<UniqueIdentifier>{cbb79e1d-95bc-e475-8e86-af33a7603af1}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="include\grpc++\impl\codegen\security"> |
||||||
|
<UniqueIdentifier>{c4a45c0f-ccce-7e26-d0bb-9e54ad676140}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="include\grpc\impl"> |
||||||
|
<UniqueIdentifier>{4aff0d7b-5c9d-080c-faa6-e8126853f149}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="include\grpc\impl\codegen"> |
||||||
|
<UniqueIdentifier>{35a120bf-8b2f-77e1-cab7-24259b5ed1db}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="test"> |
||||||
|
<UniqueIdentifier>{9d60ac43-ff38-4dfc-8c33-9167fb47fa90}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="test\cpp"> |
||||||
|
<UniqueIdentifier>{7845357d-2b4b-6f25-c68b-79be9ab587fb}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="test\cpp\codegen"> |
||||||
|
<UniqueIdentifier>{22e8c70f-796c-f2c0-d87d-e4ef419609a1}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
</ItemGroup> |
||||||
|
</Project> |
||||||
|
|
Loading…
Reference in new issue