Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 6 additions & 33 deletions projects/ogre/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,15 @@

mkdir -p build
cd build
cmake -DOGRE_STATIC=TRUE ..
cmake -DOGRE_STATIC=TRUE -DOGRE_BUILD_FUZZERS=TRUE -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DOGRE_BUILD_DEPENDENCIES=FALSE -DOGRE_BUILD_SAMPLES=FALSE ..
make -j$(nproc)

COMMON_INCLUDES="-I../OgreMain/include/ -I./include/ -I../PlugIns/STBICodec/include/ -I../Components/Bites/include/"
COMMON_LIBS="-Wl,--start-group \
./lib/libOgreOverlayStatic.a \
./lib/libOgreRTShaderSystemStatic.a \
./lib/libOgreBulletStatic.a \
./lib/libPlugin_PCZSceneManagerStatic.a \
./lib/libOgreMainStatic.a \
./lib/libOgreTerrainStatic.a \
./lib/libPlugin_OctreeZoneStatic.a \
./lib/libOgrePropertyStatic.a \
./lib/libCodec_STBIStatic.a \
./lib/libOgreMeshLodGeneratorStatic.a \
./lib/libOgreVolumeStatic.a \
./lib/libOgrePagingStatic.a \
./lib/libPlugin_BSPSceneManagerStatic.a \
./lib/libPlugin_OctreeSceneManagerStatic.a \
./lib/libDefaultSamples.a \
./lib/libOgreBitesStatic.a \
./lib/libPlugin_DotSceneStatic.a \
./lib/libPlugin_ParticleFXStatic.a \
$(find . -name 'libpugixml.a' -print -quit) \
-Wl,--end-group"

# Build the existing fuzzers
for fuzzer in image_fuzz stream_fuzz zip_fuzz; do
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $SRC/${fuzzer}.cpp -o $OUT/${fuzzer} \
$COMMON_INCLUDES -pthread $COMMON_LIBS
# copy the fuzzers
for fuzzer in image_fuzz stream_fuzz zip_fuzz ogre_deep_fuzz; do
cp bin/${fuzzer} $OUT/${fuzzer}
done

# Build the deep fuzzer with extra include path for codec headers in src/
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $SRC/ogre_deep_fuzz.cpp -o $OUT/ogre_deep_fuzz \
$COMMON_INCLUDES -I../OgreMain/src/ -pthread $COMMON_LIBS

# Create seed corpus for the deep fuzzer from Ogre's test/sample media files
mkdir -p /tmp/ogre_deep_seeds
# Mesh samples (selector byte 0x00 = FUZZ_MESH)
Expand All @@ -73,4 +46,4 @@ done
cd /tmp/ogre_deep_seeds && zip -q $OUT/ogre_deep_fuzz_seed_corpus.zip * 2>/dev/null || true

# Copy dictionary
cp $SRC/ogre_deep_fuzz.dict $OUT/ogre_deep_fuzz.dict 2>/dev/null || true
cp ../Tests/fuzz/ogre_deep_fuzz.dict $OUT/ogre_deep_fuzz.dict 2>/dev/null || true
86 changes: 0 additions & 86 deletions projects/ogre/image_fuzz.cpp

This file was deleted.

196 changes: 0 additions & 196 deletions projects/ogre/ogre_deep_fuzz.cpp

This file was deleted.

17 changes: 0 additions & 17 deletions projects/ogre/ogre_deep_fuzz.dict

This file was deleted.

Loading