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

1017 Коммитов

Автор SHA1 Сообщение Дата
Christian Holler bdf8e4d393 Bug 1471532 - Support Windows in ASan Nightly Reporter builds. r=froydnj
MozReview-Commit-ID: AK2dBOgoazY

--HG--
extra : rebase_source : 6ed99ce79180f2a6f2d54a0898cb02acbd6e9fb6
2018-06-27 11:19:00 +02:00
Andrew Halberstadt 9435736ade Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt
This will make sure that when running |mach python-test --python 3| locally,
we only run the tests that also run in CI with python 3 (and therefore pass
presumably).

MozReview-Commit-ID: 3OBr9yLSlSq

--HG--
extra : rebase_source : 456340d0ecdddf1078f2b5b4ebb1eddf3813b26a
2018-06-27 11:10:02 -04:00
Jim Chen 9d10605784 Bug 1460989 - Hold system linker lock while modifying debug map. r=glandium, a=RyanVM
When we modify the debug map, we could be racing with the system linker,
either when we modify the entries or when we change page protection
flags. To fix the race, we need to take the system linker's internal
lock when we perform any kind of modification on the debug map.

One way to hold the system linker lock is to call dl_iterate_phdr, and
perform our actions inside the callback, which is invoked with the
lock being held. However, dl_iterate_phdr is only present on Android
5.0+, and even then, dl_iterate_phdr is only protected by the linker
lock on Android 6.0+.

This means that with this patch, we can only safely modify the debug map
on Android 6.0+, which I think is acceptable for an operation that only
benefits a debugger.

MozReview-Commit-ID: BowBEO8tu8Z

--HG--
extra : amend_source : 837631dfc2ef17b24ffe5778bcb70dc29b7dfc66
2018-06-15 04:24:10 -04:00
Carl Corcoran 432149de7d Bug 1467731: Prevent WinVerifyTrust from hitting the network; r=aklotz
MozReview-Commit-ID: DSpHXsJkeoX

--HG--
extra : rebase_source : 2352f566ca9819d7e49c98889d021df9aa430d7b
extra : source : 269aeb1d215775a2117494e02185eb08f27c54e3
2018-06-08 12:45:09 +02:00
Ciure Andrei 83c5f0bd74 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE
--HG--
rename : browser/app/LaunchUnelevated.cpp => browser/app/winlauncher/LaunchUnelevated.cpp
rename : browser/app/LaunchUnelevated.h => browser/app/winlauncher/LaunchUnelevated.h
rename : browser/app/LauncherProcessWin.cpp => browser/app/winlauncher/LauncherProcessWin.cpp
rename : browser/app/LauncherProcessWin.h => browser/app/winlauncher/LauncherProcessWin.h
rename : browser/app/ProcThreadAttributes.h => browser/app/winlauncher/ProcThreadAttributes.h
2018-06-08 00:56:15 +03:00
Aaron Klotz d057aef830 Bug 1445025: Part 2 - Move blocklist definitions into separate header file and add new initialization flag; r=mhowell
* This allows us to use a single blocklist definition in multiple places.
* This patch also adds support for a new initialization flag that, when enabled,
  disables the DLL Blocking part of the mozglue blocklist but leaves the
  profiling and stackwalking suppression bits intact.
2018-06-05 15:16:13 -06:00
Cosmin Sabou 1cda6f4992 Backed out 6 changesets (bug 1445025) for browser chrome failures on browser_checkdllblockliststate.js. CLOSED TREE
Backed out changeset a1203eb4cee9 (bug 1445025)
Backed out changeset 64b003dceafb (bug 1445025)
Backed out changeset a6cff2b478da (bug 1445025)
Backed out changeset 4dbc7fbb3361 (bug 1445025)
Backed out changeset 1ad82650ca1c (bug 1445025)
Backed out changeset 5c63001e1ce6 (bug 1445025)

--HG--
rename : browser/app/winlauncher/LaunchUnelevated.cpp => browser/app/LaunchUnelevated.cpp
rename : browser/app/winlauncher/LaunchUnelevated.h => browser/app/LaunchUnelevated.h
rename : browser/app/winlauncher/LauncherProcessWin.cpp => browser/app/LauncherProcessWin.cpp
rename : browser/app/winlauncher/LauncherProcessWin.h => browser/app/LauncherProcessWin.h
rename : browser/app/winlauncher/ProcThreadAttributes.h => browser/app/ProcThreadAttributes.h
2018-06-07 12:09:22 +03:00
Aaron Klotz 05eb3b3d8a Bug 1445025: Part 2 - Move blocklist definitions into separate header file and add new initialization flag; r=mhowell
* This allows us to use a single blocklist definition in multiple places.
* This patch also adds support for a new initialization flag that, when enabled,
  disables the DLL Blocking part of the mozglue blocklist but leaves the
  profiling and stackwalking suppression bits intact.

