Commit Graph

1653 Commits

Author SHA1 Message Date
Sylvestre Ledru
cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Paul Bone
67b20ca657 Bug 1858137 - Update test to match new poisoning behaviour r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D190775
2023-10-13 12:43:44 +00:00
Emilio Cobos Álvarez
a3e8abd326 Bug 1858250 - malloc_initialized should not be SequentiallyConsistent. r=glandium
I think ReleaseAcquire semantics are sound here.

It might be that relaxed is fine too, but that might be technically
unsound because it could make the writes in malloc_init_hard not visible
to the other threads in time.

Depends on D190623

Differential Revision: https://phabricator.services.mozilla.com/D190624
2023-10-11 08:09:03 +00:00
Emilio Cobos Álvarez
bf0f43df59 Bug 1858250 - mDefaultMaxDirtyPageModifier should use relaxed memory ordering. r=glandium
Spotted while looking at this code. This doesn't guard any memory.

Differential Revision: https://phabricator.services.mozilla.com/D190623
2023-10-10 22:45:54 +00:00
Otto Länd
d749b8caa8 Bug 1850008: apply code formatting via Lando
# ignore-this-changeset
2023-10-09 00:04:20 +00:00
Paul Bone
e685735f09 Bug 1850008 - pt 3. Add a parameter for how many bytes to poison r=glandium,smaug
Also change the amount of bytes to poison to 256.

Differential Revision: https://phabricator.services.mozilla.com/D187960
2023-10-09 00:01:31 +00:00
Paul Bone
760aa24874 Bug 1850008 - pt 2. Poison at most the first 64 bytes of a memory cell r=jesup,glandium
This patch alters mozjemalloc's poisoning to poison only the first 64 bytes
of (most) memory cells.  It has this behaviour in late beta and release
builds and keeps the original "poison all" behaviour for nightly and early
beta builds.

A later patch will make this a parameter and set it to 256.

Differential Revision: https://phabricator.services.mozilla.com/D187359
2023-10-09 00:01:30 +00:00
Paul Bone
d7455773a2 Bug 1850008 - pt 1. Refactor parsing of MALLOC_OPTIONS r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D187959
2023-10-09 00:01:30 +00:00
Mike Hommey
c4273663fb Bug 1854519 - Work around wasm linking issue before clang 11. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D189320
2023-09-28 20:56:31 +00:00
Paul Bone
cda96811f8 Bug 1814798 - pt 2. Add a PHCManager component to control PHC r=glandium,emilio
This change adds the PHCManager class which observes a pref to control PHC.
The pref can be changed at runtime and will affect the parent and content
processes.

Differential Revision: https://phabricator.services.mozilla.com/D178754
2023-09-18 06:48:06 +00:00
Paul Bone
accac535a0 Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
Add the ability to enable and disable PHC at runtime through the malloc
bridge.

Differential Revision: https://phabricator.services.mozilla.com/D178753
2023-09-18 06:48:06 +00:00
Stanca Serban
6d490604c6 Backed out 2 changesets (bug 1814798) for multiple phc related failures.
Backed out changeset 50b72ab948b2 (bug 1814798)
Backed out changeset bf7d386ad43a (bug 1814798)
2023-09-12 07:54:18 +03:00
Paul Bone
8f391e64c7 Bug 1814798 - pt 2. Add a PHCManager component to control PHC r=glandium,emilio
This change adds the PHCManager class which observes a pref to control PHC.
The pref can be changed at runtime and will affect the parent and content
processes.

Differential Revision: https://phabricator.services.mozilla.com/D178754
2023-09-12 04:03:16 +00:00
Paul Bone
51e69845d9 Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
Add the ability to enable and disable PHC at runtime through the malloc
bridge.

Differential Revision: https://phabricator.services.mozilla.com/D178753
2023-09-12 04:03:16 +00:00
Logan Rosen
f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Paul Bone
c75bf8e729 Bug 1844359 - Lookup main thread only arenas without a lock r=glandium
By adding another tree for arena lookups we can access the new tree without
taking a lock.  This makes main-thread-only arenas completely lock-free.

