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

1153 Коммитов

Автор SHA1 Сообщение Дата
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
Christian Holler bdf8e4d393 Bug 1471532 - Support Windows in ASan Nightly Reporter builds. r=froydnj
MozReview-Commit-ID: AK2dBOgoazY

--HG--
extra : rebase_source : 6ed99ce79180f2a6f2d54a0898cb02acbd6e9fb6
2018-06-27 11:19:00 +02:00
Andrew Halberstadt 9435736ade Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt
This will make sure that when running |mach python-test --python 3| locally,
we only run the tests that also run in CI with python 3 (and therefore pass
presumably).

MozReview-Commit-ID: 3OBr9yLSlSq

--HG--
extra : rebase_source : 456340d0ecdddf1078f2b5b4ebb1eddf3813b26a
2018-06-27 11:10:02 -04:00
Jim Chen 9d10605784 Bug 1460989 - Hold system linker lock while modifying debug map. r=glandium, a=RyanVM
When we modify the debug map, we could be racing with the system linker,
either when we modify the entries or when we change page protection
flags. To fix the race, we need to take the system linker's internal
lock when we perform any kind of modification on the debug map.

One way to hold the system linker lock is to call dl_iterate_phdr, and
perform our actions inside the callback, which is invoked with the
lock being held. However, dl_iterate_phdr is only present on Android
5.0+, and even then, dl_iterate_phdr is only protected by the linker
lock on Android 6.0+.

This means that with this patch, we can only safely modify the debug map
on Android 6.0+, which I think is acceptable for an operation that only
benefits a debugger.

MozReview-Commit-ID: BowBEO8tu8Z

--HG--
extra : amend_source : 837631dfc2ef17b24ffe5778bcb70dc29b7dfc66
2018-06-15 04:24:10 -04:00
Carl Corcoran 432149de7d Bug 1467731: Prevent WinVerifyTrust from hitting the network; r=aklotz
MozReview-Commit-ID: DSpHXsJkeoX

--HG--
extra : rebase_source : 2352f566ca9819d7e49c98889d021df9aa430d7b
extra : source : 269aeb1d215775a2117494e02185eb08f27c54e3
2018-06-08 12:45:09 +02:00
Ciure Andrei 83c5f0bd74 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE
--HG--
rename : browser/app/LaunchUnelevated.cpp => browser/app/winlauncher/LaunchUnelevated.cpp
rename : browser/app/LaunchUnelevated.h => browser/app/winlauncher/LaunchUnelevated.h
rename : browser/app/LauncherProcessWin.cpp => browser/app/winlauncher/LauncherProcessWin.cpp
rename : browser/app/LauncherProcessWin.h => browser/app/winlauncher/LauncherProcessWin.h
rename : browser/app/ProcThreadAttributes.h => browser/app/winlauncher/ProcThreadAttributes.h
2018-06-08 00:56:15 +03:00
Aaron Klotz d057aef830 Bug 1445025: Part 2 - Move blocklist definitions into separate header file and add new initialization flag; r=mhowell
* This allows us to use a single blocklist definition in multiple places.
* This patch also adds support for a new initialization flag that, when enabled,
  disables the DLL Blocking part of the mozglue blocklist but leaves the
  profiling and stackwalking suppression bits intact.
2018-06-05 15:16:13 -06:00
Cosmin Sabou 1cda6f4992 Backed out 6 changesets (bug 1445025) for browser chrome failures on browser_checkdllblockliststate.js. CLOSED TREE
Backed out changeset a1203eb4cee9 (bug 1445025)
Backed out changeset 64b003dceafb (bug 1445025)
Backed out changeset a6cff2b478da (bug 1445025)
Backed out changeset 4dbc7fbb3361 (bug 1445025)
Backed out changeset 1ad82650ca1c (bug 1445025)
Backed out changeset 5c63001e1ce6 (bug 1445025)

--HG--
rename : browser/app/winlauncher/LaunchUnelevated.cpp => browser/app/LaunchUnelevated.cpp
rename : browser/app/winlauncher/LaunchUnelevated.h => browser/app/LaunchUnelevated.h
rename : browser/app/winlauncher/LauncherProcessWin.cpp => browser/app/LauncherProcessWin.cpp
rename : browser/app/winlauncher/LauncherProcessWin.h => browser/app/LauncherProcessWin.h
rename : browser/app/winlauncher/ProcThreadAttributes.h => browser/app/ProcThreadAttributes.h
2018-06-07 12:09:22 +03:00
Aaron Klotz 05eb3b3d8a Bug 1445025: Part 2 - Move blocklist definitions into separate header file and add new initialization flag; r=mhowell
* This allows us to use a single blocklist definition in multiple places.
* This patch also adds support for a new initialization flag that, when enabled,
  disables the DLL Blocking part of the mozglue blocklist but leaves the
  profiling and stackwalking suppression bits intact.

--HG--
extra : rebase_source : ff4dad72f57c5662fc9e1bbd9e4efb3ff01470ef
2018-06-05 15:16:13 -06:00
Ryan VanderMeulen 4aef6ab351 Backed out changeset a4465713555b (bug 1460989) for causing the Galaxy S8 crash rate to spike. 2018-06-06 21:07:48 -04:00
Xidorn Quan 75cc8c371b Bug 1452204 part 2 - Use RtlCaptureContext to capture context for current thread and remove walker thread. r=glandium
GetThreadContext() returns a context pointing to its own frame when it
gets called with the current thread handle. That frame can go away after
it returns. This patch instead uses RtlCaptureContext(), which captures
the context of its caller, when walking the current thread.

In the past, we also used a walker thread when nullptr is passed in for
aThread, but the check doesn't cover all the cases, and having another
thread is apparently more complicated than this approach.

MozReview-Commit-ID: 3TAatDc9BLh

--HG--
extra : rebase_source : 7978cce48b8939a723cd5ccafe86d3f7aca6d3ac
2018-06-04 19:23:27 +10:00
Xidorn Quan 5ce8f98cba Bug 1452204 part 1 - Correctly set walkCallingThread. r=glandium
GetCurrentThread() returns a pseudo handle, so comparing it against
the passed in argument doesn't make sense in most cases. This patch
changes it to using the thread id for comparison, which is guaranteed
to be unique in the whole lifetime of a thread.

MozReview-Commit-ID: 5TNAgLkcS6m

--HG--
extra : rebase_source : d5bb21ac57a4c1149b8d332ea7b28a78ed994c62
2018-06-04 19:17:32 +10:00
Sylvestre Ledru 89e4661534 Bug 1464869 - Fix flake8/pep8 issue by hand in mozglue/ r=glandium
MozReview-Commit-ID: 4U31tUZPm8U

--HG--
extra : rebase_source : 5b9fdb66a482e89e3d70fd5e8fd9a86c055f7044
2018-05-25 21:28:12 -07:00
Margareta Eliza Balazs 44905b7be9 Backed out 2 changesets (bug 1452204) for perma failing in memory/replace/dmd/test/test_dmd.js
Backed out changeset 4431cecd4c2d (bug 1452204)
Backed out changeset 72fc40daf6cd (bug 1452204)
2018-06-05 11:01:54 +03:00
Xidorn Quan 718caa9bc0 Bug 1452204 part 2 - Use RtlCaptureContext to capture context for current thread. r=glandium
GetThreadContext() returns a context pointing to its own frame when it
gets called with the current thread handle. That frame can go away after
it returns. This patch instead uses RtlCaptureContext(), which captures
the context of its caller, when walking the current thread.