--HG--
extra : rebase_source : ff4dad72f57c5662fc9e1bbd9e4efb3ff01470ef
2018-06-05 15:16:13 -06:00
Ryan VanderMeulen 4aef6ab351 Backed out changeset a4465713555b (bug 1460989) for causing the Galaxy S8 crash rate to spike. 2018-06-06 21:07:48 -04:00
Xidorn Quan 75cc8c371b Bug 1452204 part 2 - Use RtlCaptureContext to capture context for current thread and remove walker thread. r=glandium
GetThreadContext() returns a context pointing to its own frame when it
gets called with the current thread handle. That frame can go away after
it returns. This patch instead uses RtlCaptureContext(), which captures
the context of its caller, when walking the current thread.

In the past, we also used a walker thread when nullptr is passed in for
aThread, but the check doesn't cover all the cases, and having another
thread is apparently more complicated than this approach.

MozReview-Commit-ID: 3TAatDc9BLh

--HG--
extra : rebase_source : 7978cce48b8939a723cd5ccafe86d3f7aca6d3ac
2018-06-04 19:23:27 +10:00
Xidorn Quan 5ce8f98cba Bug 1452204 part 1 - Correctly set walkCallingThread. r=glandium
GetCurrentThread() returns a pseudo handle, so comparing it against
the passed in argument doesn't make sense in most cases. This patch
changes it to using the thread id for comparison, which is guaranteed
to be unique in the whole lifetime of a thread.

MozReview-Commit-ID: 5TNAgLkcS6m

--HG--
extra : rebase_source : d5bb21ac57a4c1149b8d332ea7b28a78ed994c62
2018-06-04 19:17:32 +10:00
Sylvestre Ledru 89e4661534 Bug 1464869 - Fix flake8/pep8 issue by hand in mozglue/ r=glandium
MozReview-Commit-ID: 4U31tUZPm8U

--HG--
extra : rebase_source : 5b9fdb66a482e89e3d70fd5e8fd9a86c055f7044
2018-05-25 21:28:12 -07:00
Margareta Eliza Balazs 44905b7be9 Backed out 2 changesets (bug 1452204) for perma failing in memory/replace/dmd/test/test_dmd.js
Backed out changeset 4431cecd4c2d (bug 1452204)
Backed out changeset 72fc40daf6cd (bug 1452204)
2018-06-05 11:01:54 +03:00
Xidorn Quan 718caa9bc0 Bug 1452204 part 2 - Use RtlCaptureContext to capture context for current thread. r=glandium
GetThreadContext() returns a context pointing to its own frame when it
gets called with the current thread handle. That frame can go away after
it returns. This patch instead uses RtlCaptureContext(), which captures
the context of its caller, when walking the current thread.

MozReview-Commit-ID: 3TAatDc9BLh

--HG--
extra : rebase_source : d5d88f0a9fa07da5b31f27c51c78ee2bfb527a8e
2018-06-04 19:23:27 +10:00
Xidorn Quan 7025ae7cbc Bug 1452204 part 1 - Correctly set walkCallingThread. r=glandium
GetCurrentThread() returns a pseudo handle, so comparing it against
the passed in argument doesn't make sense in most cases. This patch
changes it to using the thread id for comparison, which is guaranteed
to be unique in the whole lifetime of a thread.

MozReview-Commit-ID: 5TNAgLkcS6m

--HG--
extra : rebase_source : 0e72e8f6196c8079086ca697b9a121c6987ef43e
2018-06-04 19:17:32 +10:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Aaron Klotz 2884d63e52 Bug 1463596: Ensure that WritableTargetFunction correctly handles changing of protection attributes across regions that straddle page boundaries and have different initial protection attributes; r=handyman 2018-05-23 16:50:49 -06:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Aaron Klotz 0300dd1f10 Bug 1463961: DLL Interceptor - Make shared VM policy only work for in-proc interceptors and remove pid mapping; r=handyman
--HG--
extra : rebase_source : a85b283a380e0f30935868c10e3a9d626a8a0061
2018-05-28 16:54:58 -06:00
Jim Chen 32c922179c Bug 1460989 - Check page protection flags again after mprotect(); r=glandium
We are apparently still crashing even after mprotect() with write flag
returns successfully. This patch reads the flags again after mprotect()
returns, and hopefully the flags will tell the truth of whether the page
is truly writable or not after calling mprotect().

MozReview-Commit-ID: Jsg8vHKFEvJ

--HG--
extra : rebase_source : b028aa0d5cefd50302bfc2502292d9129d202e09
2018-05-30 11:47:07 -04:00
Masatoshi Kimura 05cc187118 Bug 1462727 - Make WindowsMapRemoteView.cpp work with April 2018 Update SDK. r=aklotz
MozReview-Commit-ID: DtzFeCmbGqO

--HG--
extra : rebase_source : 242862f31d3a2f6b0eb7ae53392f7c4ed3296d20
2018-05-19 02:12:14 +09:00
Tom Ritter 4e3daa47c1 Bug 1460720 Do not define _aligned_malloc - instead define _aligned_malloc_impl and export _aligned_malloc r=glandium
MozReview-Commit-ID: 3EwAd81Iz7r

--HG--
extra : rebase_source : 899303e4c5db39b24451692f59a9d3bd1f9fd5a2
2018-05-15 11:10:48 -05:00
Margareta Eliza Balazs d4b9e50875 Merge inbound to mozilla-central. a=merge 2018-05-16 13:00:51 +03:00
Markus Stange 68470bc3c0 Bug 1461555 - Rename PseudoStack to ProfilingStack. r=njn
This also changes many references to the 'pseudo stack' to refer to the 'label
stack' instead. The label stack is one of the two stacks that are managed by
the profiling stack, the other stack being the JS interpreter stack.

MozReview-Commit-ID: Ed0YMMeCBY8

--HG--
extra : rebase_source : 5675d670f424c7d7dda04bafc2b3431fa2485e3c
2018-05-15 01:03:11 -04:00
Markus Stange 633ac66e7f Bug 1461555 - Rename ProfileEntry to ProfilingStackFrame. r=njn
The term "entry" is already used for elements in the profile buffer.

MozReview-Commit-ID: 1aB22V6veQh

--HG--
extra : rebase_source : c664eb4d6bed6cb74ba8a1b67ea99bd8ca57bcf7
extra : source : 3264c0cc0027b240b55bd3aebf27263b1e1d1cc0
2018-05-15 01:14:03 -04:00
Markus Stange 73800e02dd Bug 1461053 - Treat SP marker frames as their own kind, instead of lumping them together with label frames. r=njn
MozReview-Commit-ID: 5nQEIgBY4SP

--HG--
extra : rebase_source : 9b59e41fdf62e86941104248d9c0cf08b73736f2
2018-05-14 23:30:32 -04:00
Markus Stange 818ad4ea69 Bug 1461053 - Rename Cpp frames to label frames in the ProfilingStack. r=njn
The name Cpp was confusing, because C++ functions are in the native stack, not
in the pseudo stack. The pseudo stack only contains frames for manually
instrumented code that uses AutoProfilerLabel, and JS frames.

MozReview-Commit-ID: 9ptfhREo0qy

--HG--
extra : rebase_source : 76a1a32acb4c946aeb2ad45e904e419c1c9e2ad1
2018-05-14 23:21:29 -04:00
Margareta Eliza Balazs 4f9a2ba08e Merge inbound to mozilla-central. a=merge 2018-05-11 12:36:02 +03:00
Eric Rahm c6d32ead9e Bug 1364624 - Part 2: Switch from CRITICALSECTION to SRWLOCK. r=froydnj
--HG--
extra : rebase_source : ff510d6c1959823b2a2a5ac25ae80b6067fd70dc
2018-04-27 16:48:47 -07:00
Mike Hommey b94cf61acd Bug 1459722 - Remove zxx_stream. r=froydnj
It was necessary back when we were doing decompression from a signal
handler, because we couldn't then have zlib call malloc, but we don't
do that anymore, so the whole wrapping is effectively unused.

With the wrapping gone, we manually initialize the zalloc, zfree and
opaque fields, as specified in the zlib documentation.

--HG--
extra : rebase_source : c4e84009e65f71f6c43362468c2934e04a8abda1
2018-05-10 11:45:23 +09:00
David Major 976282cb1f Bug 1460407: Fix printf format warning in TestDllInterceptorCrossProcess.cpp. r=aklotz 2018-05-09 16:16:20 -04:00
Aaron Klotz a1373c8d5a Bug 1451524: Switch the default interceptor VM policy over from unique to shared; r=handyman 2018-04-25 15:25:16 -06:00
Jon Coppeard b8b2fad2eb Bug 1457882 - Emulate glibc adaptive mutexes on OSX r=nfroyd 2018-05-02 15:11:53 +01:00
Aaron Klotz 0850bc3ec5 Bug 1451511: Add cross-process function hooking to DLL interceptor; r=handyman
--HG--
rename : ipc/mscom/DynamicallyLinkedFunctionPtr.h => mozglue/misc/DynamicallyLinkedFunctionPtr.h
extra : amend_source : 1eea43cda6e05f722f0b1373535d9ceabac18661
2018-04-04 16:31:43 -06:00
Aaron Klotz b59f7ece0f Bug 1451524: Make interceptor shared VM policy compatible with changes from bug 1456054; r=handyman
--HG--
extra : rebase_source : 14d4eaedec28708978bac42495f3a1eed180ac48
2018-04-26 11:12:55 -06:00
Hiroyuki Ikezoe 30abf8cc5d Bug 1456672 - Add a brief note that we prefer to pass TimeStamp objects by value. r=heycam,kats DONTBUILD
MozReview-Commit-ID: 6EvYJvBv5DF

--HG--
extra : rebase_source : 054ca1491ebbdc4788f90bf9fc60da75130b9af8
2018-04-26 14:53:23 +09:00
arthur.iakab b952733074 Merge mozilla-central to inbound on a CLOSED TREE
--HG--
extra : amend_source : 211f8c266bd77e1617feb70153708664d3edf337
2018-04-26 02:08:49 +03:00
Dorel Luca 7652908dea Backed out changeset 3802f86e1bd1 (bug 1364624) for shutdown hangs on reftests. a=backout 2018-04-26 00:27:45 +03:00
Aaron Klotz ea4048c1e7 Bug 1456054: Verify that a redirected address is accessible and backed by an image; r=handyman 2018-04-23 15:07:54 -06:00
Aaron Klotz ff279da3a5 Bug 1451524: Add a VM policy to the DLL interceptor that allows multiple instances to share a single trampoline space; r=handyman 2018-04-02 17:04:17 -06:00
Eric Rahm b626618f7d Bug 1364624 - Switch from CRITICALSECTION to SRWLOCK. r=froydnj
--HG--
extra : rebase_source : 4acc959bb8ccc33f6d549b71bbd83b8f8d09b353
2018-04-23 10:45:20 -07:00
James Willcox 624417af1d Bug 1455662 - Guard against mprotect() failure when manipulating link map r=jchen
MozReview-Commit-ID: 7orhBmf4j5j
2018-04-25 15:06:55 -05:00
Aaron Klotz 5317435ec0 Bug 1432653: Refactor the DLL interceptor and parameterize its memory operations; r=handyman
MozReview-Commit-ID: EYxVsQ1kicy

--HG--
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherBase.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherDetour.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherNopSpace.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/nsWindowsDllInterceptor.h
rename : toolkit/xre/test/win/TestDllInterceptor.cpp => mozglue/tests/interceptor/TestDllInterceptor.cpp
extra : amend_source : 84a7590b40a649f7321eb05feca4f9256ecc5d22
2018-04-09 13:37:52 -06:00
James Willcox cf502cd7d7 Bug 1450793 - Don't assume 4k page size r=glandium
MozReview-Commit-ID: DWSIUOFfKW5
2018-04-13 08:46:35 -05:00
Nika Layzell 0d56c8977a Bug 1437167 - Part 2: Round submillisecond condition variable waits up to 1ms, r=froydnj 2018-04-10 17:49:47 -04:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Andrea Marchesini 0d9f03eaef Bug 1450959 - TimeStamp class doesn't need to be friend of StartupTimelineRecordExternal, r=glandium 2018-04-05 06:44:31 +02:00
Marco Castelluccio f2aadf350c Bug 1433408 - Blocklist Dell Backup and Recovery tool DLLs as they cause crashes. r=aklotz
--HG--
extra : rebase_source : 85809f1757f257be0e0bf8848b0cc104e0543eb6
2018-02-15 23:13:29 +01:00
Noemi Erli 112dc4a070 Backed out changeset e72d2ab40d64 (bug 1450959) for failing in builds/worker/workspace/build/src/obj-firefox/dist/include/js/UbiNode.h on a CLOSED TREE 2018-04-05 11:55:19 +03:00
Andrea Marchesini 933fa97728 Bug 1450959 - TimeStamp class doesn't need to be friend of StartupTimelineRecordExternal, r=glandium 2018-04-05 06:44:31 +02:00
James Willcox 0e79fd0b72 Bug 1447607 - Correctly init and update ElfLoader::Singleton::lastError r=glandium
MozReview-Commit-ID: r1bclXdt4V

