Commit Graph

1171 Commits

Author SHA1 Message Date
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
Mike Hommey
492bd126b6 Bug 1543555 - Stop using our linker to resolve libc/libm symbols when not strictly necessary. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D27019

--HG--
extra : moz-landing-system : lando
2019-04-12 02:12:31 +00:00
Sylvestre Ledru
03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Csoregi Natalia
ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Aaron Klotz
87690b594c Bug 1541597: Modify PEHeaders to use NumberOfRvaAndSizes as maximum DataDirectory length; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D26012

--HG--
extra : moz-landing-system : lando
2019-04-03 21:56:24 +00:00
Cameron McCormack
eedb6aebd4 Bug 1538081 - Part 3: Add operator<<(ostream&) definitions for a few common types. r=froydnj,gerald
Depends on D25023

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

--HG--
extra : moz-landing-system : lando
2019-03-30 04:26:26 +00:00
Nathan Froyd
dc25b5a9dc Bug 1539605 - add fast paths for integer formatting on nsTSubstring; r=erahm
This way we don't have to go through a bunch of printf nonsense, and we
ought to be able to arrive at optimized routines that take advantage of
constant radices, etc.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 19:38:53 +00:00
David Parks
20b6a59a5e Bug 1533808: Recognize Chromium-sandboxed methods in WindowsDllInterceptor r=aklotz
Due to coming changes involving the IOInterposer, the WindowsDllInterceptor may be set up later than the sandbox.  The sandbox hooks some of the same functions, so the Interceptor is running into its hooks instead of the original implementations it anticipated.  This patch allows it to recognize and efficiently patch those hooks when that happens.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 22:57:14 +00:00
John Lin
529784a956 Bug 1308405 - p3: Use sample buffer class directly. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D24589

--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/SharedMemBuffer.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/SampleBuffer.java
extra : moz-landing-system : lando
2019-03-28 18:06:19 +00:00
Karl Tomlinson
c58553bcfd Bug 1536316 remove suggestion that spurious condition variable wakeups are magically handled by ConditionVariableImpl r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D23983

--HG--
extra : moz-landing-system : lando
2019-03-25 12:41:19 +00:00
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