Differential Revision: https://phabricator.services.mozilla.com/D184548
2023-08-16 05:51:38 +00:00
Paul Bone
418d7539b2 Bug 1845017 - Disable the TestPHCExhaustion test r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D184666
2023-08-10 04:16:55 +00:00
Paul Bone
014b5eca53 Bug 1845355 - Add some asserts to detect causes of a crash r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D185629
2023-08-09 07:38:36 +00:00
Brad Werth
5c1d5c00b9 Bug 1845144 Part 2: Remove macOS available and builtin_available directives for always-supported versions of macOS. r=mac-reviewers,mstange,keeler,padenot
This also does minimal refactoring of cases where the directives were
protecting a simple expression that could be refactored back to the
callers.

Differential Revision: https://phabricator.services.mozilla.com/D184399
2023-08-02 02:26:14 +00:00
Cristian Tuns
11da0568b0 Backed out changeset fcd8eecfa7b1 (bug 1845017) for causing build bustages in TestPHC.cpp CLOSED TREE 2023-08-01 04:03:35 -04:00
Paul Bone
9d10223ae1 Bug 1845017 - Disable the TestPHCExhaustion test r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D184666
2023-08-01 06:10:10 +00:00
Iulian Moraru
f8b5b0e9dc Backed out 3 changesets (bug 1845144) for causing py3 failures on test_toolchain_configure.py. CLOSED TREE
Backed out changeset 5168c7b1cf04 (bug 1845144)
Backed out changeset 6afda17fe413 (bug 1845144)
Backed out changeset d233c63f8121 (bug 1845144)
2023-08-01 06:06:53 +03:00
Brad Werth
4280325241 Bug 1845144 Part 2: Remove macOS available and builtin_available directives for always-supported versions of macOS. r=mac-reviewers,mstange,keeler
This also does minimal refactoring of cases where the directives were
protecting a simple expression that could be refactored back to the
callers.

Differential Revision: https://phabricator.services.mozilla.com/D184399
2023-07-31 22:18:09 +00:00
Masatoshi Kimura
4a82024239 Bug 1844908 - Remove pre-Win10-specific codepath from memory/. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D184296
2023-07-26 08:52:51 +00:00
Natalia Csoregi
72a7b95555 Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Masatoshi Kimura
88a68dca1a Bug 1844908 - Remove pre-Win10-specific codepath from memory/. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D184296
2023-07-25 14:41:02 +00:00
Paul Bone
b2dc052d2a Bug 1841538 - Fix punctuation r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D183243
2023-07-20 06:21:46 +00:00
Paul Bone
ebe1a07335 Bug 1841538 - Use a try lock while retreiving PHC information r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D183242
2023-07-20 06:21:46 +00:00
Paul Bone
655b51ef61 Bug 1841538 - Unlock the PHC mutex before crashing r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D183241
2023-07-20 06:21:45 +00:00
Paul Bone
e0df8952ac Bug 1829125 - Align the PHC area to the jemalloc chunk size r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D179533
2023-07-12 09:29:02 +00:00
Paul Bone
3732a83cd1 Bug 1829125 - Add a PHCExhaustion test r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D181601
2023-07-12 09:28:45 +00:00
Paul Bone
21248857c1 Bug 1839596 - Explicitly tell jemalloc which is the main thread r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D181724
2023-06-30 00:57:20 +00:00
Paul Bone
7bb3277fcb Bug 1839147 - Fix linter warnings after rearranging code r=glandium
Depends on D181831

Differential Revision: https://phabricator.services.mozilla.com/D181950
2023-06-26 23:45:43 +00:00
Paul Bone
de53f7f654 Bug 1839147 - Fix comments about sAllocDelay's type r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D181831
2023-06-26 23:45:43 +00:00
Paul Bone
2695cb5759 Bug 1839147 - Fix PHC getting stuck in disabled state r=glandium
PHC can get stuck if sAllocDelay passes 0 while it is disabled.  sAllocDelay
wraps (it's a uint32_t) and will take a long time to reach 0 again.

This patch will reset sAllocDelay if necessary when PHC is re-enabled.

Differential Revision: https://phabricator.services.mozilla.com/D181422
2023-06-26 23:45:42 +00:00
Butkovits Atila
bb9bae8012 Backed out 2 changesets (bug 1829128) for causing failures at TestPrintf.
Backed out changeset 301d3e2bdac3 (bug 1829128)
Backed out changeset c93bc35c5289 (bug 1829128)
2023-06-14 18:12:10 +03:00
Paul Bone
cd487a47e5 Bug 1829128 - Crashes in jemalloc don't have useful PHC stacks r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D180196
2023-06-14 13:28:09 +00:00
Barret Rennie
9d37cb7525 Bug 1747469 - Remove FileUtils.getFile from memory/ r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D180463
2023-06-13 15:57:45 +00:00
Paul Bone
8ea82cb1ff Bug 1824655 - Avoid locking for the DOMArena jemalloc arena r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D173828
2023-06-09 05:06:49 +00:00
Gabriele Svelto
d40b19f8c6 Bug 1776197 - Adjust crash generation to pull annotations out of child processes using the mozannotation crates r=afranchuk
Depends on D173698

Differential Revision: https://phabricator.services.mozilla.com/D173699
2023-06-07 12:34:31 +00:00
Mike Hommey
53ece1ccc1 Bug 1834337 - Ignore -Winline-new-delete warnings. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D178994
2023-05-29 20:24:44 +00:00
Mike Hommey
3b332113e3 Bug 1802675 - Don't build winheap.cpp when mozglue is a static library. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D163383
2023-05-23 03:01:22 +00:00
Mike Hommey
025602a787 Bug 1832708 - Disable std::__throw_* wrapping on libc++ >= 14.0. r=firefox-build-system-reviewers,andi
As of libc++ 14, the functions are defined in the std namespace rather
than std::<something>, which makes them conflict with our wrapping. This
is not a problem on libstdc++ because the functions are defined in the
library itself rather than the headers.

This was the real reason behind the addition of #ifndef __wasm__ ; this
is a more generic fix for the same problem.

Differential Revision: https://phabricator.services.mozilla.com/D177841
2023-05-15 21:10:55 +00:00
Mark Banner
c2dd8e3266 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Mike Hommey
e120474d55 Bug 1829050 - Enable STL wrapping (and thus infallible new) for wasm-sandboxed code. r=firefox-build-system-reviewers,shravanrn,andi
Differential Revision: https://phabricator.services.mozilla.com/D175981
2023-05-08 21:10:19 +00:00
Paul Bone
73ec90e1fe Bug 1828599 - Assert if mprotect/VirtualFree fails r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175834
2023-05-04 06:46:25 +00:00
Paul Bone
60b99c8afd Bug 1828599 - Fix control flow in MaybePageAlloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175833
2023-05-04 06:46:24 +00:00
Noemi Erli
b021722dbf Backed out changeset e06349a5b0f2 (bug 1829050) for causing build bustages in rlbox_wasm2c_sandbox.hpp 2023-05-03 08:16:13 +03:00
Mike Hommey
d9b2a96f8d Bug 1829050 - Enable STL wrapping (and thus infallible new) for wasm-sandboxed code. r=firefox-build-system-reviewers,shravanrn,andi
Differential Revision: https://phabricator.services.mozilla.com/D175981
2023-05-03 04:05:07 +00:00
Norisz Fay
7aa97db372 Backed out changeset cddc0b331d97 (bug 1829050) for causing bustages on CheckedInt.h CLOSED TREE 2023-05-03 04:31:34 +03:00