--HG--
extra : rebase_source : c9f612def794a6edc5fa8dd99fc08d2df4ed1cf1
2018-03-30 09:57:43 -05:00
Nathan Froyd 5be768776b Bug 1448032 - use SprintfLiteral in some android glue code; r=glandium
SprintfLiteral is much nicer, and placates the clang plugin as well.
2018-03-27 10:51:31 -04:00
Nathan Froyd 1dba87fe96 Bug 1448029 - make constructors in the linker explicit; r=glandium
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Sebastian Hengst ede8ef2991 Bug 1446680 - Restrict WindowsDllBlocklist's gStartAddressesToBlock to Nightly builds. r=aklotz
MozReview-Commit-ID: H3G4fKfpUlf

--HG--
extra : rebase_source : e7d2dc04aca4157484af1874bc4e89e2f44997ca
2018-03-17 21:14:18 +01:00
Carl Corcoran f1404c4534 Bug 1435816: Prevent thread start in LoadLibrary; r=aklotz
MozReview-Commit-ID: 2TNPfrqebZ8

--HG--
extra : rebase_source : 96341de92f1f5973b440cf7e9125fcdb546f5901
2018-02-22 13:41:15 +01:00
Csoregi Natalia d77091952c Backed out changeset 66fb307a2a70 (bug 1435816) for windows mingw failures on WindowsDllBlocklist.cpp:822. CLOSED TREE 2018-03-16 16:38:57 +02:00
Carl Corcoran e5b4966489 Bug 1435816: Prevent thread start in LoadLibrary; r=aklotz
MozReview-Commit-ID: 2TNPfrqebZ8

--HG--
extra : rebase_source : 074f8af9964ad002a8e550223886c99a79e3543c
2018-02-22 13:41:15 +01:00
Nicholas Nethercote 68124009fc Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium.
This patch replaces the large -intPrefs/-boolPrefs/-stringPrefs flags with
a short-lived, anonymous, shared memory segment that is used to pass the early
prefs.

Removing the bloat from the command line is nice, but more important is the
fact that this will let us pass more prefs at content process start-up, which
will allow us to remove the early/late prefs split (bug 1436911).

Although this mechanism is only used for prefs, it's conceivable that it could
be used for other data that must be received very early by children, and for
which the command line isn't ideal.

Notable details:

- Much of the patch deals with the various platform-specific ways of passing
  handles/fds to children.

  - Linux and Mac: we use a fixed fd (8) in combination with the new
    GeckoChildProcessHost::AddFdToRemap() function (which ensures the child
    won't close the fd).

  - Android: like Linux and Mac, but the handles get passed via "parcels" and
    we use the new SetPrefsFd() function instead of the fixed fd.

  - Windows: there is no need to duplicate the handle because Windows handles
    are system-wide. But we do use the new
    GeckoChildProcessHost::AddHandleToShare() function to add it to the list of
    inheritable handles. We also ensure that list is processed on all paths
    (MOZ_SANDBOX with sandbox, MOZ_SANDBOX without sandbox, non-MOZ_SANDBOX) so
    that the handles are marked as inheritable. The handle is passed via the
    -prefsHandle flag.

  The -prefsLen flag is used on all platforms to indicate the size of the
  shared memory segment.

- The patch also moves the serialization/deserialization of the prefs in/out of
  the shared memory into libpref, which is a better spot for it. (This means
  Preferences::MustSendToContentProcesses() can be removed.)

MozReview-Commit-ID: 8fREEBiYFvc

--HG--
extra : rebase_source : 7e4c8ebdbcd7d74d6bd2ab3c9e75a6a17dbd8dfe
2018-02-16 17:54:16 +11:00
Jim Chen 5c88095f46 Bug 1442255 - 7. Switch the order of fd arguments; r=jchen
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.

MozReview-Commit-ID: CAVyYAIIBPm

--HG--
extra : rebase_source : 596f590443f727d1a79582202eed122f79ae85cf
2018-03-06 13:52:50 -05:00
Gurzau Raul 185d1fcf42 Backed out 7 changesets (bug 1442255) for failing c1 tests on mochitest/test_browserElement_inproc_PurgeHistory.html
Backed out changeset 208c4c42f641 (bug 1442255)
Backed out changeset 6a794e14fceb (bug 1442255)
Backed out changeset 62d1c57c37b4 (bug 1442255)
Backed out changeset 5d0f72867f53 (bug 1442255)
Backed out changeset c3305648ad30 (bug 1442255)
Backed out changeset 08f906f3a0c8 (bug 1442255)
Backed out changeset d7a43e59a1b4 (bug 1442255)
2018-03-06 17:08:57 +02:00
Jim Chen 9b7b3f4565 Bug 1442255 - 7. Switch the order of fd arguments; r=jchen
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.

MozReview-Commit-ID: CAVyYAIIBPm

--HG--
extra : rebase_source : 02bf7337fa9a6d1194809c224acb4a2690fd87a3
2018-03-06 00:04:56 -05:00
Mike Hommey 61d75ea276 Bug 1442468 - Remove workaround for http://code.google.com/p/android/issues/detail?id=23203. r=froydnj
That NDK bug has been fixed since r8c, and we now require something more
recent than that. This effectively reverts the changes from bug 720621
and bug 734832.

--HG--
extra : rebase_source : 9ff76a790ec4135dc0172cfd0f11fc1ecef7df64
2018-03-01 15:15:02 +09:00
Aaron Klotz 020963a272 Bug 1436845: Part 1 - Add BasicDllServices; r=jimm
BasicDllServices is a simplified implementation that allows programs other than
Firefox to link against mozglue and access DLL services without requiring any
XPCOM baggage.
2018-02-13 16:03:11 -07:00
Gabriele Svelto f167c2f3e8 Bug 1307153 - Add stack traces to the crash pings in Fennec; r=jchen,ted.mielczarek
MozReview-Commit-ID: ZJKUwHFsuK

--HG--
extra : amend_source : 9a57ff1d2cf15391f1f30fa63585220adbb1a49b
2018-01-19 16:48:00 +01:00
Aaron Klotz 6e0060b743 Bug 1460997: Out-of-process interceptors should use r/w instead of r/w/x when changing protection attributes prior to writing a trampoline; r=handyman 2018-05-11 15:41:19 -06:00
philipp 3971a035c7 Bug 1043775 - Put old versions of GDATA GDKBFltDll64.dll on Dll blocklist. r=marco 2018-02-14 09:51:00 +02:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson 0129d900f3 Bug 1436263 - Part 2: Replace `override final` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -08:00
Jim Chen 589e7e1a01 Bug 1391268 - 1. Add call to verify CRC; r=glandium
To reliably detect corrupt APK, this patch adds a GeckoLoader.verifyCRC
call to enable verification of CRC before extracting libs.

MozReview-Commit-ID: 5EpIfwREGIv
2018-02-14 16:56:54 -05:00
Aaron Klotz 1eec067d63 Bug 1437309: Delayload crypt32 and wintrust in mozglue; r=glandium 2018-02-12 12:17:36 -07:00
Alex Gaynor de20b74dc4 Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.

MozReview-Commit-ID: 8agL5jwxDSL

--HG--
extra : rebase_source : 17ebcef3e9d24f3d4e7515e3fae95e65cef76a79
2017-11-27 14:37:34 -06:00
Aaron Klotz 1beac92cc2 Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : 2e3726d37356479aee81915caed04fe7af74c815
2018-01-30 15:08:03 -07:00
Aaron Klotz 0213e8a4b6 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : f280fec92c867d0adbe7b82c0e829eeb10fce5a9
2018-01-30 14:23:10 -07:00
Dorel Luca 112cc1ff6b Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout
Backed out changeset a992887a6060 (bug 1430857)
Backed out changeset cc9b0ac5f66b (bug 1430857)
Backed out changeset 4bdd6d82f993 (bug 1430857)
2018-02-07 15:02:58 +02:00
Aaron Klotz e398eaca79 Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : f86c1a6fd2a44f21a71e7a7418267b3b0d5feeec
2018-01-30 15:08:03 -07:00
Aaron Klotz 200eb77750 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : 3a5b4a6f0412311f0b9080a2b3b3a31e45d15b75
2018-01-30 14:23:10 -07:00
Gurzau Raul c104d865cc Backed out 2 changesets (bug 1430857) for build bustage on a CLOSED TREE
Backed out changeset b12ea04f9c5a (bug 1430857)
Backed out changeset 6b88557d1e50 (bug 1430857)
2018-02-06 23:27:33 +02:00
Aaron Klotz 5f9a96be9c Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : e032ee8c4cf71e5225b51797443764549f4bbe56
2018-01-30 15:08:03 -07:00
Aaron Klotz eb3453b4d6 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : d8d2ec74e7f452cb1e8b5430f4445f3b0fc9181a
2018-01-30 14:23:10 -07:00
Tom Ritter 6d070e11bd Bug 1235982 Add CFG to firefox.exe and mozglue, and a mochitest to ensure a crash r=glandium,mconley
MozReview-Commit-ID: EYKgDyGtw8m

--HG--
extra : rebase_source : 76166d4fca452674d0a442778290e40106ce339c
2018-01-25 12:15:40 -06:00
Jim Chen 1f4f8416df Bug 1428182 - 3. Only include <linux/elf.h> for non-unified headers; r=glandium
Unified headers have a complete <elf.h> so we should include that
instead of <linux/elf.h>.

MozReview-Commit-ID: DkQv2vk1Q62

--HG--
extra : rebase_source : 7cd9eb04532c14b1dd0dc8747448b89d16e4f118
2018-01-30 14:08:22 -05:00
Cosmin Sabou c6a0d55423 Backed out 11 changesets (bug 1428182) for build bustages on pixman-inlines.h:29:10 on a CLOSED TREE
Backed out changeset 84c767de6202 (bug 1428182)
Backed out changeset 429433caa78c (bug 1428182)
Backed out changeset c576e9d1f68f (bug 1428182)
Backed out changeset 092662eab5eb (bug 1428182)
Backed out changeset 4dd7eaff3ab5 (bug 1428182)
Backed out changeset fbbb0745b139 (bug 1428182)
Backed out changeset 1d1278b289b7 (bug 1428182)
Backed out changeset 55891ffb3768 (bug 1428182)
Backed out changeset 4655e1b1b237 (bug 1428182)
Backed out changeset 377eada51b3c (bug 1428182)
Backed out changeset 17c0e373d921 (bug 1428182)

--HG--
rename : ipc/chromium/src/third_party/libevent/patches/android-api-level.patch => ipc/chromium/src/third_party/libevent/patches/android-arc4random-buf.patch
2018-01-30 01:22:33 +02:00
Jim Chen 3e76d4e233 Bug 1428182 - 3. Only include <linux/elf.h> for non-unified headers; r=glandium
Unified headers have a complete <elf.h> so we should include that
instead of <linux/elf.h>.

MozReview-Commit-ID: DkQv2vk1Q62

--HG--
extra : rebase_source : 43b3fa15042246d2c3ec37a3ca904822b0f68d0c
2018-01-29 17:38:13 -05:00
Mike Hommey d76723e154 Bug 1433273 - Remove mozglue/linker/dladdr.h. r=froydnj
It was added in bug 683127 as a forced include for nspr, and
accidentally became unused after bug 1230117, but it turns out that all
versions of Android we care about nowadays (and probably back then) now
support dladdr.

--HG--
extra : rebase_source : 024244627c215de2d35e2f4595b7612eb1723996
2018-01-26 06:21:30 +09:00
Mike Hommey 5e48214af2 Bug 1414506 - Use system dl_iterate_phdr for system loaded libraries when we can. r=froydnj
When looping through the debugger helper links during our
dl_iterate_phdr implementation, we effectively race with other threads
dlclose()ing libraries while we're working.

We do have a (rather involved) check in place to ensure that elf headers
are readable. But it turns out in practice, some dlclose() do happen
between the check and the actual read of the elf headers.

Unfortunately, we can't lock the system linker while we're looping, so a
better approach is to only loop through the libraries we loaded, and
rely on the system dl_iterate_phdr to iterate over the (remaining)
system libraries.

Unfortunately (again), Android versions < 5.0 don't have a system
dl_iterate_phdr, so we have to rely on the old iterator when it's not
present.

--HG--
extra : rebase_source : 3fd07589ed1939411ef72f481b7c72f761d53701
2018-01-23 15:59:18 +09:00
Mike Hommey 76f5fcdbab Bug 1414506 - Move dl_phdr_info filling and callback invocation to a separate class. r=froydnj
We're going to introduce two code paths that need to fill dl_phdr_info
from different iterators, so first move the code to a separate class,
that both code paths will be able to call.

--HG--
extra : rebase_source : a50663ad8d15d4f7a28d7138824003df5edd7f1c
2018-01-23 15:50:38 +09:00
Mike Hommey 2d8f41393f Bug 1414506 - Drive-by: Remove MOZ_CONCAT definition from mozglue/linker/Logging.h. r=froydnj
The same exists in mozilla/MacroArgs.h, avoiding a macro redefined warning
when building on non-Android.

--HG--
extra : rebase_source : 6e3502ddf9deb96b29e3663f5867f852a2912401
2018-01-19 20:12:04 +09:00
Mike Hommey 73673fc86e Bug 1414506 - Drive-by: Add missing <cstring> include to XZStream.cpp. r=froydnj
--HG--
extra : rebase_source : 25942242d9e2cb1ccc1e18f06635218dfc894637
2018-01-19 20:08:08 +09:00
Philip Chimento 6b52ba7b8d Bug 1176787 - Always link mozglue into the shared library when building standalone. r=glandium
Regardless of which platform we are building on.

--HG--
extra : rebase_source : b10b6b7127e8ed86e9c19f4cba9d54fd2f02f99f
2018-01-15 13:57:03 -08:00
Aaron Klotz 35b1027e2c Bug 1423999: Improved UIA detection that eliminates handle duplication; r=Jamie
MozReview-Commit-ID: 5CqjkyDoPs8

--HG--
extra : amend_source : 877a3d6cadab0645274c9542249fc35cfd682d41
2017-12-07 12:13:14 -07:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Aaron Klotz 0f6431e1f3 Bug 1422394: Add a mechanism to report dll loads to an observer; r=jimm
MozReview-Commit-ID: 1ocag6jTBVV
2017-12-04 18:08:17 -07:00
Brindusan Cristian 14add183dc Backed out 2 changesets (bug 1422394) for browser-chrome failure in test_headless_screenshot.html on Windows 7 debug non-e10s r=backout a=backout on a CLOSED TREE
Backed out changeset 8f233446cd06 (bug 1422394)
Backed out changeset 96940dc4db44 (bug 1422394)
2017-12-05 23:49:08 +02:00
Aaron Klotz 7abd7674c8 Bug 1422394: Follow-up: Add missing include to fix mingw bustage; r=bustage 2017-12-05 13:00:05 -07:00
Aaron Klotz 9da53d8e93 Bug 1422394: Add a mechanism to report dll loads to an observer; r=jimm
--HG--
extra : rebase_source : ddd40aa520447fea1bdccdbe8208bb3bfd26afe7
2017-12-04 18:08:17 -07:00
Christian Holler 586ce17728 Bug 1419371 - Set max_malloc_fill_size/max_free_fill_size for ASan. r=glandium
MozReview-Commit-ID: KPng6w8JsHI

--HG--
extra : rebase_source : fcf2aced83cdf73cccb6cf572ca7da3f6a76c515
2017-11-22 13:49:36 +01:00
Julien Cristau e8ea0fb58a Bug 1421991 - Add old versions of G DATA BankGuard .dll to Windows blocklist. r=jimm 2017-11-30 17:37:20 +01:00
Aaron Klotz 010af8a7d8 Bug 1420276: Backed out changeset 244c97bc16e3 since we don't want to ship this yet; r=backout
--HG--
extra : rebase_source : f7376192a23e85f8850ef5b250e35813ef72e0e3
2017-12-04 15:58:20 -07:00
Jim Chen 190f7edde5 Bug 1416940; r=snorp
MozReview-Commit-ID: 7izmybLFG6i
2017-11-28 23:07:52 -05:00
Aaron Klotz 04c107efd4 Bug 1420276: Add uiautomationcore.dll to blocklist; r=Jamie
MozReview-Commit-ID: AIYZfyKm20b

--HG--
extra : amend_source : d49b08f20f7aebb05ff40cd0bf13ccbad0a78c5f
2017-11-23 14:07:59 -07:00