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

2241 Коммитов

Автор SHA1 Сообщение Дата
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
Bob Owen 86def8279e Bug 1546156: Don't forcibly load user32 when win32k lockdown is enabled. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D107498
2021-03-09 08:35:07 +00:00
Doug Thayer e2fa1effe1 Bug 1696568 - Ensure skeleton UI window is always consumed if created r=emalysz
If we error out in, say, DrawSkeletonUI, the window we created will be orphaned
and left to sit there indefinitely. This patch fixes that by separating the
error from the consume result.

Differential Revision: https://phabricator.services.mozilla.com/D107301
2021-03-08 21:26:06 +00:00
Toshihito Kikuchi f5928c8e7c Bug 1692908 - Block AVerMedia's virtual camera module. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D106636
2021-02-26 22:06:19 +00:00
Aaron Klotz 004362bf3e Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium
We know that some GV installations (particularly but not exlcusively Focus) are
failing to load `libxul.so` during early Gecko bootstrapping. Unfortunately
a boolean pass/fail result is not giving us sufficient information to be able to
properly troubleshoot this problem.

This patch adds `mozilla::Result`-based return values to `XPCOMGlueLoad` and
`GetBootstrap` in an effort to produce more actionable information about these
failures.

We include either a `nsresult` or, if the failure is rooted in a dynamic linker
failure, appropriate platform-specific error information:

* On Unix-based platforms, a `UniqueFreePtr<char>` containing the string from `dlerror(3)`;
* On Windows, the Win32 `DWORD` error code from `GetLastError()`.

For non-Android platforms, I updated them to handle the new return type, but
otherwise did not make any further changes.

For Android, we include the error information in the message string that we pass
into the Java `Exception` that is subsequently thrown.

Differential Revision: https://phabricator.services.mozilla.com/D104263
2021-02-23 23:25:22 +00:00
Gerald Squelart 96f3fabfcb Bug 1693037 - Fix non-MOZ_GECKO_PROFILER builds - r=florian
No code changes.

Build issues were found by renaming `MOZ_GECKO_PROFILER` to something else in toolkit/moz.configure, in both unified and non-unified builds, on all supported platforms.

Also updated some profiler-related comments.

Differential Revision: https://phabricator.services.mozilla.com/D105375
2021-02-17 22:36:28 +00:00
Andreea Pavel 64289058b6 Backed out 5 changesets (bug 1690167) for failing xpcshell at bootstrapSvc.js on a CLOSED TREE
Backed out changeset d28c0f11743f (bug 1690167)
Backed out changeset 3b2bebed9128 (bug 1690167)
Backed out changeset 7e925e90a251 (bug 1690167)
Backed out changeset f85934a2b7ad (bug 1690167)
Backed out changeset 6d83474e81bb (bug 1690167)
2021-02-17 07:10:58 +02:00
Mike Hommey 622b111f9e 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.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-02-16 21:20:04 +00:00
Mike Hommey 34cf11e754 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-02-16 21:20:04 +00:00
Mike Hommey 7912f64d75 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-02-16 21:20:04 +00:00
Mike Hommey 900d63959b 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-02-16 21:20:03 +00:00
Florian Quèze 2df72b6edb Bug 1691092 - When capturing a marker stack, stop when the PROFILER category is encountered, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D104248
2021-02-16 19:04:03 +00:00
Florian Quèze 7f356c706e Bug 1691092 - add PROFILER category to make profiler overhead very visible, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D104242
2021-02-16 19:04:02 +00:00
Gerald Squelart 811250c823 Bug 1691589 - Extract profiler label APIs into separate headers - r=florian
New headers BaseProfilerLabels.h and ProfilerLabels.h now contain all label-related APIs.

These files were hg-copied from the main headers, to preserve history, and then non-label content was removed from the main headers.
The "RAII" macros were moved to these *ProfilerLabels.h headers, because that's the most-common header in which they're needed. Meta-bug 1681416 will probably move these again as needed.

Differential Revision: https://phabricator.services.mozilla.com/D104587
2021-02-16 04:44:19 +00:00