Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Перейти к файлу
Julian Seward 114a9dd6fc Bug 1810090 - Disallow uses of MWasmDerived{,Index}Pointer with reftyped-bases. r=rhunt.
MWasmDerivedPointer denotes a base-plus-constant-offset value.  In the
presence of wasm-gc types, this is dangerous when the base value is reftyped.
This is because MWasmDerivedPointer makes it possible to construct values that
we have an obligation to modify at GC time, yet it does not give us any
mechanism to do so, since they are not valid object pointers from the GC's
point of view.  MWasmDerivedIndexPointer is similarly dangerous.

Hence if these values are live across a GC, they will be invalid after the GC,
and hence cause a crash if used after the GC.  This has been observed to
happen.

A reasonable fix seems to be to restrict their base types to be non-ref.  For
cases where the base type is ref, instead pass around a pair of the base and
the (constant) offset, to the place where the access actually happens.  In
effect what this does is to make it impossible to create these "sort-of but
not really a ref" values.

The idea is simple in theory but gives rise to quite a large patch.  Main
changes are:

* MWasmDerivedPointer::New, MWasmDerivedIndexPointer::New: assert the base
  type to exclude reftypes, and add comments.

* change from a single `address` to a `base + constant offset` formulation, in:
  - wasm::EmitWasmPreBarrierGuard
  - wasm::EmitWasmPreBarrierCall
  In places where we have a single `address` but know it is "safe", because
  either it's non-reftyped, or isn't live across any potential GC event, but
  we need to use a `base + constant offset` formulation, zero is passed for
  the offset.

* add a `base + constant offset` formulation for the following, but leave the
  existing `address`-only formulation in place:
  - Instance::postBarrierPreciseWithOffset

* remove FunctionCompiler::writeGcValueAtAddress and route all such traffic
  through FunctionCompiler::writeGcValueAtBasePlusOffset

* For constructors of MWasmStoreRef, MWasmLoadField, MWasmLoadFieldKA,
  MWasmStoreFieldKA, MWasmStoreFieldRefKA, accept an offset of type size_t,
  but restrict it to 0 .. 2^31-1 (a pre-existing limitation from
  MWasmDerivedPointer) so as to ensure that it is a valid offset to give to a
  macroassembler `Address` constructor.  However, actually store such values
  in the MIR as a uint32_t so as not to waste space.

* [ridealong] add some missing `getExtras` (debug-printing) methods for
  MWasmStoreRef MWasmLoadField MWasmLoadFieldKA MWasmStoreFieldKA
  MWasmStoreFieldRefKA.

* [ridealong] some minor rearranging of access method orderings for
  MWasmLoadField et al to make them more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D166899
