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
23 changes: 15 additions & 8 deletions infra/base-images/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,26 @@
# The first argument is the version tag, e.g., 'latest', 'ubuntu-20-04'.
VERSION_TAG=${1:-latest}

# Get the directory where this script is located to find the helper script.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

# Fetch the official list of images from the Python source of truth.
# This avoids duplicating the image list and ensures this script is always
# up-to-date.
IMAGE_LIST=$(python3 "${SCRIPT_DIR}/list_images.py")
IMAGE_LIST=(
"base-clang"
"base-builder"
"base-builder-go"
"base-builder-javascript"
"base-builder-jvm"
"base-builder-python"
"base-builder-ruby"
"base-builder-rust"
"base-builder-swift"
"base-runner"
"base-runner-debug"
"indexer"
)

echo "Building version: ${VERSION_TAG}"
echo "Images to build: ${IMAGE_LIST}"

# Loop through the official list of images and build each one.
for image_name in ${IMAGE_LIST}; do
for image_name in ${IMAGE_LIST[@]}; do
image_dir="infra/base-images/${image_name}"

if [ "${VERSION_TAG}" == "latest" ]; then
Expand Down
17 changes: 13 additions & 4 deletions infra/base-images/base-runner/bad_build_check
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,19 @@ function check_mixed_sanitizers {
echo "UNSUPPORTED ARCHITECTURE"
exit 1
fi
local ASAN_CALLS=$(objdump -dC $FUZZER | egrep "${CALL_INSN}__asan" -c)
local DFSAN_CALLS=$(objdump -dC $FUZZER | egrep "${CALL_INSN}__dfsan" -c)
local MSAN_CALLS=$(objdump -dC $FUZZER | egrep "${CALL_INSN}__msan" -c)
local UBSAN_CALLS=$(objdump -dC $FUZZER | egrep "${CALL_INSN}__ubsan" -c)
# Disassemble once and count all four sanitizers in the same pass. Running
# `objdump -dC` four times over the same binary is wasteful: fuzz targets are
# frequently hundreds of MB, and the disassembly dominates the cost of this
# check.
local ASAN_CALLS DFSAN_CALLS MSAN_CALLS UBSAN_CALLS
read ASAN_CALLS DFSAN_CALLS MSAN_CALLS UBSAN_CALLS < <(
objdump -dC $FUZZER | \
grep -Eo "${CALL_INSN}__(asan|dfsan|msan|ubsan)" | \
awk '/__asan$/ { a++ }
/__dfsan$/ { d++ }
/__msan$/ { m++ }
/__ubsan$/ { u++ }
END { print a+0, d+0, m+0, u+0 }')


if [[ "$SANITIZER" = address ]]; then
Expand Down
10 changes: 10 additions & 0 deletions infra/indexer/frontend/ast_visitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/Type.h"
// Upstream renamed clang/Basic/TypeTraits.h to clang/Basic/BuiltinTraits.h
// during LLVM 24 development. The indexer is integrated against a newer LLVM
// than the revision base-clang pins (see OUR_LLVM_REVISION in
// infra/base-images/base-clang/checkout_build_install_llvm.sh), so accept
// either spelling instead of requiring the two to move in lockstep.
// Ref: https://github.com/google/oss-fuzz/commit/0f4d4d3004beb4946db46905163b1638777395a9#commitcomment-198554014
#if __has_include("clang/Basic/BuiltinTraits.h")
#include "clang/Basic/BuiltinTraits.h"
#else
#include "clang/Basic/TypeTraits.h"
#endif
#include "clang/Basic/FileEntry.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/SourceLocation.h"
Expand Down
2 changes: 1 addition & 1 deletion projects/fwupd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
################################################################################

FROM gcr.io/oss-fuzz-base/base-builder
FROM gcr.io/oss-fuzz-base/base-builder-rust
RUN apt-get update && apt-get install -y pkg-config zlib1g-dev libffi-dev liblzma-dev libcbor-dev
RUN python3 -m pip install -U jinja2 packaging meson ninja
RUN git clone --depth 1 https://github.com/fwupd/fwupd.git fwupd
Expand Down
Loading