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

1505 Коммитов

Автор SHA1 Сообщение Дата
David Parks d7f1ab7118 Bug 1615752: Require 10-byte detour for Win 8.0 x64 CreateFileA and DuplicateHandle r=aklotz
In the current Win 8.0, these functions both start with a RIP-relative JMP (6 bytes) followed by 6 nops (6-bytes), which does not give us the 13-bytes we need for a trampoline so we require the trampoline to fit into 10 bytes.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 19:23:53 +00:00
Toshihito Kikuchi cc5d112b9f Bug 1615308 - Validate each entry of IAT for ntdll.dll before copying it into a new process. r=aklotz
We copy IAT for ntdll.dll into a new process so that our hook code can use
ntdll's functions even in the early stage.  However, IAT can be modified and
some entries may point to an address which is not valid in the child process.
In such a case, we should not copy IAT.  One example is Windows compat mode
which redirects some ntdll functions into AcLayers.dll via IAT.

With this patch, we verify each IAT entry and if any of them is outside ntdll,
we give up using the launcher process and start the browser process.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 00:19:41 +00:00
Gerald Squelart 6a8de0643e Bug 1618406 - Replace BlocksRingBuffer::BlockIndex with ProfileBufferBlockIndex - r=gregtatum,canaltinova
To facilitate the upcoming transition to a new Fission-friendly storage, all
uses of `BlocksRingBuffer::{,Block}Index` are replaced with
`ProfileBuffer{,Block}Index`.

`BlocksRingBuffer::{,Block}Index` are not needed anymore.

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

--HG--
extra : moz-landing-system : lando
2020-03-02 05:34:26 +00:00
Gerald Squelart 6ee54a61e0 Bug 1618406 - Add ProfileBuffer{,Block}Index - r=canaltinova
ProfileBufferIndex.h contains:
- `ProfileBufferIndex`, a generic index into a Profiler buffer.
- `ProfileBufferBlockIndex`, an almost-opaque index that should only point at
  valid (or expired) blocks.

These will soon be used instead of `BlocksRingBuffer::{,Block}Index`, to make
the transition away from `BlocksRingBuffer` easier.

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

--HG--
extra : moz-landing-system : lando
2020-03-02 05:33:25 +00:00
Botond Ballo ca19967656 Bug 1615275 - Remove the temporary suppression added previously. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D64485

--HG--
extra : moz-landing-system : lando
2020-02-28 15:47:10 +00:00
Toshihito Kikuchi cd995fd09d Bug 1617935 - Support opcode83 [r+disp8],imm8 in x86 detour. r=handyman
In x86, our detour handles opcode 83 only when the Mod bits is 3.
When working on another project, I hit the instruction `cmp [ebp+0Ch],1`
where the Mod bits is 1, and it can be easily handled by a small fix.
It turned out my project does not need it, but it'd be good to have this.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 21:11:55 +00:00
Andrew McCreight 4babb2b5ab Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Christian Holler 77294951e7 Bug 1614605 - Add permanent deadlock suppressions for single thread. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D63757

--HG--
extra : moz-landing-system : lando
2020-02-24 17:36:00 +00:00
Ciure Andrei 00dd87f6f4 Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight b197e1f783 Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Christian Holler 859b506961 Bug 1598342 - Import TSan fix D74828 from Clang upstream. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63378

--HG--
extra : moz-landing-system : lando
2020-02-26 21:19:47 +00:00
Gerald Squelart 2e862dd93e Bug 1616298 - ULEB128Reader - r=canaltinova
Unsigned LEB128 parser class that can be fed bytes one by one.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 01:40:33 +00:00
Gerald Squelart 29ff6c0fbd Bug 1616298 - Run BaseProfiler-independent tests even when BaseProfiler is not built - r=gregtatum,canaltinova
Some of the BaseProfile headers are always available, even when BaseProfiler
itself is not built, so we should test these in all cases.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 01:39:58 +00:00
Arthur Iakab a973454927 Backed out 2 changesets (bug 1616298)for causing build bustages on TestBaseProfiler.cpp
CLOSED TREE