2023-01-18 10:56:09 +00:00
.cargo Bug 1801049 - Update AudioIPC macOS branch to 73c8a02d. r=cubeb-reviewers,padenot 2023-01-17 00:35:51 +00:00
.vscode
accessible Bug 1757127 part 2: Use the unified Language method for ATK, IA2 and XPCOM. r=nlapre 2023-01-17 20:35:22 +00:00
browser Bug 1750317 - Address bar may cut the search string in rare circumstances. r=adw 2023-01-18 10:18:18 +00:00
build Backed out 3 changesets (bug 1747145, bug 1810627) for causing mochitest failures in /test_webassembly_compile.html 2023-01-18 13:04:08 +02:00
caps Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod 2023-01-07 17:53:19 +00:00
chrome Bug 1805100 - Remove "else if" after interruptions of control flow. r=sylvestre 2022-12-13 09:12:55 +00:00
config Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2023-01-16 14:09:46 +00:00
devtools Bug 1651255 - Support Unicode paths when importing devtools memory snapshots r=jimb 2023-01-18 09:41:15 +00:00
docs Bug 1810715 - update gc / cc leak finding documents a tiny bit for clarity, r=mccr8 DONTBUILD 2023-01-17 20:25:47 +00:00
docshell Bug 1794622; r=smaug 2023-01-17 20:22:16 +00:00
dom Bug 1810221 - Add missing libFuzzer instrumenation to dom/fs/api/. r=janv 2023-01-18 08:50:50 +00:00
editor Bug 1808906 - Make the style editor handle `<font>` at last when there are multiple preserved styles r=m_kato 2023-01-17 23:46:58 +00:00
extensions Bug 1807926: disable autoconfig tests for tests against MSIX builds r=mkaply 2023-01-09 18:01:10 +00:00
gfx Bug 1470075 - Use the proper vertical-advance of the <zero> glyph when setting up vertical-mode font metrics. r=emilio 2023-01-18 10:00:11 +00:00
gradle/wrapper Bug 1786164 - Update gradle and plugin to the latest versions. r=geckoview-reviewers,jonalmeida 2022-08-31 22:10:38 +00:00
hal Bug 1750670 - Better support orientation.lock('natural'). r=geckoview-reviewers,calu 2022-12-14 03:42:45 +00:00
image Bug 1808102 - Move contextPaint to Document class r=emilio 2023-01-17 19:13:41 +00:00
intl Bug 1789556 - Tests for bug 1787633. r=m_kato 2023-01-17 16:16:02 +00:00
ipc Bug 1351231 - PFetch protocol declaration and implementation. r=dom-worker-reviewers,jesup 2023-01-18 00:50:19 +00:00
js Bug 1810090 - Disallow uses of MWasmDerived{,Index}Pointer with reftyped-bases. r=rhunt. 2023-01-18 10:56:09 +00:00
layout Bug 1808102 - Move contextPaint to Document class r=emilio 2023-01-17 19:13:41 +00:00
media Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8 2023-01-16 23:14:12 +00:00
memory Bug 1806049 - Explicitly use uint32_t r=glandium 2023-01-10 22:30:05 +00:00
mfbt Bug 1806779 - Fix C++20 -Wdeprecated-volatile warnings in mfbt/SHA1.cpp. r=glandium 2022-12-22 02:58:24 +00:00
mobile Bug 1706656 - Avoid creating SurfaceTextures in isolated content processes on old android versions. r=geckoview-reviewers,ohall 2023-01-17 18:54:25 +00:00
modules Bug 1810623 - Pref on webgl.out-of-process and webgl.out-of-process.worker on Android until release r=gfx-reviewers,jnicol 2023-01-18 05:08:36 +00:00
mozglue Bug 1804226 - fma3 support for AudioNodeEngine r=padenot 2023-01-16 11:05:20 +00:00
netwerk Bug 1802086 - remove auth header from redirected cross-origin requests. r=necko-reviewers,smaug,valentin 2023-01-17 16:13:51 +00:00
nsprpub Bug 1788009 - NSPR_4_35_RTM, version number only, no code change. r=glandium UPGRADE_NSPR_RELEASE 2022-09-13 06:26:48 +00:00
other-licenses Bug 1802290 - Remove +x permissions on more files r=linter-reviewers,andi 2023-01-03 08:17:50 +00:00
parser Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8 2023-01-16 23:14:10 +00:00
python Bug 1810274 - correct typo in update action move-dir;r=tjr 2023-01-17 23:27:33 +00:00
remote Bug 1797723 - [puppeteer] Update vendor documentation. r=webdriver-reviewers,whimboo 2023-01-17 10:42:50 +00:00
security Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8 2023-01-16 23:14:12 +00:00
services Merge mozilla-central to autoland. CLOSED TREE 2023-01-16 23:23:45 +02:00
servo Bug 1810657 - Apply slow selector flags before matching r=emilio 2023-01-18 00:36:42 +00:00
startupcache Bug 1800050 - Use UniqueFreePtr in StartupCache::PutBuffer. r=nbp 2022-12-01 10:46:34 +00:00
storage Bug 1730547 - Return exact error instead of generic one. r=dom-storage-reviewers,jstutte 2023-01-10 17:16:17 +00:00
supply-chain Bug 1810616 — Update cargo-vet to f1e141f2f59d50f02d359f533ef718d16d1b6941. r=nika,supply-chain-reviewers 2023-01-17 16:24:01 +00:00
taskcluster Bug 1795884 - migrate release-flatpak-repackage task to gcp. r=ahal DONTBUILD 2023-01-18 08:40:47 +00:00
testing Backed out 2 changesets (bug 1735923) for causing failures in fetch-canvas-tainting-video-with-range-request.https.html CLOSED TREE 2023-01-18 13:10:45 +02:00
third_party Bug 1800942 - Temporarily log inputs to ExtrapolateLocalTime. r=mjf 2023-01-17 07:28:12 +00:00
toolkit Backed out 3 changesets (bug 1747145, bug 1810627) for causing mochitest failures in /test_webassembly_compile.html 2023-01-18 13:04:08 +02:00
tools Bug 1351231 - Integrate FetchChild into Fetch.cpp r=dom-worker-reviewers,jesup 2023-01-18 00:50:20 +00:00
uriloader Bug 1777204 - Removed unused PreloaderBase::NotifyValidating() & PreloaderBase::NotifyValidated() methods. r=manuel 2023-01-17 16:13:18 +00:00
view Bug 1802225 - Remove Layers.{h,cpp}. r=tnikkel,geckoview-reviewers,jgilbert,media-playback-reviewers,padenot,m_kato 2022-11-29 01:52:03 +00:00
widget Bug 1810620 - Make `ContentCacheInChild::CacheTextRects` check `mSelection.isSome()` at logging it r=m_kato 2023-01-18 01:32:55 +00:00
xpcom Bug 1808804 - part1 : return a new error when the MF CDM process crashes. r=jolin 2023-01-17 20:00:46 +00:00
xpfe/appshell Backed out changeset 27045cd56940 (bug 1810614) for causing bc failures in browser/base/content/test/popups/browser_popup_resize.js CLOSED TREE 2023-01-17 03:22:58 +02:00
.arcconfig
.babel-eslint.rc.js
.clang-format
.clang-format-ignore Bug 1764698 - Move LanguageDetector.jsm and related files to toolkit. r=robwu 2022-08-23 05:59:55 +00:00
.cron.yml Bug 1666491 - Add a eslint-build tester (tier 3) that depends on xpt artifacts. r=nalexander,releng-reviewers,gbrown 2022-11-17 10:57:41 +00:00
.eslintignore Bug 1803360 - [devtools] Put pretty-fast library in tree. r=ochameau. 2022-12-08 15:54:07 +00:00
.eslintrc-test-paths.js Bug 1693495 - [devtools] Implement a beginning of "Network" commands, starting with sendHTTPRequest. r=devtools-reviewers,nchevobbe 2023-01-09 13:09:43 +00:00
.eslintrc.js Bug 1810877 - Automatically replace Cu.reportError with console.error (browser/extensions/report-site-issue/). r=webcompat-reviewers,twisniewski 2023-01-18 08:24:40 +00:00
.flake8 Bug 1805839 - Do not auto-format mako.XY template files r=sheehan,linter-reviewers,sylvestre 2023-01-02 11:46:53 +00:00
.git-blame-ignore-revs
.gitattributes
.gitignore Bug 1784022 - [refactor] Convert text-emphasis-position #defines to enum classes r=emilio 2022-09-27 07:38:08 +00:00
.hg-annotate-ignore-revs
.hg-format-source
.hgignore Bug 1797723 - [puppeteer] Sync vendored puppeteer to v18.0.0. r=webdriver-reviewers,whimboo,jdescottes 2023-01-17 10:42:50 +00:00
.hgtags No bug - tagging 5bf22e58549c4b36d2087500236a764d1aa6f368 with FIREFOX_NIGHTLY_110_END a=release DONTBUILD CLOSED TREE 2023-01-16 14:09:38 +00:00
.isort.cfg Bug 1492495 - Add flake8-isort plugin to sort Python includes, with support for autofixing through isort. r=linter-reviewers,ahal 2022-11-03 13:50:46 +00:00
.lando.ini Bug 1801965: update `.lando.ini` file for new autoformatting implementation r=zeid DONTBUILD 2022-11-22 20:19:59 +00:00
.lldbinit
.mailmap
.prettierignore Bug 1782273 - Part 30: Enable prettier for selfhosted code. r=tcampbell,Standard8 2022-08-04 17:13:03 +00:00
.prettierrc
.taskcluster.yml Bug 1795994 - Migrate decision task over to GCP r=ahal,releng-reviewers,jcristau 2022-10-26 15:55:18 +00:00
.trackerignore
.yamllint
.ycm_extra_conf.py Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD 2022-12-23 22:45:46 +00:00
AUTHORS
CLOBBER Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2023-01-16 14:09:46 +00:00
Cargo.lock Bug 1801049 - Update AudioIPC macOS branch to 73c8a02d. r=cubeb-reviewers,padenot 2023-01-17 00:35:51 +00:00
Cargo.toml Bug 1793784 - Replace the minidump_writer_linux crate with the minidump-writer crate r=glandium,supply-chain-reviewers 2023-01-10 22:14:30 +00:00
GNUmakefile
LICENSE
Makefile.in
README.txt
aclocal.m4
build.gradle Bug 1805427 - Update Glean to 52.0.0 r=glandium,janerik,webdriver-reviewers,supply-chain-reviewers 2023-01-16 18:51:18 +00:00
client.mk Bug 1802075 - Avoid calling "--stop-server" as a command on local build failure. r=firefox-build-system-reviewers,andi 2022-11-23 20:38:52 +00:00
client.py Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD 2022-12-23 22:45:46 +00:00
configure Bug 1787977 - Include configure in the tree. r=firefox-build-system-reviewers,nalexander 2022-08-30 04:02:12 +00:00
configure.py Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD 2022-12-23 22:45:46 +00:00
gradle.properties Bug 1786164 - Add more Gradle JVM memory flags. r=geckoview-reviewers,jonalmeida 2022-08-31 22:10:39 +00:00
gradlew
gradlew.bat
mach Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD 2022-12-23 22:45:46 +00:00
mach.cmd
mach.ps1
mots.yaml Bug 1810755 - add Mike as a peer for profile import/migration, r=mconley,zeid DONTBUILD 2023-01-17 16:28:40 +00:00
moz.build Bug 1804449: document basic information about update infrastructure and watershed updates in the source docs. r=jcristau 2022-12-13 16:57:52 +00:00
moz.configure Bug 1802405 - Prepend mozillabuild msys2 to path only for the build. r=glandium 2022-11-26 23:23:34 +00:00
mozilla-config.h.in Bug 1802290 - Remove +x permissions on more files r=linter-reviewers,andi 2023-01-03 08:17:50 +00:00
old-configure.in Bug 1806470 - Still set some build-id on local builds. r=firefox-build-system-reviewers,andi 2023-01-12 20:54:52 +00:00
package-lock.json Bug 1802860 - Update top-level and eslint-plugin-mozilla node_modules packages. r=mossop 2022-12-06 14:35:07 +00:00
package.json Bug 1802860 - Update top-level and eslint-plugin-mozilla node_modules packages. r=mossop 2022-12-06 14:35:07 +00:00
settings.gradle Bug 1740799 - Add android-format lint test. r=nalexander,linter-reviewers,sylvestre 2022-11-18 00:55:03 +00:00
substitute-local-geckoview.gradle
test.mozbuild

README.txt

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.