Skip to content
Snippets Groups Projects
  • Garret Kelly's avatar
    9663d033
    Add a GrpcLibraryInitializer to client_context.cc · 9663d033
    Garret Kelly authored
    It's feasible that a program be written/linked such that it only use
    ClientContext from grpc++, which could end up with the other instances
    of GrpcLibraryInitializer not ending up in the final binary.  Add a
    GrpcLibraryInitializer to client_context.cc to ensure that the library
    is initialized.  The primary side-effect of the library not being
    initialized when only using a ClientContext is that the destructor for
    ClientContext indirectly ends up trying to call through
    g_core_codegen_interface when destructing its metadata, which is null.
    9663d033
    History
    Add a GrpcLibraryInitializer to client_context.cc
    Garret Kelly authored
    It's feasible that a program be written/linked such that it only use
    ClientContext from grpc++, which could end up with the other instances
    of GrpcLibraryInitializer not ending up in the final binary.  Add a
    GrpcLibraryInitializer to client_context.cc to ensure that the library
    is initialized.  The primary side-effect of the library not being
    initialized when only using a ClientContext is that the destructor for
    ClientContext indirectly ends up trying to call through
    g_core_codegen_interface when destructing its metadata, which is null.