[llcpp] Don't change source value in std::move of VectorView and tracking_ptr

tracking_ptr is intended to match the behavior of raw pointers for
unowned pointers where possible (and the behavior of unique_ptr for
owned pointers).

This wasn't the case for std::move. Example:
int* x = &something;
int* y = std::move(x);
After these statements, x == y rather than x == nullptr.

The DecodedMessage class (used in ResultOf) has a destructor that
walks the object to close handles. The previous behavior of zeroing
pointers after std::move prevented this walk from traversing the
object and led to handle leaks. This change restores the previous
behavior and allows the object to be walked.

Fixed: 49226
Test: fx test llcpp_fidl_types_test
Test: fx test llcpp_fidl_builder_test

Tests originate from fxr/377022

Change-Id: I35b89f575bfef021c1e4ba48fe549c9fd446439f
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/377654
Commit-Queue: Benjamin Prosnitz <bprosnitz@google.com>
Reviewed-by: Chris Tam <godtamit@google.com>
Reviewed-by: Yifei Teng <yifeit@google.com>
Testability-Review: Yifei Teng <yifeit@google.com>
6 files changed
tree: ad7369ec4ef8686ce3b1935667f71420b877bbdd
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. garnet/
  7. prebuilt/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .dir-locals.el
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. .style.yapf
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. README.md
  30. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.