Commit Graph

1186 Commits

Author SHA1 Message Date
Bogdan Tara
47274faae8 Backed out 12 changesets (bug 1492121) for platform.cpp and TestBaseProfiler.cpp related bustages CLOSED TREE
Backed out changeset 9d768006784a (bug 1492121)
Backed out changeset 1bf52d547eb7 (bug 1492121)
Backed out changeset da72675c0d37 (bug 1492121)
Backed out changeset bdf3b865c947 (bug 1492121)
Backed out changeset 0c6cf7bc131f (bug 1492121)
Backed out changeset 0cddbdfdfae2 (bug 1492121)
Backed out changeset ac8da816859d (bug 1492121)
Backed out changeset 3800ef0a0e37 (bug 1492121)
Backed out changeset 5f30af0d0f63 (bug 1492121)
Backed out changeset de1c3ae8df14 (bug 1492121)
Backed out changeset 0689c1b8f4f7 (bug 1492121)
Backed out changeset 5e7817b385fc (bug 1492121)
2019-06-04 12:08:39 +03:00
Gerald Squelart
fab9b786ac Bug 1492121 - Use BaseProfiler in nsBrowserApp.cpp's main() - r=njn
Start using BaseProfiler in Firefox main(), before&after XPCOM runs.

Also added a BaseProfiler label around Gecko Profiler init/shutdown (so that
samples may be ignored if user is only interested in non-XPCOM profiling).

Main process name changed to "Main Thread (Base Profiler)", so as not to confuse
the front-end, and show where this thread comes from.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:55:46 +00:00
Gerald Squelart
78897828c9 Bug 1492121 - Gecko Profiler integrates BaseProfiler startup profiled threads - r=njn
If MOZ_BASE_PROFILER_STARTUP and MOZ_PROFILER_STARTUP are set, this will integrate
a pre-XPCOM startup profile into the main profile.
It is stored as separate threads (in a single JSON string that is moved around),
which will appear as a new track under the main process.

Only adding threads from BaseProfiler means a better integration with Gecko
Profiler profiles, and is more efficient: Less code, and a smaller memory
footprint.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:55:37 +00:00
Gerald Squelart
d0e93db004 Bug 1492121 - Run BaseProfiler's InitializeWin64ProfilerHooks once from either profiler - r=njn
Running identical (but separate) InitializeWin64ProfilerHooks in both profilers
confuses the DLL interceptor and the 2nd one crashes because of unexpected
opcodes introduced by the 1st one.
If MOZ_BASE_PROFILER is defined, Gecko Profiler will use that implementation of
InitializeWin64ProfilerHooks instead of its own; and that code also has a guard
so that it effectively only run once even if called from both profilers.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:55:30 +00:00
Gerald Squelart
f76f4b33ab Bug 1492121 - Enclosing BaseProfiler in namespace mozilla::baseprofiler - r=njn
This prevents potential name clashes between the two profilers.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:55:26 +00:00
Gerald Squelart
83c59735be Bug 1492121 - Added "BASE" to all public macros - r=njn
E.g., AUTO_PROFILER_INIT -> AUTO_BASE_PROFILER_INIT.
This will allow #including BaseProfiler.h anywhere as needed, without clashing
with Gecko Profiler macros.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:55:22 +00:00
Gerald Squelart
ebef0090cf Bug 1492121 - Rename env-vars MOZ_PROFILER_* to MOZ_BASE_PROFILER_* - r=njn
Notice the extra 'BASE' in the env-var names.
This is to control BaseProfiler separately from the Gecko Profiler.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:53:56 +00:00
Gerald Squelart
4c1ca7ec33 Bug 1492121 - Enable Base Profiler by default on Linux and Mac - r=njn
Android not implemented yet.
Windows not working yet when packaged, so disabled by default, but may be
enabled locally by uncommenting `#define MOZ_BASE_PROFILER` where indicated in
BaseProfiler.h.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:53:36 +00:00
Gerald Squelart
b12d32ba33 Bug 1492121 - TestBaseProfiler - r=njn
Simple test program that exercises the most important APIs of BaseProfiler.
(Including checking that macros work even when BaseProfiler is not enabled.)

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:53:21 +00:00
Gerald Squelart
10e7d3bf93 Bug 1492121 - All necessary changes to make baseprofiler build - r=njn
Almost-mechanical changes include:
- Removed unneeded/incompatible #includes and functions (any JS- or XPCOM-
  dependent).
