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

1017 Коммитов

Автор SHA1 Сообщение Дата
Csoregi Natalia a851ae46ec Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-27 01:02:37 +03:00
David Major 7995320ed3 Bug 1478020 - Fix some -Wmicrosoft-template in the interceptor. r=aklotz 2018-07-26 16:02:30 -04:00
Jim Chen f61f04949b Bug 1451891 - Fix race conditions in __wrap_dlerror; r=glandium
__wrap_dlerror uses a single pointer for all threads, which means one
thread could get the dlerror result from another thread. Normally this
wouldn't cause crashes. However, because dlerror results come from a
per-thread buffer, if a thread exits and our saved dlerror result came
from that thread, the saved pointer could then refer to invalid memory.

The proper way to fix this is to use TLS and have a per-thread pointer
for __wrap_dlerror. However, instead of using up a TLS slot, this patch
keeps the single pointer for custom messages, and fallback to per-thread
dlerror call for system messages. While the race condition still exists,
I think the risk is acceptable. Even when races occur, they should no
longer cause crashes.

MozReview-Commit-ID: 4hGksidjiVz

--HG--
extra : rebase_source : 373000686c426b81ffd7cee88264e89b7a733957
2018-07-25 13:59:30 -04:00
Christian Holler dbb1c632c3 Bug 1478143 - Adjust default malloc_context_size for ASan builds. r=froydnj
MozReview-Commit-ID: BbYWTtrsHLH

--HG--
extra : amend_source : 54d17e32b91e3768e30ee7db0ac0aa0845c6c0ad
2018-07-24 23:01:21 +02:00
Narcis Beleuzu 2f8c84f735 Backed out changeset f7b56df2e870 (bug 1478143) for wpt failures on Linux asan. CLOSED TREE 2018-07-25 02:13:29 +03:00
Christian Holler 7a8be4d393 Bug 1478143 - Adjust default malloc_context_size for ASan builds. r=froydnj
MozReview-Commit-ID: BbYWTtrsHLH

--HG--
extra : rebase_source : 70e94b35c13422e1e39f3e11c199d024fec88e61
2018-07-24 23:01:21 +02:00
Nathan Froyd 695cb9d23b Bug 1477081 - remove TARGET_CPU use from moz.build files; r=ted.mielczarek
TARGET_CPU is not canonicalized, whereas CPU_ARCH is, so we should be
using CPU_ARCH to get consistent values everywhere.
2018-07-24 16:08:55 -04:00
Aaron Klotz ae68a9de15 Bug 1467798: Fix problems with inlining and paths in TestDllInterceptorCrossProcess; r=handyman 2018-07-04 14:12:36 -06:00
Brian Hackett 38e406e8a5 Bug 1465452 Part 1 - Allow platform mutexes to specify whether they are recorded, r=froydnj.
--HG--
extra : rebase_source : 5270a2370717577d454eb00d92be224635495be3
2018-07-21 14:28:21 +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
Carl Corcoran b3ec4a65d9 Bug 1475335: Restrict TestInjectEject gtests to nightly builds;r=aklotz
MozReview-Commit-ID: 4zzm7DN5mBm

