KEMBAR78
envoy: prevent building with none sanitizer by adisuissa · Pull Request #9719 · google/oss-fuzz · GitHub
Skip to content

Conversation

@adisuissa
Copy link
Contributor

PR #9653 added a "none" sanitizer that broke Envoy's build.
This PR explicitly lists the allowed sanitizers (address, memory, and undefined).

Signed-off-by: Adi Suissa-Peleg <adip@google.com>
@oliverchang
Copy link
Collaborator

Hi! The "none" sanitizer is required for fuzzing engines such as https://github.com/google/centipede. Is there a way to make that work?

@adisuissa
Copy link
Contributor Author

Hi! The "none" sanitizer is required for fuzzing engines such as https://github.com/google/centipede. Is there a way to make that work?

Our fuzzing build is currently broken when running in this mode:

ld.lld: error: undefined symbol: __sancov_lowest_stack
>>> referenced by config.cc:14 (/proc/self/cwd/source/extensions/request_id/uuid/config.cc:14)
>>>               bazel-out/k8-fastbuild-ST-d6203410e6b5/bin/source/extensions/request_id/uuid/_objs/config/config.pic.o:(Envoy::Extensions::RequestId::UUIDRequestIDExtension::set(Envoy::Http::RequestHeaderMap&, bool))
>>> referenced by config.cc:26 (/proc/self/cwd/source/extensions/request_id/uuid/config.cc:26)
>>>               bazel-out/k8-fastbuild-ST-d6203410e6b5/bin/source/extensions/request_id/uuid/_objs/config/config.pic.o:(Envoy::Extensions::RequestId::UUIDRequestIDExtension::setInResponse(Envoy::Http::ResponseHeaderMap&, Envoy::Http::RequestHeaderMap const&))
>>> referenced by config.cc:33 (/proc/self/cwd/source/extensions/request_id/uuid/config.cc:33)
>>>               bazel-out/k8-fastbuild-ST-d6203410e6b5/bin/source/extensions/request_id/uuid/_objs/config/config.pic.o:(Envoy::Extensions::RequestId::UUIDRequestIDExtension::get(Envoy::Http::RequestHeaderMap const&) const)
>>> referenced 24426 more times

It will take some time to track why the linking is incorrect when there is no fuzzing library.

I think we can merge this PR, and open another issue tracking why the build failed.

@oliverchang oliverchang merged commit 348ee8a into google:master Feb 17, 2023
DavidKorczynski pushed a commit that referenced this pull request Feb 17, 2023
In PR #9719 I accidentally added the memory sanitizer, which brakes the
oss-fuzz build:
```
Step #23 - "compile-libfuzzer-memory-x86_64": ld.lld: error: undefined symbol: __msan_param_tls
Step #23 - "compile-libfuzzer-memory-x86_64": >>> referenced by gtest-internal.h:522 (external/com_google_googletest/googletest/include/gtest/internal/gtest-internal.h:522)
Step #23 - "compile-libfuzzer-memory-x86_64": >>>               bazel-out/k8-fastbuild-ST-d2373e19ffe2/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(testing::internal::SuiteApiResolver<Envoy::Router::(anonymous namespace)::RouteMatcherTest>::GetSetUpCaseOrSuite(char const*, int))
Step #23 - "compile-libfuzzer-memory-x86_64": >>> referenced by gtest-internal.h:543 (external/com_google_googletest/googletest/include/gtest/internal/gtest-internal.h:543)
Step #23 - "compile-libfuzzer-memory-x86_64": >>>               bazel-out/k8-fastbuild-ST-d2373e19ffe2/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(testing::internal::SuiteApiResolver<Envoy::Router::(anonymous namespace)::RouteMatcherTest>::GetTearDownCaseOrSuite(char const*, int))
Step #23 - "compile-libfuzzer-memory-x86_64": >>> referenced by gtest-internal.h:522 (external/com_google_googletest/googletest/include/gtest/internal/gtest-internal.h:522)
Step #23 - "compile-libfuzzer-memory-x86_64": >>>               bazel-out/k8-fastbuild-ST-d2373e19ffe2/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(testing::internal::SuiteApiResolver<Envoy::Router::(anonymous namespace)::HeaderTransformsDoFormattingTest>::GetSetUpCaseOrSuite(char const*, int))
Step #23 - "compile-libfuzzer-memory-x86_64": >>> referenced 377754 more times
```

This PR keeps the address and undefined sanitizer.

Signed-off-by: Adi Suissa-Peleg <adip@google.com>
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this pull request Mar 15, 2023
PR google#9653 added a "none" sanitizer that broke Envoy's build.
This PR explicitly lists the allowed sanitizers (address, memory, and
undefined).

Signed-off-by: Adi Suissa-Peleg <adip@google.com>
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this pull request Mar 15, 2023
In PR google#9719 I accidentally added the memory sanitizer, which brakes the
oss-fuzz build:
```
Step google#23 - "compile-libfuzzer-memory-x86_64": ld.lld: error: undefined symbol: __msan_param_tls
Step google#23 - "compile-libfuzzer-memory-x86_64": >>> referenced by gtest-internal.h:522 (external/com_google_googletest/googletest/include/gtest/internal/gtest-internal.h:522)
Step google#23 - "compile-libfuzzer-memory-x86_64": >>>               bazel-out/k8-fastbuild-ST-d2373e19ffe2/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(testing::internal::SuiteApiResolver<Envoy::Router::(anonymous namespace)::RouteMatcherTest>::GetSetUpCaseOrSuite(char const*, int))
Step google#23 - "compile-libfuzzer-memory-x86_64": >>> referenced by gtest-internal.h:543 (external/com_google_googletest/googletest/include/gtest/internal/gtest-internal.h:543)
Step google#23 - "compile-libfuzzer-memory-x86_64": >>>               bazel-out/k8-fastbuild-ST-d2373e19ffe2/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(testing::internal::SuiteApiResolver<Envoy::Router::(anonymous namespace)::RouteMatcherTest>::GetTearDownCaseOrSuite(char const*, int))
Step google#23 - "compile-libfuzzer-memory-x86_64": >>> referenced by gtest-internal.h:522 (external/com_google_googletest/googletest/include/gtest/internal/gtest-internal.h:522)
Step google#23 - "compile-libfuzzer-memory-x86_64": >>>               bazel-out/k8-fastbuild-ST-d2373e19ffe2/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(testing::internal::SuiteApiResolver<Envoy::Router::(anonymous namespace)::HeaderTransformsDoFormattingTest>::GetSetUpCaseOrSuite(char const*, int))
Step google#23 - "compile-libfuzzer-memory-x86_64": >>> referenced 377754 more times
```

This PR keeps the address and undefined sanitizer.

Signed-off-by: Adi Suissa-Peleg <adip@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants