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

2254 Коммитов

Автор SHA1 Сообщение Дата
Toshihito Kikuchi ebb9e9f364 Bug 1705278 - Remove DependentModules from UntrustedModulesProcessor.cpp. r=aklotz
Bug 1620118 added a new field `isDependent` in the third-party-module ping
which is calculated in `UntrustedModulesProcessor`.  However, bug 1684532
revealed it was not accurate because some third-party applications revert
the import table to the original state immediately after their module was
loaded.

Now that we have a logic to determine `isDependent` in `NtMapViewOfSection`
to automatically block a module injected through the import table, we can
pass that value to the ping and remove the original logic in `UntrustedModulesProcessor`.

Differential Revision: https://phabricator.services.mozilla.com/D112227
2021-04-16 19:35:55 +00:00
Mike Hommey 6a41d8d7ad Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-16 04:06:02 +00:00
Doug Thayer 23378a0226 Bug 1704853 - Disable skeleton UI on non-default density r=emalysz
This is a little more than we need to disable it, but I figure we'll want to
support different UI densities in the skeleton UI long term.

Differential Revision: https://phabricator.services.mozilla.com/D111906
2021-04-15 22:58:19 +00:00
Csoregi Natalia 1d1158f8b5 Backed out changeset 95865502de4b (bug 1704853) for causing bustage on AppWindow.cpp. CLOSED TREE 2021-04-16 01:47:57 +03:00
Doug Thayer c632b8a57d Bug 1704853 - Disable skeleton UI on non-default density r=emalysz
This is a little more than we need to disable it, but I figure we'll want to
support different UI densities in the skeleton UI long term.

Differential Revision: https://phabricator.services.mozilla.com/D111906
2021-04-15 22:10:43 +00:00
Doug Thayer 638904c1f1 Bug 1693180 - Ensure we show the skeleton UI when restarting FF r=emalysz
When restarting, we set the XRE_PROFILE_PATH env var. This normally would
prevent us from showing the skeleton UI. This patch just adds another env
var to indicate that we are restarting so the skeleton UI can know it's
safe to display.

Differential Revision: https://phabricator.services.mozilla.com/D111884
2021-04-15 21:31:15 +00:00
Butkovits Atila 8255e3083f Backed out changeset 5c6b15fcea71 (bug 1515229) for causing GTest failures. CLOSED TREE 2021-04-15 13:37:29 +03:00
Doug Thayer fc1ec9303f Bug 1695674 - Ensure we use RGB macro for FillRect r=emalysz
We specify our colors like 0xrrggbb, but CreateSolidBrush expects a
color created with the RGB macro, which actually arranges it as
0xbbggrr. This change has us use the RGB macro to give a color when
creating the brush.

Differential Revision: https://phabricator.services.mozilla.com/D107945
2021-04-14 22:56:26 +00:00
Doug Thayer bc713ba00e Bug 1695674 - Update Skeleton UI layout+colors to match Proton r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D107944
2021-04-14 22:56:26 +00:00
Mike Hommey 2eacd46d46 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 22:31:36 +00:00
Toshihito Kikuchi a8483bcd1c Bug 1705125 - Block PavSHook64.dll on Win7 and older. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D112060
2021-04-14 17:38:07 +00:00
smolnar 22c6eb14ba Backed out changeset f7b0cdc3aeb0 (bug 1515229) for causing xpc failures in test_feature_stackwalking. CLOSED TREE 2021-04-14 12:25:37 +03:00
Mike Hommey 133396cb94 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 04:47:09 +00:00
Toshihito Kikuchi 9bb61c843d Bug 1704276 - Block InfoWatch Device Monitor's module. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D111783
2021-04-13 14:26:20 +00:00
Chris Fallin 605271bd29 Bug 1701620 part 4 - Fix memory support for WASI. r=jandem,sfink
WASI lacks of support many memory stuff like mmap, memory protections and etc, but
it has malloc so we can use it instead. Also, here we are stubbing out all
uses of the missing WASI memory functionality.

Differential Revision: https://phabricator.services.mozilla.com/D110075
2021-04-13 08:25:10 +00:00
Csoregi Natalia 91bd333c25 Backed out changeset f48cb748519b (bug 1701620) for bustage on Memory.cpp. CLOSED TREE 2021-04-13 10:09:41 +03:00
Chris Fallin 4e5ae46c03 Bug 1701620 part 4 - Fix memory support for WASI. r=jandem,sfink
WASI lacks of support many memory stuff like mmap, memory protections and etc, but
it has malloc so we can use it instead. Also, here we are stubbing out all
uses of the missing WASI memory functionality.

Differential Revision: https://phabricator.services.mozilla.com/D110075
2021-04-13 06:50:13 +00:00
Chris Fallin f062cdc9ba Bug 1701613 part 3 - Add stub thread implementation for WASI. r=jandem,wingo
WASI lacks thread support so the stub implementation for threads has been added.

Differential Revision: https://phabricator.services.mozilla.com/D110073
2021-04-08 08:02:16 +00:00
Tyson Smith ab8b997e30 Bug 1688716 - Suppress TSan failure calling into graphics drivers. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D111206
2021-04-08 06:33:03 +00:00
Paul Adenot 030f28a6fb Bug 1686405 - Fix tier-3 build. r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109492
2021-04-02 08:56:24 +00:00
Brindusan Cristian 6ba223af02 Backed out changeset 943e1e811d75 (bug 1686405) for causing build bustages in Uptime.cpp. CLOSED TREE 2021-04-01 17:01:25 +03:00
Paul Adenot 28401075fc Bug 1686405 - Fix tier-3 build. r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109492
2021-04-01 13:23:23 +00:00
Toshihito Kikuchi 0d9e48e427 Bug 1702086 - Make sure LoadLibraryEx really locks the mapped address. r=mstange
Before `SharedLibraryInfo::GetInfoForSelf` calls `GetPdbInfo` to parse a module's
PE header, it calls `LoadLibraryEx` to prevent the module from being unloaded
during `GetPdbInfo`.  If the module was already unloaded before `LoadLibraryEx`,
however, `LoadLibraryEx` maps the module onto an address different from the original
mapped address, so that `module.lpBaseOfDll` becomes invalid.

This patch is to call `LoadLibraryEx` before `GetModuleInformation` to make sure
`LoadLibraryEx` increments the module's refcount and does not map the module onto
a new address.  With this, `module.lpBaseOfDll` is always valid, thus we don't have
to call `VirtualQuery`.

Differential Revision: https://phabricator.services.mozilla.com/D110421
2021-04-01 00:35:01 +00:00
Mike Hommey 85e065c14d Bug 1700885 - Add a runtime way to disable MozWalkTheStack. r=Gankra
WalkTheStack* is the function that is being called to print stacks to
the user on e.g. MOZ_CRASH on debug builds. Until bug 1699375, some
cases weren't covered, which now cause unwanted side-effects with e.g.
fuzzing. At least as a stop-gap, allow to runtime-disable the behavior
via an environment variable.

Other uses of the stack-walker, like the profiler's, are not affected
when setting the environment variable.

Differential Revision: https://phabricator.services.mozilla.com/D110199
2021-03-31 00:47:58 +00:00
Toshihito Kikuchi 573d612334 Bug 1700281 - Block Webroot SecureAnywhere's module. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D109695
2021-03-29 14:26:43 +00:00
Nazım Can Altınova 7039884fe6 Bug 1698129 - Rename the profiler browsingContextID outputs to tabID and bump the profile version r=gerald
Lastly, we are changing the parts that requires a version bump and bumping the
profiler version in the end. This will require a PR in the front-end for a
version upgrader and changes related to the renaming.

Differential Revision: https://phabricator.services.mozilla.com/D109282
2021-03-25 12:52:11 +00:00
Nazım Can Altınova f8b414e1c2 Bug 1698129 - Rename browsingContextID to tabID inside the profiler codebase r=julienw,gerald,devtools-backward-compat-reviewers
This patch is only  about renaming the internals of the profiler codebase and
it doesn't touch any parts that requires a backwards compatibility or version
bump.

Differential Revision: https://phabricator.services.mozilla.com/D109280
2021-03-25 12:52:10 +00:00
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Agi Sferro 34624a6abf Bug 1567341 - Allow geckoview.test to run xpcshell. r=esawin
This commit adds a new command line option |-xpcshell| that, when passed, will
run an xpcshell instead of launching a full Gecko instance.

This command line option is restricted to org.mozilla.geckoview.test for now,
as it's really hard to use and not really a usecase outside mozilla. We can
revisit this if there's interest.

Differential Revision: https://phabricator.services.mozilla.com/D106211
2021-03-24 21:49:38 +00:00
Alexandru Michis 497409d76e Backed out 24 changesets (bug 1567341) for causing xpcshell failures in test_telemetry.js
CLOSED TREE

Backed out changeset deb795c7d0ed (bug 1567341)
Backed out changeset 62d24a3e5e33 (bug 1567341)
Backed out changeset 1185cabd94e0 (bug 1567341)
Backed out changeset 73a4ae419261 (bug 1567341)
Backed out changeset b6eb111329f3 (bug 1567341)
Backed out changeset 0dc0bfedc042 (bug 1567341)
Backed out changeset 9dca635e41d7 (bug 1567341)
Backed out changeset c34928580933 (bug 1567341)
Backed out changeset f9ba384bb407 (bug 1567341)
Backed out changeset ec25c2df380e (bug 1567341)
Backed out changeset 9e8ea542b51e (bug 1567341)
Backed out changeset 3dc62863a028 (bug 1567341)
Backed out changeset 6c104f865540 (bug 1567341)
Backed out changeset c422ca4207ea (bug 1567341)
Backed out changeset e3df748ed62f (bug 1567341)
Backed out changeset 9d1f27796a97 (bug 1567341)
Backed out changeset 1d93ba23f809 (bug 1567341)
Backed out changeset 55652f6af6ed (bug 1567341)
Backed out changeset 9fb892955a88 (bug 1567341)
Backed out changeset 1cdd95c43416 (bug 1567341)
Backed out changeset 5a839d5e3e33 (bug 1567341)
Backed out changeset ea84b5749a27 (bug 1567341)
Backed out changeset dcb1ae146475 (bug 1567341)
Backed out changeset d72accc274ac (bug 1567341)
2021-03-24 23:37:43 +02:00
Agi Sferro 5256b36255 Bug 1567341 - Allow geckoview.test to run xpcshell. r=esawin
This commit adds a new command line option |-xpcshell| that, when passed, will
run an xpcshell instead of launching a full Gecko instance.

This command line option is restricted to org.mozilla.geckoview.test for now,
as it's really hard to use and not really a usecase outside mozilla. We can
revisit this if there's interest.

Differential Revision: https://phabricator.services.mozilla.com/D106211
2021-03-24 20:20:01 +00:00
Jeff Muizelaar 9290181962 Bug 1700113 - Use the builtin gettid() on Android. r=glandium
Syscalls can be pretty slow on Android and this lets us use the
gettid() cache that bionic has:
d7c52625f2/libc/bionic/gettid.cpp

Differential Revision: https://phabricator.services.mozilla.com/D109353
2021-03-23 00:41:12 +00:00
Mike Hommey 4d8e18962b Bug 1699375 - Move WalkTheStack to mozglue. r=nika
A long standing issue is that MOZ_ASSERT and related don't print stack
traces in debug builds when they're directly or indirectly emitted from
non-libxul code. Moving WalkTheStack to mozglue alleviates the problem.

It's also not printing stack traces when emitted from C code (and for
some C third party libraries, we do redirect assert to MOZ_ASSERT),
which we solve by making the corresponding API available without C++
(which WalkTheStack being a static method of the nsTraceRefCnt class
didn't allow, or the use of a closure on Android).

This requires some adjustements to headers that indirectly assume that
Assertions.h includes ErrorList.h through nsError.h through nscore.h
through nsTraceRefcnt.h.

We also remove TestStackCrawl.cpp because it hasn't been built since
bug 158528, 19 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D108913
2021-03-22 21:25:30 +00:00
Mike Hommey 9f69fef1e9 Bug 1699375 - Make MozFormatCodeAddress* return the printed size, and use that instead of strlen. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D108912
2021-03-22 21:25:30 +00:00
Mike Hommey 6cb10c45a4 Bug 1699375 - Add {Vs,S}printLiteral-like functions for buffers of arbitrary size. r=nika
and use them in MozFormatCodeAddress.

Differential Revision: https://phabricator.services.mozilla.com/D108911
2021-03-22 21:25:30 +00:00
Mike Hommey 86270cdf01 Bug 1699375 - Move MozStackWalkThread to a separate header. r=gerald
It requires including <windows.h>, preventing the inclusion of StackWalk.h
from some places (and upcoming changes will make StackWalk.h included in
more places).

Differential Revision: https://phabricator.services.mozilla.com/D108910
2021-03-22 21:25:29 +00:00
Florian Quèze 8ad1e5d0aa Bug 1699742 - Remove MOZ_GECKO_PROFILER ifdefs that are no longer needed, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D109078
2021-03-22 16:29:52 +00:00
Mike Hommey ec7f538e0c Bug 1698719 - Remove aSkipFrames argument to both FramePointerStackWalk and MozStackWalkThread. r=gsvelto,gerald
In the case of FramePointerStackwalk, the caller gives a pointer to the
top-most frame to walk from. There isn't really a reason to give a
number of frames to skip, as the right frame pointer could be given in
the first place if that was really necessary. And in practice, it's
hasn't been used so far.

In the case of MozStackWalkThread, the caller presumably doesn't know
what the thread the stack is being walked for is doing, and it would be
a guesswork to pass a valid number of frames to skip. In practice, it's
also not used.

The aSkipFrames is already a footgun on MozStackWalk (and we're going to
change that in bug 1515229), we don't need to keep a footgun on these
other stack walking methods.

Differential Revision: https://phabricator.services.mozilla.com/D108563
2021-03-17 00:21:39 +00:00
Jeff Muizelaar 702bd6eeec Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium
Currently, printf_stderr doesn't show up when running with ./mach run.
This is because we run with -attach-console and that redirects stderr
to a different file descriptor using freopen in UseParentConsole.

The change from just using stderr directly happened in bug 340443 and was done
to avoid some linking issues. That problem doesn't seem to apply anymore so you'd
expect we'd be able to go back to the straightforward implemention that works even
if stderr has been redirected. Unfortunately, Windows takes not buffering
stderr very seriously and fprintf will write out the results character
by character. This can cause log output lines to be intermixed which
breaks log parsing in CI. We keep using fdopen to create a new FILE*
that's buffered but instead of hard coding fd 2, we get the actual fd
that corresponds to stderr using fileno.

The mozglue implementation was cargo culted from xpcom, so we update it
as well.

Differential Revision: https://phabricator.services.mozilla.com/D98550
2021-03-16 20:45:21 +00:00
Gerald Squelart f193604f7c Bug 1687631 - Enable CPU Utilization by default in the profilers - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D107598
2021-03-15 11:54:43 +00:00
Toshihito Kikuchi 2279f22a3f Bug 1697282 - Make the repo buildable without MOZ_LAUNCHER_PROCESS. r=aklotz
This patch makes sure the repo can be built without `MOZ_LAUNCHER_PROCESS`.

- Compile WinTokenUtils.cpp under winlaucher regardless of `MOZ_LAUNCHER_PROCESS`
  because we still need `IsAdminWithoutUac`.
- Skip TestDllBlocklist.NoOpEntryPoint GTest because the `RedirectToNoOpEntryPoint`
  feature is only available with the new blocklist with the launcher process.

Differential Revision: https://phabricator.services.mozilla.com/D108142
2021-03-12 23:38:01 +00:00
Toshihito Kikuchi 5e3192a80e Bug 1694489 - Block more versions of K7 Total Security. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D107959
2021-03-11 22:54:03 +00:00
Mike Hommey 9c0fcac97c Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses, and the updater, for which we keep using vsnprintf.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-03-10 23:52:40 +00:00
Mike Hommey e47bda795b Bug 1690167 - Add support for the hh length modifier in Printf.cpp. r=nika,Gankra
Test cases from TestIntegerPrintfMacros will cover this in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D103729
2021-03-10 23:52:40 +00:00
Mike Hommey c7936d817c Bug 1690167 - Add support for the j length modifier in Printf.cpp. r=Gankra
Test cases from TestIntegerPrintfMacros will cover this in an upcoming commit.

Differential Revision: https://phabricator.services.mozilla.com/D105080
2021-03-10 23:52:39 +00:00
Mike Hommey 3e40e0ce40 Bug 1690167 - Move Sprintf.h and IntegerPrintfMacros.h next to Printf.h. r=jwalden
Which means they move from MFBT to mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D103728
2021-03-10 23:52:39 +00:00
Agi Sferro 9ec0facdaa Bug 1694481 - Remove unused methods in GeckoLoader. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106181
2021-03-10 22:43:08 +00:00
Agi Sferro 71dbca3068 Bug 1694481 - Remove unused NativeZip. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106180
2021-03-10 22:43:07 +00:00
Agi Sferro b39485034a Bug 1694481 - Remove unused DirectBufferAllocator. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106179
2021-03-10 22:43:07 +00:00
Doug Thayer 6a24f1709b Bug 1696556 - Always run earlyBlankFirstPaint if we showed skele UI r=emalysz
This code is important for transitioning between the skeleton UI code and the
full-featured browser window code. Additionally, the original logic of disabling
when not on the default theme no longer applies, because it was intended to
eliminate white flashes in dark mode. However, with the skeleton UI, those
white flashes no longer occur.

Differential Revision: https://phabricator.services.mozilla.com/D107293
2021-03-09 18:37:53 +00:00