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

1103 Коммитов

Автор SHA1 Сообщение Дата
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