From c1dd0aa944437c21e9746cd1c7754cfc894f3c95 Mon Sep 17 00:00:00 2001 From: dev-dharan24 <139329488+dev-dharan24@users.noreply.github.com> Date: Sun, 26 Jul 2026 19:48:25 +0530 Subject: [PATCH 1/4] Trigger temporary Firefox ASan artifact workflow --- tmp-firefox-asan-trigger.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 tmp-firefox-asan-trigger.txt diff --git a/tmp-firefox-asan-trigger.txt b/tmp-firefox-asan-trigger.txt new file mode 100644 index 0000000..149020c --- /dev/null +++ b/tmp-firefox-asan-trigger.txt @@ -0,0 +1 @@ +Trigger the temporary pull-request workflow that fetches the official Mozilla linux64 ASan optimized browser artifact. From ab541218d3ed3c4e028d96648192ec9b1b9912d0 Mon Sep 17 00:00:00 2001 From: dev-dharan24 <139329488+dev-dharan24@users.noreply.github.com> Date: Sun, 26 Jul 2026 20:09:37 +0530 Subject: [PATCH 2/4] Temporarily fetch public WeakMap test attachments --- .github/workflows/fetch-firefox-asan.yml | 47 +++++++++++++++++------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/.github/workflows/fetch-firefox-asan.yml b/.github/workflows/fetch-firefox-asan.yml index 285457c..27b3ad9 100644 --- a/.github/workflows/fetch-firefox-asan.yml +++ b/.github/workflows/fetch-firefox-asan.yml @@ -1,4 +1,4 @@ -name: Fetch Firefox ASan artifact +name: Fetch Bugzilla WeakMap cases on: push: @@ -13,22 +13,43 @@ permissions: jobs: fetch: runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 10 steps: - - name: Download official Mozilla linux64 ASan optimized build + - name: Download public Bugzilla attachment metadata and JavaScript cases shell: bash run: | set -euxo pipefail - URL='https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.mozilla-central.latest.firefox.linux64-asan-opt/artifacts/public/build/target.tar.xz' - curl --fail --location --retry 5 --retry-all-errors --output firefox-asan-target.tar.xz "$URL" - sha256sum firefox-asan-target.tar.xz | tee SHA256SUMS - ls -lh firefox-asan-target.tar.xz SHA256SUMS - - name: Upload browser archive + mkdir -p bug-1991980 + curl --fail --location --retry 5 --retry-all-errors \ + 'https://bugzilla.mozilla.org/rest/bug/1991980/attachment' \ + -o bug-1991980/attachments.json + python3 - <<'PY' + import base64, json, pathlib, re, urllib.request + root = pathlib.Path('bug-1991980') + data = json.loads((root / 'attachments.json').read_text()) + attachments = data.get('bugs', {}).get('1991980', []) + manifest = [] + for item in attachments: + aid = int(item['id']) + name = item.get('file_name') or f'attachment-{aid}' + ctype = item.get('content_type', '') + manifest.append({'id': aid, 'name': name, 'summary': item.get('summary'), 'content_type': ctype}) + if ctype not in {'application/x-javascript', 'text/javascript', 'application/javascript'}: + continue + url = f'https://bugzilla.mozilla.org/attachment.cgi?id={aid}' + with urllib.request.urlopen(url, timeout=30) as response: + raw = response.read() + safe = re.sub(r'[^A-Za-z0-9._-]+', '_', name).strip('_') or f'attachment-{aid}.js' + if not safe.endswith('.js'): + safe += '.js' + (root / f'{aid}-{safe}').write_bytes(raw) + (root / 'manifest.json').write_text(json.dumps(manifest, indent=2)) + print(json.dumps(manifest, indent=2)) + PY + find bug-1991980 -maxdepth 1 -type f -printf '%f %s bytes\n' | sort + - name: Upload public WeakMap cases uses: actions/upload-artifact@v4 with: - name: firefox-linux64-asan-opt - path: | - firefox-asan-target.tar.xz - SHA256SUMS - compression-level: 0 + name: bug-1991980-weakmap-cases + path: bug-1991980/ retention-days: 1 From 416f93049c31ebbf66a5e0b1f46bba8d454b5dbd Mon Sep 17 00:00:00 2001 From: dev-dharan24 <139329488+dev-dharan24@users.noreply.github.com> Date: Sun, 26 Jul 2026 21:49:42 +0530 Subject: [PATCH 3/4] Fetch sparse Firefox GC source for local CTF analysis --- .github/workflows/fetch-firefox-asan.yml | 72 ++++++++++++------------ 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/.github/workflows/fetch-firefox-asan.yml b/.github/workflows/fetch-firefox-asan.yml index 27b3ad9..d395f55 100644 --- a/.github/workflows/fetch-firefox-asan.yml +++ b/.github/workflows/fetch-firefox-asan.yml @@ -1,10 +1,9 @@ -name: Fetch Bugzilla WeakMap cases +name: Fetch sparse Firefox GC source on: push: paths: - '.github/workflows/fetch-firefox-asan.yml' - pull_request: workflow_dispatch: permissions: @@ -13,43 +12,46 @@ permissions: jobs: fetch: runs-on: ubuntu-latest - timeout-minutes: 10 + timeout-minutes: 20 steps: - - name: Download public Bugzilla attachment metadata and JavaScript cases + - name: Checkout the exact affected Firefox revision sparsely + uses: actions/checkout@v4 + with: + repository: dev-dharan24/firefox + ref: 2c934dbbd7bdb99f4e4edd7fb22aa06c29192ec6 + path: firefox + filter: blob:none + sparse-checkout-cone-mode: false + sparse-checkout: | + js/src/gc/** + js/src/jit-test/tests/gc/** + js/src/jit-test/tests/weakmap/** + js/src/tests/non262/WeakMap/** + js/src/tests/non262/gc/** + js/public/** + mfbt/** + modules/libpref/** + dom/base/** + xpcom/base/** + + - name: Package the checked-out source shell: bash run: | set -euxo pipefail - mkdir -p bug-1991980 - curl --fail --location --retry 5 --retry-all-errors \ - 'https://bugzilla.mozilla.org/rest/bug/1991980/attachment' \ - -o bug-1991980/attachments.json - python3 - <<'PY' - import base64, json, pathlib, re, urllib.request - root = pathlib.Path('bug-1991980') - data = json.loads((root / 'attachments.json').read_text()) - attachments = data.get('bugs', {}).get('1991980', []) - manifest = [] - for item in attachments: - aid = int(item['id']) - name = item.get('file_name') or f'attachment-{aid}' - ctype = item.get('content_type', '') - manifest.append({'id': aid, 'name': name, 'summary': item.get('summary'), 'content_type': ctype}) - if ctype not in {'application/x-javascript', 'text/javascript', 'application/javascript'}: - continue - url = f'https://bugzilla.mozilla.org/attachment.cgi?id={aid}' - with urllib.request.urlopen(url, timeout=30) as response: - raw = response.read() - safe = re.sub(r'[^A-Za-z0-9._-]+', '_', name).strip('_') or f'attachment-{aid}.js' - if not safe.endswith('.js'): - safe += '.js' - (root / f'{aid}-{safe}').write_bytes(raw) - (root / 'manifest.json').write_text(json.dumps(manifest, indent=2)) - print(json.dumps(manifest, indent=2)) - PY - find bug-1991980 -maxdepth 1 -type f -printf '%f %s bytes\n' | sort - - name: Upload public WeakMap cases + git -C firefox rev-parse HEAD | tee SOURCE_REVISION + git -C firefox show -s --format=fuller HEAD | tee SOURCE_COMMIT.txt + tar --exclude='firefox/.git' -cJf firefox-gc-source-2c934db.tar.xz firefox SOURCE_REVISION SOURCE_COMMIT.txt + sha256sum firefox-gc-source-2c934db.tar.xz | tee SHA256SUMS + ls -lh firefox-gc-source-2c934db.tar.xz SOURCE_REVISION SOURCE_COMMIT.txt SHA256SUMS + + - name: Upload sparse source archive uses: actions/upload-artifact@v4 with: - name: bug-1991980-weakmap-cases - path: bug-1991980/ + name: firefox-gc-source-2c934db + path: | + firefox-gc-source-2c934db.tar.xz + SOURCE_REVISION + SOURCE_COMMIT.txt + SHA256SUMS + compression-level: 0 retention-days: 1 From 188e7242dc36f19aff6ad79915d0bfaebe144e77 Mon Sep 17 00:00:00 2001 From: dev-dharan24 <139329488+dev-dharan24@users.noreply.github.com> Date: Sun, 26 Jul 2026 21:55:59 +0530 Subject: [PATCH 4/4] Trigger sparse Firefox source workflow --- .github/fetch-source-trigger-2.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/fetch-source-trigger-2.txt diff --git a/.github/fetch-source-trigger-2.txt b/.github/fetch-source-trigger-2.txt new file mode 100644 index 0000000..dd7d980 --- /dev/null +++ b/.github/fetch-source-trigger-2.txt @@ -0,0 +1 @@ +Temporary source-fetch trigger for the private CTF analysis.