Skip to content

Commit 821d534

Browse files
Merge branch 'master' into fb-swift-versions
2 parents ee5b536 + 5dcc271 commit 821d534

File tree

251 files changed

+2849
-2028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+2849
-2028
lines changed

.github/workflows/check_base_os.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
# Get the list of changed files compared to the target branch
3737
# and filter for unique directories under 'projects/'.
38-
CHANGED_DIRS=$(git diff --name-only ${{ github.base_ref }} ${{ github.head_ref }} | \
38+
CHANGED_DIRS=$(git diff --name-only ${GITHUB_BASE_REF} ${GITHUB_HEAD_REF} | \
3939
grep '^projects/' | \
4040
xargs -n 1 dirname | \
4141
sort -u)
@@ -53,9 +53,11 @@ jobs:
5353
if: steps.changed-projects.outputs.changed_dirs != ''
5454
run: |
5555
EXIT_CODE=0
56-
for project_dir in ${{ steps.changed-projects.outputs.changed_dirs }};
56+
for project_dir in ${STEPS_CHANGED_PROJECTS_OUTPUTS_CHANGED_DIRS};
5757
do
5858
echo "--- Checking ${project_dir} ---"
5959
python3 infra/ci/check_base_os.py "${project_dir}" || EXIT_CODE=$?
6060
done
6161
exit $EXIT_CODE
62+
env:
63+
STEPS_CHANGED_PROJECTS_OUTPUTS_CHANGED_DIRS: ${{ steps.changed-projects.outputs.changed_dirs }}

infra/base-images/base-builder/compile_native_go_fuzzer_v2

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,25 @@ tags="-tags gofuzz"
2323
# Get absolute path.
2424
abs_file_dir=$(go list $tags -f {{.Dir}} $path)
2525

26-
# TODO(adamkorcz): Get rid of "-r" flag here.
27-
export fuzzer_filename=$(grep -r -l --include='*.go' -s "$function" "${abs_file_dir}")
26+
# Find the file containing the fuzzer function definition.
27+
# Search for the actual function signature with testing.F to avoid false matches
28+
# in files that only reference the function name (e.g., in comments or helper functions).
29+
export fuzzer_filename=$(grep -r -l --include='*.go' "func ${function}(.*testing\.F" "${abs_file_dir}")
2830

2931
# Import build_native_go_fuzzer
3032
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3133
source "$SCRIPT_DIR/go_utils.sh"
3234

33-
# Test if file contains a line with "func $function" and "testing.F".
34-
if [ $(grep -r "func $function" $fuzzer_filename | grep "testing.F" | wc -l) -eq 1 ]
35+
# Verify we found exactly one file with the fuzzer function.
36+
file_count=$(echo "$fuzzer_filename" | wc -w)
37+
if [ "$file_count" -eq 1 ] && [ -n "$fuzzer_filename" ] && [ -f "$fuzzer_filename" ]
3538
then
3639
build_native_go_fuzzer $fuzzer $function $abs_file_dir $path
40+
elif [ "$file_count" -gt 1 ]
41+
then
42+
echo "Error: Found multiple files with func ${function}(f *testing.F):"
43+
echo "$fuzzer_filename"
44+
exit 1
3745
else
3846
echo "Could not find the function: func ${function}(f *testing.F)"
3947
fi

infra/base-images/base-builder/indexer/clang_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright 2025 Google LLC.
2+
# Copyright 2026 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

infra/base-images/base-builder/indexer/clang_wrapper_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright 2025 Google LLC.
2+
# Copyright 2026 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

infra/base-images/base-builder/indexer/coverage.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC.
1+
// Copyright 2026 Google LLC.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

infra/base-images/base-builder/indexer/dwarf_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright 2025 Google LLC.
2+
# Copyright 2026 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

infra/base-images/base-builder/indexer/dwarf_info_diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright 2025 Google LLC.
2+
# Copyright 2026 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

infra/base-images/base-builder/indexer/fuzzing_engine.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC.
1+
// Copyright 2026 Google LLC.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

infra/base-images/base-builder/indexer/index_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright 2025 Google LLC.
2+
# Copyright 2026 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

infra/base-images/base-builder/indexer/index_build_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright 2025 Google LLC.
2+
# Copyright 2026 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)