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

1174 Коммитов

Автор SHA1 Сообщение Дата
Mike Shal e39a3d6b7c Bug 632954 - Add an explicit __llvm_profile_dump() call for Android; r=snorp
When Android shuts down the ndk process, it doesn't call the registered
atexit() handlers, which is normally where the profile data gets written
to file. Since the PGO test suite closes the browser when it is
finished, the nativeRun routine can manually call out to
__llvm_profile_dump() before returning.

This method has a downside that only the profile data from the calling
library gets written out, rather than for the whole process. Since we
are most interested in optimizing libxul, a new hook is added in
Bootstrap to make sure we get the profile data for the right library.

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

--HG--
extra : source : 0615c775a0cf6e8f98e1c051cd574c0d602a738a
2019-03-18 23:52:31 +00:00
Noemi Erli b61340c4b0 Backed out 12 changesets (bug 632954) for causing Android Bpgo(run) pending jobs CLOSED TREE
Backed out changeset 429c96e4de32 (bug 632954)
Backed out changeset de8beacc5eb4 (bug 632954)
Backed out changeset c151ebf303ca (bug 632954)
Backed out changeset b96dd954a456 (bug 632954)
Backed out changeset 26031d362333 (bug 632954)
Backed out changeset 097f141a499d (bug 632954)
Backed out changeset 6f5fc0d644dd (bug 632954)
Backed out changeset 53d3443e55d9 (bug 632954)
Backed out changeset 503bcac73583 (bug 632954)
Backed out changeset 142ae187478d (bug 632954)
Backed out changeset 0615c775a0cf (bug 632954)
Backed out changeset 3dfc0e4f8e7c (bug 632954)
2019-03-20 11:58:18 +02:00
Mike Shal 14770d9dbf Bug 632954 - Add an explicit __llvm_profile_dump() call for Android; r=snorp
When Android shuts down the ndk process, it doesn't call the registered
atexit() handlers, which is normally where the profile data gets written
to file. Since the PGO test suite closes the browser when it is
finished, the nativeRun routine can manually call out to
__llvm_profile_dump() before returning.

This method has a downside that only the profile data from the calling
library gets written out, rather than for the whole process. Since we
are most interested in optimizing libxul, a new hook is added in
Bootstrap to make sure we get the profile data for the right library.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 23:52:31 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Carl Corcoran d6d1ff2060 Bug 1503538 Part 1/5: Move printf_stderr to a shared header r=aklotz
In the tree we have two copies of printf_stderr() with the comment,
"Ideally this should be shared". This moves the function to a new exported
header which can be the basis for other similar debugging utility functions.

To include it,
#include "mozilla/glue/Debug.h"

A small concern with this is that printf_stderr() is in the global namespace,
and could conflict if it's inadvertently included along with, for example,
nsDebug.h which also defines this function. The warning in the comment at the
top of the file attempts to mitigate this.

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

--HG--
extra : moz-landing-system : lando
2019-03-06 00:51:15 +00:00
Ryan Hunt 1954ab0781 Bug 1523969 part 18 - Move method definition inline comments to new line in mozglue. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D21119

--HG--
extra : rebase_source : 5f5f0457fc136bc9e3c8edb315e4b7e6275ec3c2
2019-02-25 16:10:53 -06:00
Aaron Klotz 7f14366c55 Bug 1529647: Fix a straggling unused variable warning; r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D20856

--HG--
extra : moz-landing-system : lando
2019-02-22 19:28:57 +00:00
Aaron Klotz 28466cb97e Bug 1460433: Part 1 - Change BasicDllServices to not do any dll notification callbacks; r=mhowell
BasicDllServices is used to gain access to the authenticode APIs in non-Gecko
contexts. One feature that WinDllServices provides is the ability to register
a callback interface to be notified when a DLL has been loaded.

This is not particularly useful in the BasicDllServices use case, and in the
"handle a launcher process failure on a background thread" use case, would
actually be harmful.

This patch modifies the DLLServices backend to offer a "basic" option that
omits the callback stuff.

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

--HG--
extra : moz-landing-system : lando
2019-02-20 06:18:45 +00:00
Aaron Klotz 0146031967 Bug 1526016: Get TestDllInterceptor building on aarch64 builds; r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D19447

--HG--
extra : moz-landing-system : lando
2019-02-21 18:42:42 +00:00
Aaron Klotz 67bda80b52 Bug 1526383: Add essential arm64 support to nsWindowsDllInterceptor; r=handyman
This patch doesn't cover all possible functions for which we currently
instantiate interceptors inside Firefox/Gecko. Rather than asserting, we just
fail in those cases (at least until we have full coverage of existing uses).

