Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR #60221: Fix null pointer dereference in tsl::profiler::CreateStub
Imported from GitHub PR tensorflow/tensorflow#60221 The bug was found by Svace static analyzer: 1. channel may be null 2. it is passed to grpc::ProfileAnalysis::NewStub(channel) 3. then passed to grpc::ProfileAnalysis::Stub::Stub(channel) 4. then constructor grpc::internal::RpcMethod::RpcMethod() dereferences channel via channel->RegisterMethod(name) cc @mihaimaruseac Copybara import of the project: -- 232683a9b9e567f43239592b958e4302c257d85d by Alexey Vishnyakov <vishnya@ispras.ru>: Fix null pointer dereference in tsl::profiler::CreateStub The bug was found by Svace static analyzer: 1. channel may be null 2. it is passed to grpc::ProfileAnalysis::NewStub(channel) 3. then passed to grpc::ProfileAnalysis::Stub::Stub(channel) 4. then constructor grpc::internal::RpcMethod::RpcMethod() dereferences channel via channel->RegisterMethod(name) Merging this change closes #60221 FUTURE_COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#60221 from SweetVishnya:rpc-profiler-client-nullptr 232683a9b9e567f43239592b958e4302c257d85d PiperOrigin-RevId: 522457456
- Loading branch information