Backed out changeset 781be7f64b1a (bug 1616298)
Backed out changeset a3920eccb1ac (bug 1616298)
2020-02-25 20:55:44 +02:00
Gerald Squelart bd615e6031 Bug 1616298 - ULEB128Reader - r=canaltinova
Unsigned LEB128 parser class that can be fed bytes one by one.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 06:05:29 +00:00
Gerald Squelart 8f7a1f5c14 Bug 1616298 - Run BaseProfiler-independent tests even when BaseProfiler is disabled - r=gregtatum,canaltinova
Some of the BaseProfile headers are always available, even when BaseProfiler
itself is disabled, so we should test these in all cases.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 17:01:37 +00:00
Christian Holler 583260130a Bug 1615265 - Suppress data race in OffThreadDecodeCallback. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D63448

--HG--
extra : moz-landing-system : lando
2020-02-20 10:00:12 +00:00
Michal Novotny 427ad8bf1f Bug 1614637 - Remove suppression for data race in CacheStorageService::OnMemoryConsumptionChange() r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D63259

--HG--
extra : moz-landing-system : lando
2020-02-19 09:52:12 +00:00
Christian Holler 35f070d805 Bug 1616342 - Add Unity-related library to TSan suppression list. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63309

--HG--
extra : moz-landing-system : lando
2020-02-19 10:39:03 +00:00
Mike Shal d8e4653d19 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 13:22:46 +00:00
Doug Thayer 7847f77986 Bug 1615045 - Remove StartupCache tsan race suppression r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62849

--HG--
extra : moz-landing-system : lando
2020-02-14 20:29:26 +00:00
Christian Holler 1847c7f638 Bug 1615275 - Add temporary suppression for GetVelocity data race. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D62887

--HG--
extra : moz-landing-system : lando
2020-02-14 21:37:13 +00:00
Cosmin Sabou 302a8d76a6 Backed out 2 changesets (bug 1615045) for tsan failures on StartupCache.cpp.
CLOSED TREE

Backed out changeset c0414b3adbe8 (bug 1615045)
Backed out changeset 56ef1d43a305 (bug 1615045)
2020-02-14 19:32:41 +02:00
Doug Thayer 7e6ec0f8b0 Bug 1615045 - Remove StartupCache tsan race suppression r=froydnj
Depends on D62848

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

--HG--
extra : moz-landing-system : lando
2020-02-14 13:40:53 +00:00
Cosmin Sabou ff39f9206d Backed out 2 changesets (bug 1613263, bug 1611326) for presummably causing l10n langpack bustages. a=backout
Backed out changeset 77e54e76848a (bug 1611326)
Backed out changeset 36ba18ac3a68 (bug 1613263)
2020-02-14 15:02:21 +02:00
Mike Shal ad0c283ab2 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 23:07:04 +00:00
Coroiu Cristina fc53596ca3 Backed out 2 changesets (bug 1598068) for build bustage at ShowSSEConfig on a CLOSED TREE
Backed out changeset 5fb8d24977eb (bug 1598068)
Backed out changeset eba60d849030 (bug 1598068)
2020-02-14 00:48:07 +02:00
James Willcox 5a405a1191 Bug 1598068 - Add ashmem abstraction to mozglue and use it everywhere r=glandium,jld
Apps targeting SDK 29 are not allowed to open /dev/ashmem directly, and
instead must use NDK functions. Those functions are only available in
SDK 26 and higher, so we need this shim to use the functions if they
are available, else fallback to opening /dev/ashmem directly.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 22:17:05 +00:00
Brindusan Cristian e2fb6b8344 Backed out changeset 7fefed11f117 (bug 1611326) for build bustages at update-1.xpi.stub. CLOSED TREE 2020-02-13 23:33:34 +02:00
Mike Shal e6464dd404 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 20:31:50 +00:00
Christian Holler 9614ab7d1f Bug 1615202 - Suppression intermittent XDR race variation in TSan. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62722

--HG--
extra : moz-landing-system : lando
2020-02-13 14:26:59 +00:00
Christian Holler 57dc730d44 Bug 1615228 - Suppress race with base::Thread::Stop(). r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62720

--HG--
extra : moz-landing-system : lando
2020-02-13 14:27:38 +00:00
Christian Holler 5059d9b44d Bug 1615125 - Update TSan suppressions to address intermittents. r=njn CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com//D62674

--HG--
extra : amend_source : d855ee5e660ebb11f62f84a1745441add5b52b0d
2020-02-13 02:43:32 +02:00
Christian Holler 3ec290bd27 Bug 1615045 - Add temporary TSan suppression for StartupCache. r=froydnj CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D62647

--HG--
extra : amend_source : 36b0f1625051fc190a0238908917138d229f07bf
2020-02-12 22:19:04 +02:00
Christian Holler 782c1333ca Bug 1612711 - Update TSan suppressions for Mochitests/XPCShell tests. r=froydnj
Depends on D62628

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

--HG--
extra : moz-landing-system : lando
2020-02-12 19:15:16 +00:00
Toshihito Kikuchi f6a7430688 Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman
This patch adds a function to get an exported function in a remote process.
We need this implementation to address Bug 1604008, Bug 1608645, and Bug 1610790.

When `WindowsDllInterceptor` detours a function in a remote process, we used the
native `GetProcAddress` locally, and then detours the returned address in the
target process.  The problem is if the caller's export table was modified, the
address returned from `GetProcAddress` might be invalid in the target process,
which is Bug 1604008.

I implemented `GetProcAddress` depending on both local and remote process image,
but it caused two regressions Bug 1608645 and Bug 1610790 because multiple
applications modify firefox's export table in multiple ways, such as replacing
an entry of EAT, replacing an RVA to Export section, or etc.

With this patch, we can use `PEExportSection<MMPolicy>::GetProcAddress` to get
an exported function in a remote process without relying on any local data so
that it's not impacted by modification of the local export table.

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

Depends on D62314
2020-02-11 22:21:10 +02:00
Toshihito Kikuchi 1764f470d6 Bug 1610790: Part 1 - Use wmain in mozglue/tests. r=handyman
This patch changes the entrypoint of test programs under mozglue/tests so that
a coming test program can handle a command string easily.

Differential Revision: https://phabricator.services.mozilla.com//D62314
2020-02-12 02:23:57 +02:00
Cosmin Sabou aa2a505209 Backed out 2 changesets (bug 1610790) for causing build bustages about ShowSSEConfig.
CLOSED TREE
2020-02-12 01:10:38 +02:00
Toshihito Kikuchi 23b368208e Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman
This patch adds a function to get an exported function in a remote process.
We need this implementation to address Bug 1604008, Bug 1608645, and Bug 1610790.

When `WindowsDllInterceptor` detours a function in a remote process, we used the
native `GetProcAddress` locally, and then detours the returned address in the
target process.  The problem is if the caller's export table was modified, the
address returned from `GetProcAddress` might be invalid in the target process,
which is Bug 1604008.

I implemented `GetProcAddress` depending on both local and remote process image,
but it caused two regressions Bug 1608645 and Bug 1610790 because multiple
applications modify firefox's export table in multiple ways, such as replacing
an entry of EAT, replacing an RVA to Export section, or etc.

With this patch, we can use `PEExportSection<MMPolicy>::GetProcAddress` to get
an exported function in a remote process without relying on any local data so
that it's not impacted by modification of the local export table.

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

Depends on D62314

--HG--
extra : rebase_source : 3088f5997a2097ef22ce8567783375e5f7866ab2
2020-02-11 22:21:10 +02:00
Toshihito Kikuchi 638cc48d46 Bug 1610790: Part 1 - Use wmain in mozglue/tests. r=handyman
This patch changes the entrypoint of test programs under mozglue/tests so that
a coming test program can handle a command string easily.

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

--HG--
extra : rebase_source : a180de844700bbee60a6491a35da33da84aa12ed
2020-02-10 19:58:33 +02:00
Cosmin Sabou d8474fa6b6 Backed out changeset f0890a32d6bb (bug 1604008) as requested by tkikuchi (toshi).
--HG--
extra : rebase_source : 799ec22fbc48b549c2e9d5ea295bcf92cb941b5d
2020-02-11 23:21:17 +02:00
Cosmin Sabou b438e2a16f Backed out changeset f74adc43b654 (bug 1608645) as requested by tkikuchi (toshi).
--HG--
extra : rebase_source : 83d53600fe057aca34128ac37b451120cb3337b5
2020-02-11 23:19:56 +02:00
Toshihito Kikuchi 3694eeda43 Bug 1592486 - Store ModuleLoadFrame::sTopFrame as a global variable if TLS is not ready. r=aklotz
We had a thread-local varialbe `ModuleLoadFrame::sTopFrame` to track the topmost
stack frame of `LdrLoadDll`.  However, our hook function `patched_LdrLoadDll` can
be called even before TLS is initialized.  In such a case, accessing `sTopFrame`
causes AV.

This patch introduces `SafeThreadLocal` to safely access a thread-local varialbe.
If TLS is not initialized, it falls back to a global variable because in that
early stage there is only a single thread running.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 18:08:11 +00:00
Narcis Beleuzu 614e851352 Backed out changeset 6866be136e53 (bug 1592486) for cppunit failures on TestNativeNt.exe . CLOSED TREE 2020-02-06 11:53:45 +02:00
Toshihito Kikuchi c531413173 Bug 1592486 - Store ModuleLoadFrame::sTopFrame as a global variable if TLS is not ready. r=aklotz
We had a thread-local varialbe `ModuleLoadFrame::sTopFrame` to track the topmost
stack frame of `LdrLoadDll`.  However, our hook function `patched_LdrLoadDll` can
be called even before TLS is initialized.  In such a case, accessing `sTopFrame`
causes AV.

This patch introduces `SafeThreadLocal` to safely access a thread-local varialbe.
If TLS is not initialized, it falls back to a global variable because in that
early stage there is only a single thread running.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 03:10:57 +00:00
Emilio Cobos Álvarez 33b4cfe736 Bug 1610702 - Generalize Vector::podResizeToFit into Vector::shrinkStorageToFit(). r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D61337

--HG--
extra : moz-landing-system : lando
2020-02-03 17:32:12 +00:00
Edwin Takahashi d174b45f2d Bug 1602689 - whitelist RegisteredThread::RegisteredThread r=decoder,gerald
Changes:

Whitelist the `RegisteredThread::RegisteredThread` failures for linux1804-64-asan/opt temporarily while the parent bug is left open, to support `mochitest-browser-chrome` migration to linux1804-64.

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

--HG--
extra : moz-landing-system : lando
2020-01-30 20:21:31 +00:00
Sylvestre Ledru 1ba4b73c17 Bug 1611635 - TestPrintf.cpp: remove a test - causes a warning with gcc > 9 r=froydnj
The "(null)" printing behavior is a glibc extension and the specified behavior
in the standard is undefined

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

--HG--
extra : moz-landing-system : lando
2020-01-26 08:23:45 +00:00
David Major 76ce9d96fa Bug 1598119 - Disable Control Flow Guard for WindowsDllInterceptor returns r=handyman
Under the stronger Control Flow Guard scheme coming in clang 10, when a nop-space hook jumps back to the original API, at `ntdll!Whatever+2`, that address is not a registered jump target, so we crash with a CFG failure. Since this is a deliberate violation of the rules, let's disable CFG for these calls.

Based on my testing, this is the only place we need to use this attribute, so I placed its definition close to the use. (Had we needed more of these, I would have put it in mfbt/.)

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

--HG--
extra : moz-landing-system : lando
2020-01-21 18:50:22 +00:00
Sylvestre Ledru 187e9bafaf Bug 1519636 - Automatically reformat recent changes using clang-format r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-21 09:51:27 +00:00