This is okay, as for the upcoming milestone 2 of aarch64 builds, we are most
concerned with successfully being able to hook the following functions:

ntdll!LdrLoadDll
ntdll!LdrUnloadDll
ntdll!LdrResolveDelayLoadedAPI
user32!GetWindowInfo

So, within that context, the aarch64 implementation is fairly simple:

Each instruction is 4-bytes wide. We iterate down each instruction, and if the
current instruction is *not* PC-relative, we just copy it verbatim. If we
encounter an instruction that *is* PC-relative, we either decode it and
rewrite it inside the trampoline, or we fail. For the purposes of milestone 2,
the only instruction that is essential to decode is ADRP.

In bug 1526016 I modify TestDllInterceptor to exclude functions that are not
yet supported by this patch.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 18:41:17 +00:00
Cosmin Sabou 9f8b29287b Merge mozilla-central to autoland. 2019-02-21 05:43:34 +02:00
Masatoshi Kimura e59e3b3e20 Bug 1528651 - Fix some trivial warnings and re-enable warnings-as-errors on Windows in some directories. r=dmajor
--HG--
extra : source : 5ee9efeda9e67f6af0521be85266703763cc4c50
2019-02-19 20:42:11 +09:00
Gerald Squelart 4fad2ecf62 Bug 1528842 - Disable ASAN checks in FramePointerStackWalk - r=glandium
FramePointerStackWalk can trip ASAN when walking the stack and reading outside
of ASAN-protected objects.

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

--HG--
extra : moz-landing-system : lando
2019-02-20 05:01:12 +00:00
Masatoshi Kimura e25fbce870 Bug 1528651 - Re-enable warnings-as-errors on Windows in some directories. r=dmajor
--HG--
extra : source : ba86ea25070b37f4725834e1c2d9ec4c0783e119
2019-02-17 15:03:02 +09:00
Markus Stange 0b151b8c2b Bug 1500692 - Centralize profiling category definition and add infrastructure for subcategories. r=njn
The actual subcategories will be added in later patches, so that there are no
unused categories.

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

--HG--
extra : moz-landing-system : lando
2019-02-16 17:37:43 +00:00
Mike Hommey 2980c6fe0b Bug 1512504 - Remove now unused CFG test. r=tjr
Depends on D19615

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

--HG--
extra : moz-landing-system : lando
2019-02-14 18:56:29 +00:00
Mike Hommey ef3ad686ee Bug 1512504 - Remove support for MSVC. r=froydnj
Consequently, this removes:
- MOZ_LIBPRIO, which is now always enabled.
- non_msvc_compiler, which is now always true.
- The cl.py wrapper, since it's not used anymore.
- CL_INCLUDES_PREFIX, which was only used for the cl.py wrapper.
- NONASCII, which was only there to ensure CL_INCLUDES_PREFIX still
  worked in non-ASCII cases.

This however keeps a large part of detecting and configuring for MSVC,
because we still do need it for at least headers, libraries, and midl.

Depends on D19614

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

--HG--
extra : moz-landing-system : lando
2019-02-14 21:45:27 +00:00
Aaron Klotz 84c01f8930 Bug 1400344: Rename mscom::MainThreadRuntime to mscom::ProcessRuntime and make it aware of Win32k lockdown and of multiple instantiations; r=Jamie
This patch takes care of a bunch of issues and does some cleanup:

* We rename mscom::MainThreadRuntime to mscom::ProcessRuntime, as the latter
  is a more accurate name going forward.
* We make ProcessRuntime aware of the Win32k Lockdown process mitigation
  policy. When Win32k is disabled, we perform process-wide COM initialization
  in the multi-threaded apartment (since we cannot create an STA window).
* We refactor the mscom apartment region stuff to enable the Win32k lockdown
  pieces in ProcessRuntime.
* We move some Gecko-specific stuff into MOZILLA_INTERNAL_API guards so that
  ProcessRuntime is usable outside of xul.dll (I will be needing it for the
  launcher process).
* Another thing that might happen with the launcher process is that, under
  error conditions in the launcher, we create a ProcessRuntime object on a
  background thread for the purposes of telemetry logging, but we also allow
  the main thread to proceed to start as the browser. This could result in a
  scenario where the main thread, as the browser process, is attempting to
  instantiate its ProcessRuntime and ends up racing with the launcher process's
  telemetry thread which has its own ProcessRuntime. To account for this
  situation, we add mutual exclusion to the process-wide initialization code.
  We host this part inside mozglue since that state is shared between both
  firefox.exe and xul.dll.
* We clean up ProcessRuntime::InitializeSecurity by using Vector to set up
  the EXPLICIT_ACCESS entries.
* We remove mscom::MainThreadClientInfo and replace it with a direct call to
  CoGetCallerTID
* We revise all references to this class to use the new name.

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

--HG--
rename : ipc/mscom/COMApartmentRegion.h => ipc/mscom/ApartmentRegion.h
rename : ipc/mscom/MainThreadRuntime.cpp => ipc/mscom/ProcessRuntime.cpp
rename : ipc/mscom/MainThreadRuntime.h => ipc/mscom/ProcessRuntime.h
extra : moz-landing-system : lando
2019-02-14 18:56:20 +00:00
Dorel Luca 67115dd61b Backed out changeset 2d4b8d90cbd7 (bug 1400344) for Spider monkey failrues. CLOSED TREE
--HG--
rename : ipc/mscom/ApartmentRegion.h => ipc/mscom/COMApartmentRegion.h
rename : ipc/mscom/ProcessRuntime.cpp => ipc/mscom/MainThreadRuntime.cpp
rename : ipc/mscom/ProcessRuntime.h => ipc/mscom/MainThreadRuntime.h
2019-02-14 20:45:26 +02:00
Aaron Klotz 0cb12a123a Bug 1400344: Rename mscom::MainThreadRuntime to mscom::ProcessRuntime and make it aware of Win32k lockdown and of multiple instantiations; r=Jamie
This patch takes care of a bunch of issues and does some cleanup:

* We rename mscom::MainThreadRuntime to mscom::ProcessRuntime, as the latter
  is a more accurate name going forward.
* We make ProcessRuntime aware of the Win32k Lockdown process mitigation
  policy. When Win32k is disabled, we perform process-wide COM initialization
  in the multi-threaded apartment (since we cannot create an STA window).
* We refactor the mscom apartment region stuff to enable the Win32k lockdown
  pieces in ProcessRuntime.
* We move some Gecko-specific stuff into MOZILLA_INTERNAL_API guards so that
  ProcessRuntime is usable outside of xul.dll (I will be needing it for the
  launcher process).
* Another thing that might happen with the launcher process is that, under
  error conditions in the launcher, we create a ProcessRuntime object on a
  background thread for the purposes of telemetry logging, but we also allow
  the main thread to proceed to start as the browser. This could result in a
  scenario where the main thread, as the browser process, is attempting to
  instantiate its ProcessRuntime and ends up racing with the launcher process's
  telemetry thread which has its own ProcessRuntime. To account for this
  situation, we add mutual exclusion to the process-wide initialization code.
  We host this part inside mozglue since that state is shared between both
  firefox.exe and xul.dll.
* We clean up ProcessRuntime::InitializeSecurity by using Vector to set up
  the EXPLICIT_ACCESS entries.
* We remove mscom::MainThreadClientInfo and replace it with a direct call to
  CoGetCallerTID
* We revise all references to this class to use the new name.

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

--HG--
rename : ipc/mscom/COMApartmentRegion.h => ipc/mscom/ApartmentRegion.h
rename : ipc/mscom/MainThreadRuntime.cpp => ipc/mscom/ProcessRuntime.cpp
rename : ipc/mscom/MainThreadRuntime.h => ipc/mscom/ProcessRuntime.h
extra : moz-landing-system : lando
2019-02-14 16:40:58 +00:00
Eric Rahm e75dbf47de Bug 1520962 - Update stackwalking bounds check to avoid aStackEnd. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D19210

--HG--
extra : moz-landing-system : lando
2019-02-08 20:22:21 +00:00
Tom Ritter dba455e2b4 Bug 1525644 - Remove MSVC-enabled CFG flags r=dmajor
We no longer ship or support MSVC builds. This is just taking up space.
2019-02-06 11:44:56 -06:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
David Major b141aa3e7b Bug 1520880: Silence an unused variable warning in the stubbed-out ARM64 interceptor. r=aklotz 2019-01-17 21:59:06 -05:00
Gabriele Svelto a27ca2c584 Bug 1516983 - Add the FRAPS .dll to the blocklist r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D15524

--HG--
extra : moz-landing-system : lando
2019-01-16 19:33:45 +00:00
Carl Corcoran 63ba2c68d7 Bug 1518490 Part 1/3: Measure DLL load timings and pass into UntrustedModulesManager r=aklotz
This patch measures the duration of module loads and passes it up to
UntrustedModulesManager where, in later patches, it will be consumed by
telemetry.

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

