2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:17 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2017-09-11 21:33:26 +03:00
|
|
|
DisableStlWrapping()
|
2013-07-10 23:08:21 +04:00
|
|
|
|
2019-06-06 09:18:09 +03:00
|
|
|
# Important: for CppUnitTests to be run, they also need to be added
|
|
|
|
# to testing/cppunittest.ini.
|
|
|
|
|
2014-10-30 07:06:12 +03:00
|
|
|
GeckoCppUnitTests([
|
2014-07-25 02:14:21 +04:00
|
|
|
'ShowSSEConfig',
|
2014-10-30 07:06:12 +03:00
|
|
|
], linkage=None)
|
2017-05-08 22:49:48 +03:00
|
|
|
|
|
|
|
CppUnitTests([
|
2019-06-06 09:18:09 +03:00
|
|
|
'TestBaseProfiler',
|
2017-05-08 22:49:48 +03:00
|
|
|
'TestPrintf',
|
|
|
|
])
|
2018-04-09 22:37:52 +03:00
|
|
|
|
2019-06-06 09:18:09 +03:00
|
|
|
with Files('TestBaseProfiler.cpp'):
|
|
|
|
BUG_COMPONENT = ('Core', 'Gecko Profiler')
|
|
|
|
|
2018-04-09 22:37:52 +03:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
2019-01-16 02:10:00 +03:00
|
|
|
GeckoCppUnitTests([
|
|
|
|
'TestNativeNt',
|
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 23:21:10 +03:00
|
|
|
'TestPEExportSection',
|
2020-01-08 19:53:17 +03:00
|
|
|
'TestTimeStampWin',
|
2019-01-16 02:10:00 +03:00
|
|
|
], linkage=None)
|
2018-04-09 22:37:52 +03:00
|
|
|
TEST_DIRS += [
|
|
|
|
'interceptor',
|
2018-06-14 10:15:26 +03:00
|
|
|
'gtest',
|
2018-04-09 22:37:52 +03:00
|
|
|
]
|
2019-01-16 02:10:00 +03:00
|
|
|
OS_LIBS += [
|
|
|
|
'ntdll',
|
2019-06-11 03:11:58 +03:00
|
|
|
'version',
|
2019-01-16 02:10:00 +03:00
|
|
|
]
|
2020-02-12 03:23:57 +03:00
|
|
|
|
|
|
|
if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] in ('gcc', 'clang'):
|
|
|
|
# This allows us to use wmain as the entry point on mingw
|
|
|
|
LDFLAGS += [
|
|
|
|
'-municode',
|
|
|
|
]
|