MozReview-Commit-ID: 3TAatDc9BLh

--HG--
extra : rebase_source : d5d88f0a9fa07da5b31f27c51c78ee2bfb527a8e
2018-06-04 19:23:27 +10:00
Xidorn Quan 7025ae7cbc Bug 1452204 part 1 - Correctly set walkCallingThread. r=glandium
GetCurrentThread() returns a pseudo handle, so comparing it against
the passed in argument doesn't make sense in most cases. This patch
changes it to using the thread id for comparison, which is guaranteed
to be unique in the whole lifetime of a thread.

MozReview-Commit-ID: 5TNAgLkcS6m

--HG--
extra : rebase_source : 0e72e8f6196c8079086ca697b9a121c6987ef43e
2018-06-04 19:17:32 +10:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Aaron Klotz 2884d63e52 Bug 1463596: Ensure that WritableTargetFunction correctly handles changing of protection attributes across regions that straddle page boundaries and have different initial protection attributes; r=handyman 2018-05-23 16:50:49 -06: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
Aaron Klotz 0300dd1f10 Bug 1463961: DLL Interceptor - Make shared VM policy only work for in-proc interceptors and remove pid mapping; r=handyman
--HG--
extra : rebase_source : a85b283a380e0f30935868c10e3a9d626a8a0061
2018-05-28 16:54:58 -06:00
Jim Chen 32c922179c Bug 1460989 - Check page protection flags again after mprotect(); r=glandium
We are apparently still crashing even after mprotect() with write flag
returns successfully. This patch reads the flags again after mprotect()
returns, and hopefully the flags will tell the truth of whether the page
is truly writable or not after calling mprotect().

MozReview-Commit-ID: Jsg8vHKFEvJ

--HG--
extra : rebase_source : b028aa0d5cefd50302bfc2502292d9129d202e09
2018-05-30 11:47:07 -04:00
Masatoshi Kimura 05cc187118 Bug 1462727 - Make WindowsMapRemoteView.cpp work with April 2018 Update SDK. r=aklotz
MozReview-Commit-ID: DtzFeCmbGqO

--HG--
extra : rebase_source : 242862f31d3a2f6b0eb7ae53392f7c4ed3296d20
2018-05-19 02:12:14 +09: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
Margareta Eliza Balazs d4b9e50875 Merge inbound to mozilla-central. a=merge 2018-05-16 13:00:51 +03:00
Markus Stange 68470bc3c0 Bug 1461555 - Rename PseudoStack to ProfilingStack. r=njn
This also changes many references to the 'pseudo stack' to refer to the 'label
stack' instead. The label stack is one of the two stacks that are managed by
the profiling stack, the other stack being the JS interpreter stack.

MozReview-Commit-ID: Ed0YMMeCBY8

--HG--
extra : rebase_source : 5675d670f424c7d7dda04bafc2b3431fa2485e3c
2018-05-15 01:03:11 -04:00
Markus Stange 633ac66e7f Bug 1461555 - Rename ProfileEntry to ProfilingStackFrame. r=njn
The term "entry" is already used for elements in the profile buffer.

MozReview-Commit-ID: 1aB22V6veQh

--HG--
extra : rebase_source : c664eb4d6bed6cb74ba8a1b67ea99bd8ca57bcf7
extra : source : 3264c0cc0027b240b55bd3aebf27263b1e1d1cc0
2018-05-15 01:14:03 -04:00
Markus Stange 73800e02dd Bug 1461053 - Treat SP marker frames as their own kind, instead of lumping them together with label frames. r=njn
MozReview-Commit-ID: 5nQEIgBY4SP

--HG--
extra : rebase_source : 9b59e41fdf62e86941104248d9c0cf08b73736f2
2018-05-14 23:30:32 -04:00
Markus Stange 818ad4ea69 Bug 1461053 - Rename Cpp frames to label frames in the ProfilingStack. r=njn
The name Cpp was confusing, because C++ functions are in the native stack, not
in the pseudo stack. The pseudo stack only contains frames for manually
instrumented code that uses AutoProfilerLabel, and JS frames.

MozReview-Commit-ID: 9ptfhREo0qy

--HG--
extra : rebase_source : 76a1a32acb4c946aeb2ad45e904e419c1c9e2ad1
2018-05-14 23:21:29 -04:00
Margareta Eliza Balazs 4f9a2ba08e Merge inbound to mozilla-central. a=merge 2018-05-11 12:36:02 +03:00
Eric Rahm c6d32ead9e Bug 1364624 - Part 2: Switch from CRITICALSECTION to SRWLOCK. r=froydnj
--HG--
extra : rebase_source : ff510d6c1959823b2a2a5ac25ae80b6067fd70dc
2018-04-27 16:48:47 -07:00
Mike Hommey b94cf61acd Bug 1459722 - Remove zxx_stream. r=froydnj
It was necessary back when we were doing decompression from a signal
handler, because we couldn't then have zlib call malloc, but we don't
do that anymore, so the whole wrapping is effectively unused.

With the wrapping gone, we manually initialize the zalloc, zfree and
opaque fields, as specified in the zlib documentation.

--HG--
extra : rebase_source : c4e84009e65f71f6c43362468c2934e04a8abda1
2018-05-10 11:45:23 +09:00
David Major 976282cb1f Bug 1460407: Fix printf format warning in TestDllInterceptorCrossProcess.cpp. r=aklotz 2018-05-09 16:16:20 -04:00
Aaron Klotz a1373c8d5a Bug 1451524: Switch the default interceptor VM policy over from unique to shared; r=handyman 2018-04-25 15:25:16 -06:00
Jon Coppeard b8b2fad2eb Bug 1457882 - Emulate glibc adaptive mutexes on OSX r=nfroyd 2018-05-02 15:11:53 +01:00
Aaron Klotz 0850bc3ec5 Bug 1451511: Add cross-process function hooking to DLL interceptor; r=handyman
--HG--
rename : ipc/mscom/DynamicallyLinkedFunctionPtr.h => mozglue/misc/DynamicallyLinkedFunctionPtr.h
extra : amend_source : 1eea43cda6e05f722f0b1373535d9ceabac18661
2018-04-04 16:31:43 -06:00
Aaron Klotz b59f7ece0f Bug 1451524: Make interceptor shared VM policy compatible with changes from bug 1456054; r=handyman
--HG--
extra : rebase_source : 14d4eaedec28708978bac42495f3a1eed180ac48
2018-04-26 11:12:55 -06:00
Hiroyuki Ikezoe 30abf8cc5d Bug 1456672 - Add a brief note that we prefer to pass TimeStamp objects by value. r=heycam,kats DONTBUILD
MozReview-Commit-ID: 6EvYJvBv5DF

--HG--
extra : rebase_source : 054ca1491ebbdc4788f90bf9fc60da75130b9af8
2018-04-26 14:53:23 +09:00
arthur.iakab b952733074 Merge mozilla-central to inbound on a CLOSED TREE
--HG--
extra : amend_source : 211f8c266bd77e1617feb70153708664d3edf337
2018-04-26 02:08:49 +03:00
Dorel Luca 7652908dea Backed out changeset 3802f86e1bd1 (bug 1364624) for shutdown hangs on reftests. a=backout 2018-04-26 00:27:45 +03:00
Aaron Klotz ea4048c1e7 Bug 1456054: Verify that a redirected address is accessible and backed by an image; r=handyman 2018-04-23 15:07:54 -06:00
Aaron Klotz ff279da3a5 Bug 1451524: Add a VM policy to the DLL interceptor that allows multiple instances to share a single trampoline space; r=handyman 2018-04-02 17:04:17 -06:00
Eric Rahm b626618f7d Bug 1364624 - Switch from CRITICALSECTION to SRWLOCK. r=froydnj
--HG--
extra : rebase_source : 4acc959bb8ccc33f6d549b71bbd83b8f8d09b353
2018-04-23 10:45:20 -07:00
James Willcox 624417af1d Bug 1455662 - Guard against mprotect() failure when manipulating link map r=jchen
MozReview-Commit-ID: 7orhBmf4j5j
2018-04-25 15:06:55 -05:00
Aaron Klotz 5317435ec0 Bug 1432653: Refactor the DLL interceptor and parameterize its memory operations; r=handyman
MozReview-Commit-ID: EYxVsQ1kicy

--HG--
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherBase.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherDetour.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherNopSpace.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/nsWindowsDllInterceptor.h
rename : toolkit/xre/test/win/TestDllInterceptor.cpp => mozglue/tests/interceptor/TestDllInterceptor.cpp
extra : amend_source : 84a7590b40a649f7321eb05feca4f9256ecc5d22
2018-04-09 13:37:52 -06:00
James Willcox cf502cd7d7 Bug 1450793 - Don't assume 4k page size r=glandium
MozReview-Commit-ID: DWSIUOFfKW5
2018-04-13 08:46:35 -05:00
Nika Layzell 0d56c8977a Bug 1437167 - Part 2: Round submillisecond condition variable waits up to 1ms, r=froydnj 2018-04-10 17:49:47 -04:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Andrea Marchesini 0d9f03eaef Bug 1450959 - TimeStamp class doesn't need to be friend of StartupTimelineRecordExternal, r=glandium 2018-04-05 06:44:31 +02:00
Marco Castelluccio f2aadf350c Bug 1433408 - Blocklist Dell Backup and Recovery tool DLLs as they cause crashes. r=aklotz
--HG--
extra : rebase_source : 85809f1757f257be0e0bf8848b0cc104e0543eb6
2018-02-15 23:13:29 +01:00
Noemi Erli 112dc4a070 Backed out changeset e72d2ab40d64 (bug 1450959) for failing in builds/worker/workspace/build/src/obj-firefox/dist/include/js/UbiNode.h on a CLOSED TREE 2018-04-05 11:55:19 +03:00
Andrea Marchesini 933fa97728 Bug 1450959 - TimeStamp class doesn't need to be friend of StartupTimelineRecordExternal, r=glandium 2018-04-05 06:44:31 +02:00
James Willcox 0e79fd0b72 Bug 1447607 - Correctly init and update ElfLoader::Singleton::lastError r=glandium
MozReview-Commit-ID: r1bclXdt4V

--HG--
extra : rebase_source : c9f612def794a6edc5fa8dd99fc08d2df4ed1cf1
2018-03-30 09:57:43 -05:00
Nathan Froyd 5be768776b Bug 1448032 - use SprintfLiteral in some android glue code; r=glandium
SprintfLiteral is much nicer, and placates the clang plugin as well.
2018-03-27 10:51:31 -04:00
Nathan Froyd 1dba87fe96 Bug 1448029 - make constructors in the linker explicit; r=glandium
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Sebastian Hengst ede8ef2991 Bug 1446680 - Restrict WindowsDllBlocklist's gStartAddressesToBlock to Nightly builds. r=aklotz
MozReview-Commit-ID: H3G4fKfpUlf

--HG--
extra : rebase_source : e7d2dc04aca4157484af1874bc4e89e2f44997ca
2018-03-17 21:14:18 +01:00
Carl Corcoran f1404c4534 Bug 1435816: Prevent thread start in LoadLibrary; r=aklotz
MozReview-Commit-ID: 2TNPfrqebZ8

--HG--
extra : rebase_source : 96341de92f1f5973b440cf7e9125fcdb546f5901
2018-02-22 13:41:15 +01:00
Csoregi Natalia d77091952c Backed out changeset 66fb307a2a70 (bug 1435816) for windows mingw failures on WindowsDllBlocklist.cpp:822. CLOSED TREE 2018-03-16 16:38:57 +02:00
Carl Corcoran e5b4966489 Bug 1435816: Prevent thread start in LoadLibrary; r=aklotz
MozReview-Commit-ID: 2TNPfrqebZ8

--HG--
extra : rebase_source : 074f8af9964ad002a8e550223886c99a79e3543c
2018-02-22 13:41:15 +01:00
Nicholas Nethercote 68124009fc Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium.
This patch replaces the large -intPrefs/-boolPrefs/-stringPrefs flags with
a short-lived, anonymous, shared memory segment that is used to pass the early
prefs.

Removing the bloat from the command line is nice, but more important is the
fact that this will let us pass more prefs at content process start-up, which
will allow us to remove the early/late prefs split (bug 1436911).

Although this mechanism is only used for prefs, it's conceivable that it could
be used for other data that must be received very early by children, and for
which the command line isn't ideal.

Notable details:

- Much of the patch deals with the various platform-specific ways of passing
  handles/fds to children.

  - Linux and Mac: we use a fixed fd (8) in combination with the new
    GeckoChildProcessHost::AddFdToRemap() function (which ensures the child
    won't close the fd).

  - Android: like Linux and Mac, but the handles get passed via "parcels" and
    we use the new SetPrefsFd() function instead of the fixed fd.

  - Windows: there is no need to duplicate the handle because Windows handles
    are system-wide. But we do use the new
    GeckoChildProcessHost::AddHandleToShare() function to add it to the list of
    inheritable handles. We also ensure that list is processed on all paths
    (MOZ_SANDBOX with sandbox, MOZ_SANDBOX without sandbox, non-MOZ_SANDBOX) so
    that the handles are marked as inheritable. The handle is passed via the
    -prefsHandle flag.

  The -prefsLen flag is used on all platforms to indicate the size of the
  shared memory segment.

- The patch also moves the serialization/deserialization of the prefs in/out of
  the shared memory into libpref, which is a better spot for it. (This means
  Preferences::MustSendToContentProcesses() can be removed.)

MozReview-Commit-ID: 8fREEBiYFvc

--HG--
extra : rebase_source : 7e4c8ebdbcd7d74d6bd2ab3c9e75a6a17dbd8dfe
2018-02-16 17:54:16 +11:00
Jim Chen 5c88095f46 Bug 1442255 - 7. Switch the order of fd arguments; r=jchen
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.

MozReview-Commit-ID: CAVyYAIIBPm

--HG--
extra : rebase_source : 596f590443f727d1a79582202eed122f79ae85cf
2018-03-06 13:52:50 -05:00
Gurzau Raul 185d1fcf42 Backed out 7 changesets (bug 1442255) for failing c1 tests on mochitest/test_browserElement_inproc_PurgeHistory.html
Backed out changeset 208c4c42f641 (bug 1442255)
Backed out changeset 6a794e14fceb (bug 1442255)
Backed out changeset 62d1c57c37b4 (bug 1442255)
Backed out changeset 5d0f72867f53 (bug 1442255)
Backed out changeset c3305648ad30 (bug 1442255)
Backed out changeset 08f906f3a0c8 (bug 1442255)
Backed out changeset d7a43e59a1b4 (bug 1442255)
2018-03-06 17:08:57 +02:00
Jim Chen 9b7b3f4565 Bug 1442255 - 7. Switch the order of fd arguments; r=jchen
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.

MozReview-Commit-ID: CAVyYAIIBPm

--HG--
extra : rebase_source : 02bf7337fa9a6d1194809c224acb4a2690fd87a3
2018-03-06 00:04:56 -05:00
Mike Hommey 61d75ea276 Bug 1442468 - Remove workaround for http://code.google.com/p/android/issues/detail?id=23203. r=froydnj
That NDK bug has been fixed since r8c, and we now require something more
recent than that. This effectively reverts the changes from bug 720621
and bug 734832.

--HG--
extra : rebase_source : 9ff76a790ec4135dc0172cfd0f11fc1ecef7df64
2018-03-01 15:15:02 +09:00
Aaron Klotz 020963a272 Bug 1436845: Part 1 - Add BasicDllServices; r=jimm
BasicDllServices is a simplified implementation that allows programs other than
Firefox to link against mozglue and access DLL services without requiring any
XPCOM baggage.
2018-02-13 16:03:11 -07:00
Gabriele Svelto f167c2f3e8 Bug 1307153 - Add stack traces to the crash pings in Fennec; r=jchen,ted.mielczarek
MozReview-Commit-ID: ZJKUwHFsuK

--HG--
extra : amend_source : 9a57ff1d2cf15391f1f30fa63585220adbb1a49b
2018-01-19 16:48:00 +01:00
Aaron Klotz 6e0060b743 Bug 1460997: Out-of-process interceptors should use r/w instead of r/w/x when changing protection attributes prior to writing a trampoline; r=handyman 2018-05-11 15:41:19 -06:00
philipp 3971a035c7 Bug 1043775 - Put old versions of GDATA GDKBFltDll64.dll on Dll blocklist. r=marco 2018-02-14 09:51:00 +02:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson 0129d900f3 Bug 1436263 - Part 2: Replace `override final` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -08:00
Jim Chen 589e7e1a01 Bug 1391268 - 1. Add call to verify CRC; r=glandium
To reliably detect corrupt APK, this patch adds a GeckoLoader.verifyCRC
call to enable verification of CRC before extracting libs.

MozReview-Commit-ID: 5EpIfwREGIv
2018-02-14 16:56:54 -05:00
Aaron Klotz 1eec067d63 Bug 1437309: Delayload crypt32 and wintrust in mozglue; r=glandium 2018-02-12 12:17:36 -07:00
Alex Gaynor de20b74dc4 Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.

MozReview-Commit-ID: 8agL5jwxDSL

--HG--
extra : rebase_source : 17ebcef3e9d24f3d4e7515e3fae95e65cef76a79
2017-11-27 14:37:34 -06:00
Aaron Klotz 1beac92cc2 Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : 2e3726d37356479aee81915caed04fe7af74c815
2018-01-30 15:08:03 -07:00
Aaron Klotz 0213e8a4b6 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : f280fec92c867d0adbe7b82c0e829eeb10fce5a9
2018-01-30 14:23:10 -07:00
Dorel Luca 112cc1ff6b Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout
Backed out changeset a992887a6060 (bug 1430857)
Backed out changeset cc9b0ac5f66b (bug 1430857)
Backed out changeset 4bdd6d82f993 (bug 1430857)
2018-02-07 15:02:58 +02:00
Aaron Klotz e398eaca79 Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : f86c1a6fd2a44f21a71e7a7418267b3b0d5feeec
2018-01-30 15:08:03 -07:00
Aaron Klotz 200eb77750 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : 3a5b4a6f0412311f0b9080a2b3b3a31e45d15b75
2018-01-30 14:23:10 -07:00
Gurzau Raul c104d865cc Backed out 2 changesets (bug 1430857) for build bustage on a CLOSED TREE
Backed out changeset b12ea04f9c5a (bug 1430857)
Backed out changeset 6b88557d1e50 (bug 1430857)
2018-02-06 23:27:33 +02:00
Aaron Klotz 5f9a96be9c Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : e032ee8c4cf71e5225b51797443764549f4bbe56
2018-01-30 15:08:03 -07:00
Aaron Klotz eb3453b4d6 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : d8d2ec74e7f452cb1e8b5430f4445f3b0fc9181a
2018-01-30 14:23:10 -07:00
Tom Ritter 6d070e11bd Bug 1235982 Add CFG to firefox.exe and mozglue, and a mochitest to ensure a crash r=glandium,mconley
MozReview-Commit-ID: EYKgDyGtw8m

--HG--
extra : rebase_source : 76166d4fca452674d0a442778290e40106ce339c
2018-01-25 12:15:40 -06:00
Jim Chen 1f4f8416df Bug 1428182 - 3. Only include <linux/elf.h> for non-unified headers; r=glandium
Unified headers have a complete <elf.h> so we should include that
instead of <linux/elf.h>.

MozReview-Commit-ID: DkQv2vk1Q62

--HG--
extra : rebase_source : 7cd9eb04532c14b1dd0dc8747448b89d16e4f118
2018-01-30 14:08:22 -05:00
Cosmin Sabou c6a0d55423 Backed out 11 changesets (bug 1428182) for build bustages on pixman-inlines.h:29:10 on a CLOSED TREE
Backed out changeset 84c767de6202 (bug 1428182)
Backed out changeset 429433caa78c (bug 1428182)
Backed out changeset c576e9d1f68f (bug 1428182)
Backed out changeset 092662eab5eb (bug 1428182)
Backed out changeset 4dd7eaff3ab5 (bug 1428182)
Backed out changeset fbbb0745b139 (bug 1428182)
Backed out changeset 1d1278b289b7 (bug 1428182)
Backed out changeset 55891ffb3768 (bug 1428182)
Backed out changeset 4655e1b1b237 (bug 1428182)
Backed out changeset 377eada51b3c (bug 1428182)
Backed out changeset 17c0e373d921 (bug 1428182)

--HG--
rename : ipc/chromium/src/third_party/libevent/patches/android-api-level.patch => ipc/chromium/src/third_party/libevent/patches/android-arc4random-buf.patch
2018-01-30 01:22:33 +02:00
Jim Chen 3e76d4e233 Bug 1428182 - 3. Only include <linux/elf.h> for non-unified headers; r=glandium
Unified headers have a complete <elf.h> so we should include that
instead of <linux/elf.h>.

MozReview-Commit-ID: DkQv2vk1Q62

--HG--
extra : rebase_source : 43b3fa15042246d2c3ec37a3ca904822b0f68d0c
2018-01-29 17:38:13 -05:00
Mike Hommey d76723e154 Bug 1433273 - Remove mozglue/linker/dladdr.h. r=froydnj
It was added in bug 683127 as a forced include for nspr, and
accidentally became unused after bug 1230117, but it turns out that all
versions of Android we care about nowadays (and probably back then) now
support dladdr.

--HG--
extra : rebase_source : 024244627c215de2d35e2f4595b7612eb1723996
2018-01-26 06:21:30 +09:00
Mike Hommey 5e48214af2 Bug 1414506 - Use system dl_iterate_phdr for system loaded libraries when we can. r=froydnj
When looping through the debugger helper links during our
dl_iterate_phdr implementation, we effectively race with other threads
dlclose()ing libraries while we're working.

We do have a (rather involved) check in place to ensure that elf headers
are readable. But it turns out in practice, some dlclose() do happen
between the check and the actual read of the elf headers.

Unfortunately, we can't lock the system linker while we're looping, so a
better approach is to only loop through the libraries we loaded, and
rely on the system dl_iterate_phdr to iterate over the (remaining)
system libraries.

Unfortunately (again), Android versions < 5.0 don't have a system
dl_iterate_phdr, so we have to rely on the old iterator when it's not
present.

--HG--
extra : rebase_source : 3fd07589ed1939411ef72f481b7c72f761d53701
2018-01-23 15:59:18 +09:00
Mike Hommey 76f5fcdbab Bug 1414506 - Move dl_phdr_info filling and callback invocation to a separate class. r=froydnj
We're going to introduce two code paths that need to fill dl_phdr_info
from different iterators, so first move the code to a separate class,
that both code paths will be able to call.

--HG--
extra : rebase_source : a50663ad8d15d4f7a28d7138824003df5edd7f1c
2018-01-23 15:50:38 +09:00
Mike Hommey 2d8f41393f Bug 1414506 - Drive-by: Remove MOZ_CONCAT definition from mozglue/linker/Logging.h. r=froydnj
The same exists in mozilla/MacroArgs.h, avoiding a macro redefined warning
when building on non-Android.

--HG--
extra : rebase_source : 6e3502ddf9deb96b29e3663f5867f852a2912401
2018-01-19 20:12:04 +09:00
Mike Hommey 73673fc86e Bug 1414506 - Drive-by: Add missing <cstring> include to XZStream.cpp. r=froydnj
--HG--
extra : rebase_source : 25942242d9e2cb1ccc1e18f06635218dfc894637
2018-01-19 20:08:08 +09:00
Philip Chimento 6b52ba7b8d Bug 1176787 - Always link mozglue into the shared library when building standalone. r=glandium
Regardless of which platform we are building on.

--HG--
extra : rebase_source : b10b6b7127e8ed86e9c19f4cba9d54fd2f02f99f
2018-01-15 13:57:03 -08:00
Aaron Klotz 35b1027e2c Bug 1423999: Improved UIA detection that eliminates handle duplication; r=Jamie
MozReview-Commit-ID: 5CqjkyDoPs8

--HG--
extra : amend_source : 877a3d6cadab0645274c9542249fc35cfd682d41
2017-12-07 12:13:14 -07:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Aaron Klotz 0f6431e1f3 Bug 1422394: Add a mechanism to report dll loads to an observer; r=jimm
MozReview-Commit-ID: 1ocag6jTBVV
2017-12-04 18:08:17 -07:00
Brindusan Cristian 14add183dc Backed out 2 changesets (bug 1422394) for browser-chrome failure in test_headless_screenshot.html on Windows 7 debug non-e10s r=backout a=backout on a CLOSED TREE
Backed out changeset 8f233446cd06 (bug 1422394)
Backed out changeset 96940dc4db44 (bug 1422394)
2017-12-05 23:49:08 +02:00
Aaron Klotz 7abd7674c8 Bug 1422394: Follow-up: Add missing include to fix mingw bustage; r=bustage 2017-12-05 13:00:05 -07:00
Aaron Klotz 9da53d8e93 Bug 1422394: Add a mechanism to report dll loads to an observer; r=jimm
--HG--
extra : rebase_source : ddd40aa520447fea1bdccdbe8208bb3bfd26afe7
2017-12-04 18:08:17 -07:00
Christian Holler 586ce17728 Bug 1419371 - Set max_malloc_fill_size/max_free_fill_size for ASan. r=glandium
MozReview-Commit-ID: KPng6w8JsHI

--HG--
extra : rebase_source : fcf2aced83cdf73cccb6cf572ca7da3f6a76c515
2017-11-22 13:49:36 +01:00
Julien Cristau e8ea0fb58a Bug 1421991 - Add old versions of G DATA BankGuard .dll to Windows blocklist. r=jimm 2017-11-30 17:37:20 +01:00
Aaron Klotz 010af8a7d8 Bug 1420276: Backed out changeset 244c97bc16e3 since we don't want to ship this yet; r=backout
--HG--
extra : rebase_source : f7376192a23e85f8850ef5b250e35813ef72e0e3
2017-12-04 15:58:20 -07:00
Jim Chen 190f7edde5 Bug 1416940; r=snorp
MozReview-Commit-ID: 7izmybLFG6i
2017-11-28 23:07:52 -05:00
Aaron Klotz 04c107efd4 Bug 1420276: Add uiautomationcore.dll to blocklist; r=Jamie
MozReview-Commit-ID: AIYZfyKm20b

--HG--
extra : amend_source : d49b08f20f7aebb05ff40cd0bf13ccbad0a78c5f
2017-11-23 14:07:59 -07:00
Mike Hommey 32ecc64ada Bug 1420353 - Change how replace-malloc initializes, part 2. r=njn
Because one entry point is simpler than two, we make replace_init fulfil
both the roles of replace_init and replace_get_bridge.

Note this should be binary compatible with older replace-malloc
libraries, albeit not detecting their bridge (and with the
previous change, they do not register anyways). So loading older
replace-malloc libraries should do nothing, but not crash in awful ways.

--HG--
extra : rebase_source : aaf83e706ee34f45cfa75551a2f0998e5c5b8726
2017-11-24 16:02:05 +09:00
Mike Hommey 845f9c5d82 Bug 1420353 - Change how replace-malloc initializes, part 1. r=njn
The allocator API is a moving target, and every time we change it, the
surface for replace-malloc libraries grows. This causes some build
system problems, because of the tricks in replace_malloc.mk, which
require the full list of symbols.

Considering the above and the goal of moving some of the replace-malloc
libraries into mozglue, it becomes simpler to reduce the replace-malloc
exposure to the initialization functions.

So instead of the allocator poking into replace-malloc libraries for all
the functions, we expect their replace_init function to alter the table
of allocator functions it's passed to register its own functions.

This means replace-malloc implementations now need to copy the original
table, which is not a bad thing, as it allows function calls with one
level of indirection less. It also replace_init functions to not
actually register the replace-malloc functions in some cases, which will
be useful when linking some replace-malloc libraries into mozglue.

Note this is binary compatible with previously built replace-malloc
libraries, but because those libraries wouldn't update the function
table, they would stay disabled.

--HG--
extra : rebase_source : 2518f6ebe76b4c82359e98369de6a5a8c3ca9967
2017-11-22 17:24:29 +09:00
Chris Manchester 1877e49bc4 Bug 1411712 - Move symbol version script flags for arm in mozglue to moz.build. r=mshal
MozReview-Commit-ID: II250cfTmip

--HG--
extra : rebase_source : 70a8764e3bb646c54005fb25dc4343fdc201bade
2017-11-02 11:47:48 -07:00
Chris Manchester f8a3e49e93 Bug 1411712 - Make a new variable for LDFLAGS to be set by Makefile.in that aren't intended to be handled by other backends. r=mshal
These flags are only relevant on OS X, and will not be necessary soon, so this
commit moves them to a separate variable while we move the remainder of the
ldflags to mozbuild.

MozReview-Commit-ID: 1NDgz3HIYpT

--HG--
extra : rebase_source : 6e9b5f5a5be5ff916db89a0b73896b9058eb040e
2017-11-02 11:47:47 -07:00
Martin Stransky 79aef7f85b Bug 1348310 - Use CLOCK_MONOTONIC as a base for nsWindow::GetEventTimeStamp() on Wayland, r=karlt
We assume CLOCK_MONOTONIC as timebase for events on Wayland and use that to translates GDK event times to gecko timestamps.

MozReview-Commit-ID: LWd2KWTQeha

--HG--
extra : rebase_source : 1839d35989b9c29c60dd33d445db79afc75af9ab
2017-10-19 15:28:47 +02:00
Hiroyuki Ikezoe 12c6f62e78 Bug 1379564 - Make BaseTimeDuration::Forever() constexpr. r=birtles
MozReview-Commit-ID: DFse9SD1taP

--HG--
extra : rebase_source : a23d92c8b959c7f680b06c223e266ff1646813b0
2017-07-10 16:21:34 +09:00
Nathan Froyd c04d322a0a Bug 1412405 - fix isnanf symbol lookup by using a LoadedElf for libm; r=glandium
We already dealt with issues around dlsym not resolving weak symbols
with libc in bug 1081034.  This fix applies the same workaround to libm,
which solves the isnanf issue.

The previous fix for looking up __isnanf is no longer needed.
2017-10-28 08:51:23 -04:00
Marco Castelluccio 1c0b2d34a1 Bug 1385542 - Blocklist pghook.dll as it causes crashes. r=jimm
--HG--
extra : rebase_source : e0a8b869388d5772697bf31e900b691534b93e63
2017-10-21 01:15:58 +01:00
Nathan Froyd 936aff29b5 Bug 1412405 - try harder to find a definition for isnanf in the custom linker; r=nalexander
The comment with the accompanying change explains things, but the short
version is that clang generates full calls to isnanf, which our
dlsym-based symbol lookup in the custom linker cannot handle correctly.
We therefore need to do extra work for isnanf to find the correct symbol.
2017-10-27 17:08:20 -04:00
Marco Castelluccio 9264f7616b Bug 1407337 - Block OpenSC < 0.16.0.0. r=jimm
--HG--
extra : rebase_source : 6f2f1d3f7e3219e4d78b36fef92613fb23b77218
extra : histedit_source : fbe1d04b2577caeb7380c505ed53047435194159
2017-10-11 11:45:44 +01:00
Bob Owen 75a8563510 Bug 1410073: Load user32.dll immediately after the DLL Blocklist is in place. r=aklotz
This is to reduce the chance of it being loaded on an injected thread.
2017-10-19 20:49:44 +01:00
Bob Owen 25f5a8b221 Bug 1372823 Part 5: Extend BaseThreadInitThunk thread start address verification to 64-bit. r=dmajor 2017-09-21 09:31:07 +01:00
Marco Castelluccio 0bdfded31a Bug 1360029 - Block Nahimic DLLs affected by a bug which causes Firefox to crash. r=jimm
--HG--
extra : rebase_source : 9d35825a8ce1ecb43f72b95ac7b27c33a834521f
2017-10-12 15:08:04 +01:00
Mike Hommey 9f2dd4775e Bug 1407468 - Replace multiple !JS_STANDALONE with MOZ_WIDGET_TOOLKIT. r=mshal
--HG--
extra : rebase_source : 4f9f9f583c3422ed0f8d1d65ea8e7575bd9baf2c
2017-10-05 14:50:01 +09:00
Honza Bambas 581d528607 Bug 1406386 - Control how TimeStamp works on Windows via and envvar. r=froydnj 2017-10-06 09:16:00 -04:00
Nicholas Nethercote a6fede36c2 Bug 1384814 - Remove critical address machinery from Mac implementation of MozStackWalk(). r=glandium.
It seemingly hasn't been needed since Mac OS 10.7. A diagnostic assertion that
has been in place for a while hasn't caught any uses of it.

--HG--
extra : rebase_source : 9834849eec9174267c7df8de7fd22840ffa36d8f
2017-10-03 13:53:14 +11:00
Sebastian Hengst 15ce5cb2db Backed out changeset 4dab43248f15 (bug 1372823) for crashing GTest on Windows 10 x64 debug. r=backout
MozReview-Commit-ID: 1u7TFtv6Mdv
2017-09-21 17:27:32 +02:00
Bob Owen 6e55dc3260 Bug 1372823: Extend BaseThreadInitThunk thread start address verification to 64-bit. r=dmajor 2017-09-21 09:31:07 +01:00
Mike Hommey 25eda66c1a Bug 1401116 - Remove jemalloc symbols from mozglue.def.in. r=njn
As long as symbols have the right declspec, the linker is going to
export them as expected. The main exception to when we actually need the
exported symbol to have a different name, which is the case for the
symbols normally exported by the CRT. So keep only those renamed symbols
in mozglue.def.in.

Keeping the jemalloc symbols in this file kind of implies that we need
every new API entry points to appear in there when it's not true. This
thus removes an unnecessary moving part when adding new allocator API
entry points.

--HG--
extra : rebase_source : 76faa659d62d46f3624fe3f1df0c09beb68e3549
2017-09-19 16:06:29 +09:00
Mike Hommey 2cb309a670 Bug 1401118 - Avoid having to modify replace-malloc.mk every time we add an allocator API entry point. r=froydnj
For obscure linkage reasons, we need all the replace-malloc symbols
being passed to the linker to tell it to allow them being undefined.

That list actually duplicates what's in malloc_decls.h somehow, and
every time we add an entry point, we end up having to modify those two
files (and others, addressed in different bugs), which is suboptimal.

So we generate the list of those symbols from malloc_decls.h.

--HG--
extra : rebase_source : 50156c6dda5601a6437f94a753400ec4ed9c8343
2017-09-19 16:09:56 +09:00
Christian Holler 75d68dab36 Bug 1386304 - Add and integrate asan-reporter system add-on. r=froydnj
MozReview-Commit-ID: IwE2LzofLz0

--HG--
extra : rebase_source : 49d5f79b0774837aa52c02a120f7c16272be157e
2017-07-31 15:13:38 +02:00
Chris Manchester fab07bc443 Bug 1386876 - Replace all uses of NO_VISIBILITY_FLAGS with a template and remove NO_VISIBILITY_FLAGS. r=glandium
MozReview-Commit-ID: 194U1WMCAM0

--HG--
extra : rebase_source : 365b68b0a1772d238ae9b84966e53dcd1197fd85
2017-05-01 18:12:35 -07:00
Chris Manchester c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Julien Cristau ff7b765b29 Bug 1268470 - Part 3: Restrict klsihk64.dll block to versions < 14.0.457.0 r=jimm
MozReview-Commit-ID: CD7jpcGGr9s

--HG--
extra : rebase_source : 73030b371d05a9a4d46964f54ee12eb1419f1255
2017-09-11 11:58:12 +02:00
Julien Cristau 01dcd5f0dc Bug 1268470 - Part 2: Block klsihk64.dll on Windows 8 r=jimm
MozReview-Commit-ID: B2IrXnr46eP

--HG--
extra : rebase_source : 3c9d8c60faa28f272b36354ceacffba70de94de7
2017-09-08 12:00:56 +02:00
Julien Cristau 18f5425cc8 Bug 1268470 - Part 1: Add BLOCK_WIN8_ONLY flag to dll blocklist r=jimm
MozReview-Commit-ID: 8ZhqDv4YMOn

--HG--
extra : rebase_source : 1a0f708c97eebeca016a053cad820f1dcd0e0129
2017-09-08 11:59:13 +02:00
Wes Kocher eace83acfa Backed out changeset 0c2b838c91e4 (bug 1386304) for eslint failures in asan-reporter/bootstrap.js a=backout
MozReview-Commit-ID: KjA9iDDA2hp
2017-09-07 16:51:48 -07:00
Christian Holler 06f527a679 Bug 1386304 - Add and integrate asan-reporter system add-on. r=froydnj
MozReview-Commit-ID: IwE2LzofLz0

--HG--
extra : rebase_source : bd952047103a990d314667fc73a4cf570f9a2bde
2017-07-31 15:13:38 +02:00
Mike Hommey e77f51a721 Bug 1395776 - Fold replace-malloc into mozjemalloc. r=njn
Add the MPL 2.0 license header per bug 1395449.

--HG--
extra : rebase_source : c85544a178aba7e77b5b8031851b8e16b22a3848
2017-08-31 12:02:01 +09:00
Sebastian Hengst 43bc951ac7 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ES9rKhiQo10
2017-09-01 10:38:51 +02:00
Nicholas Nethercote c419d5fa48 Bug 1389305 (attempt 2) - Add jemalloc_ptr_info() and moz_malloc_enclosing_size_of(). r=glandium.
--HG--
extra : rebase_source : 93a6cfcc916fb239581c2892f24b24c6fc65ac71
2017-09-01 11:52:23 +10:00
Sebastian Hengst 4310ea4600 Backed out changeset f232b5b1a0c7 (bug 1389305) for frequently failing GTest Jemalloc.PtrInfo on Linux opt. r=backout 2017-08-31 13:52:48 +02:00
Nicholas Nethercote 365285b831 Bug 1389305 - Add jemalloc_ptr_info() and moz_malloc_enclosing_size_of(). r=glandium.
jemalloc_ptr_info() gives info about any pointer, such as whether it's within a
live or free allocation, and if so, info about that allocation. It's useful for
debugging.

moz_malloc_enclosing_size_of() uses jemalloc_ptr_info() to measure the size of
an allocation from an interior pointer. It's useful for memory reporting,
especially for Rust code.

--HG--
extra : rebase_source : caa19cccf8c2d1f79cf004fe6a408775de5a7b22
2017-08-24 19:37:27 +10:00
Tom Ritter da549982c3 Bug 1394007 Fix a signedness comparison warning in WindowsDllBlocklist.cpp r=dmajor
MozReview-Commit-ID: 3qH0PU2gBur

--HG--
extra : rebase_source : 6f2b51367462604cf3b6c53ce8a82722d926970d
2017-08-30 00:43:46 -05:00
Tom Ritter 92ff663a31 Bug 1393498 Mark the stub_BaseThreadInitThunk as MOZ_NORETURN to silence a warning about a noreturn function not returning r=dmajor,froydnj
/home/worker/workspace/build/src/mozglue/build/WindowsDllBlocklist.cpp:816:1: error: 'noreturn' function does return [-Werror]

MozReview-Commit-ID: SYgPDW0sMV

--HG--
extra : rebase_source : 27b1dda404b3fc5fab95dd524677387bad921751
2017-08-24 22:49:09 -05:00
Ryan VanderMeulen 2ef4841fe2 Backed out changeset d44d3fae6125 (bug 1393498) for bustage on a CLOSED TREE. 2017-08-24 19:54:02 -04:00
Tom Ritter b76720e4d2 Bug 1393498 Mark the stub_BaseThreadInitThunk as MOZ_NORETURN to silence a warning about a noreturn function not returning r=dmajor
/home/worker/workspace/build/src/mozglue/build/WindowsDllBlocklist.cpp:816:1: error: 'noreturn' function does return [-Werror]

MozReview-Commit-ID: SYgPDW0sMV

--HG--
extra : rebase_source : 1039c3f8669093c9d77a3c30090c76457c8eb6e8
2017-08-24 16:28:32 -05:00
Wes Kocher c14002885a Backed out changeset 0df56be60d07 (bug 1393498) for windows build failures a=backout
MozReview-Commit-ID: 9LrZYhCPjRv
2017-08-24 12:14:31 -07:00
Tom Ritter 21351be91a Bug 1393498 Mark the stub_BaseThreadInitThunk as MOZ_NORETURN to silence a warning about a noreturn function not returning r=dmajor
/home/worker/workspace/build/src/mozglue/build/WindowsDllBlocklist.cpp:816:1: error: 'noreturn' function does return [-Werror]

MozReview-Commit-ID: SYgPDW0sMV

--HG--
extra : rebase_source : d932e84ff0729b1c5ccff6658ee81849eb27eef4
2017-08-24 09:32:04 -05:00
Brian Murray 9cd396d183 Bug 1380204: Improve error handling in XZStream.cpp r=glandium
Report init failure if uncompressed stream size is 0.
Check for overflows when casting.
Verify LZMA stream only has a single block.
Detailed error logging.
MozReview-Commit-ID: DZ4cWGxAzkw

--HG--
extra : rebase_source : da66646c78e7947ffcf2325ad5bd0de9205506bf
2017-07-11 17:45:07 -07:00
Carl Corcoran 5c4000df9d Bug 1361410: Don't hook BaseThreadInitThunk when WRusr.dll is loaded, mitigating a crash; r=dmajor
MozReview-Commit-ID: KqWq2bHT0CE

--HG--
extra : rebase_source : 54292be2efe4d50ec5806c1d066eb34ac97ecf14
2017-08-17 15:05:17 +02:00
Mike Hommey 4aaef7b18a Bug 1395032 - Remove remainder of the VS CRT allocator mismatch hack. r=gps
Bug 1186064 removed most of it when we started requiring VS 2015u2, but
the "frex" function exported through mozglue.def.in was only used
through the MSVCRT being patched by fixcrt.py, which is not done anymore.
So the "frex" export is not used anymore, and so the "dumb_free_thunk"
function is not used anymore as well.

--HG--
extra : rebase_source : 879c469c317c8b6749410a4a476d6c951c9a1d0f
2017-08-30 14:06:13 +09:00
Masatoshi Kimura e34560fbbc Bug 1391696 - Use GetTickCount64 without a GetProcAddress check in Timestamp_windows.cpp. r=froydnj
MozReview-Commit-ID: 7rkorGQKCOw

--HG--
extra : rebase_source : ff797855d7206e2efa9523591f6d57c8319ed984
2017-08-19 03:08:11 +09:00
Nathan Froyd 2fff1c679f Bug 1388807 - fix StackWalk.h documentation; r=keeler
We use C++ constructs in this file, we shouldn't advertise C
compatibility in the comments.
2017-08-11 15:15:31 -04:00
Eric Rahm fe18bf0131 Bug 1386825 - Part 4: Remove remaining instances of MOZ_B2G. r=froydnj
MozReview-Commit-ID: 8r4eMwiZ4Vg
2017-08-08 14:41:09 -07:00
Jim Chen e16afc583e Bug 1384828 - Use tid for UI thread detection; r=esawin
Use the UI thread's tid for checking if we're on the UI thread in Gecko.
This lets us get rid of `GeckoThread.registerUiThread`, in order to
avoid a race where we check for UI thread before `registerUiThread` is
called.

MozReview-Commit-ID: 11gAWgx4UZo
2017-08-03 13:06:16 -04:00
Nicholas Nethercote 406a9ed175 Bug 1384819 (part 3) - Remove the return value from the stack walker functions. r=glandium.
Just one caller (in DMD) actually looks at it, and that's in an unimportant way
-- if the return value was false, mLength would be zero anyway.

--HG--
extra : rebase_source : 0463ab3765744742a9e854964342d631095fa55f
2017-07-27 16:46:55 +10:00
Nicholas Nethercote 8a20eb82d2 Bug 1384819 (part 2) - Tweak FramePointerStackWalk() arguments. r=glandium.
This patch does he following.

- Avoids some unnecessary casting.

- Renames the |bp| parameter as |aBp|.

- Makes the no-op FramePointerStackWalk() signature match the real one.
  (Clearly it's dead code in all built configurations!)

--HG--
extra : rebase_source : 3fe606d1ff9b063294f4028ff884c20661ed9e0a
2017-07-27 16:46:33 +10:00
Nicholas Nethercote 08e54b7c13 Bug 1384819 (part 1) - Split MozStackWalk(). r=glandium.
MozStackWalk() is different on Windows to the other platforms. It has two extra
arguments, which can be used to walk the stack of a different thread.

This patch makes those differences clearer. Instead of having a single function
and forbidding those two arguments on non-Windows, it removes those arguments
from MozStackWalk, and splits off MozStackWalkThread() which retains them. This
also allows those arguments to have more appropriate types (HANDLE instead of
uintptr_t; CONTEXT* instead of than void*) and names (aContext instead of
aPlatformData).

The patch also removes unnecessary reinterpret_casts for the aClosure argument
at a couple of MozStackWalk() callsites.

--HG--
extra : rebase_source : 111ab7d6426d7be921facc2264f6db86c501d127
2017-07-27 12:46:47 +10:00
Nicholas Nethercote 7709e79b50 Bug 1384814 - Add a diagnostic assertion to detect any use of the critical address machinery. r=glandium.
It appears to be unused, but it would be good to have some real-world data to
confirm this. A diagnostic assertion is a better choice for this than a
telemetry problem because stack-walking is such a low-level operation.

--HG--
extra : rebase_source : 1ebb96c5cce1b4a1c7ed09182c095af1b44a0f31
2017-07-27 17:01:09 +10:00
Kartikaya Gupta 37b78eda1b Bug 1384233 - Update documentation for the %I format specifier in Printf.h. r=froydnj
MozReview-Commit-ID: 5bxCGKYrXFI

--HG--
extra : rebase_source : de32c96981abd05f72cd408d9489d2a83adcc1cb
2017-07-26 16:22:58 -04:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Nicholas Nethercote 2a4f265a62 Bug 1381727 (part 2) - Remove SmprintfFree(). r=glandium.
It's just a complex wrapper for free(), or equivalent function. (In practice,
all the uses end up in free().)

--HG--
extra : rebase_source : 247ea8458aa57319bd1c8366115a9b4f39ed5a33
2017-07-25 09:09:25 +10:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Nicholas Nethercote 76360b4793 Bug 1382099 - Remove MOZ_WIDGET_GONK from mozglue/. r=glandium.
--HG--
extra : rebase_source : be872a2272b731523fdad5ee52ffcd40d87729c5
2017-07-19 18:38:54 +10:00
Tom Ritter 0591f401da Bug 1380103 Cast a DWORD (__attribute__((__stdcall__)) *)(void*) to a bare void* to fix a compiler error r=ccorcoran,dmajor
MozReview-Commit-ID: 88e6e2w5Gd1

--HG--
extra : rebase_source : 4011d6d4261c83517d54ea5c4bf08ba54a77fd0c
2017-07-11 14:26:35 -05:00
John Lin c62cf1bde1 Bug 1374556 - use Android-like signal handlers instead of SIG_DFL. r=glandium
For some reason the remote decoder process will crash on some x86/Android M devices when SIGSEGV is handled by SIG_DFL. To avoid this issue and continue suppressing crash dialog, capture the signals with Android like handlers and strip debuggerd related code.

MozReview-Commit-ID: 3diOGc3OInD

--HG--
extra : rebase_source : 42017c10d13c30880f80c81b0d7487bb0d05fd44
2017-07-10 14:44:50 +08:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Mike Hommey ed863255b4 Bug 1378592 - Remove MOZ_REPLACE_MALLOC_LINKAGE. r=froydnj
MOZ_REPLACE_MALLOC_LINKAGE was added back when there were problems with
getting weak references working properly for replace-malloc.

Versions of OSX < 10.6 needed flat namespace, but aren't supported
anymore.

Versions of Xcode < 4.5 required flat namespace + a dummy library in
order to produce proper weak references. There is virtually nobody still
building with such an ancient toolchain.

Keeping those around doesn't /really/ hurt, except recent versions of
Xcode don't expose dyldinfo in /usr/bin, used for the configure test.
Consequently, MOZ_REPLACE_MALLOC_LINKAGE ended up being set to use the
dummy library setup, which, by using flat namespace, now causes harm in
bug 1356701, causing bug 1378332.

--HG--
extra : rebase_source : e3edc1f2cf905943c33fafeb631f2f88fc87167e
2017-07-06 10:26:04 +09:00
Tom Ritter 70e18ce213 Bug 1377605 Cast -1 to DWORD to correctly match the error return value given by SuspendThread r=aklotz
MozReview-Commit-ID: 5XHgkpQJQKY

--HG--
extra : rebase_source : 92d963e3415840eebbe47bf835ec6fb20489d908
2017-07-03 16:07:25 -05:00
David Major 8f2fab9547 Bug 1378442 - Move Win64 profiler hooks to profiler_start. r=mstange 2017-07-05 18:45:31 -04:00
Tom Ritter 2d28a5e8de Bug 1377607 Cast int to unsigned to silence an error about signed vs unsigned comparisons r=froydnj
MozReview-Commit-ID: Op3tiipqcr

--HG--
extra : rebase_source : 5a6e6cf7d13eb5fc83420f373f7c1c445012768b
2017-06-30 19:32:33 -05:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Eugen Sawin b3685a6ef3 Bug 1318247 - [1.0] Add custom refcounting of zips in ZipCollection to allow for thread-safe reuse of zips. r=glandium 2017-06-30 10:47:29 -07:00