Comments (3)
It always works with the version that fuzztest
is using in their own builds:
Lines 23 to 28 in 4c3852b
from fuzztest.
Hi all,
I'm using the latest version of absl
.
http_archive(
name = "com_google_absl",
sha256 = "59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5",
strip_prefix = "abseil-cpp-20230802.0",
url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz",
)
Unfortunately a couple of fixes are necessary:
End of search list.
In file included from external/com_google_fuzztest/fuzztest/internal/type_support.cc:15:
external/com_google_fuzztest/./fuzztest/internal/type_support.h:31:10: fatal error: 'absl/strings/has_absl_stringify.h' file not found
31 | #include "absl/strings/has_absl_stringify.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
The path for has_absl_stringify
has changed so it is necessary to change it to absl/strings/internal/has_absl_stringify.h
so you have to modify type_support.h
Once done if you try again you should have the following error:
In file included from external/com_google_fuzztest/./fuzztest/internal/table_of_recent_compares.h:31:
external/com_google_fuzztest/./fuzztest/internal/type_support.h:90:46: error: no template named 'HasAbslStringify' in namespace 'absl'; did you mean 'absl::strings_internal::HasAbslStringify'?
90 | inline constexpr bool has_absl_stringify_v = absl::HasAbslStringify<T>::value;
| ^~~~~~~~~~~~~~~~~~~~~~
| absl::strings_internal::HasAbslStringify
external/com_google_absl/absl/strings/internal/has_absl_stringify.h:42:8: note: 'absl::strings_internal::HasAbslStringify' declared here
42 | struct HasAbslStringify : std::false_type {};
| ^
1 error generated.
This time add strings_internal::
on line 90 as suggested.
Now you should be able to use bazel test
and bazel run
[==========] Running 0 tests from 0 test suites.
[==========] 0 tests from 0 test suites ran. (0 ms total)
[ PASSED ] 0 tests.
INFO: Found 1 test target...
Target //:alberto up-to-date:
bazel-bin/alberto
INFO: Elapsed time: 14.652s, Critical Path: 9.12s
INFO: 131 processes: 1 internal, 130 linux-sandbox.
INFO: Build completed successfully, 131 total actions
//:alberto PASSED in 0.0s
Executed 1 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
โ woff2 git:(ccbeb246d2) bazel run --copt=-I./include :alberto
INFO: Analyzed target //:alberto (0 packages loaded, 3 targets configured).
INFO: Found 1 target...
Target //:alberto up-to-date:
bazel-bin/alberto
INFO: Elapsed time: 0.139s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: external/bazel_tools/tools/test/test-setup.sh ./alberto
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //:alberto
-----------------------------------------------------------------------------
[==========] Running 0 tests from 0 test suites.
[==========] 0 tests from 0 test suites ran. (0 ms total)
[ PASSED ] 0 tests.
โ woff2 git:(ccbeb246d2)
@racko is it worth a PR?
from fuzztest.
@thealberto Don't ask me, I'm just another user ๐
That being said, as a reviewer I would comment that internal
headers and APIs must not be used. Thus, for a proper solution, somebody needs to figure out how HasAbslStringify
should be replaced without accessing internals.
Looking for a solution, I found that while you are using the latest release from Sep 18, 2023, fuzztest's main branch actually requires abseil/abseil-cpp@fad9462 from Dec 7, 2023 : At the time of writing I found absl/strings/has_absl_stringify.h in abseil's master branch:
// `HasAbslStringify<T>` detects if type `T` supports the `AbslStringify()`
// customization point (see
// https://abseil.io/docs/cpp/guides/format#abslstringify for the
// documentation).
//
// Note that there are types that can be `StrCat`-ed that do not use the
// `AbslStringify` customization point (for example, `int`).
template <typename T, typename = void>
struct HasAbslStringify : std::false_type {};
template <typename T>
struct HasAbslStringify<
T, std::enable_if_t<std::is_void<decltype(AbslStringify(
std::declval<strings_internal::UnimplementedSink&>(),
std::declval<const T&>()))>::value>> : std::true_type {};
from fuzztest.
Related Issues (20)
- FUZZ_TEST_F Should Respect GTEST_SKIP() in GoogleTest Base Fixture
- support for timeout HOT 5
- how FUZZ_TEST enable multithreading
- DFUZZTEST_COMPATIBILITY_MODE=libfuzzer failing on linking HOT 1
- MBErr: Builder group name "chromium.fuzz" not found in "/opt/chromium/src/tools/mb/mb_config.pyl" HOT 2
- cc_fuzztest_grammar_library bazel macro cannot be used outside of com_google_fuzztest repo
- Backslashes are wrongly escaped in grammar_codegen
- Byte Array Mutator failed on empty input HOT 1
- error: static assertion failed due to requirement 'always_false<unsigned char *>': => Type not supported yet HOT 2
- How can I build and run the vp8_encoder_fuzz_test
- Add bzlmod support for Bazel HOT 2
- How to add a new fuzzer for libvpx HOT 1
- libfuzzer compatibility mode spams `Unexpected file format` without making any progress (ะกMake)
- Target based fuzztest_setup_fuzzing_flags
- Cannot test a pointer type HOT 1
- How can I generate a profraw file based on the output of my custom fuzzer? HOT 6
- Fuzz mode as documented in https://github.com/google/fuzztest/blob/main/doc/quickstart-cmake.md doesn't work HOT 1
- [CMake] sanitizer is forced to "address sanitizer"
- Compatibility mode broken with oss-fuzz
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuzztest.