Files
verilator/nodist/fuzzer/setup_user
T
Geza Lore 832f41f0fe Internals: Hide CC make rules (#6537)
All code is built as C++ via CXX, but we still have some references to
CC. Trying to make sure we don't add plain C later by hiding the C
compiler. (So it's always enough to override CXX=... in configure)
2025-10-07 17:37:42 +01:00

34 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
######################################################################
# DESCRIPTION: Fuzzer setup to be run as a normal user
#
# Copyright 2019-2019 by Eric Rippey. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
######################################################################
# This is the portion of the setup for fuzzing that does not require root access.
set -e
# Build instrumented version of verilator
pushd ../..
autoconf
AFL_HARDEN=1 CXX=afl-g++ ./configure $(cd ..; pwd)
make clean
make -j $(ncpus)
popd
# Create a listing of likely snippets for the fuzzer to use.
# Not essential, but makes things likely to be found faster.
./generate_dictionary
# Set up input directory
mkdir in1
echo "module m; initial \$display(\"Hello world!\n\"); endmodule" > in1/1.v
# Compile wrapper program
AFL_HARDEN=1 CXX=afl-g++ make wrapper