Some tests using `testing::ValuesIn` fail to compile with `--config=asan`
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
Currently, `--config=asan` builds fail to compile for some tests
```
bazel test --config=asan --keep_going //xls/codegen:block_generator_test //xls/codegen:combinational_generator_test //xls/codegen:finite_state_machine_test //xls/codegen:module_builder_test //xls/codegen:pipeline_generator_test
```
Interestingly, with regular compile, they work, but with `asan`, they all have compile-issues with `gtest` which show up as:
```
xls/codegen/block_generator_test.cc:1680:22: error: no matching function for call to 'ValuesIn'
1680 | testing::Combine(testing::ValuesIn(kDefaultSimulationTargets),
| ^~~~~~~~~~~~~~~~~
external/com_google_googletest/googletest/include/gtest/gtest-param-test.h:508:32: note: expanded from macro 'INSTANTIATE_TEST_SUITE_P'
508 | auto t = std::make_tuple(__VA_ARGS__); \
| ^~~~~~~~~~~
external/com_google_googletest/googletest/include/gtest/gtest-param-test.h:304:29: note: candidate template ignored: substitution failure [with T = SimulationTarget, N = 0]
304 | internal::ParamGenerator ValuesIn(const T (&array)[N]) {
| ^
external/com_google_googletest/googletest/include/gtest/gtest-param-test.h:309:58: note: candidate template ignored: substitution failure [with Container = SimulationTarget[0]]: type 'xls::verilog::SimulationTarget[0]' cannot be used prior to '::' because it has no members
309 | internal::ParamGenerator ValuesIn(
| ~~~~~~~~~ ^
external/com_google_googletest/googletest/include/gtest/gtest-param-test.h:297:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
297 | ValuesIn(ForwardIterator begin, ForwardIterator end) {
```
Maybe something already fixed up-stream in googletest (we're currently using latest released, but maybe we can try latest git hash).
Observed while looking at feasibility of #1447
Contributor guide
Assessment
This issue has not been assessed yet.