- Use std::string for strings and nsIDs.
- Use thin wrappers around mozilla::detail::MutexImpl for mutexes.
- Use hand-rolled AddRef&Release's for ref-counted classes -- could not use
  mfbt/RefCounted.h because of bug 1536656.
- Added some platform-specific polyfills, e.g.: MicrosecondsSince1970().
- Only record the main thread by default.
- Logging controlled by env-vars MOZ_BASE_PROFILER_{,DEBUG_,VERBOSE_}LOGGING.

This now builds (with --enable-base-profiler), but is not usable yet.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:53:01 +00:00
Gerald Squelart
494369648d Bug 1492121 - MOZ_BASE_PROFILER may be defined in BaseProfiler.h to enable Base Profiler - r=njn
Added baseprofiler to mozglue/moz.build, so it will be built.
However all cpp files are dependent on `MOZ_BASE_PROFILER`, which is currently
not #defined by default (in public/BaseProfiler.h).

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

--HG--
extra : moz-landing-system : lando
2019-06-04 06:52:41 +00:00
Gerald Squelart
38eb2d609e Bug 1492121 - Copy most of Gecko Profiler code to mozglue/baseprofiler - r=njn
Almost-straight copy of a subset of files from tools/profiler to
mozglue/baseprofiler.
Some minor changes first:
- Reduced moz.build to only mention actually-copied files.
- Headers in 'public' prefixed with "Base" (to distinguish them from their
  originals, in case they later get #included from the same units).
- Also copied profiling categories from js/src/vm/GeckoProfiler.cpp to
  ProfilingCategory.cpp, and copied js/src/vm/ProfilingStack.cpp, and their
  respective headers -- as they are needed for a significant part of
  the profiler API, and are not strictly js-specific.

baseprofiler not yet added to parent mozglue/moz.build, so it won't be built yet.

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

--HG--
rename : tools/profiler/core/EHABIStackWalk.cpp => mozglue/baseprofiler/core/EHABIStackWalk.cpp
rename : tools/profiler/core/EHABIStackWalk.h => mozglue/baseprofiler/core/EHABIStackWalk.h
rename : tools/profiler/core/PageInformation.cpp => mozglue/baseprofiler/core/PageInformation.cpp
rename : tools/profiler/core/PageInformation.h => mozglue/baseprofiler/core/PageInformation.h
rename : tools/profiler/core/PlatformMacros.h => mozglue/baseprofiler/core/PlatformMacros.h
rename : tools/profiler/core/ProfileBuffer.cpp => mozglue/baseprofiler/core/ProfileBuffer.cpp
rename : tools/profiler/core/ProfileBuffer.h => mozglue/baseprofiler/core/ProfileBuffer.h
rename : tools/profiler/core/ProfileBufferEntry.cpp => mozglue/baseprofiler/core/ProfileBufferEntry.cpp
rename : tools/profiler/core/ProfileBufferEntry.h => mozglue/baseprofiler/core/ProfileBufferEntry.h
rename : tools/profiler/core/ProfileJSONWriter.cpp => mozglue/baseprofiler/core/ProfileJSONWriter.cpp
rename : tools/profiler/core/ProfiledThreadData.cpp => mozglue/baseprofiler/core/ProfiledThreadData.cpp
rename : tools/profiler/core/ProfiledThreadData.h => mozglue/baseprofiler/core/ProfiledThreadData.h
rename : tools/profiler/core/ProfilerBacktrace.cpp => mozglue/baseprofiler/core/ProfilerBacktrace.cpp
rename : tools/profiler/core/ProfilerBacktrace.h => mozglue/baseprofiler/core/ProfilerBacktrace.h
rename : tools/profiler/core/ProfilerMarker.h => mozglue/baseprofiler/core/ProfilerMarker.h
rename : tools/profiler/core/ProfilerMarkerPayload.cpp => mozglue/baseprofiler/core/ProfilerMarkerPayload.cpp
rename : js/src/vm/GeckoProfiler.cpp => mozglue/baseprofiler/core/ProfilingCategory.cpp
rename : js/src/vm/ProfilingStack.cpp => mozglue/baseprofiler/core/ProfilingStack.cpp
rename : tools/profiler/core/RegisteredThread.cpp => mozglue/baseprofiler/core/RegisteredThread.cpp
rename : tools/profiler/core/RegisteredThread.h => mozglue/baseprofiler/core/RegisteredThread.h
rename : tools/profiler/core/ThreadInfo.h => mozglue/baseprofiler/core/ThreadInfo.h
rename : tools/profiler/core/VTuneProfiler.cpp => mozglue/baseprofiler/core/VTuneProfiler.cpp
rename : tools/profiler/core/VTuneProfiler.h => mozglue/baseprofiler/core/VTuneProfiler.h
rename : tools/profiler/core/platform-linux-android.cpp => mozglue/baseprofiler/core/platform-linux-android.cpp
rename : tools/profiler/core/platform-macos.cpp => mozglue/baseprofiler/core/platform-macos.cpp
rename : tools/profiler/core/platform-win32.cpp => mozglue/baseprofiler/core/platform-win32.cpp
rename : tools/profiler/core/platform.cpp => mozglue/baseprofiler/core/platform.cpp
rename : tools/profiler/core/platform.h => mozglue/baseprofiler/core/platform.h
rename : tools/profiler/core/shared-libraries-linux.cc => mozglue/baseprofiler/core/shared-libraries-linux.cc
rename : tools/profiler/core/shared-libraries-macos.cc => mozglue/baseprofiler/core/shared-libraries-macos.cc
rename : tools/profiler/core/shared-libraries-win32.cc => mozglue/baseprofiler/core/shared-libraries-win32.cc
rename : tools/profiler/core/vtune/ittnotify.h => mozglue/baseprofiler/core/vtune/ittnotify.h
rename : tools/profiler/lul/AutoObjectMapper.cpp => mozglue/baseprofiler/lul/AutoObjectMapper.cpp
rename : tools/profiler/lul/AutoObjectMapper.h => mozglue/baseprofiler/lul/AutoObjectMapper.h
rename : tools/profiler/lul/LulCommon.cpp => mozglue/baseprofiler/lul/LulCommon.cpp
rename : tools/profiler/lul/LulCommonExt.h => mozglue/baseprofiler/lul/LulCommonExt.h
rename : tools/profiler/lul/LulDwarf.cpp => mozglue/baseprofiler/lul/LulDwarf.cpp
rename : tools/profiler/lul/LulDwarfExt.h => mozglue/baseprofiler/lul/LulDwarfExt.h
rename : tools/profiler/lul/LulDwarfInt.h => mozglue/baseprofiler/lul/LulDwarfInt.h
rename : tools/profiler/lul/LulDwarfSummariser.cpp => mozglue/baseprofiler/lul/LulDwarfSummariser.cpp
rename : tools/profiler/lul/LulDwarfSummariser.h => mozglue/baseprofiler/lul/LulDwarfSummariser.h
rename : tools/profiler/lul/LulElf.cpp => mozglue/baseprofiler/lul/LulElf.cpp
rename : tools/profiler/lul/LulElfExt.h => mozglue/baseprofiler/lul/LulElfExt.h
rename : tools/profiler/lul/LulElfInt.h => mozglue/baseprofiler/lul/LulElfInt.h
rename : tools/profiler/lul/LulMain.cpp => mozglue/baseprofiler/lul/LulMain.cpp
rename : tools/profiler/lul/LulMain.h => mozglue/baseprofiler/lul/LulMain.h
rename : tools/profiler/lul/LulMainInt.h => mozglue/baseprofiler/lul/LulMainInt.h
rename : tools/profiler/lul/platform-linux-lul.cpp => mozglue/baseprofiler/lul/platform-linux-lul.cpp
rename : tools/profiler/lul/platform-linux-lul.h => mozglue/baseprofiler/lul/platform-linux-lul.h
rename : tools/profiler/moz.build => mozglue/baseprofiler/moz.build
rename : tools/profiler/public/ProfileJSONWriter.h => mozglue/baseprofiler/public/BaseProfileJSONWriter.h
rename : tools/profiler/public/GeckoProfiler.h => mozglue/baseprofiler/public/BaseProfiler.h
rename : tools/profiler/public/ProfilerCounts.h => mozglue/baseprofiler/public/BaseProfilerCounts.h
rename : tools/profiler/public/ProfilerMarkerPayload.h => mozglue/baseprofiler/public/BaseProfilerMarkerPayload.h
rename : tools/profiler/public/shared-libraries.h => mozglue/baseprofiler/public/BaseProfilerSharedLibraries.h
rename : js/public/ProfilingCategory.h => mozglue/baseprofiler/public/BaseProfilingCategory.h
rename : js/public/ProfilingStack.h => mozglue/baseprofiler/public/BaseProfilingStack.h
extra : moz-landing-system : lando
2019-06-04 06:52:15 +00:00
Mike Hommey
4c0ecc6982 Bug 1554063 - Move decimal to mozglue. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D32435

--HG--
rename : mfbt/decimal/Decimal.cpp => mozglue/misc/decimal/Decimal.cpp
rename : mfbt/decimal/Decimal.h => mozglue/misc/decimal/Decimal.h
rename : mfbt/decimal/UPSTREAM-GIT-SHA => mozglue/misc/decimal/UPSTREAM-GIT-SHA
rename : mfbt/decimal/comparison-with-nan.patch => mozglue/misc/decimal/comparison-with-nan.patch
rename : mfbt/decimal/fix-wshadow-warnings.patch => mozglue/misc/decimal/fix-wshadow-warnings.patch
rename : mfbt/decimal/mfbt-abi-markers.patch => mozglue/misc/decimal/mfbt-abi-markers.patch
rename : mfbt/decimal/moz-decimal-utils.h => mozglue/misc/decimal/moz-decimal-utils.h
rename : mfbt/decimal/to-moz-dependencies.patch => mozglue/misc/decimal/to-moz-dependencies.patch
rename : mfbt/decimal/update.sh => mozglue/misc/decimal/update.sh
rename : mfbt/decimal/zero-serialization.patch => mozglue/misc/decimal/zero-serialization.patch
extra : moz-landing-system : lando
2019-05-29 06:57:28 +00:00
Mike Hommey
2abcc3d7cb Bug 1553363 - Generalize the *_impl goop for allocation functions in mozglue. r=froydnj
The current situation is suboptimal, where we have the same goop
repeated in multiple files, and where things kinda sorta work out fine
thanks to the linker for files that would have been forbidden, except
when the linker doesn't do its job, which apparently happen on
mingwclang builds.

This change only really covers C++ code using operator new/delete, and
not things that would be using malloc/free, because it's easier.
malloc/free is left for a followup.

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

--HG--
extra : moz-landing-system : lando
2019-05-29 22:49:42 +00:00
Ehsan Akhgari
4cb428d268 Bug 1555205 - Move db/sqlite3 to third_party/; r=mak
Differential Revision: https://phabricator.services.mozilla.com/D32939

--HG--
rename : db/sqlite3/README => third_party/sqlite3/README
rename : db/sqlite3/README.MOZILLA => third_party/sqlite3/README.MOZILLA
rename : db/sqlite3/src/moz.build => third_party/sqlite3/src/moz.build
rename : db/sqlite3/src/sqlite.symbols => third_party/sqlite3/src/sqlite.symbols
rename : db/sqlite3/src/sqlite3.c => third_party/sqlite3/src/sqlite3.c
rename : db/sqlite3/src/sqlite3.h => third_party/sqlite3/src/sqlite3.h
extra : moz-landing-system : lando
2019-05-29 10:16:29 +00:00
Masatoshi Kimura
6d9fff0168 Bug 1554380 - Fix some issues in mozilla::ReadAhead. r=aklotz
* CreateFileW will return INVALID_HANDLE_VALUE (-1) on failure, not NULL (0).
* MapViewOfFile will map the entire section if the size is 0. No explicit size
  is required.
* If SEC_IMAGE is specified, the mapped image size may be different from the
  file size on the storage.

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

--HG--
extra : moz-landing-system : lando
2019-05-29 10:13:28 +00:00
Mihai Alexandru Michis
372773e7f5 Backed out changeset 3edc5be703be (bug 1554063) for mass test failures. CLOSED TREE
--HG--
rename : mozglue/misc/decimal/Decimal.cpp => mfbt/decimal/Decimal.cpp
rename : mozglue/misc/decimal/Decimal.h => mfbt/decimal/Decimal.h
rename : mozglue/misc/decimal/UPSTREAM-GIT-SHA => mfbt/decimal/UPSTREAM-GIT-SHA
rename : mozglue/misc/decimal/comparison-with-nan.patch => mfbt/decimal/comparison-with-nan.patch
rename : mozglue/misc/decimal/fix-wshadow-warnings.patch => mfbt/decimal/fix-wshadow-warnings.patch
rename : mozglue/misc/decimal/mfbt-abi-markers.patch => mfbt/decimal/mfbt-abi-markers.patch
rename : mozglue/misc/decimal/moz-decimal-utils.h => mfbt/decimal/moz-decimal-utils.h
rename : mozglue/misc/decimal/to-moz-dependencies.patch => mfbt/decimal/to-moz-dependencies.patch
rename : mozglue/misc/decimal/update.sh => mfbt/decimal/update.sh
rename : mozglue/misc/decimal/zero-serialization.patch => mfbt/decimal/zero-serialization.patch
2019-05-29 09:54:37 +03:00
Mike Hommey
66cb95a768 Bug 1554063 - Move decimal to mozglue. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D32435

--HG--
rename : mfbt/decimal/Decimal.cpp => mozglue/misc/decimal/Decimal.cpp
rename : mfbt/decimal/Decimal.h => mozglue/misc/decimal/Decimal.h
rename : mfbt/decimal/UPSTREAM-GIT-SHA => mozglue/misc/decimal/UPSTREAM-GIT-SHA
rename : mfbt/decimal/comparison-with-nan.patch => mozglue/misc/decimal/comparison-with-nan.patch
rename : mfbt/decimal/fix-wshadow-warnings.patch => mozglue/misc/decimal/fix-wshadow-warnings.patch
rename : mfbt/decimal/mfbt-abi-markers.patch => mozglue/misc/decimal/mfbt-abi-markers.patch
rename : mfbt/decimal/moz-decimal-utils.h => mozglue/misc/decimal/moz-decimal-utils.h
rename : mfbt/decimal/to-moz-dependencies.patch => mozglue/misc/decimal/to-moz-dependencies.patch
rename : mfbt/decimal/update.sh => mozglue/misc/decimal/update.sh
rename : mfbt/decimal/zero-serialization.patch => mozglue/misc/decimal/zero-serialization.patch
extra : moz-landing-system : lando
2019-05-29 00:59:20 +00:00
Mike Hommey
03cd499c91 Bug 1554078 - Remove now unnecessary STL wrapping. r=chmanchester
Some parts of mozglue used to be STL wrapped because mozalloc used to be
a separate library, but that was changed a while ago (in bug 868814, 4
years ago), and those wrappings are not necessary anymore.

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

--HG--
extra : moz-landing-system : lando
2019-05-29 00:07:22 +00:00
Sylvestre Ledru
d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
Nathan Froyd
0839a1bd24 Bug 1542746 - remove code for frontend-based PGO instrumentation; r=dmajor
We're moving to IR-level PGO instrumentation for clang-cl.  We've also
moved to using static linker ordering files, which was the primary
application of the previous style of PGO instrumentation.  We therefore
we no longer need this code.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 20:00:38 +00:00
arthur.iakab
af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru
c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Aaron Klotz
fa7002c45d Bug 1552362: Ensure that the DLL Interceptor's ADRP decoding treats its immediate operand as signed; r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D31550

--HG--
extra : moz-landing-system : lando
2019-05-20 19:01:00 +00:00
Emilio Cobos Álvarez
9d5285ccb9 Bug 1549762 - Turn the linker inline asm into an assembly file. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D31051

--HG--
extra : moz-landing-system : lando
2019-05-16 01:02:00 +00:00
Emilio Cobos Álvarez
c74f3a885b Bug 1549762 - Don't build mozglue linker tests if building with icecream. r=glandium
As icecream doesn't deal well with .incbin.

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

--HG--
extra : moz-landing-system : lando
2019-05-15 13:40:23 +00:00
David Parks
5730f5fc1c Bug 1546546: Part 3 - TestDllInterceptor must leave intercepted functions operable r=aklotz
In part 1, we disabled the unhooking of DLL-intercepted functions at shutdown.  The TestDllInterceptor relied on unhooking -- it worked by hooking functions with a "nonsense function" (nullptr) and then immediately unhooking it.  That restored the original function behavior.  Some hooked functions (e.g. NtWriteFile) are used by functions later in the program (e.g. printf) so the functions need to maintain their behavior.

This patch replaces the nonsense function with an identity function that also sets a global boolean as a side-effect.  The function is written in machine code.  x86-32, x86-64, and aarch64 variants are included.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 00:26:59 +00:00
David Parks
c005eb91b7 Bug 1546546: Part 2 - Pass a real CredHandle to relevant TestDllInterceptor functions r=aklotz
QueryCredentialsAttributesA and FreeCredentialsHandle trigger an exception when null is passed for the CredHandle pointer.  This exception was ignored (when not run in the debugger) but that is no longer the case with the changes in part 3.  This patch passes a real CredHandle to them.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 00:26:16 +00:00
David Parks
b4dbd0065b Bug 1546546: Part 1 - Never unhook DLL-intercepted functions upon VMSharingPolicyShared destruction r=aklotz
This patch fixes a static destructor order dependency between WindowsDllInterceptor and VMSharingPolicyUnique by telling VMSharingPolicyShared not to access the VMSharingPolicyUnique at destruction.  This means that the behavior of intercepted functions is no longer restored in the given process at policy shutdown time.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 00:25:35 +00:00
Aaron Klotz
6540251ed0 Bug 1545355: Uppercase hash tags before calling WinVerifyTrust on catalog files; r=mhowell
On Windows 7, WinVerifyTrust fails unless the tag is uppercased. This patch
also adds a missing call to CryptCATAdminReleaseCatalogContext, the need for
which was poorly documented on MSDN.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 16:58:24 +00:00
Sylvestre Ledru
e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Kartikaya Gupta
0ce8311834 Bug 1544435 - Block wbload.dll as it causes GPU process crashes. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D29378

--HG--
extra : moz-landing-system : lando
2019-04-30 18:22:53 +00:00
Aaron Klotz
70900309f0 Bug 1535704: Part 2 - Add a hook to sandbox target initialization that catches mscom's attempts to resolve user32 when Win32k lockdown is enabled; r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D27833

--HG--
extra : moz-landing-system : lando
2019-04-22 21:38:36 +00:00
David Parks
406cc6afbf Bug 1546545: Part 2 - Create empty TrampolineCollection if the process sandbox forbids dynamic code r=aklotz
TrampolineCollection iterates over an array of Trampolines that it has set 'write' permissions for.  If this happens in a process whose sandbox forbids dynamic code then these permissions cannot be set.  This patch detects that condition and returns an empty TrampolineCollection in that case.  We ASSERT if we fail to set permissions for any other reason.

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

--HG--
extra : moz-landing-system : lando
2019-04-29 21:07:20 +00:00
David Parks
d9d0882177 Bug 1546545: Part 1 - Properly store pointer to sandboxed DLL intercepted method r=aklotz
Bug 1533808 introduced code to intercept DLL methods that the Chromium sandbox had already intercepted.  That patch did not store the the pointer to the intercepted function in the trampoline data, as is done when intercepting other methods.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 00:49:32 +00:00
Sylvestre Ledru
96da5036ad Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-28 09:30:05 +00:00
Aaron Klotz
c2bb05fdfb Bug 1547113: Add support for section table parsing to nt::PEHeaders; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D28905

--HG--
extra : moz-landing-system : lando
2019-04-26 15:55:11 +00:00
Mike Hommey
e12a4b2881 Bug 1546587 - Convert TestZip to a gtest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28759

--HG--
extra : moz-landing-system : lando
2019-04-25 23:41:50 +00:00
Mike Hommey
36b33e0796 Bug 1546587 - Include the TestZip zip files as binary data. r=froydnj
We're going to convert the test to a gtest, and it's simpler not to have
to deal with finding the path to the testcase zip files. They're small
enough anyways, and can be inserted as raw binary data via some assembly
magic. This being android-only code, we don't need extreme portability
here. This is the same trick we use in
config/external/icu/data/icudata_gas.S.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:41:47 +00:00
Mike Hommey
cf749be8f7 Bug 1546587 - Modernize loops in TestZip. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28757

--HG--
extra : moz-landing-system : lando
2019-04-25 23:41:45 +00:00
Dorel Luca
cf86de4259 Backed out changeset 3096a547bb84 (bug 1546546) for Cpp failures in TestDllInterceptor.exe. CLOSED TREE 2019-04-26 00:52:11 +03:00
David Parks
a138049df1 Bug 1546546: Never unhook DLL-intercepted methods upon VMSharingPolicyShared destruction r=aklotz
This patch fixes a static destructor order dependency between WindowsDllInterceptor and VMSharingPolicyUnique by telling VMSharingPolicyShared not to access the VMSharingPolicyUnique at destruction.  See the bug for details of the order dependency.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 17:10:24 +00:00
Aaron Klotz
5a16846aa3 Bug 1535704: Part 1 - Move IsWin32kLockedDown into mozglue; r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D27832

--HG--
extra : moz-landing-system : lando
2019-04-22 19:13:23 +00:00
Sylvestre Ledru
a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Geoff Brown
a58ba7930b Bug 1530874 - Version the mozglue symbols on Android. r=froydnj
See comment 24 in the bug for details on what can go wrong without this
change. This change ensures system libraries are not going to pick
symbols from mozglue when running processes outside dalvik.

As a side effect, this makes things kind of closer to what happens when
dalvik is involved, exposing unit tests to possible allocator mismatches
that could happen like bug 1531887.

On the flip side, libraries that link against mozglue explicitly are
going to get a reference to the versioned symbols, so everything is fine
in that regard. The custom linker, however, will ignore the versions
altogether, and its symbols resolution just ends up unchanged. So we're
fine there too.

We use something that is close to what using a SYMBOLS_FILE would
generate as a version script, but we need to do so manually because
SYMBOLS_FILE doesn't support exporting all the symbols.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 21:39:10 +00:00
Mike Hommey
777665d869 Bug 1545007 - Remove our pthread_atfork implementation for Android. r=froydnj
Bug 884239 added a build-time Android version check around the
pthread_atfork function definition at the same time as for timer_create,
which was subsequently removed. But it turns out the version that
documented was wrong: per the comment added in bug 680190,
pthread_atfork might have been supported since Android 2.3 (gingerbread,
API 9 or 10). That might not be entirely accurate, though, because the
bionic repository seems to show it made it to Android 4.0 (ice cream
sandwich, API 14 or 15).

Either way, that is less than the minimum API version we currently
support, which is 16.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 18:26:02 +00:00
Aaron Klotz
1a74deabad Bug 1503538: Part 3 - Changes to NativeNt and ImportDir to allow for blocking injected static DLL dependencies; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D27145

--HG--
extra : moz-landing-system : lando
2019-04-12 19:58:01 +00:00
Doug Thayer
2d3776cd66 Bug 1538279 - Only readahead DLLs in parent process r=glandium
There shouldn't be any need to do this for content processes as
the DLL should already be in the system file cache.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 18:46:13 +00:00
Cosmin Sabou
c64f16b342 Backed out 3 changesets (bug 1538279) for mass test failures. CLOSED TREE
Backed out changeset af07f58d18cc (bug 1538279)
Backed out changeset 508ee4cf9ea2 (bug 1538279)
Backed out changeset 6f2e7c819c11 (bug 1538279)
2019-04-12 07:47:53 +03:00
Doug Thayer
13a4a8518f Bug 1538279 - Only readahead DLLs in parent process r=glandium
There shouldn't be any need to do this for content processes as
the DLL should already be in the system file cache.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 02:17:48 +00:00