--HG--
extra : rebase_source : 63c545d06512102ba8ff69a13226a5af6355eff8
2018-07-13 16:59:52 +02:00
Jim Blandy 001ad997b8 Bug 1469223: Delete mozilla::detail::MutexImpl::operator==. r=froydnj
There is no meaningful equality relationship on any plausible mutex
implementation other than object identity. Having MutexImpl's users simply
compare by addresses makes it clearer in the callers that that's what's going
on.
2018-06-17 15:57:18 -07:00
Kris Maglione b744713e4e Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : intermediate-source : 7c03b7dd00e9675f9ac045ed1ea733eb0486904f
extra : absorb_source : c79df6bd9ebbec3454fcca1a81cbfa540ad91a3e
extra : source : 38f690f30e78764763bb012045073fa781efa691
extra : histedit_source : 544ff4257f38fae99a800276d06eb0d719882ca2
2018-07-13 11:06:58 -07:00
Kris Maglione f071708db7 Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : intermediate-source : ff41551f5ff1b98b72ed771a6f2a3f66a8b79a57
extra : absorb_source : c9fe7423fcbb47655b05209b44fb02b69b272d07
extra : source : 4b7a8a35ed956159e2f443c6211164c0cbf3d926
extra : histedit_source : b98b792791274f00a5e649c82dc25043cc1d699a
2018-07-02 15:01:25 -07:00
Brindusan Cristian fe91a8922e Backed out 13 changesets (bug 1471025) for reftest failures on variation-format-hint-1a.html; bc failures performance/browser_preferences_usage.js; wpt failures on format-specifiers-variations.html. CLOSED TREE
Backed out changeset 6b672d70f335 (bug 1471025)
Backed out changeset 200bec7e766a (bug 1471025)
Backed out changeset 6c72dc1bff88 (bug 1471025)
Backed out changeset 7f4cc96fae12 (bug 1471025)
Backed out changeset b4f9178f132d (bug 1471025)
Backed out changeset 8eff817d2f7e (bug 1471025)
Backed out changeset f9362cf1add4 (bug 1471025)
Backed out changeset ce379eaab179 (bug 1471025)
Backed out changeset 7c03b7dd00e9 (bug 1471025)
Backed out changeset ff41551f5ff1 (bug 1471025)
Backed out changeset 46a6f9d0773b (bug 1471025)
Backed out changeset 434106f1b75e (bug 1471025)
Backed out changeset c490838c8329 (bug 1471025)
2018-07-14 01:16:06 +03:00
Kris Maglione 92550be97d Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : source : 38f690f30e78764763bb012045073fa781efa691
extra : histedit_source : 2daf7386fbc9f9696c73168d6421139c5cefc5b4%2Ca0adf715f65281047915e678f8c054e5ec671de3
2018-07-13 11:06:58 -07:00
Kris Maglione 954d6a28ca Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : source : 4b7a8a35ed956159e2f443c6211164c0cbf3d926
extra : histedit_source : 01a1160ce1107d12e8b376d4512dedb0478e447c
2018-07-02 15:01:25 -07:00
Brindusan Cristian a68383b333 Backed out 12 changesets (bug 1471025) for build bustages on dom/ipc/ContentProcess.cpp. CLOSED TREE
Backed out changeset 398ccedc20dc (bug 1471025)
Backed out changeset 599895de063e (bug 1471025)
Backed out changeset dc7ec17179d1 (bug 1471025)
Backed out changeset 5051f15fc200 (bug 1471025)
Backed out changeset faef4df47b20 (bug 1471025)
Backed out changeset d344247b8706 (bug 1471025)
Backed out changeset 83d98ea5ebac (bug 1471025)
Backed out changeset 38f690f30e78 (bug 1471025)
Backed out changeset 4b7a8a35ed95 (bug 1471025)
Backed out changeset e3bbc87b71af (bug 1471025)
Backed out changeset 68bb03c63b3c (bug 1471025)
Backed out changeset 4a8fbb472c91 (bug 1471025)
2018-07-13 22:11:24 +03:00
Kris Maglione 6c6960d4c8 Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : rebase_source : c06aa38ff4bc2bdfa09a4aae359e1f418727ce29
extra : absorb_source : c68cd5f0e8f52980d35432cf21e1fc5552542bf2
2018-07-13 11:06:58 -07:00
Kris Maglione de31493580 Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : rebase_source : 28e8c6075bacf5f610058227a9731aeadb50f320
extra : absorb_source : f63602a163ed19fb65e26640319750fdd9b92ad1
2018-07-02 15:01:25 -07:00
Chris Manchester ae2d841079 Bug 1475210 - Do not generate rules to install test-specific libraries during artifact builds. r=gps
MozReview-Commit-ID: B25vvkhBUo2