--HG--
extra : moz-landing-system : lando
2019-01-15 10:49:36 +00:00
Chris Martin 31a8e2ccae Bug 1508312 - Add assert to catch accidental re-enter of Slim RW lock r=ccorcoran,aklotz
WindowsDllBlocklist installs a callback function that fires whenever a DLL
is loaded. The installer function shares an SRWLock with the callback
function.

SRWLock is not re-entrant, so if the installer function accidently causes a
DLL load before releasing the lock, the callback function will deadlock.

This occured trying to solve Bug 1402282, where the installer function used
"new" to allocate memory, which called the Win32 "RtlGenRandom()" function,
which loaded bcrypt.dll, which caused the callback to fire off, which tried
to lock the mutex that was already locked by the installer function.

Hopefully this will save another developer lots of debug time in the future by
turning a difficult-to-debug deadlock into a nice, loud assertion.

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

--HG--
extra : moz-landing-system : lando
2019-01-16 01:21:16 +00:00
Aaron Klotz 99ef8003dd Bug 1511078: Add LauncherRegistryInfo as a temporary mechanism for runtime disabling of launcher process; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D15756

--HG--
rename : browser/app/winlauncher/NativeNt.h => mozglue/misc/NativeNt.h
rename : browser/app/winlauncher/test/TestNativeNt.cpp => mozglue/tests/TestNativeNt.cpp
rename : browser/app/winlauncher/LauncherResult.h => toolkit/xre/LauncherResult.h
extra : moz-landing-system : lando
2019-01-15 23:10:00 +00:00
Coroiu Cristina d263400b1c Backed out 2 changesets (bug 1511078) for build bustages at Unified_cpp_toolkit_xre0.obj
Backed out changeset 61a47d6d5e26 (bug 1511078)
Backed out changeset 006df494925a (bug 1511078)

--HG--
rename : toolkit/xre/LauncherResult.h => browser/app/winlauncher/LauncherResult.h
rename : mozglue/misc/NativeNt.h => browser/app/winlauncher/NativeNt.h
rename : mozglue/tests/TestNativeNt.cpp => browser/app/winlauncher/test/TestNativeNt.cpp
2019-01-15 23:15:50 +02:00
Aaron Klotz 3171e2da60 Bug 1511078: Follow-up - fix mingw build failures for TestNativeNt; r=bustage 2019-01-15 13:39:49 -07:00
Aaron Klotz 64310051e7 Bug 1511078: Add LauncherRegistryInfo as a temporary mechanism for runtime disabling of launcher process; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D15756

--HG--
rename : browser/app/winlauncher/NativeNt.h => mozglue/misc/NativeNt.h
rename : browser/app/winlauncher/test/TestNativeNt.cpp => mozglue/tests/TestNativeNt.cpp
rename : browser/app/winlauncher/LauncherResult.h => toolkit/xre/LauncherResult.h
extra : moz-landing-system : lando
2019-01-15 20:19:46 +00:00
Mike Hommey 106cde5e98 Bug 1519744 - Remove MOZ_GLUE_WRAP_LDFLAGS. r=dmajor
It's been unused since NUWA was removed in bug 1284674.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 16:58:34 +00:00
Jacek Caban 10da17814d Bug 1515982 - Don't use RT_MANIFEST in mozglue.rc file. r=froydnj
It's a define that needs winuser.rh to be included.

MozReview-Commit-ID: LPfJOwnNm6V

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

--HG--
extra : moz-landing-system : lando
2019-01-12 06:44:11 +00:00
shindli eae80bd903 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-09 23:45:39 +02:00
Tom Tromey 18e18bcdb3 Bug 1517433 - do not assert on over-long float printf; r=froydnj
mozilla::PrintfTarget::cvt_f release asserts that the desired printf
fit into a statically-sized buffer.  However, this may not be the case
if the user requested a larger width or precision.  Handle this
unusual case by allocating a temporary buffer.

MozReview-Commit-ID: 2WicecHDzDR

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

--HG--
extra : moz-landing-system : lando
2019-01-09 15:50:27 +00:00
Nathan Froyd 42bd2abf83 Bug 1062533 - part 4 - expose a tryLock method for PlatformMutex; r=mccr8
Chromium IPC locks have this and the API gets used, so we need to expose
it ourselves if we're going to use our locks in place of the Chromium
IPC locks.  This patch changes the mozglue parts; tweaking the xpcom
parts is the next patch.
2019-01-09 11:09:24 -04:00
David Parks a19f3aae29 Bug 1505482: Allow DLL patcher to resolve some backward short JMPs (r=aklotz)
In Windows 7 x64, GetFileAttributesW begins with a short, backwards jump that can't safely be converted by the interceptor.  Additionally, the function doesn't have enough NOP space after the JMP for the trampoline.  However, the target of the short JMP is a long JMP, followed by plenty of NOP space.  This patch moves the trampoline location from the first JMP to the second.

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

--HG--
extra : moz-landing-system : lando
2018-12-26 17:28:37 +00:00
Carl Corcoran b2b3ea7d03 Bug 1513176: Prevent mozglue.dll from appearing erroneously in the untrusted modules ping;r=aklotz
Nightly is reporting mozglue.dll as being untrusted in the untrusted modules
ping. Until now, xpcshell tests hard-code mozglue to appear as untrusted in
order to cover certain code paths related to startup modules.

This patch:
1. Checks explicitly for the xpcshell environment and only applies this logic
   during xpcshell tests.
2. Uses a purpose-build DLL, "untrusted-startup-test-dll.dll", instead of
   mozglue. This is more explicit and doesn't interfere with any "true"
   processing of mozglue.

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

--HG--
extra : moz-landing-system : lando
2018-12-24 21:04:13 +00:00
Mike Hommey e8843c3a0b Bug 1513088 - Switch aarch64-windows MozStackWalk code to RtlVirtualUnwind. r=froydnj
As far as my stepping through WalkStackMain64 goes, it seems StackWalk64
doesn't work, even with more information added to the frame data it's
given.

Switching to the same code as for x86-64, however, works, albeit
skipping too many frames, but all platforms are actually skipping too
many frames, so let's ignore that for now and leave it to bug 1515229.

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

--HG--
extra : moz-landing-system : lando
2018-12-19 20:14:17 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari 490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Honza Bambas 743553b81f Bug 1487778 - Protect QueryPerformanceCounter against going backward, r=froydnj 2018-11-26 03:08:00 +02:00
James Willcox 992335e0bf Bug 1486524 - Don't use XZ compression for libs on Android r=glandium,nalexander
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.

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

--HG--
extra : moz-landing-system : lando
2018-11-23 20:31:57 +00:00
Aaron Klotz 83877256da Bug 1495512: Part 2 - Add test for 10-byte DLL interception; r=handyman
Added a test to TestCrossProcessInterceptor that forcibly uses a 10-byte patch
on NtMapViewOfSection (which is a realistic case) and then ensures that
disabling the hook also works.

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

--HG--
extra : moz-landing-system : lando
2018-11-23 05:57:01 +00:00
Aaron Klotz b1df9cbd91 Bug 1495512: Part 1 - DLL Interceptor - Add capability to do 10-byte detour patches against ntdll; r=handyman
This patch adds support on x64 for 10-byte detour patches in certain cases.
In particular, the reserved region of trampoline memory must be allocated
within the bottommost 2GB of the address space.

This feature is currently only activated when detouring functions exported by
ntdll.dll.

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

--HG--
extra : moz-landing-system : lando
2018-11-23 05:56:42 +00:00
Cosmin Sabou 49e2a3a0cf Backed out changeset 1e076b0054cc (bug 1486524) for toolchains gradle bustages. CLOSED TREE 2018-11-21 18:01:10 +02:00
James Willcox 976e18d241 Bug 1486524 - Don't use XZ compression for libs on Android r=glandium,nalexander
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.

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

--HG--
extra : moz-landing-system : lando
2018-11-21 15:21:59 +00:00
Andreea Pavel 9351d666e7 Backed out changeset 2bc6db0a2574 (bug 1486524) android raptor failures ona CLOSED TREE 2018-11-14 23:04:59 +02:00
James Willcox b97296cf79 Bug 1486524 - Don't use XZ compression for libs on Android r=glandium,nalexander
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 17:48:58 +00:00
Bogdan Tara 0f6f614304 Backed out 2 changesets (bug 1495512) for Windows build bustages CLOSED TREE
Backed out changeset 0cd30c3d9b30 (bug 1495512)
Backed out changeset 7ae82cae37d9 (bug 1495512)
2018-11-14 05:09:12 +02:00
Aaron Klotz d318ffbb7a Bug 1495512: Part 2 - Add test for 10-byte DLL interception; r=handyman
Added a test to TestCrossProcessInterceptor that forcibly uses a 10-byte patch
on NtMapViewOfSection (which is a realistic case) and then ensures that
disabling the hook also works.

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

--HG--
extra : moz-landing-system : lando
2018-11-13 19:51:21 +00:00
Aaron Klotz c29e536879 Bug 1495512: Part 1 - DLL Interceptor - Add capability to do 10-byte detour patches against ntdll; r=handyman
This patch adds support on x64 for 10-byte detour patches in certain cases.
In particular, the reserved region of trampoline memory must be allocated
within the bottommost 2GB of the address space.

This feature is currently only activated when detouring functions exported by
ntdll.dll.

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

--HG--
extra : moz-landing-system : lando
2018-11-13 19:48:58 +00:00
Andreea Pavel 7cb075753d Backed out 2 changesets (bug 1495512) for failing Win MinGW builds
Backed out changeset 78154ca1e2ac (bug 1495512)
Backed out changeset 17212e7dfe29 (bug 1495512)
2018-11-10 04:06:10 +02:00
Aaron Klotz 6e620ffbcc Bug 1495512: Part 2 - Add test for 10-byte DLL interception; r=handyman
Added a test to TestCrossProcessInterceptor that forcibly uses a 10-byte patch
on NtMapViewOfSection (which is a realistic case) and then ensures that
disabling the hook also works.

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

--HG--
extra : moz-landing-system : lando
2018-11-10 00:50:23 +00:00
Aaron Klotz 29006b00c1 Bug 1495512: Part 1 - DLL Interceptor - Add capability to do 10-byte detour patches against ntdll; r=handyman
This patch adds support on x64 for 10-byte detour patches in certain cases.
In particular, the reserved region of trampoline memory must be allocated
within the bottommost 2GB of the address space.

This feature is currently only activated when detouring functions exported by
ntdll.dll.

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

--HG--
extra : moz-landing-system : lando
2018-11-10 00:49:57 +00:00
Markus Stange ab700f9fc0 Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:31:02 +00:00
Brindusan Cristian ab89743379 Backed out 9 changesets (bug 1499507) for build bustages on /profiler/core/platform.cpp. CLOSED TREE
Backed out changeset 4c79a5557d7b (bug 1499507)
Backed out changeset 35d05a53e0a9 (bug 1499507)
Backed out changeset 9254e6c721b3 (bug 1499507)
Backed out changeset cf40b044af3f (bug 1499507)
Backed out changeset 76dd85b9aaf7 (bug 1499507)
Backed out changeset 6256446f16c4 (bug 1499507)
Backed out changeset 41cede6bc7d2 (bug 1499507)
Backed out changeset 30476b824eb4 (bug 1499507)
Backed out changeset 24a9494155fe (bug 1499507)
2018-11-05 23:24:49 +02:00
Markus Stange 4c59aa793c Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

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

--HG--
extra : moz-landing-system : lando
2018-11-05 20:55:10 +00:00
Narcis Beleuzu 2c6edfdde8 Backed out 9 changesets (bug 1499507) for bustages on ProfileBuffer.cpp . CLOSED TREE
Backed out changeset 541186291b88 (bug 1499507)
Backed out changeset 8a3f4acbad3b (bug 1499507)
Backed out changeset f427afc392b0 (bug 1499507)
Backed out changeset 58dc19fb2b76 (bug 1499507)
Backed out changeset 9225e9aea377 (bug 1499507)
Backed out changeset ca23a517da63 (bug 1499507)
Backed out changeset 16d6c90333de (bug 1499507)
Backed out changeset bc134fe1722a (bug 1499507)
Backed out changeset 4a9c9a91182c (bug 1499507)
2018-11-05 21:48:11 +02:00
Markus Stange 000dc83f31 Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

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

--HG--
extra : moz-landing-system : lando
2018-11-05 19:07:45 +00:00
Carl Corcoran 13f66b51b6 Bug 1435827 part 1/9: Send DLL load event info to xul;r=aklotz
We now record DLL load events along with stack trace and other data so we can
later determine trustworthiness and report the DLL via telemetry.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 08:01:52 +00:00
Tom Ritter 2e4e7ddd81 Bug 1432429 - Point the JS Runtimes at TimeStamp for the current time. r=jandem
This patch adds a new static member to the TimeStamp class to store the
current locked *time* (in ms since the epoch) in addition to the current locked
timestamp.

We point the JS Engine at this value if Fuzzyfox is enabled.
2018-10-26 13:28:51 -05:00
Tom Ritter 61ca4f10d9 Bug 1432429 - Integrate FuzzyFox into the TimeStamp class. r=baku,froydnj
Creates GetFuzzyfoxEnabled() functions that check a static boolean.
Exposes SetFuzzyfoxEnabled() because we cannot depend on Pref
Observation code inside the TimeStamp class.

TimeStamp::Now will now return a Fuzzy value.

We add a NowReally function to support obtaining the real timestamp.

We also add a UsedCanonicalNow to expose whether the TimeStamp was real or fuzzy.
2018-10-09 12:05:25 -05:00
Tom Ritter b83b9c5b11 Bug 1432429 - Add FuzzyFox class and prefs. r=baku,froydnj
Creates a FuzzyFox class for implementating the core of the step/sleep
algorithm. Starts it in nsLayoutStatics::Initialize()

Adds the fuzzyfox prefs.

Moves the ms2mt macros from TimeStamp_windows.cpp to TimeStamp_windows.h
and creates a new public function GetQueryPerformanceFrequencyPerSec() to
expose a static variable in the .cpp file. This is necessary to support
the macros being usable anywhere.  (And we use the macros in FuzzyFox.)
2018-09-18 13:05:26 -05:00
Jeff Gilbert 02e6ff5ccb Bug 1499587 - Fix win64 clang-cl -Wwritable-strings. r=ted
Differential Revision: https://phabricator.services.mozilla.com/D9031

--HG--
extra : moz-landing-system : lando
2018-10-25 14:16:27 +00:00
Masatoshi Kimura f38cdcfbf1 Bug 1496179 - Make mozglue.dll a private SxS assembly. r=aklotz,froydnj
SxS assemblies do not obey the usual DLL search order. It will make it possible
to load mozglue.dll from appdir even if the PreferSystem32Images mitigation is
enabled and System32 has a random mozglue.dll.
2018-10-10 22:57:53 +09:00
David Major 46eec958f3 Bug 1496173 - More aarch64 interceptor fixups. r=mhowell 2018-10-03 17:01:05 -04:00
shindli 14c2437eec Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-27 00:57:23 +03:00
Gabriele Svelto 1f10595529 Bug 1490240 - Fix the remaining compiler warnings in the crash reporter r=ted,glandium
Differential Revision: https://phabricator.services.mozilla.com/D5741

--HG--
extra : moz-landing-system : lando
2018-09-26 11:54:34 +00:00
Brindusan Cristian f997140c00 Backed out changeset 628ebca30ce3 (bug 1490240) for bustages on [Unified_cpp_crashreporter0.obj]. CLOSED TREE 2018-09-24 17:10:58 +03:00
Gabriele Svelto a47a091a6d Bug 1490240 - Fix the remaining compiler warnings in the crash reporter r=ted,glandium
Differential Revision: https://phabricator.services.mozilla.com/D5741

--HG--
extra : moz-landing-system : lando
2018-09-24 13:21:38 +00:00
arthur.iakab 12be75264f Backed out changeset 5a566d2d6722 (bug 1490240)for build bustages on Unified_cpp_crashreporter0.obj CLOSED TREE 2018-09-21 15:25:15 +03:00
Gabriele Svelto 37759d8ccd Bug 1490240 - Fix the remaining compiler warnings in the crash reporter r=ted,glandium
Differential Revision: https://phabricator.services.mozilla.com/D5741

--HG--
extra : moz-landing-system : lando
2018-09-21 11:38:04 +00:00
Aaron Klotz 98d8754140 Bug 1492865: Test NTSTATUS code to determine whether DLL load actually succeeded; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D6434

--HG--
extra : moz-landing-system : lando
2018-09-20 21:58:04 +00:00
Carl Corcoran 2ba0b97140 Bug 1489092: Handle return value of append() to suppress warnings;r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D5139

--HG--
extra : moz-landing-system : lando
2018-09-18 18:59:54 +00:00
arthur.iakab 1ee75a928a Merge inbound to mozilla-central a=merge 2018-09-19 05:18:50 +03:00
Ted Mielczarek de99592416 Bug 1399870 - make DEFFILE a Path instead of a string; r=gps
All but one of the current uses of DEFFILE use `SRCDIR + '/file.def'` to
get a srcdir-relative path anyway, and the other one wants an
objdir-relative path, so using Path makes everything clearer.

This makes it more straightforward to translate the paths for the WSL
build.
2018-09-18 15:50:19 -04:00
Carl Corcoran b29044d236 Bug 1491783: Allow file delete and write during VerifySignature;r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D6014

--HG--
extra : moz-landing-system : lando
2018-09-17 20:51:43 +00:00
philipp beae23b892 Bug 1465787 - Add old versions of nviewh64.dll to the dll blocklist. r=marco 2018-09-18 19:01:10 +03:00
Honza Bambas 9a6441ab15 Bug 1487778 - Sentinel QueryPerformanceCounter results for monotonicity even when TSC is reported stable via CPU features, r=froydnj 2018-09-18 03:49:00 +03:00
Thomas P. ac7fc2f5a6 Bug 1474488: add --enable-undefined-sanitizer with custom checks r=froydnj 2018-09-11 02:47:23 +00:00
Jim Chen d92debaff7 Bug 1480834 - 3. Fix linker compile errors under x86-64; r=glandium
The linker has x86-64 support but currently fails to compile. This patch
fixes these compile errors to make it build under x86-64.

Differential Revision: https://phabricator.services.mozilla.com/D4481
2018-09-13 12:09:25 -04:00
Tom Ritter 3fec4a70cd Bug 1490725 Add this-> to some interceptor code to fix the MinGW x86 build r=aklotz
Related to Bug 1480457

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

--HG--
extra : moz-landing-system : lando
2018-09-12 18:24:20 +00:00
Carl Corcoran b174116dd2 Bug 1490624: Correcting incorrect captitalization of windows.h r=bustage-fix
--HG--
extra : rebase_source : 086899a6cb5817abeff2bef94de57f7a16981f1e
2018-09-12 12:14:10 +02:00
Carl Corcoran 7db61ed776 Bug 1473103: Add unit tests for DLL blocklist integrity; r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D2219

--HG--
extra : moz-landing-system : lando
2018-09-10 22:01:10 +00:00
Nathan Froyd 6d14711d3f Bug 1494392 - fix thinkos in the aarch64 windows interceptor code; r=aklotz 2018-09-26 15:36:51 -04:00
Tom Ritter 74b5d87cd9 Bug 1480457 - Address moz.build failures for mingw-clang r=aklotz
--HG--
extra : amend_source : 61f7bfdd7b827d6fd12c16c8ed7cd3c00f5bf09e
2018-08-30 23:17:15 +03:00
Tom Ritter 45e0e41278 Bug 1480457 Address template parameter shadowing r=aklotz
This code throws an error in clang on the inner MMPolicy:
error: declaration of 'MMPolicy' shadows template parameter

Notethat the template parameter is declared earlier at the
class definition of ReadOnlyTargetFunction

MozReview-Commit-ID: buLE9d22YS

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

--HG--
extra : moz-landing-system : lando
2018-08-30 12:08:26 +00:00
Carl Corcoran 7da8e04c87 Bug 1467736: Add support for DllBlocklist_Shutdown;r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D4544

--HG--
extra : moz-landing-system : lando
2018-08-29 18:49:49 +00:00
Nathan Froyd 62ef49df4d Bug 1486898 - make WindowsCFGStatus test work with aarch64 windows; r=glandium 2018-08-28 20:40:36 -04:00
Nathan Froyd 0b8d2e01f3 Bug 1485701 - make the interceptor code compilable, if not functional, on aarch64 windows; r=aklotz 2018-08-28 09:27:57 -04:00
Nathan Froyd 7d55fef8da Bug 1486040 - make WindowsDllBlocklist.h functional for aarch64 windows; r=aklotz 2018-08-28 09:27:57 -04:00
Nathan Froyd b8909530ab Bug 1485716 - part 2 - add aarch64 windows support to the stack walking code; r=aklotz
This code is untested and has been cargo-culted a little bit from the
existing x86 code, but should work OK; all the code in Windows is
compiled with frame pointers, we're compiled with frame pointers after
the previous patch, and so the frame pointer unwinding path makes the
most sense.
2018-08-23 16:48:53 -04:00
Nathan Froyd 8c484e785c Bug 1480595 - make TimeStamp compilable for AArch64 Windows; r=glandium
We don't have to check whether AArch64 systems have a stable counter;
they are all specified to do so in the architecture reference manual.
2018-08-23 12:54:29 -04:00
Aaron Klotz fff6fb1ff1 Bug 1485487: Add an assertion to ensure that DllServices::GetBinaryOrgName is not called on the Gecko main thread; r=mhowell
--HG--
extra : rebase_source : 51e91fd9fcac54decd083bd0943d4af9bcbd539e
2018-08-22 15:23:04 -06:00
Gabriele Svelto 15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Mike Hommey 6d197a0707 Bug 1481719 - Disable profile-instr-out-of-date warnings explicitly rather than allowing all warnings where they appear. r=dmajor 2018-08-09 06:07:33 +09:00
Masatoshi Kimura 2a18be87fb Bug 1481433 - ifdef-out the entire TestDLLEject.cpp. r=froydnj
--HG--
extra : rebase_source : 3fe4e30beae5ea7e2ee17b7e3b47c189a1c31b4e
2018-08-08 03:24:46 +09:00