BaldDemian opened a new pull request, #3511: URL: https://github.com/apache/fory/pull/3511
<!-- **Thanks for contributing to Apache Fory™.** **If this is your first time opening a PR on fory, you can refer to [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).** Contribution Checklist - The **Apache Fory™** community has requirements on the naming of pr titles. You can also find instructions in [CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md). - Apache Fory™ has a strong focus on performance. If the PR you submit will have an impact on performance, please benchmark it first and provide the benchmark result here. --> ## Why? As mentioned in https://github.com/apache/fory/pull/3490#issuecomment-4079516008, one cargo bench case stably fails in the current code. After some digging, I think it results from this line: https://github.com/apache/fory/blob/ede9b64750b2f03a238928bea3d081f2b7744b89/rust/fory-core/src/resolver/type_resolver.rs#L1389 The `clone()` method for `TypeResolver` should return a **deep** clone: https://github.com/apache/fory/blob/ede9b64750b2f03a238928bea3d081f2b7744b89/rust/fory-core/src/resolver/type_resolver.rs#L1316-L1319 But the `type_meta_by_index` field has type `Vec<Option<Rc<TypeMeta>>>`, calling `clone()` on this type directly would lead to a **shadow** clone indeed. The `internal_type_info_by_id` field in `TypeResolver` also has a similar type `Vec<Option<Rc<TypeInfo>>>` but it doesn't call `clone()` directly. ## What does this PR do? - deep clone `type_meta_by_index`. Now the cargo bench case can run successfully and stably. - introduce bazel-setup GitHub action in C++ sanitizer job <!-- Describe the details of this PR. --> ## Related issues <!-- Is there any related issue? If this PR closes them you say say fix/closes: - #xxxx0 - #xxxx1 - Fixes #xxxx2 --> ## AI Contribution Checklist No ## Does this PR introduce any user-facing change? No. ## Benchmark No. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
