Skip to content

AssertSoo fails when trying to build with a protobuf library in fuzzing mode #1937

@I-ABD-I

Description

@I-ABD-I

when using fuzzing mode and a proto library, and trying to run it always reports this line:
Assertion failed: ((common.capacity() == policy.soo_capacity()) && "Try enabling sanitizers."), function AssertSoo, file raw_hash_set.cc, line 781.

everything in this cmake was copied from the getting started guide except the protobuf part

cmake_minimum_required(VERSION 3.19)
project(first_fuzz_project)

# GoogleTest requires at least C++17
set(CMAKE_CXX_STANDARD 17)

add_subdirectory(fuzztest)

enable_testing()


include(GoogleTest)


find_package(Protobuf)

fuzztest_setup_fuzzing_flags()
fuzztest_proto_library(NAME protolib SRCS test.proto PUBLIC)

add_executable(
  first_fuzz_test
  first_fuzz_test.cc
)

# If you have other dependencies than FuzzTest, link them:
target_link_libraries(first_fuzz_test PRIVATE fuzztest::protolib)

link_fuzztest(first_fuzz_test)
gtest_discover_tests(first_fuzz_test)

platform: macos26
clang version: 20.1.8
libprotoc version: 33.1
cmake version: 4.1.2
on main branch 1c3e6d1

built using:
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebug \
-DFUZZTEST_FUZZING_MODE=on ..
cmake --build . -j 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions