Граф коммитов

1233 Коммитов

Автор SHA1 Сообщение Дата
arthur.iakab 27754a7d12 Backed out 2 changesets (bug 1402282) for turning multiple browser chrome bugs into permafail
Backed out changeset db7059b57f92 (bug 1402282)
Backed out changeset cea1d44ac776 (bug 1402282)
2018-11-05 17:56:37 +02:00
Chris Martin 3824b0d43e Bug 1402282 - Change jemalloc to use secure random arena ids r=glandium
Previously the id for a new arena was just a counter that increased by one
every time. For hardening purposes, we want to make the new counter a secure
random ID, so an attacker will have a more difficult time finding the memory
they are looking for.

Differential Revision: https://phabricator.services.mozilla.com/D10158

--HG--
extra : moz-landing-system : lando
2018-11-05 00:27:31 +00:00
Chris Martin a1d5bd1909 Bug 1402282 - Clang-format on mozjemalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D10794

--HG--
extra : moz-landing-system : lando
2018-11-05 00:26:00 +00:00
Noemi Erli 06a8cd8e3c Backed out changeset bee1c344cb47 (bug 1491909) for failures in browser/components/extensions/test/xpcshell/test_ext_geckoProfiler_control.js 2018-10-24 04:23:13 +03:00
Denis Palmeiro fc930ad16f Bug 1491909 - Add an AllocPolicy to mozilla::JSONWriter r=jwalden,mstange
JSONWriter currently calls new and delete indirectly through mozilla::MakeUnique to allocate a buffer.  Becuase of this, the methods of this class cannot be invoked within Spidermonkey due to https://searchfox.org/mozilla-central/source/config/check_vanilla_allocations.py#6-14.  Therefore, JSONWriter needs an AllocPolicy template parameter so that the allocation and deallocation routines can be changed to match the JS AllocPolicy when invoked within SpiderMonkey.

Differential Revision: https://phabricator.services.mozilla.com/D7279

--HG--
extra : moz-landing-system : lando
2018-10-23 20:46:31 +00:00
Randell Jesup 0f390bf1a5 Bug 1480430: Modify jemalloc to allow dynamic replacement r=glandium 2018-10-09 22:28:37 -04:00
Eric Rahm c5bb74ff5d Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.

--HG--
extra : rebase_source : 475166fa6d1f241bf4d67cbdda1aab73000a5c3a
extra : intermediate-source : fcdc1d5eaf1a932992287074d0c91504dd7180d8
extra : source : 1192c15fc9347ccd6169dcb5bea81d7f2399e3fd
2018-10-01 16:38:17 -07:00
Cosmin Sabou 5a8eb92385 Backed out 3 changesets (bug 1409739) for causing Linux x64 ccov & fuzzing bustages. a=backout
Backed out changeset 387f946c7c48 (bug 1409739)
Backed out changeset 617288a6b2d9 (bug 1409739)
Backed out changeset fcdc1d5eaf1a (bug 1409739)
2018-10-03 20:29:42 +03:00
Eric Rahm 703da53d94 Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.

--HG--
extra : source : 1192c15fc9347ccd6169dcb5bea81d7f2399e3fd
extra : intermediate-source : d39c2dfcc7004a4736436c564de239ba68b20c03
extra : histedit_source : 5a75a20f5b88481c994597da81fdbc29186aba3d%2C3f60f2bfbe54ab3843d4b18d66296cd4aadf4a30
2018-10-01 16:38:17 -07:00
Coroiu Cristina 7f6d72d2a2 Backed out 3 changesets (bug 1409739) for xpcshell failures at memory/replace/dmd/test/test_dmd.js
Backed out changeset dc3c5143ba4e (bug 1409739)
Backed out changeset e37ea5eb932a (bug 1409739)
Backed out changeset d39c2dfcc700 (bug 1409739)
2018-10-03 02:07:19 +03:00
Eric Rahm 6566498f9e Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.

--HG--
extra : rebase_source : 2b1d2dbf8a3a538533554c6697f0e9ee51ec1bed
extra : source : 1192c15fc9347ccd6169dcb5bea81d7f2399e3fd
2018-10-01 16:38:17 -07:00
Gurzau Raul 4f0690bc0d Backed out 3 changesets (bug 1409739) for failing at /dmd/test/test_dmd.js on a CLOSED TREE
Backed out changeset 39c8abcf9cb2 (bug 1409739)
Backed out changeset c0da83c08b62 (bug 1409739)
Backed out changeset 1192c15fc934 (bug 1409739)
2018-10-02 18:43:32 +03:00
Eric Rahm 0196b4c2ca Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.

--HG--
extra : rebase_source : 147e62e22248971980d95fe211c86116a98cbdf4
2018-10-01 16:38:17 -07:00
Tom Ritter 934ba40bb8 Bug 1480457-Correct typedef so it matches an earlier typedef r=aklotz
--HG--
extra : amend_source : c6796d3a8bb13939440b390ac9af11054b46dd15
2018-08-30 23:05:59 +03:00
Nicholas Nethercote fe34f19459 Bug 1486690 - Rename nsMemory::Clone() and remove unnecessary checks after it. r=glandium
The 'x' in the new name makes it clearer that it's infallible.

--HG--
extra : rebase_source : 51fd946c482befe8a8ca5bd88ecc967971f455da
2018-08-28 15:59:19 +10:00
Masatoshi Kimura 3d01e517aa Bug 1484184 - Remove now unused _RAISE macro check to deal with MSVC 2017 15.8. r=froydnj
--HG--
extra : source : b38403f36056d301321c128be96ee60d14739859
2018-08-17 01:27:29 +09:00
Narcis Beleuzu 96343e8f1f Backed out 3 changesets (bug 1484184, bug 1484190, bug 1484191) for bustages on test_toolchain_configure.py. CLOSED TREE
Backed out changeset dca5444170e0 (bug 1484190)
Backed out changeset 1ef81d07bc5b (bug 1484184)
Backed out changeset 2a42fd4df1bb (bug 1484191)
2018-08-20 19:49:37 +03:00
Masatoshi Kimura 59a91c2a72 Bug 1484184 - Remove now unused _RAISE macro check to deal with MSVC 2017 15.8. r=froydnj
--HG--
extra : rebase_source : d93dbda28fff9cdbf0f6a908e0c1d59c152665e5
extra : source : b38403f36056d301321c128be96ee60d14739859
2018-08-17 01:27:29 +09:00
Mike Hommey 5f59918688 Bug 1482797 - Don't use MADV_FREE on Linux until we support it properly. r=njn 2018-08-15 21:33:57 +09:00
Nicholas Nethercote b9e071e2e8 Bug 1481998 - Make mozilla::Hash{Map,Set}'s entry storage allocation lazy. r=luke,sfink
Entry storage allocation now occurs on the first lookupForAdd()/put()/putNew().
This removes the need for init() and initialized(), and matches how
PLDHashTable/nsTHashtable work. It also removes the need for init() functions
in a lot of types that are built on top of mozilla::Hash{Map,Set}.

Pros:

- No need for init() calls and subsequent checks.

- No memory allocated for empty tables, which are not that uncommon.

Cons:

- An extra branch in lookup() and lookupForAdd(), but not in put()/putNew(),
  because the existing checkOverloaded() can handle it.

Specifics:

- Construction now can take a length parameter.

- init() is removed. Explicit length-setting, when necessary, now occurs in the
  constructors.

- initialized() is removed.

- capacity() now returns zero when the entry storage is absent.

- lookupForAdd() is no longer `const`, because it can instantiate the storage,
  which requires modifications.

- lookupForAdd() can now return an invalid AddPtr in two cases:

  - old: hashing failure (due to OOM in the hasher)

  - new: OOM while instantiating entry storage

  The existing failure handling paths for the old case work for the new case.

- clear(), finish(), and clearAndShrink() are replaced by clear(), compact(),
  and reserve(). The old compactIfUnderloaded() is also removed.

- Capacity computation code is now in its own functions, bestCapacity() and
  hashShift(). setTableSizeLog2() is removed.

- uint32_t is used throughout for capacities, instead of size_t, for
  consistency with other similar values.

- changeTableSize() now takes a capacity instead of a deltaLog2, and it can now
  handle !mTable.

Measurements:

- Total source code size is reduced by over 900 lines. Also, lots of existing
  lines got shorter (i.e. two checks were reduced to one).

- Executable size barely changed, down by 2 KiB on Linux64. The extra branches
  are compensated for by the lack of init() calls.

- Speed changed negligibly. The instruction count for Bench_Cpp_MozHash
  increased from 2.84 billion to 2.89 billion but any execution time change was
  well below noise.
2018-08-10 18:00:29 +10:00
Mike Hommey f4f54e5aeb Bug 1482330 - Upgrade to Android NDK r17b and API level 16 (JB). r=snorp
We're currently using NDK r15c, which is rather old, and happens to come
with a buggy gold linker. Let's use a more recent NDK, with a fixed
linker.

Unfortunately, we're currently at NDK API level 9, which the newer NDK
doesn't provide for x86 anymore. But that corresponds to Gingerbread
(2.3), which we've long stopped supporting. On the SDK side, we already
dropped support of versions before Jelly Bean, so we can do the same on
the NDK side. That corresponds to API level 16. So let's just use that
as a baseline.

Another change in the newer NDK is that the target-name changed from
i386-linux-android to i686-linux-android, so adjust for that in the
android x86 mozconfigs.
2018-08-11 09:47:41 +09:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Cosmin Sabou de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Nicholas Nethercote a4cfd53308 Bug 1478879 - Remove Range/Enum use in DMD. r=mccr8
--HG--
extra : rebase_source : 19428e3d0d1b8676fe55be729b0e75d787086b6c
2018-07-27 12:21:01 +10:00
Nicholas Nethercote 6141e31ef4 Bug 1479954 - Rename Hash{Set,Map}::sizeOf{In,Ex}cludingThis(). r=luke
In PLDHashTable the equivalent functions have a "Shallow" prefix, which makes
it clear that they don't measure things hanging off the table. This patch makes
mozilla::Hash{Set,Map} do likewise.

MozReview-Commit-ID: 3kwCJynhW7d

--HG--
extra : rebase_source : 9c03d11f376a9fd4cfd5cfcdc0c446c00633b210
2018-08-01 09:57:52 +10:00
Nicholas Nethercote 6998f465ed Bug 1477626 - Use mozilla::HashTable instead of JS::HashTable in DMD. r=erahm
Also use mozilla::HashNumber where appropriate.

MozReview-Commit-ID: BTq0XDS5UfQ

--HG--
extra : rebase_source : 28f45a9b27e831e99620a2b575f373003f1301f2
2018-07-26 20:15:58 +10:00
Calixte Denizet 38484d357e Bug 1474254 -- Disable test Jemalloc.JunkPoison for Windows ccov builds.
Summary: GTest is permafailing on Windows because of timeout.

Reviewers: glandium

Reviewed By: glandium

Bug #: 1474254

Differential Revision: https://phabricator.services.mozilla.com/D2043

--HG--
extra : rebase_source : cea68e50f96a1788bf15dc6ca7859e5f698a6209
2018-07-27 22:48:14 +03:00
Brian Hackett 29bb91306b Bug 1465452 Part 5 - Don't record some jemalloc atomics, r=njn.
--HG--
extra : rebase_source : a1dacd30546372e836b69e51f200e4c3e1295930
2018-07-21 14:30:33 +00:00
Brian Hackett f6b8e6f81c Bug 1309552 - Specify buffer size when freeing data in AllocPolicy, r=waldo.
--HG--
extra : rebase_source : f4e2d9f8831cf41c19d592ce252e87161f32250b
2018-07-20 23:58:34 +00:00
Masatoshi Kimura cc03337492 Bug 1476597 - Stop using dynamic exception specification in mozalloc.h. r=froydnj
--HG--
extra : rebase_source : 48047a82e42dc7688fb3ed484d01794ccbd86763
2018-07-18 20:36:25 +09:00
Jacek Caban 505960071d Bug 1471352 - Don't export functions from gcc_throw.h in mingw builds. r=froydnj
MozReview-Commit-ID: D5HQWCN12oI

--HG--
extra : rebase_source : 890d816347162f54204df4dcd5c3297c917da867
2018-06-26 18:55:14 +02:00
Eric Rahm ca834a09a7 Bug 1470268 - Add allocation filter to dmd.py. r=njn
This adds an '--allocation-filter' param that can be used to limit output to
only allocations that include the filter in their stack. For example:
  dmd.py --allocation-filter fontconfig dmd.json.gz
limits its output to just allocations that have an instance of 'fontconfig' in
in one of their stack frames.

--HG--
extra : rebase_source : 9ed34d5c7a6a2b76e96455e66b2e8196686ade16
2018-06-20 13:11:50 -07:00
Jon Coppeard 858a13bce3 Bug 1468767 - Check result of calling vm_copy() r=njn 2018-06-14 14:58:45 -07:00
Sylvestre Ledru 3e84d308c3 Bug 1464869 - Fix flake8/pep8 issue by hand in memory/ r=njn
MozReview-Commit-ID: 8bkhAB4g6rv

--HG--
extra : rebase_source : 623f4ed95d601b47878c910859f3b91e87897011
2018-05-25 23:27:02 -07:00
Sylvestre Ledru 21f28e8329 Bug 1464869 - Run autopep8 on memory/ r=njn
MozReview-Commit-ID: GzFGXZ8WLX5

--HG--
extra : rebase_source : 15b2f8fefaa4ee32a4f655086194202d9e82efb6
2018-05-25 23:16:07 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Margareta Eliza Balazs 03394c438d Merge inbound to mozilla-central. a=merge 2018-05-24 12:37:58 +03:00
Mike Hommey 7c246fac68 Bug 1460838 - Avoid static initializers in mozjemalloc with MSVC. r=njn
--HG--
extra : rebase_source : dd2106192a90fbade6f89dfa1169c6e9ab3a553b
2018-05-24 11:23:10 +09:00
Andreea Pavel 8469234a9f Bug 1461964 - removed mac 10.6 reference r=njn 2018-05-20 23:08:00 +03:00
Tom Ritter 4e3daa47c1 Bug 1460720 Do not define _aligned_malloc - instead define _aligned_malloc_impl and export _aligned_malloc r=glandium
MozReview-Commit-ID: 3EwAd81Iz7r

--HG--
extra : rebase_source : 899303e4c5db39b24451692f59a9d3bd1f9fd5a2
2018-05-15 11:10:48 -05:00
Tom Ritter 799ec67a16 Bug 1448749 Resolve undefined references to '_imp__mozalloc_abort' in the MinGW build r=glandium
MozReview-Commit-ID: 5enjU5Xp8G9

--HG--
extra : rebase_source : 21e8f5aff8f3d6f26fd9127e0b30099031a587a7
2018-05-16 22:02:05 -05:00
Masatoshi Kimura e98b2c42f0 Bug 1445601 - Stop using LoadLibraryA in replace_malloc. r=glandium
MozReview-Commit-ID: 8EzDtCIlg7F

--HG--
extra : rebase_source : cf909f472c1c0007b2ff759d011435b8b6bc0f37
2018-03-25 13:12:03 +09:00
David Major fa8d998487 Bug 1447795: Add even more UseItOrLoseIt to SmokeDMD.cpp 2018-04-01 09:37:42 -04:00
Tom Ritter 5fda6df793 Bug 1446466 Remove Nightly-only restriction on jemalloc arena implementation r=glandium
MozReview-Commit-ID: CC2cftngmli

--HG--
extra : rebase_source : 5cc5d5b0638b29074cc0e497f4669ebabcf6578a
2018-03-21 20:53:46 -05:00
Tom Ritter 51a8daef9d Bug 1446466 Crash if moz_dispose_arena is called, and comment out all callers r=glandium
Bug 1364359 is to fix a leaked arena. Until that is fixed; it is unsafe to
call moz_dispose_arena more than once.

MozReview-Commit-ID: KIby1RLtrPK

--HG--
extra : rebase_source : 6ea41001e9f0c4d5eb24ee678d6c1c0218991ac3
2018-03-21 20:49:35 -05:00
Margareta Eliza Balazs adebb06ac1 Merge inbound to mozilla-central. a=merge 2018-03-28 00:48:11 +03:00
Carl Corcoran 6766b3d082 Bug 1448546: Adding sized operator delete overloads on Windows builds; r=froydnj
MozReview-Commit-ID: EzhNZEf0suT

--HG--
extra : rebase_source : 695258d519654c9f0f69dc8a1446f28136ae8273
extra : source : 013cfa5c5f358aa02784a8a20bf181d3751d0bbf
2018-03-27 14:42:17 +02:00
Nathan Froyd 3d6d46eaba Bug 1448030 - use SprintfLiteral in fillAbortMessage; r=glandium
The SprintfLiteral checker complains that:

  snprintf(msg, sizeof(msg), ...);

should be using SprintfLiteral instead.  Let's do that.
2018-03-27 10:51:32 -04:00
David Major 0fab6b57fc Bug 1447795 - Add some more UseItOrLoseIt to SmokeDMD.cpp. r=njn 2018-03-21 13:52:00 +02:00