--HG--
extra : rebase_source : bd5f4a07490d4165234c396337d7d92123dd14be
2018-07-12 12:37:46 -07:00
Aaron Klotz 9f11895c62 Bug 1475067: Faster handling of UNICODE_STRINGs in bootstrap blocklist; r=mhowell 2018-07-06 18:11:48 -06:00
Aaron Klotz 09a7297c55 Bug 1473175: Add support for catalog files to DLL signature verifications; r=mhowell 2018-07-10 14:09:44 -06:00
Ciure Andrei 7515739963 Backed out 1 changesets (bug 1473175) for windows 2012 build bustages CLOSED TREE
Backed out changeset 92c393ca18d6 (bug 1473175)
2018-07-12 02:22:54 +03:00
Aaron Klotz 12b5f4ebbe Bug 1473175: Add support for catalog files to DLL signature verifications; r=mhowell
--HG--
extra : rebase_source : f2a1cb4059f80e7cf025879e09998dff9b49981b
2018-07-10 14:09:44 -06:00
Carl Corcoran 63153c7e3b Bug 1443411: Add gtests for blocking threads with LoadLibrary start address;r=aklotz
MozReview-Commit-ID: 2wIUNnNoKa8

--HG--
extra : rebase_source : f1990af6cd130d9bca38ef21d64d66584d20b94e
2018-06-14 00:15:26 -07:00
Nathan Froyd 0daa8edfcc Bug 1444171 - Add pgo-generate-only source functionality; r=glandium
For clang-cl, we want to add code to libxul that only exists during the
PGO generation phase, so we can collect data.  The most expedient way to
do that is to enable certain files in SOURCES to be marked as to only be
compiled during the PGO generation step.
2018-07-09 18:35:49 -04:00
Aaron Klotz 5c9335136e Bug 1473371: Create a separate function hook type for use with cross-process DLL interceptors; r=handyman 2018-07-04 14:14:18 -06:00
Ciure Andrei 46d4610039 Backed out 1 changesets (bug 1473371)for windows-specific changes and fails on windows CLOSED TREE
Backed out changeset f86b10b13521 (bug 1473371)
2018-07-06 22:22:05 +03:00
Aaron Klotz 9f585dd45c Bug 1473371: Create a separate function hook type for use with cross-process DLL interceptors; r=handyman 2018-07-04 14:14:18 -06:00
Gabriele Svelto 016baeca8b Bug 1468207 - Use the new timer-based available memory tracker on Win32; r=dmajor
--HG--
extra : source : 9028b2953c7d4fcf90c12586d4077daef4335419
2018-07-04 21:06:07 +02:00
Aaron Klotz d88f616e24 Bug 1460022: Part 8 - Update DLL blocklist to work with revised DLL interceptor interface; r=mhowell 2018-06-27 11:51:10 -06:00
Aaron Klotz 9b29ad04f3 Bug 1460022: Part 3 - Update TestDllInterceptorCrossProcess to reflect new interceptor interface; r=handyman 2018-06-27 11:48:45 -06:00
Aaron Klotz 084151562b Bug 1460022: Part 2 - Update TestDllInterceptor to use new DLL interceptor interface; r=handyman
In addition to updating the interface, this patch also significantly alters the
structure of this test. In particular, it removes the Test* functions in favour
of using template magic.

I did this because I noticed that, in the majority of cases, the stub function
was being called with all zero arguments, and then we check for the expected
error code. I thought that maybe we could replace that repetition with some
templates that instantiate a blank tuple that may then be applied to a callable
object.

See the (MAYBE_)TEST_HOOK* and TEST_DETOUR* macro definitions for detailed
information about how to use these things.

The test successfully completes with both 32-bit and 64-bit builds.
2018-06-27 11:48:28 -06:00
Aaron Klotz 4572b1b561 Bug 1460022: Part 1 - Modify DLL interceptor to use one-time initialization when setting hooks; r=handyman
This patch makes the interceptor's AddHook functions private, and converts
the stubs from simple function pointers into objects containing both the stub
function pointer, plus a INIT_ONCE sentinel.

Setting a hook now requires calling Set or SetDetour on the stub, which ensures
that the hook attempt happens once and only once.

The constructor for the new object is constexpr, so it should not generate
static initializers if it is declared statically.

