Grpc Graph - fix use after free

GrpcGraph initializes StreamSetObserver - which triggers a thread to
notify GrpcGraph of termination. If GrpcGraph is destroyed, this will
result in use after free. Fix this by enforcing that GrpcGraph object is
not destroyed before StreamSetObserver.

Bug: 170407229
Test: build, unit test and fuzz test
Change-Id: I8b24f72af60c441ebd7a31939769c46589431cfe
Merged-In: I8b24f72af60c441ebd7a31939769c46589431cfe
(cherry picked from commit 3f53bf0525bd5c21ff6cc3235b93cb26a7866ea8)
4 files changed
tree: 1bd61629a603622ec1f60ee173a1399f49030d78
  1. .clang-format
  2. .gitignore
  3. Android.mk
  4. CPPLINT.cfg
  5. CleanSpec.mk
  6. EncryptionRunner/
  7. FrameworkPackageStubs/
  8. OWNERS
  9. PREUPLOAD.cfg
  10. README.md
  11. TEST_MAPPING
  12. car-bugreportd/
  13. car-default-input-service/
  14. car-internal-lib/
  15. car-lib/
  16. car-maps-placeholder/
  17. car-systemtest-lib/
  18. car-test-lib/
  19. car-usb-handler/
  20. car_product/
  21. computepipe/
  22. evs/
  23. experimental/
  24. obd2-lib/
  25. packages/
  26. procfs-inspector/
  27. service/
  28. surround_view/
  29. tests/
  30. tools/
  31. user/
  32. vehicle-hal-support-lib/
  33. watchdog/
README.md

Native (C++) code format is required to be compatible with .clang-format file. Run

git clang-format --style=file --extension='h,cpp,cc' HEAD~

Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.