Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit abc4b27

Browse files
Bug 1475573 - Create --enable-fuzzing debug build job for Android x86 firefox. r=nalexander,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D2428 --HG-- extra : moz-landing-system : lando
1 parent 2ee5623 commit abc4b27

7 files changed

Lines changed: 89 additions & 1 deletion

File tree

build/gecko_templates.mozbuild

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ def GeckoBinary(linkage='dependent', mozglue=None):
3636
elif linkage != None:
3737
error('`linkage` must be "dependent", "standalone" or None')
3838

39+
if CONFIG['LIBFUZZER']:
40+
assert mozglue is not None, 'libfuzzer depends on "mozglue"'
41+
USE_LIBS += [
42+
'fuzzer'
43+
]
44+
LOCAL_INCLUDES += [
45+
'/tools/fuzzing/libfuzzer'
46+
]
47+
3948
if mozglue:
4049
LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
4150
if mozglue == 'program':

ipc/app/moz.build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ LOCAL_INCLUDES += [
2323
'/xpcom/base',
2424
]
2525

26+
if CONFIG['LIBFUZZER']:
27+
USE_LIBS += [
28+
'fuzzer',
29+
'mozglue'
30+
]
31+
LOCAL_INCLUDES += [
32+
'/tools/fuzzing/libfuzzer',
33+
]
34+
2635
# DELAYLOAD_DLLS in this block ensures that the DLL blocklist is functional
2736
if CONFIG['OS_ARCH'] == 'WINNT':
2837
DELAYLOAD_DLLS += [
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
. "$topsrcdir/mobile/android/config/mozconfigs/android-x86/debug"
2+
3+
# Remove unwanted environment variables from the 'debug' mozconfig.
4+
unset MOZILLA_OFFICIAL
5+
unset MOZ_TELEMETRY_REPORTING
6+
unset MOZ_ANDROID_POCKET
7+
8+
ac_add_options --enable-fuzzing
9+
10+
# This adds '-fuzzing' to the APK filename for local builds.
11+
export MOZ_PKG_SPECIAL=fuzzing
12+
13+
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"

taskcluster/ci/build/android.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,56 @@ android-x86/opt:
155155
- linux64-sccache
156156
- linux64-node
157157

158+
android-x86-fuzzing/debug:
159+
description: "Android x86 Fuzzing Debug"
160+
index:
161+
product: mobile
162+
job-name: android-x86-fuzzing-debug
163+
treeherder:
164+
platform: android-4-2-x86/debug
165+
symbol: Bf
166+
worker-type: aws-provisioner-v1/gecko-{level}-b-android
167+
worker:
168+
docker-image: {in-tree: android-build}
169+
max-run-time: 7200
170+
env:
171+
GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
172+
TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android-x86/releng.manifest"
173+
artifacts:
174+
- name: public/android/R
175+
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/R
176+
type: directory
177+
- name: public/android/maven
178+
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
179+
type: directory
180+
- name: public/build/geckoview-androidTest.apk
181+
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/outputs/apk/androidTest/officialWithGeckoBinariesNoMinApi/debug/geckoview-official-withGeckoBinaries-noMinApi-debug-androidTest.apk
182+
type: file
183+
- name: public/build/geckoview_example.apk
184+
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/officialWithGeckoBinariesNoMinApi/debug/geckoview_example-official-withGeckoBinaries-noMinApi-debug.apk
185+
type: file
186+
- name: public/build
187+
path: /builds/worker/artifacts/
188+
type: directory
189+
run:
190+
using: mozharness
191+
actions: [get-secrets build multi-l10n update]
192+
config:
193+
- builds/releng_base_android_64_builds.py
194+
script: "mozharness/scripts/fx_desktop_build.py"
195+
secrets: true
196+
custom-build-variant-cfg: x86-fuzzing-debug
197+
tooltool-downloads: internal
198+
toolchains:
199+
- android-gradle-dependencies
200+
- android-ndk-linux
201+
- android-sdk-linux
202+
- linux64-clang
203+
- linux64-rust-android
204+
- linux64-rust-size
205+
- linux64-sccache
206+
- linux64-node
207+
158208
android-x86-nightly/opt:
159209
description: "Android 4.2 x86 Nightly"
160210
attributes:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
config = {
2+
'base_name': 'Android 4.2 x86 %(branch)s debug fuzzing build',
3+
'stage_platform': 'android-x86-fuzzing-debug',
4+
'src_mozconfig': 'mobile/android/config/mozconfigs/android-x86/debug-fuzzing',
5+
'debug_build': True,
6+
}

testing/mozharness/mozharness/mozilla/building/buildbase.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ class BuildOptionParser(object):
437437
'rusttests-debug': 'builds/releng_sub_%s_configs/%s_rusttests_debug.py',
438438
'x86': 'builds/releng_sub_%s_configs/%s_x86.py',
439439
'x86-artifact': 'builds/releng_sub_%s_configs/%s_x86_artifact.py',
440+
'x86-fuzzing-debug': 'builds/releng_sub_%s_configs/%s_x86_fuzzing_debug.py',
440441
'api-16-partner-sample1': 'builds/releng_sub_%s_configs/%s_api_16_partner_sample1.py',
441442
'aarch64': 'builds/releng_sub_%s_configs/%s_aarch64.py',
442443
'android-test': 'builds/releng_sub_%s_configs/%s_test.py',

tools/fuzzing/faulty/Faulty.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ Faulty::MaybeCollectAndClosePipe(int aPipe, unsigned int aProbability)
362362
}
363363

364364
if (aPipe > -1) {
365-
FAULTY_LOG("Collecting pipe %d to bucket of pipes (count: %ld)",
365+
FAULTY_LOG("Collecting pipe %d to bucket of pipes (count: %zu)",
366366
aPipe, mFds.size());
367367
mFds.insert(aPipe);
368368
}

0 commit comments

Comments
 (0)