Note that, as a corollary of the new behaviour, we no longer need to set guards
around any hook setting code. I have removed those when present.
2018-06-27 11:48:05 -06:00
shindli dd50d1646e Backed out 13 changesets (bug 1460022) for bustages in :/build/build/src/mozglue/tests/interceptor/TestDllInterceptor.cpp(113) on a CLOSED TREE
Backed out changeset b798c3689bbf (bug 1460022)
Backed out changeset c3b3b854affd (bug 1460022)
Backed out changeset ecb1b6fd3134 (bug 1460022)
Backed out changeset 91fed649dd5a (bug 1460022)
Backed out changeset be7032cddad2 (bug 1460022)
Backed out changeset d4a036b976e6 (bug 1460022)
Backed out changeset 5f3dfde41e38 (bug 1460022)
Backed out changeset a16486a6f685 (bug 1460022)
Backed out changeset 69eacc5c3ab8 (bug 1460022)
Backed out changeset 34aa7c29b31e (bug 1460022)
Backed out changeset 00b20c0a7637 (bug 1460022)
Backed out changeset b8e8aea4a01f (bug 1460022)
Backed out changeset 15822d9848d8 (bug 1460022)
2018-07-04 03:37:11 +03:00
Aaron Klotz 87175de922 Bug 1460022: Part 8 - Update DLL blocklist to work with revised DLL interceptor interface; r=mhowell 2018-06-27 11:51:10 -06:00
Aaron Klotz ef8970296d Bug 1460022: Part 3 - Update TestDllInterceptorCrossProcess to reflect new interceptor interface; r=handyman 2018-06-27 11:48:45 -06:00
Aaron Klotz 1c39ff82df Bug 1460022: Part 2 - Update TestDllInterceptor to use new DLL interceptor interface; r=handyman
In addition to updating the interface, this patch also significantly alters the
structure of this test. In particular, it removes the Test* functions in favour
of using template magic.

I did this because I noticed that, in the majority of cases, the stub function
was being called with all zero arguments, and then we check for the expected
error code. I thought that maybe we could replace that repetition with some
templates that instantiate a blank tuple that may then be applied to a callable
object.

See the (MAYBE_)TEST_HOOK* and TEST_DETOUR* macro definitions for detailed
information about how to use these things.

The test successfully completes with both 32-bit and 64-bit builds.
2018-06-27 11:48:28 -06:00
Aaron Klotz 984eed3371 Bug 1460022: Part 1 - Modify DLL interceptor to use one-time initialization when setting hooks; r=handyman
This patch makes the interceptor's AddHook functions private, and converts
the stubs from simple function pointers into objects containing both the stub
function pointer, plus a INIT_ONCE sentinel.

Setting a hook now requires calling Set or SetDetour on the stub, which ensures
that the hook attempt happens once and only once.

The constructor for the new object is constexpr, so it should not generate
static initializers if it is declared statically.

Note that, as a corollary of the new behaviour, we no longer need to set guards
around any hook setting code. I have removed those when present.
2018-06-27 11:48:05 -06:00
shindli dcc88f33f9 Backed out 13 changesets (bug 1460022) for bustages in builds/worker/workspace/build/src/dom/plugins/ipc/FunctionHook.h💯24 on a CLOSED TREE
Backed out changeset 0734142a3f35 (bug 1460022)
Backed out changeset 18fbfa7ca685 (bug 1460022)
Backed out changeset 2df129bd5692 (bug 1460022)
Backed out changeset 02a7ed68933f (bug 1460022)
Backed out changeset 221137d1c2de (bug 1460022)
Backed out changeset 9cb0b7a15402 (bug 1460022)
Backed out changeset 18f8f85c0307 (bug 1460022)
Backed out changeset 867a1351efff (bug 1460022)
Backed out changeset 933e0b698f8e (bug 1460022)
Backed out changeset 09da660071e1 (bug 1460022)
Backed out changeset 8bb5142d3f53 (bug 1460022)
Backed out changeset 0ddf581bdaac (bug 1460022)
Backed out changeset 1cd5f9b4a6af (bug 1460022)
2018-07-04 02:49:24 +03:00
Aaron Klotz ecd4916dce Bug 1460022: Part 8 - Update DLL blocklist to work with revised DLL interceptor interface; r=mhowell
--HG--
extra : rebase_source : 04e2f3c3ea6916f43e54a7f8c992f6cbb4fb3286
2018-06-27 11:51:10 -06:00
Aaron Klotz 0ff30867ea Bug 1460022: Part 3 - Update TestDllInterceptorCrossProcess to reflect new interceptor interface; r=handyman
--HG--
extra : rebase_source : 208380bdaaf2c394c5d93cf2f0f8cb2a117b3e66
2018-06-27 11:48:45 -06:00
Aaron Klotz 9c86a6adcd Bug 1460022: Part 2 - Update TestDllInterceptor to use new DLL interceptor interface; r=handyman
In addition to updating the interface, this patch also significantly alters the
structure of this test. In particular, it removes the Test* functions in favour
of using template magic.

I did this because I noticed that, in the majority of cases, the stub function
was being called with all zero arguments, and then we check for the expected
error code. I thought that maybe we could replace that repetition with some
templates that instantiate a blank tuple that may then be applied to a callable
object.

See the (MAYBE_)TEST_HOOK* and TEST_DETOUR* macro definitions for detailed
information about how to use these things.

The test successfully completes with both 32-bit and 64-bit builds.

--HG--
extra : rebase_source : 95e9a3386c0a6c5f9f78b1e8fa5a88c1c30e9b51
2018-06-27 11:48:28 -06:00
Aaron Klotz 4cb1d86ef0 Bug 1460022: Part 1 - Modify DLL interceptor to use one-time initialization when setting hooks; r=handyman
This patch makes the interceptor's AddHook functions private, and converts
the stubs from simple function pointers into objects containing both the stub
function pointer, plus a INIT_ONCE sentinel.

Setting a hook now requires calling Set or SetDetour on the stub, which ensures
that the hook attempt happens once and only once.

The constructor for the new object is constexpr, so it should not generate
static initializers if it is declared statically.

Note that, as a corollary of the new behaviour, we no longer need to set guards
around any hook setting code. I have removed those when present.

--HG--
extra : rebase_source : 260ec9f99839468d9994186fddd7cf2b33e6c87d
2018-06-27 11:48:05 -06:00
Nathan Froyd 00e534b498 Bug 1472806 - fix microsoft template lookup extensions in interceptor code; r=aklotz
clang-cl complains about things like:

z:/build/build/src/obj-firefox/dist/include/mozilla/interceptor/VMSharingPolicies.h(53,50):  warning: use of identifier 'GetLocalView' found via unqualified lookup into dependent bases of class templates is a Microsoft extension [-Wmicrosoft-template]
      return TrampolineCollection<MMPolicy>(*this, GetLocalView(), GetRemoteView(),
                                                   ^

in various files in interceptor/, and since the warnings are in headers,
rather than in sources, they're rather annoying.  Let's fix this to be
standards-complaint and make clang-cl stop complaining.
2018-07-03 17:04:26 -04:00
Christian Holler 2a3b6f8ca3 Bug 1471532 - Support Windows in ASan Nightly Reporter builds. r=froydnj
MozReview-Commit-ID: AK2dBOgoazY

--HG--
extra : rebase_source : 1065a2f3b10913ac574cf1187d717f21fc2994e6
extra : histedit_source : 3042e51e496e4e8593b367d89332a9199bf3999c
2018-06-27 11:19:00 +02:00
Coroiu Cristina 5416c68fa2 Backed out changeset 64f3290fac6e (bug 1471532) on reqest by decoder a=backout 2018-06-30 00:57:00 +03:00
Margareta Eliza Balazs ee85ffa45d Merge inbound to mozilla-central. a=merge 2018-06-29 12:41:54 +03:00
Aaron Klotz 61f9bf0bc0 Bug 1472030: Use macro variant of MAKE_VERSION in DLL blocklists with MSVC; r=mhowell 2018-06-28 16:49:42 -06:00