mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 01:41:18 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b28db02500 | ||
|
|
9c1bfbc543 | ||
|
|
23b1ea3389 | ||
|
|
e50b4cd55e | ||
|
|
e7654ee554 | ||
|
|
b30f42a734 | ||
|
|
aa36d6c56b | ||
|
|
a767441359 | ||
|
|
85eba0bbeb | ||
|
|
000f3d992d | ||
|
|
206dea669b | ||
|
|
6ac3f2fa8e | ||
|
|
cdc31fc133 | ||
|
|
305e22710a | ||
|
|
95b144b64d | ||
|
|
a2f36516cf | ||
|
|
6ce1222e7e | ||
|
|
0abce40a05 | ||
|
|
b4c300585d | ||
|
|
f9c349cccb | ||
|
|
d935016dc8 | ||
|
|
945d9a0547 | ||
|
|
3c13978565 | ||
|
|
a23452cce3 | ||
|
|
cd95c9ef97 | ||
|
|
22871df38a | ||
|
|
820d459d0d | ||
|
|
6ea9123ac3 | ||
|
|
27790d42b1 | ||
|
|
4f1cd929c4 | ||
|
|
fee0708f99 | ||
|
|
e0e647bc90 | ||
|
|
e9458bd216 | ||
|
|
c42c759a61 | ||
|
|
22911b0435 | ||
|
|
9ab93cecd3 | ||
|
|
ff56d2741a | ||
|
|
f79e3fa5e4 | ||
|
|
4f441da82f | ||
|
|
72cc4e7187 | ||
|
|
3068b11844 | ||
|
|
864ddb2030 | ||
|
|
85498a4b78 | ||
|
|
cfbf3eb388 | ||
|
|
93b9571b3b | ||
|
|
5a15a9ad5b | ||
|
|
ae565f2b84 | ||
|
|
399d3b5c7a | ||
|
|
b8bf12ef32 | ||
|
|
9172a12bdb | ||
|
|
3f2f21d1ee | ||
|
|
c1cd68cfc3 | ||
|
|
a8d2fe02ff | ||
|
|
94ac91c060 | ||
|
|
fa7a11a92e | ||
|
|
d3313eb682 | ||
|
|
b76f8d8e3e | ||
|
|
8aeb850140 | ||
|
|
e7b29fc36e | ||
|
|
3f62e2da55 | ||
|
|
29a2d7c67e | ||
|
|
8b07a30c2a | ||
|
|
a53fee3855 | ||
|
|
9bafe84b75 | ||
|
|
e0a4178a1e | ||
|
|
355089c9b0 | ||
|
|
fc440488d3 | ||
|
|
797ade46cf | ||
|
|
08478fdc93 | ||
|
|
1f1a914e57 | ||
|
|
3091648fe7 | ||
|
|
80f9f6e798 | ||
|
|
10a4623646 | ||
|
|
8916e2b505 | ||
|
|
2a73e63c87 | ||
|
|
af5c02a22d | ||
|
|
492231421e | ||
|
|
f72e1c2713 | ||
|
|
36de4b20e1 | ||
|
|
b1d77a74c2 | ||
|
|
59a27c929f | ||
|
|
462bbcbdbc | ||
|
|
fb4381bccc | ||
|
|
9d550f4e37 | ||
|
|
515ab83272 | ||
|
|
66ef59d2ea | ||
|
|
93e05d60b4 | ||
|
|
51011bb6f7 | ||
|
|
3eec6fe288 | ||
|
|
836a9ab3a8 | ||
|
|
d6e3dea218 | ||
|
|
01729dd2df | ||
|
|
b574e0739e | ||
|
|
36b5e090fd | ||
|
|
4201c5b8c8 | ||
|
|
33840d4210 | ||
|
|
7440551046 | ||
|
|
f6c07b0e29 | ||
|
|
1d685be15f | ||
|
|
1d1d2eb91d | ||
|
|
c27b0f4843 | ||
|
|
3097b851b1 | ||
|
|
7e27ac7205 | ||
|
|
6e39d1a1da | ||
|
|
dc619d85d2 | ||
|
|
fdbd1fe54e | ||
|
|
55d683a1f0 | ||
|
|
79b6297dcb | ||
|
|
1de400df6c | ||
|
|
4114d0e625 |
No files matched your search
@@ -4,3 +4,4 @@ Makefile
|
||||
*.dll
|
||||
*.mdb
|
||||
coreclr-testlist.txt
|
||||
microbench-perf.sh
|
||||
+1
-1
@@ -120,7 +120,7 @@ for PARAM; do
|
||||
done
|
||||
|
||||
if test x$has_ext_mod = xtrue; then
|
||||
pushd ../mono-extensions/scripts
|
||||
pushd $top_srcdir../mono-extensions/scripts
|
||||
sh ./prepare-repo.sh $ext_mod_args || exit 1
|
||||
popd
|
||||
else
|
||||
|
||||
@@ -3366,8 +3366,10 @@ Global
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|wasm.ActiveCfg = Release|net_4_x
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|winaot.ActiveCfg = Debug|net_4_x
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|winaot.ActiveCfg = Release|net_4_x
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|xammac.ActiveCfg = Debug|net_4_x
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|xammac.ActiveCfg = Release|net_4_x
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|xammac.ActiveCfg = Debug|xammac
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|xammac.Build.0 = Debug|xammac
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|xammac.ActiveCfg = Release|xammac
|
||||
{817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|xammac.Build.0 = Release|xammac
|
||||
{767CAD15-F8B5-4EAC-8B3D-4EF75F768015}.Debug|net_4_x.ActiveCfg = Debug|net_4_x
|
||||
{767CAD15-F8B5-4EAC-8B3D-4EF75F768015}.Debug|net_4_x.Build.0 = Debug|net_4_x
|
||||
{767CAD15-F8B5-4EAC-8B3D-4EF75F768015}.Release|net_4_x.ActiveCfg = Release|net_4_x
|
||||
|
||||
+132
-66
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [5.21.0],
|
||||
AC_INIT(mono, [5.22.1],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -48,7 +48,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
|
||||
# There is no ordering of corlib versions, no old or new,
|
||||
# the runtime expects an exact match.
|
||||
#
|
||||
MONO_CORLIB_VERSION=7A6EDC32-7F43-403B-8F6F-53AB0AD74819
|
||||
MONO_CORLIB_VERSION=72AAF33F-CAFE-477B-9F74-C7ADBB6E28F2
|
||||
|
||||
#
|
||||
# Put a quoted #define in config.h.
|
||||
@@ -543,6 +543,8 @@ AC_PROG_LD_GNU
|
||||
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h sys/sysctl.h libproc.h sys/prctl.h copyfile.h)
|
||||
AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h arpa/inet.h complex.h unwind.h)
|
||||
AC_CHECK_HEADER(unistd.h, [HAVE_UNISTD_H=1], [HAVE_UNISTD_H=0])
|
||||
AC_SUBST(HAVE_UNISTD_H)
|
||||
AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h],
|
||||
[], [], [#include <stddef.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -599,6 +601,7 @@ AC_CHECK_HEADERS(linux/magic.h)
|
||||
if test x$platform_android = xyes; then
|
||||
AC_CHECK_HEADERS(machine/endian.h sys/endian.h)
|
||||
AC_CHECK_HEADERS(android/legacy_signal_inlines.h, [have_android_signal_inlines=yes], [have_android_signal_inlines=no])
|
||||
AC_CHECK_HEADERS(android/ndk-version.h)
|
||||
|
||||
# Make sure SIGRT{MIN,MAX} work - they will fail to work with unified headers if building for
|
||||
# API level < 21 *and* android/legacy_signal_inlines.h doesn't declare (and define) the required
|
||||
@@ -608,7 +611,8 @@ if test x$platform_android = xyes; then
|
||||
if test x$have_android_signal_inlines = xyes; then
|
||||
AC_MSG_CHECKING([Whether Android SIGRTMIN/SGRTMAX macros are valid])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([#include <android/legacy_signal_inlines.h>],[
|
||||
AC_LANG_PROGRAM([#include <signal.h>
|
||||
#include <android/legacy_signal_inlines.h>],[
|
||||
int i;
|
||||
for (i = SIGRTMIN + 1; i < SIGRTMAX; ++i) {
|
||||
}
|
||||
@@ -2907,6 +2911,7 @@ if test x$host_win32 = xno; then
|
||||
AC_CHECK_FUNCS(setpgid)
|
||||
AC_CHECK_FUNCS(system)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
AC_CHECK_FUNCS(waitpid)
|
||||
AC_CHECK_FUNCS(accept4)
|
||||
AC_CHECK_FUNCS(localtime_r)
|
||||
AC_CHECK_FUNCS(mkdtemp)
|
||||
@@ -3280,6 +3285,9 @@ if test x$host_win32 = xno; then
|
||||
AC_MSG_CHECKING(for shm_open that works well enough with mmap)
|
||||
if test "x$ac_cv_func_shm_open" = "xno" -o "x$ac_cv_func_shm_open_working_with_mmap" = "xno" ; then
|
||||
AC_MSG_RESULT(no)
|
||||
elif test "x$cross_compiling" = "xyes"; then
|
||||
AC_MSG_RESULT(cross compiling, assuming yes)
|
||||
AC_DEFINE(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP, 1, [shm_open that works well enough with mmap])
|
||||
else
|
||||
AC_TRY_RUN([
|
||||
#include <sys/mman.h>
|
||||
@@ -4107,6 +4115,14 @@ case "$host" in
|
||||
ACCESS_UNALIGNED="no"
|
||||
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
|
||||
;;
|
||||
aarch64-*darwin*ilp32)
|
||||
TARGET=ARM6432
|
||||
arch_target=arm64
|
||||
AC_DEFINE(MONO_ARCH_ILP32, 1, [64 bit mode with 4 byte longs and pointers])
|
||||
sizeof_register=8
|
||||
# assuming no other target other than watchOS is using aarch64*darwin triple
|
||||
TARGET_SYS=WATCHOS
|
||||
;;
|
||||
aarch64-*)
|
||||
# https://lkml.org/lkml/2012/7/15/133
|
||||
TARGET=ARM64
|
||||
@@ -4216,8 +4232,10 @@ if test "x$host" != "x$target"; then
|
||||
CPPFLAGS="$CPPFLAGS"
|
||||
target_win32=no
|
||||
;;
|
||||
aarch64*-linux-*)
|
||||
TARGET=ARM64;
|
||||
aarch64*darwin*_ilp32)
|
||||
TARGET=ARM6432;
|
||||
AC_DEFINE(MONO_ARCH_ILP32, 1, [64 bit mode with 4 byte longs and pointers])
|
||||
AC_DEFINE(TARGET_WATCHOS, 1, [...])
|
||||
;;
|
||||
aarch64-*)
|
||||
TARGET=ARM64
|
||||
@@ -4270,7 +4288,7 @@ ARM)
|
||||
arch_target=arm
|
||||
ACCESS_UNALIGNED="no"
|
||||
;;
|
||||
ARM64)
|
||||
ARM64|ARM6432)
|
||||
AC_DEFINE(TARGET_ARM64, 1, [...])
|
||||
arch_target=arm64
|
||||
;;
|
||||
@@ -4413,7 +4431,7 @@ fi
|
||||
dnl Use GCC atomic ops if they work on the target.
|
||||
if test x$GCC = "xyes"; then
|
||||
case $TARGET in
|
||||
X86 | AMD64 | ARM | ARM64 | POWERPC | POWERPC64 | MIPS | S390X | SPARC | SPARC64 | RISCV32 | RISCV64)
|
||||
X86 | AMD64 | ARM | ARM64 | ARM6432 | POWERPC | POWERPC64 | MIPS | S390X | SPARC | SPARC64 | RISCV32 | RISCV64)
|
||||
AC_DEFINE(USE_GCC_ATOMIC_OPS, 1, [...])
|
||||
;;
|
||||
esac
|
||||
@@ -4426,7 +4444,7 @@ if test "x$target_mach" = "xyes"; then
|
||||
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
|
||||
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
|
||||
BTLS_SUPPORTED=no
|
||||
elif test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64"; then
|
||||
elif test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64" -o "x$TARGET" = "xARM6432"; then
|
||||
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
|
||||
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
|
||||
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
|
||||
@@ -4640,6 +4658,7 @@ AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support])
|
||||
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
AC_CHECK_FUNCS(waitpid)
|
||||
|
||||
AC_ARG_WITH([overridable-allocators], [ --with-overridable-allocators allow g_*alloc/g_free to call custom allocators set via g_mem_set_vtable])
|
||||
|
||||
@@ -4663,8 +4682,6 @@ elif test x$target_ios = xno; then
|
||||
AC_CHECK_FUNCS(strndup getpwuid_r)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators = xyes)
|
||||
|
||||
AC_SEARCH_LIBS(sqrtf, m)
|
||||
|
||||
# nanosleep may not be part of libc, also search it in other libraries
|
||||
@@ -5247,7 +5264,7 @@ dnl **********************
|
||||
dnl *** checked builds ***
|
||||
dnl **********************
|
||||
|
||||
AC_ARG_ENABLE(checked_build, [ --enable-checked-build=LIST To enable checked build (expensive asserts), configure with a comma-separated LIST of checked build modules and then include that same list in the environment variable MONO_CHECK_MODE at runtime. Recognized checked build modules: all, gc, metadata, thread, private_types],[
|
||||
AC_ARG_ENABLE(checked_build, [ --enable-checked-build=LIST To enable checked build (expensive asserts), configure with a comma-separated LIST of checked build modules and then include that same list in the environment variable MONO_CHECK_MODE at runtime. Recognized checked build modules: all, gc, metadata, thread, private_types, crash_reporting],[
|
||||
|
||||
if test x$enable_checked_build != x ; then
|
||||
AC_DEFINE(ENABLE_CHECKED_BUILD,1,[Enable checked build])
|
||||
@@ -5261,6 +5278,7 @@ AC_ARG_ENABLE(checked_build, [ --enable-checked-build=LIST To enable check
|
||||
eval "mono_checked_build_test_enable_metadata='yes'"
|
||||
eval "mono_checked_build_test_enable_thread='yes'"
|
||||
eval "mono_checked_build_test_enable_private_types='yes'"
|
||||
eval "mono_checked_build_test_enable_crash_reporting='yes'"
|
||||
fi
|
||||
|
||||
if test "x$mono_checked_build_test_enable_gc" = "xyes"; then
|
||||
@@ -5278,10 +5296,20 @@ AC_ARG_ENABLE(checked_build, [ --enable-checked-build=LIST To enable check
|
||||
if test "x$mono_checked_build_test_enable_private_types" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_CHECKED_BUILD_PRIVATE_TYPES, 1, [Enable private types checked build])
|
||||
fi
|
||||
|
||||
if test "x$mono_checked_build_test_enable_crash_reporting" = "xyes"; then
|
||||
# Required
|
||||
with_overridable_allocators=yes
|
||||
AC_DEFINE(ENABLE_OVERRIDABLE_ALLOCATORS,1,[Overridable allocator support enabled])
|
||||
|
||||
AC_DEFINE(ENABLE_CHECKED_BUILD_CRASH_REPORTING, 1, [Enable private types checked build])
|
||||
fi
|
||||
], [])
|
||||
|
||||
dnl End of checked builds
|
||||
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators = xyes)
|
||||
|
||||
AC_CHECK_HEADER([malloc.h],
|
||||
[AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1],
|
||||
[Define to 1 if you have /usr/include/malloc.h.])],,)
|
||||
@@ -5314,6 +5342,26 @@ dnl **************
|
||||
AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider], enable_btls=$enableval, enable_btls=$BTLS_SUPPORTED)
|
||||
AC_ARG_ENABLE(btls-lib, [ --disable-btls-lib Disable building the BTLS native library], enable_btls_lib=$enableval, enable_btls_lib=$BTLS_SUPPORTED)
|
||||
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
|
||||
AC_ARG_WITH(btls_android_api, [ --with-btls-android-api Android NDK API level for BTLS build])
|
||||
AC_ARG_WITH(btls_android_cmake_toolchain, [ --with-btls-android-cmake-toolchain Path to the cmake toolchain file for Android])
|
||||
AC_ARG_WITH(btls_android_ndk_asm_workaround, [ --with-btls-android-ndk-asm-workaround Work around a problem with NDK r18+ clang compiler when compiling some AES assembly for ARM])
|
||||
|
||||
if test "x$with_btls_android_api" = "x" ; then
|
||||
case "$BTLS_PLATFORM" in
|
||||
android-armv5)
|
||||
with_btls_android_api=16" ;;
|
||||
android-armv6)
|
||||
with_btls_android_api=16" ;;
|
||||
android-armv7)
|
||||
with_btls_android_api=16 ;;
|
||||
android-v8a)
|
||||
with_btls_android_api=21 ;;
|
||||
android-x86)
|
||||
with_btls_android_api=16 ;;
|
||||
android-x64)
|
||||
with_btls_android_api=21 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "x$enable_btls" = "xno"; then
|
||||
enable_btls_lib=no
|
||||
@@ -5390,22 +5438,22 @@ if test "x$enable_btls" = "xyes"; then
|
||||
esac
|
||||
;;
|
||||
android-armv5)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api"
|
||||
;;
|
||||
android-armv6)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api"
|
||||
;;
|
||||
android-armv7)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api"
|
||||
;;
|
||||
android-v8a)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=21"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api"
|
||||
;;
|
||||
android-x86)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=14"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api"
|
||||
;;
|
||||
android-x64)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=21"
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=$with_btls_android_api"
|
||||
;;
|
||||
riscv32)
|
||||
btls_arch=riscv32
|
||||
@@ -5418,8 +5466,16 @@ if test "x$enable_btls" = "xyes"; then
|
||||
esac
|
||||
|
||||
if test "x$platform_android" = "xyes"; then
|
||||
if test "x$with_btls_android_cmake_toolchain" = "x"; then
|
||||
with_btls_android_cmake_toolchain="$BTLS_ROOT/util/android-cmake/android.toolchain.cmake"
|
||||
fi
|
||||
|
||||
if test "x$with_btls_android_ndk_asm_workaround" != "x"; then
|
||||
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DENABLE_NDK_ARM_WORKAROUND=ON"
|
||||
fi
|
||||
|
||||
btls_android=yes
|
||||
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=$BTLS_ROOT/util/android-cmake/android.toolchain.cmake"
|
||||
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=$with_btls_android_cmake_toolchain"
|
||||
if test "x$with_btls_android_ndk" != "x"; then
|
||||
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DANDROID_NDK=\"$with_btls_android_ndk\""
|
||||
else
|
||||
@@ -5467,7 +5523,7 @@ AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
|
||||
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
|
||||
AM_CONDITIONAL(POWERPC64, test x$TARGET = xPOWERPC64)
|
||||
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
|
||||
AM_CONDITIONAL(ARM64, test x$TARGET = xARM64)
|
||||
AM_CONDITIONAL(ARM64, test x$TARGET = xARM64 -o x$TARGET = xARM6432)
|
||||
AM_CONDITIONAL(S390X, test x$TARGET = xS390X)
|
||||
AM_CONDITIONAL([RISCV], [test x$TARGET = xRISCV32 -o x$TARGET = xRISCV64])
|
||||
AM_CONDITIONAL([RISCV32], [test x$TARGET = xRISCV32])
|
||||
@@ -5756,54 +5812,59 @@ fi
|
||||
# crypto primitives that we're using as part of System.Security.Cryptography.Apple.
|
||||
#
|
||||
# On Desktop, we can check at runtime whether the OS version is recent enough and switch
|
||||
# implementation accordingly. We build a single `libmono_native` shared library.
|
||||
# implementation accordingly. We build a single `libmono-native` shared library.
|
||||
#
|
||||
# However, on Mobile we cannot have any undefined symbols as this would break Bitcode.
|
||||
#
|
||||
# During the mobile build, we are called with `CC` containing an explicit minium version flag,
|
||||
# During the mobile build, we are called with `CFLAGS` containing an explicit minium version flag,
|
||||
# which is eiter `-mmacosx-version-min=`, `-mios-simulator-version-min=` or `-miphoneos-version-min=`
|
||||
# depending on platform.
|
||||
#
|
||||
# We build two versions of the shared library:
|
||||
# - `libmono_native_compat` is built with whichever minimum version is passed to us via `CC`.
|
||||
# - `libmono_native_unifed` is built with the minimum version set to macOS 10.12+ / iOS 10+.
|
||||
# - `libmono-native-compat` is built with whichever minimum version is passed to us via `CFLAGS`.
|
||||
# - `libmono-native-unifed` is built with the minimum version set to macOS 10.12+ / iOS 10+.
|
||||
#
|
||||
# For testing purpuses, there is a function called `mono_native_get_platform_type ()`
|
||||
# (see mono/native/mono-native-platform.c), which returns a `MonoNativePlatformType` enum value.
|
||||
# There is also `Mono.MonoNativePlatform.GetPlatformType ()` (see mcs/class/System/Mono/MonoNativePlatform.cs).
|
||||
# There is also `Mono.MonoNativePlatform.GetPlatformType ()` (see mcs/class/corlib/Test/Mono/MonoNativePlatform.cs).
|
||||
#
|
||||
# This can be called by automated tests both to ensure that the library has been correctly installed and also
|
||||
# to verify that it's the correct version of it.
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([Mono.Native support])
|
||||
sed_version_pattern='[[0-9]]\{1,2\}\(\.[[0-9]]\{1,2\}\)'
|
||||
if test x$target_osx = xyes; then
|
||||
sed_remove_mac_version_pattern="s/-mmacosx-version-min=$sed_version_pattern//g"
|
||||
grep_find_mac_version_pattern="-mmacosx-version-min=$sed_version_pattern"
|
||||
mono_native_compat_version=`echo $CC | grep -o -e $grep_find_mac_version_pattern`
|
||||
MONO_NATIVE_CC=`echo $CC | sed -e $sed_remove_mac_version_pattern`
|
||||
MONO_NATIVE_CXX=`echo $CXX | sed -e $sed_remove_mac_version_pattern`
|
||||
MONO_NATIVE_CPPFLAGS=`echo $CPPFLAGS | sed -e $sed_remove_mac_version_pattern`
|
||||
MONO_NATIVE_CFLAGS=`echo $CFLAGS | sed -e $sed_remove_mac_version_pattern`
|
||||
MONO_NATIVE_CXXFLAGS=`echo $CXXFLAGS | sed -e $sed_remove_mac_version_pattern`
|
||||
MONO_NATIVE_LDFLAGS=`echo $LDFLAGS | sed -e $sed_remove_mac_version_pattern`
|
||||
MONO_NATIVE_CC=$CC
|
||||
MONO_NATIVE_CXX=$CXX
|
||||
MONO_NATIVE_CCASFLAGS=$CCASFLAGS
|
||||
MONO_NATIVE_CPPFLAGS=$CPPFLAGS
|
||||
MONO_NATIVE_CXXFLAGS=$CXXFLAGS
|
||||
MONO_NATIVE_CFLAGS=$CFLAGS
|
||||
MONO_NATIVE_LDFLAGS=$LDFLAGS
|
||||
|
||||
mono_native=yes
|
||||
MONO_NATIVE_PLATFORM=macos
|
||||
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_MACOS"
|
||||
AC_MSG_CHECKING([Mono.Native support])
|
||||
AC_MSG_RESULT(macos)
|
||||
|
||||
AC_MONO_APPLE_AVAILABLE(mono_native_compat, [whether we need the compatibility layer],
|
||||
[!(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12)])
|
||||
|
||||
if test x$mono_native_compat = xyes; then
|
||||
mono_native_compat=yes
|
||||
mono_native_text="Mac OSX (compat+unified)"
|
||||
MONO_NATIVE_COMPAT_CFLAGS="$CFLAGS $mono_native_compat_version"
|
||||
MONO_NATIVE_COMPAT_LDFLAGS="$LDFLAGS $mono_native_compat_version"
|
||||
MONO_NATIVE_UNIFIED_CFLAGS="$MONO_NATIVE_CFLAGS -mmacosx-version-min=10.12"
|
||||
MONO_NATIVE_UNIFIED_LDFLAGS="$MONO_NATIVE_LDFLAGS -mmacosx-version-min=10.12"
|
||||
mono_native_text="Mac OSX (compat + unified v10.12)"
|
||||
MONO_NATIVE_COMPAT_CCASFLAGS=$MONO_NATIVE_CCASFLAGS
|
||||
MONO_NATIVE_COMPAT_CPPFLAGS=$MONO_NATIVE_CPPFLAGS
|
||||
MONO_NATIVE_COMPAT_CXXFLAGS=$MONO_NATIVE_CXXFLAGS
|
||||
MONO_NATIVE_COMPAT_CFLAGS=$MONO_NATIVE_CFLAGS
|
||||
MONO_NATIVE_COMPAT_LDFLAGS=$MONO_NATIVE_LDFLAGS
|
||||
|
||||
sed_remove_mac_version_pattern="s/-mmacosx-version-min=$sed_version_pattern//g"
|
||||
MONO_NATIVE_UNIFIED_CCASFLAGS="`echo $CCASFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12"
|
||||
MONO_NATIVE_UNIFIED_CPPFLAGS="`echo $CPPFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12"
|
||||
MONO_NATIVE_UNIFIED_CXXFLAGS="`echo $CXXFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12"
|
||||
MONO_NATIVE_UNIFIED_CFLAGS="`echo $CFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12"
|
||||
MONO_NATIVE_UNIFIED_LDFLAGS="`echo $LDFLAGS | sed -e $sed_remove_mac_version_pattern` -mmacosx-version-min=10.12"
|
||||
else
|
||||
mono_native_compat=no
|
||||
mono_native_text="Mac OSX"
|
||||
@@ -5855,16 +5916,8 @@ elif test x$mono_native_platform_ios = xyes; then
|
||||
])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([Mono.Native support])
|
||||
AC_MSG_RESULT([$mono_native_ios_target])
|
||||
|
||||
AC_MONO_APPLE_AVAILABLE(mono_native_compat, [whether we need the compatibility layer], [!($mono_native_compat_check)])
|
||||
|
||||
sed_remove_ios_version_pattern="s/-m\(.*\)-version-min=$sed_version_pattern//g"
|
||||
grep_find_ios_version_pattern="-m$mono_native_ios_target-version-min=$sed_version_pattern"
|
||||
|
||||
mono_native_compat_version=`echo $CC | grep -o -e $grep_find_ios_version_pattern`
|
||||
|
||||
if test x$with_bitcode = xyes; then
|
||||
mono_native_ldflags="-framework CoreFoundation -framework Foundation -no-undefined -fatal_warnings"
|
||||
MONO_NATIVE_LIBADD="../mini/$LIBMONO_LA"
|
||||
@@ -5876,19 +5929,28 @@ elif test x$mono_native_platform_ios = xyes; then
|
||||
mono_native_ldflags="$mono_native_ldflags -framework GSS"
|
||||
fi
|
||||
|
||||
MONO_NATIVE_CC=`echo $CC | sed -e $sed_remove_ios_version_pattern`
|
||||
MONO_NATIVE_CXX=`echo $CXX | sed -e $sed_remove_ios_version_pattern`
|
||||
MONO_NATIVE_CPPFLAGS=`echo $CPPFLAGS | sed -e $sed_remove_ios_version_pattern`
|
||||
MONO_NATIVE_CXXFLAGS=`echo $CXXFLAGS | sed -e $sed_remove_ios_version_pattern`
|
||||
MONO_NATIVE_CFLAGS=`echo $CFLAGS | sed -e $sed_remove_ios_version_pattern`
|
||||
MONO_NATIVE_LDFLAGS=`echo $LDFLAGS $mono_native_ldflags | sed -e $sed_remove_ios_version_pattern`
|
||||
MONO_NATIVE_CC=$CC
|
||||
MONO_NATIVE_CXX=$CXX
|
||||
MONO_NATIVE_CCASFLAGS=$CCASFLAGS
|
||||
MONO_NATIVE_CPPFLAGS=$CPPFLAGS
|
||||
MONO_NATIVE_CXXFLAGS=$CXXFLAGS
|
||||
MONO_NATIVE_CFLAGS=$CFLAGS
|
||||
MONO_NATIVE_LDFLAGS="$LDFLAGS $mono_native_ldflags"
|
||||
|
||||
if test x$mono_native_compat = xyes; then
|
||||
mono_native_text="$mono_native_text (compat+unified)"
|
||||
MONO_NATIVE_COMPAT_CFLAGS="$CFLAGS $mono_native_compat_version"
|
||||
MONO_NATIVE_COMPAT_LDFLAGS="$LDFLAGS $mono_native_compat_version"
|
||||
MONO_NATIVE_UNIFIED_CFLAGS="$MONO_NATIVE_CFLAGS -m$mono_native_ios_target-version-min=$mono_native_unified_version"
|
||||
MONO_NATIVE_UNIFIED_LDFLAGS="$MONO_NATIVE_LDFLAGS -m$mono_native_ios_target-version-min=$mono_native_unified_version"
|
||||
mono_native_text="$mono_native_text (compat + unified v$mono_native_unified_version)"
|
||||
MONO_NATIVE_COMPAT_CCASFLAGS=$MONO_NATIVE_CCASFLAGS
|
||||
MONO_NATIVE_COMPAT_CPPFLAGS=$MONO_NATIVE_CPPFLAGS
|
||||
MONO_NATIVE_COMPAT_CXXFLAGS=$MONO_NATIVE_CXXFLAGS
|
||||
MONO_NATIVE_COMPAT_CFLAGS=$MONO_NATIVE_CFLAGS
|
||||
MONO_NATIVE_COMPAT_LDFLAGS=$MONO_NATIVE_LDFLAGS
|
||||
|
||||
sed_remove_ios_version_pattern="s/-m\(.*\)-version-min=$sed_version_pattern//g"
|
||||
MONO_NATIVE_UNIFIED_CCASFLAGS="`echo $CCASFLAGS | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version"
|
||||
MONO_NATIVE_UNIFIED_CPPFLAGS="`echo $CPPFLAGS | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version"
|
||||
MONO_NATIVE_UNIFIED_CXXFLAGS="`echo $CXXFLAGS | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version"
|
||||
MONO_NATIVE_UNIFIED_CFLAGS="`echo $CFLAGS | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version"
|
||||
MONO_NATIVE_UNIFIED_LDFLAGS="`echo $LDFLAGS $mono_native_ldflags | sed -e $sed_remove_ios_version_pattern` -m$mono_native_ios_target-version-min=$mono_native_unified_version"
|
||||
fi
|
||||
|
||||
mono_native=yes
|
||||
@@ -5897,6 +5959,7 @@ elif test x$host_linux = xyes; then
|
||||
mono_native_text="Linux"
|
||||
MONO_NATIVE_CC=$CC
|
||||
MONO_NATIVE_CXX=$CXX
|
||||
MONO_NATIVE_CCASFLAGS=$CCASFLAGS
|
||||
MONO_NATIVE_CPPFLAGS=$CPPFLAGS
|
||||
MONO_NATIVE_CXXFLAGS=$CXXFLAGS
|
||||
MONO_NATIVE_CFLAGS=$CFLAGS
|
||||
@@ -5905,14 +5968,13 @@ elif test x$host_linux = xyes; then
|
||||
mono_native=yes
|
||||
mono_native_compat=no
|
||||
MONO_NATIVE_PLATFORM=linux
|
||||
AC_MSG_CHECKING([Mono.Native support])
|
||||
AC_MSG_RESULT(linux)
|
||||
|
||||
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_LINUX"
|
||||
elif case $host_os in aix*|os400*) true;; *) false;; esac; then
|
||||
mono_native_text="AIX"
|
||||
MONO_NATIVE_CC=$CC
|
||||
MONO_NATIVE_CXX=$CXX
|
||||
MONO_NATIVE_CCASFLAGS=$CCASFLAGS
|
||||
MONO_NATIVE_CPPFLAGS=$CPPFLAGS
|
||||
MONO_NATIVE_CXXFLAGS=$CXXFLAGS
|
||||
MONO_NATIVE_CFLAGS=$CFLAGS
|
||||
@@ -5921,17 +5983,14 @@ elif case $host_os in aix*|os400*) true;; *) false;; esac; then
|
||||
mono_native=yes
|
||||
mono_native_compat=no
|
||||
MONO_NATIVE_PLATFORM=aix
|
||||
AC_MSG_CHECKING([Mono.Native support])
|
||||
AC_MSG_RESULT(aix)
|
||||
|
||||
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_AIX"
|
||||
else
|
||||
mono_native=no
|
||||
mono_native_text="no"
|
||||
AC_MSG_CHECKING([Mono.Native support])
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT($mono_native_text)
|
||||
|
||||
if test x$mono_native_compat = xyes; then
|
||||
MONO_NATIVE_LIBRARY_NAME=libmono-native-compat
|
||||
else
|
||||
@@ -5941,8 +6000,15 @@ fi
|
||||
AC_SUBST(MONO_NATIVE_PLATFORM)
|
||||
AC_SUBST(MONO_NATIVE_CC)
|
||||
AC_SUBST(MONO_NATIVE_CXX)
|
||||
AC_SUBST(MONO_NATIVE_CCASFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_COMPAT_CCASFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_UNIFIED_CCASFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_CPPFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_COMPAT_CPPFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_UNIFIED_CPPFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_CXXFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_COMPAT_CXXFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_UNIFIED_CXXFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_CFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_COMPAT_CFLAGS)
|
||||
AC_SUBST(MONO_NATIVE_UNIFIED_CFLAGS)
|
||||
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 3ee07e0a53...cad071b690.
Vendored
+1
-1
Submodule external/bockbuild updated: 4a3e9edd27...0f9e88d46a.
Vendored
+1
-1
Submodule external/boringssl updated: 59b78d07a4...3d87996698.
Vendored
+1
-1
Submodule external/cecil updated: 792dc155d3...e5d5fa4a73.
Vendored
+1
-1
Submodule external/corefx updated: ec8f921501...ac21f570f9.
Vendored
+1
-1
Submodule external/corert updated: 0e5f123f6b...1b7d4a1e4b.
Vendored
+1
-1
Submodule external/linker updated: a8c8e3107b...84a79a11a9.
+5
-1
@@ -2,7 +2,7 @@ thisdir = build
|
||||
SUBDIRS =
|
||||
include ../build/rules.make
|
||||
|
||||
BUILT_FILES = common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs
|
||||
BUILT_FILES = common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs common/sourcelink.json
|
||||
|
||||
all-local install-local test-local run-test-local csproj-local run-test-ondotnet-local uninstall-local doc-update-local: $(BUILT_FILES)
|
||||
@:
|
||||
@@ -18,6 +18,9 @@ common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs: common/Cons
|
||||
test -n '$(MONO_CORLIB_VERSION)'
|
||||
sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' -e 's,@''MONO_CORLIB_VERSION@,$(MONO_CORLIB_VERSION),' $< > $@
|
||||
|
||||
common/sourcelink.json: common/sourcelink.json.in $(wildcard config.make) | $(topdir)/class/lib/$(PROFILE_DIRECTORY)
|
||||
sed -e 's,@mono_topdir@,$(shell cd $(topdir)/.. && pwd),' -e 's,@mono_commit_hash@,$(shell cd $(topdir)/.. && git rev-parse HEAD),' -e 's,@corefx_commit_hash@,$(shell cd $(topdir)/../external/corefx && git rev-parse HEAD),' -e 's,@corert_commit_hash@,$(shell cd $(topdir)/../external/corert && git rev-parse HEAD),' -e 's,@cecil_commit_hash@,$(shell cd $(topdir)/../external/cecil && git rev-parse HEAD),' $< > $@
|
||||
|
||||
PLATFORMS = macos linux win32 unix
|
||||
PROFILES = \
|
||||
build \
|
||||
@@ -28,6 +31,7 @@ PROFILES = \
|
||||
|
||||
COMMON_SRCS = \
|
||||
Consts.cs.in \
|
||||
sourcelink.json.in \
|
||||
Locale.cs \
|
||||
MonoTODOAttribute.cs \
|
||||
basic-profile-check.cs \
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
/Consts.cs
|
||||
/sourcelink.json
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"documents": {
|
||||
"@mono_topdir@/external/corefx/*": "https://raw.githubusercontent.com/mono/corefx/@corefx_commit_hash@/*",
|
||||
"@mono_topdir@/external/corert/*": "https://raw.githubusercontent.com/mono/corert/@corert_commit_hash@/*",
|
||||
"@mono_topdir@/external/cecil/*": "https://raw.githubusercontent.com/mono/cecil/@cecil_commit_hash@/*",
|
||||
"@mono_topdir@/*": "https://raw.githubusercontent.com/mono/mono/@mono_commit_hash@/*"
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,11 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# add sourcelink information if we're building a portable PDB
|
||||
ifneq (, $(findstring debug:portable, $(PROFILE_MCS_FLAGS)))
|
||||
LIB_MCS_FLAGS += -sourcelink:$(topdir)/build/common/sourcelink.json
|
||||
endif
|
||||
|
||||
the_libdir = $(the_libdir_base)$(intermediate)
|
||||
|
||||
ifdef LIBRARY_USE_INTERMEDIATE_FILE
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<!--End of common files-->
|
||||
<!-- @ALL_SOURCES@ -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../System/System.csproj" />
|
||||
<ProjectReference Include="../../corlib/corlib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
|
||||
@@ -12,7 +12,7 @@ LIBRARY = System.Drawing.Common.dll
|
||||
KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS =
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
|
||||
|
||||
ifdef false # we'll enable this at a later point
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+2
-1
@@ -104,7 +104,8 @@ testing_aot_hybrid_dirs_parallel := $(testing_aot_full_dirs_parallel)
|
||||
|
||||
xammac_dirs_parallel := \
|
||||
$(mobile_common_dirs_parallel) \
|
||||
Mono.CompilerServices.SymbolWriter
|
||||
Mono.CompilerServices.SymbolWriter \
|
||||
Mono.CSharp
|
||||
|
||||
monodroid_dirs_parallel := \
|
||||
$(mobile_common_dirs_parallel) \
|
||||
|
||||
@@ -80,6 +80,11 @@
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM;IOS_REFLECTION;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_PROCESS_START</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<OutputPath>./../../class/lib/xammac</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_PROCESS_START</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
|
||||
<OutputPath>./../../class/lib/xammac_net_4_5</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac_net_4_5</IntermediateOutputPath>
|
||||
@@ -131,6 +136,9 @@
|
||||
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
<Compile Include="testing_aot_full-parser.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<Compile Include="xammac-parser.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
|
||||
<Compile Include="xammac_net_4_5-parser.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -185,6 +185,7 @@
|
||||
<Compile Include="..\..\..\external\cecil\Mono.Security.Cryptography\CryptoService.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\Mono\Disposable.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\Mono\Empty.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\Mono\MergeSort.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\Mono\Type.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\ProjectInfo.cs" />
|
||||
<Compile Include="Consts.cs" />
|
||||
|
||||
@@ -34,7 +34,7 @@ $(test_output_dir)/dtest-excfilter.exe: Test/dtest-excfilter.il | $(test_output_
|
||||
$(ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
|
||||
|
||||
$(test_output_dir)/dtest-app.exe: Test/dtest-app.cs $(TEST_HELPERS_SOURCES) | $(test_output_dir)
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -sourcelink:Test/sourcelink.json -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Runtime.CompilerServices.Unsafe.dll -sourcelink:Test/sourcelink.json -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
|
||||
|
||||
TEST_HELPERS_SOURCES = \
|
||||
../test-helpers/NetworkHelpers.cs \
|
||||
|
||||
@@ -85,6 +85,31 @@ public class Tests2 {
|
||||
}
|
||||
}
|
||||
|
||||
public struct TestEnumeratorInsideGenericStruct<TKey, TValue>
|
||||
{
|
||||
private KeyValuePair<TKey, TValue> _bucket;
|
||||
private Position _currentPosition;
|
||||
internal TestEnumeratorInsideGenericStruct(KeyValuePair<TKey, TValue> bucket)
|
||||
{
|
||||
_bucket = bucket;
|
||||
_currentPosition = Position.BeforeFirst;
|
||||
}
|
||||
|
||||
public KeyValuePair<TKey, TValue> Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_currentPosition == Position.BeforeFirst)
|
||||
return _bucket;
|
||||
return _bucket;
|
||||
}
|
||||
}
|
||||
private enum Position
|
||||
{
|
||||
BeforeFirst
|
||||
}
|
||||
}
|
||||
|
||||
public struct AStruct : ITest2 {
|
||||
public int i;
|
||||
public string s;
|
||||
@@ -166,6 +191,19 @@ public class GClass<T> {
|
||||
}
|
||||
}
|
||||
|
||||
public struct MySpan<T> {
|
||||
internal class Pinnable<J> {
|
||||
public J Data;
|
||||
}
|
||||
Pinnable<T> _pinnable;
|
||||
public MySpan(T[] array) {
|
||||
_pinnable = Unsafe.As<Pinnable<T>>(array);
|
||||
}
|
||||
public override string ToString() {
|
||||
return "abc";
|
||||
}
|
||||
}
|
||||
|
||||
public struct GStruct<T> {
|
||||
public T i;
|
||||
|
||||
@@ -389,9 +427,27 @@ public class Tests : TestsBase, ITest2
|
||||
new Tests ().invoke_abort ();
|
||||
new Tests ().evaluate_method ();
|
||||
Bug59649 ();
|
||||
field_with_unsafe_cast_value();
|
||||
inspect_enumerator_in_generic_struct();
|
||||
if_property_stepping();
|
||||
return 3;
|
||||
}
|
||||
|
||||
private class TestClass {
|
||||
private string oneLineProperty = "";
|
||||
public string OneLineProperty {
|
||||
get { return oneLineProperty; }
|
||||
set { oneLineProperty = value; }
|
||||
}
|
||||
}
|
||||
|
||||
public static void if_property_stepping() {
|
||||
var test = new TestClass();
|
||||
if (test.OneLineProperty == "someInvalidValue6049e709-7271-41a1-bc0a-f1f1b80d4125")
|
||||
return;
|
||||
Console.Write("");
|
||||
}
|
||||
|
||||
public static void local_reflect () {
|
||||
//Breakpoint line below, and reflect someField via ObjectMirror;
|
||||
LocalReflectClass.RunMe ();
|
||||
@@ -470,6 +526,8 @@ public class Tests : TestsBase, ITest2
|
||||
ss_fp_clobber ();
|
||||
ss_no_frames ();
|
||||
ss_await ();
|
||||
ss_nested_with_three_args_wrapper();
|
||||
ss_nested_twice_with_two_args_wrapper();
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
@@ -569,6 +627,15 @@ public class Tests : TestsBase, ITest2
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void field_with_unsafe_cast_value() {
|
||||
var arr = new char[3];
|
||||
arr[0] = 'a';
|
||||
arr[1] = 'b';
|
||||
arr[2] = 'c';
|
||||
MySpan<char> bytes = new MySpan<char>(arr);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void ss_nested () {
|
||||
ss_nested_1 (ss_nested_2 ());
|
||||
@@ -581,16 +648,53 @@ public class Tests : TestsBase, ITest2
|
||||
ss_nested_with_two_args(ss_nested_arg (), ss_nested_arg ());
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void ss_nested_with_three_args_wrapper () {
|
||||
ss_nested_with_three_args(ss_nested_arg1 (), ss_nested_arg2 (), ss_nested_arg3 ());
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void ss_nested_twice_with_two_args_wrapper () {
|
||||
ss_nested_with_two_args(ss_nested_arg1 (), ss_nested_with_two_args(ss_nested_arg2 (), ss_nested_arg3 ()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void inspect_enumerator_in_generic_struct() {
|
||||
TestEnumeratorInsideGenericStruct<String, String> generic_struct = new TestEnumeratorInsideGenericStruct<String, String>(new KeyValuePair<string, string>("0", "f1"));
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static int ss_nested_with_two_args (int a1, int a2) {
|
||||
return a1 + a2;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static int ss_nested_with_three_args (int a1, int a2, int a3) {
|
||||
return a1 + a2 + a3;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static int ss_nested_arg () {
|
||||
return 0;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static int ss_nested_arg1 () {
|
||||
return 0;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static int ss_nested_arg2 () {
|
||||
return 0;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static int ss_nested_arg3 () {
|
||||
return 0;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void ss_nested_1 (int i) {
|
||||
}
|
||||
|
||||
@@ -4481,7 +4481,83 @@ public class DebuggerTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotWorking")]
|
||||
public void StepOverOnExitFromArgsAfterStepInMethodParameter2() {
|
||||
Event e = run_until ("ss_nested_with_three_args_wrapper");
|
||||
|
||||
var req = create_step(e);
|
||||
req.Enable();
|
||||
|
||||
e = step_once();
|
||||
assert_location(e, "ss_nested_with_three_args_wrapper");
|
||||
|
||||
e = step_into();
|
||||
assert_location(e, "ss_nested_arg1");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_arg1");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_arg1");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_with_three_args_wrapper");
|
||||
|
||||
e = step_into();
|
||||
assert_location(e, "ss_nested_arg2");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_arg2");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_arg2");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_with_three_args_wrapper");
|
||||
|
||||
e = step_into();
|
||||
assert_location(e, "ss_nested_arg3");
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void StepOverOnExitFromArgsAfterStepInMethodParameter3() {
|
||||
Event e = run_until ("ss_nested_twice_with_two_args_wrapper");
|
||||
|
||||
var req = create_step(e);
|
||||
req.Enable();
|
||||
|
||||
e = step_once();
|
||||
assert_location(e, "ss_nested_twice_with_two_args_wrapper");
|
||||
|
||||
e = step_into();
|
||||
assert_location(e, "ss_nested_arg1");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_arg1");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_arg1");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_twice_with_two_args_wrapper");
|
||||
|
||||
e = step_into();
|
||||
assert_location(e, "ss_nested_arg2");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_arg2");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_arg2");
|
||||
|
||||
e = step_over();
|
||||
assert_location(e, "ss_nested_twice_with_two_args_wrapper");
|
||||
|
||||
e = step_into();
|
||||
assert_location(e, "ss_nested_arg3");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldCorrectlyStepOverOnExitFromArgsAfterStepInMethodParameter() {
|
||||
Event e = run_until ("ss_nested_with_two_args_wrapper");
|
||||
|
||||
@@ -4507,6 +4583,25 @@ public class DebuggerTests
|
||||
assert_location(e, "ss_nested_arg");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void InspectEnumeratorInGenericStruct() {
|
||||
//files.myBucket.GetEnumerator().get_Current().Key watching this generates an exception in Debugger
|
||||
Event e = run_until("inspect_enumerator_in_generic_struct");
|
||||
var req = create_step(e);
|
||||
req.Enable();
|
||||
e = step_once();
|
||||
e = step_over();
|
||||
StackFrame frame = e.Thread.GetFrames () [0];
|
||||
var ginst = frame.Method.GetLocal ("generic_struct");
|
||||
Value variable = frame.GetValue (ginst);
|
||||
StructMirror thisObj = (StructMirror)variable;
|
||||
TypeMirror thisType = thisObj.Type;
|
||||
variable = thisObj.InvokeMethod(e.Thread, thisType.GetMethod("get_Current"), null);
|
||||
thisObj = (StructMirror)variable;
|
||||
thisType = thisObj.Type;
|
||||
AssertValue ("f1", thisObj["value"]);
|
||||
}
|
||||
|
||||
[Test]
|
||||
// Uses a fixed port
|
||||
[Category("NotWorking")]
|
||||
@@ -4676,5 +4771,44 @@ public class DebuggerTests
|
||||
AssertValue (1, mirror["i"]);
|
||||
AssertValue (2.0, mirror["d"]);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FieldWithUnsafeCastValue() {
|
||||
Event e = run_until("field_with_unsafe_cast_value");
|
||||
var req = create_step(e);
|
||||
req.Enable();
|
||||
e = step_once();
|
||||
e = step_over();
|
||||
e = step_over();
|
||||
e = step_over();
|
||||
e = step_over();
|
||||
e = step_over();
|
||||
var frame = e.Thread.GetFrames () [0];
|
||||
var ginst = frame.Method.GetLocal ("bytes");
|
||||
Value variable = frame.GetValue (ginst);
|
||||
StructMirror thisObj = (StructMirror)variable;
|
||||
TypeMirror thisType = thisObj.Type;
|
||||
variable = thisObj.InvokeMethod(e.Thread, thisType.GetMethod("ToString"), null);
|
||||
AssertValue ("abc", variable);
|
||||
|
||||
}
|
||||
[Test]
|
||||
public void IfPropertyStepping () {
|
||||
Event e = run_until ("if_property_stepping");
|
||||
var req = create_step (e);
|
||||
req.Enable ();
|
||||
e = step_once ();
|
||||
e = step_over ();
|
||||
e = step_into ();
|
||||
e = step_into ();
|
||||
e = step_into ();
|
||||
e = step_into ();
|
||||
e = step_into ();
|
||||
e = step_into ();
|
||||
e = step_into ();
|
||||
e = step_into ();
|
||||
e = step_into ();
|
||||
Assert.IsTrue ((e as StepEvent).Method.Name == "op_Equality" || (e as StepEvent).Method.Name == "if_property_stepping");
|
||||
}
|
||||
} // class DebuggerTests
|
||||
} // namespace
|
||||
@@ -8,7 +8,11 @@ KEYFILE = ../mono.pub
|
||||
LIB_MCS_FLAGS = -nowarn:618
|
||||
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
|
||||
TEST_LIB_REFS = nunit.mocks
|
||||
TEST_LIB_REFS =
|
||||
|
||||
ifneq ($(PROFILE),xammac_net_4_5)
|
||||
TEST_LIB_REFS += nunit.mocks
|
||||
endif
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@ KEYFILE = ../mono.pub
|
||||
LIB_MCS_FLAGS =
|
||||
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
|
||||
TEST_LIB_REFS = System.Messaging nunit.mocks
|
||||
TEST_LIB_REFS = System.Messaging
|
||||
|
||||
ifneq ($(PROFILE),xammac_net_4_5)
|
||||
TEST_LIB_REFS += nunit.mocks
|
||||
endif
|
||||
|
||||
include ../../build/library.make
|
||||
-8
@@ -110,14 +110,6 @@ namespace System.ComponentModel.Composition.ReflectionModel
|
||||
{
|
||||
Requires.NotNull(importDefinition, "importDefinition");
|
||||
|
||||
ReflectionImportDefinition reflectionImportDefinition = importDefinition as ReflectionImportDefinition;
|
||||
if (reflectionImportDefinition == null)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
string.Format(CultureInfo.CurrentCulture, Strings.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()),
|
||||
"importDefinition");
|
||||
}
|
||||
|
||||
return (importDefinition is IPartCreatorImportDefinition);
|
||||
}
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/*.cs
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/*.cs
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/AttributedModel/*.cs
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/*.cs
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Factories/*.cs
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Primitives/*.cs
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/ReflectionModel/*.cs
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/Integration/*.cs
|
||||
../../../external/corefx/src/System.ComponentModel.Composition/tests/System/UnitTesting/*.cs
|
||||
@@ -29,12 +29,6 @@ ifdef MONO_FEATURE_APPLETLS
|
||||
LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLETLS
|
||||
endif
|
||||
|
||||
ifdef ENABLE_GSS
|
||||
ifndef NO_GSS
|
||||
LIB_MCS_FLAGS += -d:ENABLE_GSS
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef PROFILE_DISABLE_BTLS
|
||||
ifdef HAVE_BTLS
|
||||
LIB_MCS_FLAGS += -d:MONO_FEATURE_BTLS
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
|
||||
<OutputPath>./../../class/lib/monotouch</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;COREFX;PLATFORM_UNIX;USEOFFSET;MONO_PARTIAL_DATA_IMPORT;NO_CODEDOM;NO_OLEDB;NO_ODBC;NO_CONFIGURATION;MONO_FEATURE_APPLETLS;ENABLE_GSS</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;COREFX;PLATFORM_UNIX;USEOFFSET;MONO_PARTIAL_DATA_IMPORT;NO_CODEDOM;NO_OLEDB;NO_ODBC;NO_CONFIGURATION;MONO_FEATURE_APPLETLS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
|
||||
<OutputPath>./../../class/lib/monotouch_watch</OutputPath>
|
||||
@@ -74,12 +74,12 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<OutputPath>./../../class/lib/xammac</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;COREFX;PLATFORM_UNIX;USEOFFSET;MONO_PARTIAL_DATA_IMPORT;NO_CODEDOM;NO_OLEDB;NO_ODBC;NO_CONFIGURATION;MONO_FEATURE_APPLETLS;ENABLE_GSS</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;COREFX;PLATFORM_UNIX;USEOFFSET;MONO_PARTIAL_DATA_IMPORT;NO_CODEDOM;NO_OLEDB;NO_ODBC;NO_CONFIGURATION;MONO_FEATURE_APPLETLS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
|
||||
<OutputPath>./../../class/lib/xammac_net_4_5</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac_net_4_5</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;COREFX;PLATFORM_UNIX;USEOFFSET;MONO_PARTIAL_DATA_IMPORT;MONO_FEATURE_APPLETLS;ENABLE_GSS</DefineConstants>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;COREFX;PLATFORM_UNIX;USEOFFSET;MONO_PARTIAL_DATA_IMPORT;MONO_FEATURE_APPLETLS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
|
||||
<OutputPath>./../../class/lib/orbis</OutputPath>
|
||||
|
||||
@@ -12,7 +12,11 @@ endif
|
||||
KEYFILE = ../msfinal.pub
|
||||
LIB_MCS_FLAGS = /resource:System.Messaging/MessageQueue.resx
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
|
||||
TEST_LIB_REFS = nunit.mocks
|
||||
TEST_LIB_REFS =
|
||||
|
||||
ifneq ($(PROFILE),xammac_net_4_5)
|
||||
TEST_LIB_REFS += nunit.mocks
|
||||
endif
|
||||
|
||||
EXTRA_DISTFILES = System.Messaging/MessageQueue.resx
|
||||
|
||||
|
||||
@@ -57,13 +57,35 @@ namespace System.Net.Http
|
||||
public HttpRequestMessage Request;
|
||||
public CancellationTokenRegistration CancellationTokenRegistration;
|
||||
public CFContentStream ContentStream;
|
||||
public bool StreamCanBeDisposed;
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
CancellationTokenRegistration.Dispose ();
|
||||
if (ContentStream != null) {
|
||||
ContentStream.Close ();
|
||||
}
|
||||
if (ContentStream != null) {
|
||||
// The Close method of the CFContentStream blocks as you can see:
|
||||
// public void Close ()
|
||||
// {
|
||||
// data_read_event.WaitOne (); // make sure there's no pending data
|
||||
//
|
||||
// data_mutex.WaitOne ();
|
||||
// data = null;
|
||||
// this.http_stream.ErrorEvent -= HandleErrorEvent;
|
||||
// data_mutex.ReleaseMutex ();
|
||||
//
|
||||
// data_event.Set ();
|
||||
// }
|
||||
// This means. that when we want to ignore the data of the content, which happens
|
||||
// in the first request of a redirect, if we want to close, ignoring the content
|
||||
// we will have a deadlock.
|
||||
// Dispose will clean all the data, without waiting for the read, which by design in the
|
||||
// CFContentStream, blocks the thread. This happens ONLY after the first request that gets
|
||||
// a redirect status code. All other cases should call close.
|
||||
if (StreamCanBeDisposed)
|
||||
ContentStream.Dispose ();
|
||||
else
|
||||
ContentStream.Close ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,6 +195,11 @@ namespace System.Net.Http
|
||||
}
|
||||
|
||||
protected internal override async Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken)
|
||||
{
|
||||
return await SendAsync (request, cancellationToken, true).ConfigureAwait (false);
|
||||
}
|
||||
|
||||
internal async Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken, bool isFirstRequest)
|
||||
{
|
||||
sentRequest = true;
|
||||
|
||||
@@ -194,7 +221,8 @@ namespace System.Net.Http
|
||||
}
|
||||
}
|
||||
|
||||
stream.ShouldAutoredirect = allowAutoRedirect;
|
||||
if (!isFirstRequest && allowAutoRedirect)
|
||||
stream.ShouldAutoredirect = allowAutoRedirect;
|
||||
stream.HasBytesAvailableEvent += HandleHasBytesAvailableEvent;
|
||||
stream.ErrorEvent += HandleErrorEvent;
|
||||
stream.ClosedEvent += HandleClosedEvent;
|
||||
@@ -234,9 +262,31 @@ namespace System.Net.Http
|
||||
CloseStream (stream);
|
||||
});
|
||||
|
||||
if (isFirstRequest) {
|
||||
var initialRequest = await response.Task;
|
||||
var status = initialRequest.StatusCode;
|
||||
if (IsRedirect (status) && allowAutoRedirect) {
|
||||
bucket.StreamCanBeDisposed = true;
|
||||
// remove headers in a redirect for Authentication.
|
||||
request.Headers.Authorization = null;
|
||||
return await SendAsync (request, cancellationToken, false).ConfigureAwait (false);
|
||||
}
|
||||
return initialRequest;
|
||||
}
|
||||
return await response.Task;
|
||||
}
|
||||
|
||||
// Decide if we redirect or not, similar to what is done in the managed handler
|
||||
// https://github.com/mono/mono/blob/eca15996c7163f331c9f2cd0a17b63e8f92b1d55/mcs/class/referencesource/System/net/System/Net/HttpWebRequest.cs#L5681
|
||||
static bool IsRedirect (HttpStatusCode status)
|
||||
{
|
||||
return status == HttpStatusCode.Ambiguous || // 300
|
||||
status == HttpStatusCode.Moved || // 301
|
||||
status == HttpStatusCode.Redirect || // 302
|
||||
status == HttpStatusCode.RedirectMethod || // 303
|
||||
status == HttpStatusCode.RedirectKeepVerb; // 307
|
||||
}
|
||||
|
||||
void HandleErrorEvent (object sender, CFStream.StreamEventArgs e)
|
||||
{
|
||||
var stream = (CFHTTPStream)sender;
|
||||
|
||||
@@ -19,11 +19,13 @@ ifneq ($(PROFILE),monodroid)
|
||||
ifneq ($(PROFILE),monotouch)
|
||||
ifneq ($(PROFILE),monotouch_tv)
|
||||
ifneq ($(PROFILE),monotouch_watch)
|
||||
ifneq ($(PROFILE),xammac_net_4_5)
|
||||
XTEST_LIB_REFS += System.Drawing
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (2.1, $(FRAMEWORK_VERSION))
|
||||
LIB_REFS += System.Data System.Configuration SMDiagnostics
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
System.Runtime.Serialization/Bug666333Test.cs
|
||||
System.Runtime.Serialization/WsdlHelper.cs
|
||||
System.Runtime.Serialization/XsdDataContractImporterTest2.cs
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../external/corefx/src/System.Runtime.Serialization.Xml/tests/SerializationTypes.RuntimeOnly.cs
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
System/UriTemplateTest.cs
|
||||
System.ServiceModel/WebHttpBindingTest.cs
|
||||
System.ServiceModel.Activation/WebScriptServiceHostFactoryTest.cs
|
||||
System.ServiceModel.Configuration/WebHttpBindingElementTest.cs
|
||||
System.ServiceModel.Description/WebHttpBehaviorTest.cs
|
||||
System.ServiceModel.Description/WebHttpEndpointTest.cs
|
||||
System.ServiceModel.Description/WebScriptEnablingBehaviorTest.cs
|
||||
System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs
|
||||
System.ServiceModel.Web/WebOperationContextTest.cs
|
||||
System.ServiceModel.Web/WebServiceHostTest.cs
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
System.Web.Services/WebServiceTest.cs
|
||||
System.Web.Services.Configuration/DiagnosticsElementTest.cs
|
||||
System.Web.Services.Configuration/ProtocolElementTest.cs
|
||||
System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs
|
||||
System.Web.Services.Configuration/SoapExtensionTypeElementTest.cs
|
||||
System.Web.Services.Configuration/TypeElementTest.cs
|
||||
System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs
|
||||
System.Web.Services.Configuration/WsiProfilesElementTest.cs
|
||||
System.Web.Services.Description/ServiceDescriptionImporterTest.cs
|
||||
System.Web.Services.Description/ServiceDescriptionReflectorTest.cs
|
||||
System.Web.Services.Description/WebReferenceOptionsTest.cs
|
||||
System.Web.Services.Description/WebServicesInteroperabilityTest.cs
|
||||
System.Web.Services.Protocols/LogicalMethodInfoTest.cs
|
||||
System.Web.Services.Protocols/SoapServerTypeTest.cs
|
||||
@@ -272,7 +272,8 @@ namespace System.Web.Configuration
|
||||
{
|
||||
string path = NormalizeVirtualPath (virtualPath);
|
||||
|
||||
foreach (VirtualDirectoryMapping mapping in map.VirtualDirectories) {
|
||||
for (int j = 0; j < map.VirtualDirectories.Count; j++) {
|
||||
VirtualDirectoryMapping mapping = map.VirtualDirectories.Get(j);
|
||||
if (path.StartsWith (mapping.VirtualDirectory)) {
|
||||
int i = mapping.VirtualDirectory.Length;
|
||||
if (path.Length == i) {
|
||||
|
||||
@@ -483,7 +483,7 @@ namespace System.Windows.Forms.Layout
|
||||
CalculateColumnWidths (settings, actual_positions, max_colspan, settings.ColumnStyles, auto_size, column_widths, false);
|
||||
|
||||
// Calculate available width
|
||||
int available_width = size.Width - (border_width * (columns + 1));
|
||||
int available_width = size.Width < Int16.MaxValue ? size.Width - (border_width * (columns + 1)) : 0;
|
||||
foreach (int width in column_widths)
|
||||
available_width -= width;
|
||||
|
||||
@@ -516,7 +516,7 @@ namespace System.Windows.Forms.Layout
|
||||
CalculateRowHeights (settings, actual_positions, max_rowspan, settings.RowStyles, auto_size, column_widths, row_heights);
|
||||
|
||||
// Calculate available height
|
||||
int available_height = size.Height - (border_width * (rows + 1));
|
||||
int available_height = size.Height < Int16.MaxValue ? size.Height - (border_width * (rows + 1)) : 0;
|
||||
foreach (int height in row_heights)
|
||||
available_height -= height;
|
||||
|
||||
|
||||
@@ -24,11 +24,13 @@ ifneq ($(PROFILE),monodroid)
|
||||
ifneq ($(PROFILE),monotouch)
|
||||
ifneq ($(PROFILE),monotouch_tv)
|
||||
ifneq ($(PROFILE),monotouch_watch)
|
||||
ifneq ($(PROFILE),xammac_net_4_5)
|
||||
XTEST_LIB_REFS += System.Drawing
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBRARY_WARN_AS_ERROR = yes
|
||||
|
||||
|
||||
@@ -84,5 +84,9 @@ using System.Runtime.InteropServices;
|
||||
[assembly: InternalsVisibleTo ("Xamarin.Mac, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
|
||||
#endif
|
||||
|
||||
#if MONODROID
|
||||
[assembly: InternalsVisibleTo ("Mono.Android, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
|
||||
#endif
|
||||
|
||||
[assembly: TypeForwardedTo (typeof (System.Collections.Generic.Stack<>))]
|
||||
[assembly: TypeForwardedTo (typeof (System.Collections.Generic.Queue<>))]
|
||||
@@ -92,9 +92,13 @@ endif
|
||||
|
||||
ifndef PROFILE_DISABLE_BTLS
|
||||
ifdef HAVE_BTLS
|
||||
|
||||
LIB_MCS_FLAGS += -d:MONO_FEATURE_BTLS
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ENABLE_GSS
|
||||
ifndef NO_GSS
|
||||
LIB_MCS_FLAGS += -d:ENABLE_GSS
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -67,7 +67,8 @@ namespace Microsoft.CSharp
|
||||
|
||||
mcs.StartInfo.Arguments += BuildArgs (options, fileNames, _provOptions);
|
||||
|
||||
var mcsOutMutex = new Mutex ();
|
||||
var stderr_completed = new ManualResetEvent (false);
|
||||
var stdout_completed = new ManualResetEvent (false);
|
||||
/*
|
||||
string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
|
||||
if (monoPath != null)
|
||||
@@ -93,15 +94,19 @@ namespace Microsoft.CSharp
|
||||
|
||||
mcs.StartInfo.CreateNoWindow=true;
|
||||
mcs.StartInfo.UseShellExecute=false;
|
||||
mcs.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
mcs.StartInfo.RedirectStandardOutput=true;
|
||||
mcs.StartInfo.RedirectStandardError=true;
|
||||
mcs.ErrorDataReceived += new DataReceivedEventHandler ((sender, args) => {
|
||||
if (args.Data != null) {
|
||||
mcsOutMutex.WaitOne ();
|
||||
if (args.Data != null)
|
||||
results.Output.Add (args.Data);
|
||||
mcsOutMutex.ReleaseMutex ();
|
||||
}
|
||||
else
|
||||
stderr_completed.Set ();
|
||||
});
|
||||
mcs.OutputDataReceived += new DataReceivedEventHandler ((sender, args) => {
|
||||
if (args.Data == null)
|
||||
stdout_completed.Set ();
|
||||
});
|
||||
|
||||
// Use same text decoder as mcs and not user set values in Console
|
||||
mcs.StartInfo.StandardOutputEncoding =
|
||||
@@ -125,8 +130,8 @@ namespace Microsoft.CSharp
|
||||
|
||||
results.NativeCompilerReturnValue = mcs.ExitCode;
|
||||
} finally {
|
||||
mcs.CancelErrorRead ();
|
||||
mcs.CancelOutputRead ();
|
||||
stderr_completed.WaitOne (TimeSpan.FromSeconds (30));
|
||||
stdout_completed.WaitOne (TimeSpan.FromSeconds (30));
|
||||
mcs.Close();
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,11 @@ namespace Mono.Net.Security
|
||||
};
|
||||
|
||||
var task = ProcessAuthentication (true, options, CancellationToken.None);
|
||||
task.Wait ();
|
||||
try {
|
||||
task.Wait ();
|
||||
} catch (Exception ex) {
|
||||
throw HttpWebRequest.FlattenException (ex);
|
||||
}
|
||||
}
|
||||
|
||||
public IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState)
|
||||
@@ -231,7 +235,11 @@ namespace Mono.Net.Security
|
||||
};
|
||||
|
||||
var task = ProcessAuthentication (true, options, CancellationToken.None);
|
||||
task.Wait ();
|
||||
try {
|
||||
task.Wait ();
|
||||
} catch (Exception ex) {
|
||||
throw HttpWebRequest.FlattenException (ex);
|
||||
}
|
||||
}
|
||||
|
||||
public IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState)
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Mono
|
||||
class SystemDependencyProvider : ISystemDependencyProvider
|
||||
{
|
||||
static SystemDependencyProvider instance;
|
||||
static object syncRoot = new object ();
|
||||
|
||||
public static SystemDependencyProvider Instance {
|
||||
get {
|
||||
@@ -44,8 +45,12 @@ namespace Mono
|
||||
|
||||
internal static void Initialize ()
|
||||
{
|
||||
if (instance == null)
|
||||
Interlocked.CompareExchange (ref instance, new SystemDependencyProvider (), null);
|
||||
lock (syncRoot) {
|
||||
if (instance != null)
|
||||
return;
|
||||
|
||||
instance = new SystemDependencyProvider ();
|
||||
}
|
||||
}
|
||||
|
||||
ISystemCertificateProvider ISystemDependencyProvider.CertificateProvider => CertificateProvider;
|
||||
|
||||
@@ -400,6 +400,8 @@ namespace System.Net
|
||||
WebConnection.Debug ($"{ME} CLOSE #1: read_eof={read_eof} bufferedEntireContent={bufferedEntireContent}");
|
||||
if (read_eof || bufferedEntireContent) {
|
||||
disposed = true;
|
||||
innerStream?.Dispose ();
|
||||
innerStream = null;
|
||||
Operation.Finish (true);
|
||||
} else {
|
||||
// If we have not read all the contents
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
|
||||
<OutputPath>./../../class/lib/monotouch</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;MONO_FEATURE_APPLETLS;ONLY_APPLETLS</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;MONO_FEATURE_APPLETLS;ONLY_APPLETLS;ENABLE_GSS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_runtime' ">
|
||||
<OutputPath>./../../class/lib/monotouch_runtime</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch_runtime</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;MONO_FEATURE_APPLETLS;ONLY_APPLETLS</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;MONO_FEATURE_APPLETLS;ONLY_APPLETLS;ENABLE_GSS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
|
||||
<OutputPath>./../../class/lib/monotouch_watch</OutputPath>
|
||||
@@ -87,12 +87,12 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<OutputPath>./../../class/lib/xammac</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;MONO_FEATURE_APPLETLS;FEATURE_COMPILED;ONLY_APPLETLS</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;MONO_FEATURE_APPLETLS;FEATURE_COMPILED;ONLY_APPLETLS;ENABLE_GSS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
|
||||
<OutputPath>./../../class/lib/xammac_net_4_5</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac_net_4_5</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;CODEDOM;MONO_FEATURE_APPLETLS;FEATURE_COMPILED;ONLY_APPLETLS;CONFIGURATION_DEP</DefineConstants>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;CODEDOM;MONO_FEATURE_APPLETLS;FEATURE_COMPILED;ONLY_APPLETLS;ENABLE_GSS;CONFIGURATION_DEP</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
|
||||
<OutputPath>./../../class/lib/orbis</OutputPath>
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
using System.Drawing;
|
||||
#endif
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.System.ComponentModel {
|
||||
@@ -58,5 +61,21 @@ namespace MonoTests.System.ComponentModel {
|
||||
|
||||
Assert.AreEqual (1, dvat.GetHashCode (), "GetHashCode");
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
[DefaultValue (typeof (Color), "Black")]
|
||||
public Color Bar { get; set; }
|
||||
|
||||
// https://github.com/mono/mono/issues/12362
|
||||
[Test]
|
||||
public void Bug_12362 ()
|
||||
{
|
||||
var prop = typeof (DefaultValueAttributeTest).GetProperty ("Bar");
|
||||
var attr = (DefaultValueAttribute)prop.GetCustomAttributes (true) [0];
|
||||
var value = attr.Value;
|
||||
Assert.IsNotNull (value);
|
||||
Assert.AreEqual (typeof (Color), value.GetType ());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -690,7 +690,12 @@ namespace Microsoft.Win32 {
|
||||
|
||||
public void DirtyTimeout (object state)
|
||||
{
|
||||
Flush ();
|
||||
try {
|
||||
Flush ();
|
||||
} catch {
|
||||
// This was identified as a crasher under some scenarios
|
||||
// Internal MS issue: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/787119
|
||||
}
|
||||
}
|
||||
|
||||
public void Flush ()
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Mono {
|
||||
static extern void DisableMicrosoftTelemetry ();
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath, IntPtr eventType, IntPtr appPath);
|
||||
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath, IntPtr eventType, IntPtr appPath, IntPtr configDir);
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void SendMicrosoftTelemetry_internal (IntPtr payload, ulong portable_hash, ulong unportable_hash);
|
||||
@@ -147,7 +147,8 @@ namespace Mono {
|
||||
SendMicrosoftTelemetry (payload_str, portable_hash, unportable_hash);
|
||||
}
|
||||
|
||||
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str, string eventType_str, string appPath_str)
|
||||
// All must be set except for configDir_str
|
||||
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str, string eventType_str, string appPath_str, string configDir_str)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
|
||||
using (var appBundleID_chars = RuntimeMarshal.MarshalString (appBundleID_str))
|
||||
@@ -156,8 +157,9 @@ namespace Mono {
|
||||
using (var merpGUIPath_chars = RuntimeMarshal.MarshalString (merpGUIPath_str))
|
||||
using (var eventType_chars = RuntimeMarshal.MarshalString (eventType_str))
|
||||
using (var appPath_chars = RuntimeMarshal.MarshalString (appPath_str))
|
||||
using (var configDir_chars = RuntimeMarshal.MarshalString (configDir_str))
|
||||
{
|
||||
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value, eventType_chars.Value, appPath_chars.Value);
|
||||
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value, eventType_chars.Value, appPath_chars.Value, configDir_chars.Value);
|
||||
}
|
||||
} else {
|
||||
throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
|
||||
@@ -192,16 +194,53 @@ namespace Mono {
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void RegisterReportingForNativeLib_internal (IntPtr modulePathSuffix, IntPtr moduleName);
|
||||
static extern void EnableCrashReportLog_internal (IntPtr directory);
|
||||
|
||||
static void RegisterReportingForNativeLib (string modulePathSuffix_str, string moduleName_str)
|
||||
static void EnableCrashReportLog (string directory_str)
|
||||
{
|
||||
using (var modulePathSuffix_chars = RuntimeMarshal.MarshalString (modulePathSuffix_str))
|
||||
using (var moduleName_chars = RuntimeMarshal.MarshalString (moduleName_str))
|
||||
using (var directory_chars = RuntimeMarshal.MarshalString (directory_str))
|
||||
{
|
||||
RegisterReportingForNativeLib_internal (modulePathSuffix_chars.Value, moduleName_chars.Value);
|
||||
EnableCrashReportLog_internal (directory_chars.Value);
|
||||
}
|
||||
}
|
||||
|
||||
enum CrashReportLogLevel : int {
|
||||
MonoSummaryNone = 0,
|
||||
MonoSummarySetup,
|
||||
MonoSummarySuspendHandshake,
|
||||
MonoSummaryUnmanagedStacks,
|
||||
MonoSummaryManagedStacks,
|
||||
MonoSummaryStateWriter,
|
||||
MonoSummaryStateWriterDone,
|
||||
MonoSummaryMerpWriter,
|
||||
MonoSummaryMerpInvoke,
|
||||
MonoSummaryCleanup,
|
||||
MonoSummaryDone,
|
||||
|
||||
MonoSummaryDoubleFault
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern int CheckCrashReportLog_internal (IntPtr directory, bool clear);
|
||||
|
||||
static CrashReportLogLevel CheckCrashReportLog (string directory_str, bool clear)
|
||||
{
|
||||
using (var directory_chars = RuntimeMarshal.MarshalString (directory_str))
|
||||
{
|
||||
return (CrashReportLogLevel) CheckCrashReportLog_internal (directory_chars.Value, clear);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void AnnotateMicrosoftTelemetry_internal (IntPtr key, IntPtr val);
|
||||
|
||||
static void AnnotateMicrosoftTelemetry (string key, string val)
|
||||
{
|
||||
using (var key_chars = RuntimeMarshal.MarshalString (key))
|
||||
using (var val_chars = RuntimeMarshal.MarshalString (val))
|
||||
{
|
||||
AnnotateMicrosoftTelemetry_internal (key_chars.Value, val_chars.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,8 +185,10 @@ namespace System.Diagnostics {
|
||||
return frames;
|
||||
|
||||
var accum = new List<StackFrame> ();
|
||||
foreach (var t in captured_traces)
|
||||
accum.AddRange(t.GetFrames ());
|
||||
foreach (var t in captured_traces) {
|
||||
for (int i = 0; i < t.FrameCount; i++)
|
||||
accum.Add (t.GetFrame (i));
|
||||
}
|
||||
|
||||
accum.AddRange (frames);
|
||||
return accum.ToArray ();
|
||||
|
||||
@@ -303,11 +303,24 @@ namespace System.Reflection.Emit {
|
||||
return System.Text.Encoding.UTF8.GetString(data, pos, len);
|
||||
}
|
||||
|
||||
internal static string decode_string (byte [] data, int pos, out int rpos)
|
||||
{
|
||||
if (data [pos] == 0xff) {
|
||||
rpos = pos + 1;
|
||||
return null;
|
||||
} else {
|
||||
int len = decode_len (data, pos, out pos);
|
||||
string s = string_from_bytes (data, pos, len);
|
||||
pos += len;
|
||||
rpos = pos;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
internal string string_arg ()
|
||||
{
|
||||
int pos = 2;
|
||||
int len = decode_len (data, pos, out pos);
|
||||
return string_from_bytes (data, pos, len);
|
||||
return decode_string (data, pos, out pos);
|
||||
}
|
||||
|
||||
internal static UnmanagedMarshal get_umarshal (CustomAttributeBuilder customBuilder, bool is_field) {
|
||||
@@ -335,18 +348,14 @@ namespace System.Reflection.Emit {
|
||||
int paramType; // What is this ?
|
||||
|
||||
/* Skip field/property signature */
|
||||
pos ++;
|
||||
int fieldPropSig = (int)data [pos ++];
|
||||
/* Read type */
|
||||
paramType = ((int)data [pos++]);
|
||||
if (paramType == 0x55) {
|
||||
/* enums, the value is preceeded by the type */
|
||||
int len2 = decode_len (data, pos, out pos);
|
||||
string_from_bytes (data, pos, len2);
|
||||
pos += len2;
|
||||
decode_string (data, pos, out pos);
|
||||
}
|
||||
int len = decode_len (data, pos, out pos);
|
||||
string named_name = string_from_bytes (data, pos, len);
|
||||
pos += len;
|
||||
string named_name = decode_string (data, pos, out pos);
|
||||
|
||||
switch (named_name) {
|
||||
case "ArraySubType":
|
||||
@@ -375,9 +384,7 @@ namespace System.Reflection.Emit {
|
||||
pos += 4;
|
||||
break;
|
||||
case "SafeArrayUserDefinedSubType":
|
||||
len = decode_len (data, pos, out pos);
|
||||
string_from_bytes (data, pos, len);
|
||||
pos += len;
|
||||
decode_string (data, pos, out pos);
|
||||
break;
|
||||
case "SizeParamIndex":
|
||||
value = (int)data [pos++];
|
||||
@@ -386,20 +393,15 @@ namespace System.Reflection.Emit {
|
||||
hasSize = true;
|
||||
break;
|
||||
case "MarshalType":
|
||||
len = decode_len (data, pos, out pos);
|
||||
marshalTypeName = string_from_bytes (data, pos, len);
|
||||
pos += len;
|
||||
marshalTypeName = decode_string (data, pos, out pos);
|
||||
break;
|
||||
case "MarshalTypeRef":
|
||||
len = decode_len (data, pos, out pos);
|
||||
marshalTypeName = string_from_bytes (data, pos, len);
|
||||
marshalTypeRef = Type.GetType (marshalTypeName);
|
||||
pos += len;
|
||||
marshalTypeName = decode_string (data, pos, out pos);
|
||||
if (marshalTypeName != null)
|
||||
marshalTypeRef = Type.GetType (marshalTypeName);
|
||||
break;
|
||||
case "MarshalCookie":
|
||||
len = decode_len (data, pos, out pos);
|
||||
marshalCookie = string_from_bytes (data, pos, len);
|
||||
pos += len;
|
||||
marshalCookie = decode_string (data, pos, out pos);
|
||||
break;
|
||||
default:
|
||||
throw new Exception ("Unknown MarshalAsAttribute field: " + named_name);
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace System.Threading {
|
||||
internal int _serialized_principal_version;
|
||||
private IntPtr appdomain_refs;
|
||||
private int interruption_requested;
|
||||
private IntPtr synch_cs;
|
||||
private IntPtr longlived;
|
||||
internal bool threadpool_thread;
|
||||
private bool thread_interrupt_requested;
|
||||
/* These are used from managed code */
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -27,7 +27,7 @@ using System;
|
||||
|
||||
namespace Mono
|
||||
{
|
||||
// Keep in sync with mono/native/mono-native-platform-type.h
|
||||
// Keep in sync with mono/native/mono-native-platform.h
|
||||
[Flags]
|
||||
enum MonoNativePlatformType
|
||||
{
|
||||
@@ -30,40 +30,5 @@ namespace MonoTests.Mono
|
||||
var initialized = MonoNativePlatform.IsInitialized ();
|
||||
Assert.IsTrue (initialized, "MonoNativePlatform.IsInitialized()");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestReflectionInitialize ()
|
||||
{
|
||||
var asm = typeof (string).Assembly;
|
||||
var type = asm.GetType ("Mono.MonoNativePlatform");
|
||||
Assert.IsNotNull (type, "MonoNativePlatform");
|
||||
|
||||
var method = type.GetMethod ("Initialize", BindingFlags.Static | BindingFlags.Public);
|
||||
Assert.IsNotNull (method, "MonoNativePlatform.Initialize");
|
||||
|
||||
var method2 = type.GetMethod ("IsInitialized", BindingFlags.Static | BindingFlags.Public);
|
||||
Assert.IsNotNull (method2, "MonoNativePlatform.IsInitialized");
|
||||
|
||||
method.Invoke (null, null);
|
||||
|
||||
var result = (bool)method2.Invoke (null, null);
|
||||
Assert.IsTrue (result, "MonoNativePlatform.IsInitialized()");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestInternalCounter ()
|
||||
{
|
||||
MonoNativePlatform.Initialize ();
|
||||
|
||||
var asm = typeof (string).Assembly;
|
||||
var type = asm.GetType ("Mono.MonoNativePlatform");
|
||||
Assert.IsNotNull (type, "MonoNativePlatform");
|
||||
|
||||
var method = type.GetMethod ("TestInternalCounter", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
Assert.IsNotNull (method, "MonoNativePlatform.TestInternalCounter");
|
||||
var result = method.Invoke (null, null);
|
||||
|
||||
Assert.That (result, Is.GreaterThan (0), "MonoNativePlatform.TestInternalCounter()");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using NUnit.Framework;
|
||||
using System.Runtime.ExceptionServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MonoTests.System.Diagnostics
|
||||
{
|
||||
@@ -181,7 +182,7 @@ namespace MonoTests.System.Diagnostics
|
||||
frame1.GetFileLineNumber (),
|
||||
"Line number (1)");
|
||||
|
||||
Assert.AreEqual (135,
|
||||
Assert.AreEqual (136,
|
||||
frame2.GetFileLineNumber (),
|
||||
"Line number (2)");
|
||||
|
||||
@@ -321,7 +322,7 @@ namespace MonoTests.System.Diagnostics
|
||||
frame1.GetFileLineNumber (),
|
||||
"Line number (1)");
|
||||
|
||||
Assert.AreEqual (271,
|
||||
Assert.AreEqual (272,
|
||||
frame2.GetFileLineNumber (),
|
||||
"Line number (2)");
|
||||
}
|
||||
@@ -377,6 +378,49 @@ namespace MonoTests.System.Diagnostics
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotWasm")]
|
||||
[Category("MobileNotWorking")]
|
||||
// https://github.com/mono/mono/issues/12688
|
||||
public async Task GetFrames_AsyncCalls ()
|
||||
{
|
||||
await StartAsyncCalls ();
|
||||
}
|
||||
|
||||
private async Task StartAsyncCalls ()
|
||||
{
|
||||
try
|
||||
{
|
||||
await AsyncMethod1 ();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
var stackTrace = new StackTrace (exception, true);
|
||||
Assert.AreEqual (25, stackTrace.GetFrames ().Length);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<int> AsyncMethod1 ()
|
||||
{
|
||||
return await AsyncMethod2 ();
|
||||
}
|
||||
|
||||
private async Task<int> AsyncMethod2 ()
|
||||
{
|
||||
return await AsyncMethod3 ();
|
||||
}
|
||||
|
||||
private async Task<int> AsyncMethod3 ()
|
||||
{
|
||||
return await AsyncMethod4 ();
|
||||
}
|
||||
|
||||
private async Task<int> AsyncMethod4 ()
|
||||
{
|
||||
await Task.Delay (10);
|
||||
throw new Exception ("Test exception thrown!");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests whether getting method associated with frame works.
|
||||
/// </summary>
|
||||
|
||||
@@ -86,7 +86,6 @@ namespace MonoTests.System.IO
|
||||
}
|
||||
|
||||
if (d.DriveType == DriveType.Fixed) { // just consider fixed drives for now
|
||||
Assert.True (d.IsReady);
|
||||
AssertHelper.GreaterOrEqual (d.AvailableFreeSpace, 0);
|
||||
AssertHelper.GreaterOrEqual (d.TotalFreeSpace, 0);
|
||||
AssertHelper.GreaterOrEqual (d.TotalSize, 0);
|
||||
|
||||
@@ -9,6 +9,7 @@ using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Threading;
|
||||
using System.Runtime.InteropServices;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.System.Reflection.Emit
|
||||
@@ -845,6 +846,59 @@ namespace MonoTests.System.Reflection.Emit
|
||||
assemblyBuilder1.Save ("Repro55681-2a.dll");
|
||||
}
|
||||
|
||||
[DllImport("SomeLib")]
|
||||
private static extern void MethodForNullStringMarshalAsFields([MarshalAs(UnmanagedType.LPWStr)] string param);
|
||||
|
||||
[Test]
|
||||
public void NullStringMarshalAsFields () {
|
||||
// Regression test for https://github.com/mono/mono/issues/12747
|
||||
//
|
||||
// MarshalAsAttribute goes through
|
||||
// CustomAttributeBuilder.get_umarshal which tries to
|
||||
// build an UnmanagedMarshal value by decoding the CAB's data.
|
||||
//
|
||||
// The data decoding needs to handle null string (encoded as 0xFF) properly.
|
||||
var aName = new AssemblyName("Repro12747");
|
||||
var assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(aName, AssemblyBuilderAccess.RunAndSave, tempDir);
|
||||
var module = assembly.DefineDynamicModule(aName.Name, aName.Name + ".dll");
|
||||
|
||||
var prototypeMethodName = nameof(MethodForNullStringMarshalAsFields);
|
||||
var someMethod = this.GetType().GetMethod(prototypeMethodName, BindingFlags.Static | BindingFlags.NonPublic);
|
||||
|
||||
var typeBuilder = module.DefineType("NewType" + module.ToString(), TypeAttributes.Class | TypeAttributes.Public);
|
||||
var methodBuilder = typeBuilder.DefineMethod("NewMethod", MethodAttributes.Public | MethodAttributes.HideBySig, typeof(void), new[] { typeof(string) });
|
||||
var il = methodBuilder.GetILGenerator();
|
||||
il.Emit(OpCodes.Ret);
|
||||
|
||||
var param = someMethod.GetParameters()[0];
|
||||
var paramBuilder = methodBuilder.DefineParameter(1, param.Attributes, null);
|
||||
MarshalAsAttribute attr = param.GetCustomAttribute<MarshalAsAttribute>();
|
||||
var attrCtor = typeof(MarshalAsAttribute).GetConstructor(new[] { typeof(UnmanagedType) });
|
||||
object[] attrCtorArgs = { attr.Value };
|
||||
|
||||
// copy over the fields from the real MarshalAsAttribute on the parameter of "MethodForNullStringMarshalAsFields",
|
||||
// including the ones that were initialized to null
|
||||
var srcFields = typeof(MarshalAsAttribute).GetFields(BindingFlags.Public | BindingFlags.Instance);
|
||||
var fieldArguments = new FieldInfo[srcFields.Length];
|
||||
var fieldArgumentValues = new object[srcFields.Length];
|
||||
for(int i = 0; i < srcFields.Length; i++)
|
||||
{
|
||||
var field = srcFields[i];
|
||||
fieldArguments[i] = field;
|
||||
fieldArgumentValues[i] = field.GetValue(attr);
|
||||
}
|
||||
|
||||
var attrBuilder = new CustomAttributeBuilder(attrCtor, attrCtorArgs, Array.Empty<PropertyInfo>(), Array.Empty<object>(),
|
||||
fieldArguments, fieldArgumentValues);
|
||||
// this encodes the CustomAttributeBuilder as a data
|
||||
// blob and then tries to decode it using
|
||||
// CustomAttributeBuilder.get_umarshal
|
||||
paramBuilder.SetCustomAttribute(attrBuilder);
|
||||
|
||||
var finalType = typeBuilder.CreateType();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace MonoTests.System.Reflection
|
||||
public class CustomAttributeDataTest
|
||||
{
|
||||
[DllImport ("libc")]
|
||||
public static extern void pinvoke ();
|
||||
public static extern int readlink (string path, byte[] buffer, int buflen);
|
||||
|
||||
[MarshalAs (UnmanagedType.LPStr)]
|
||||
[NonSerialized]
|
||||
@@ -274,7 +274,7 @@ namespace MonoTests.System.Reflection
|
||||
// https://github.com/mono/mono/issues/10544
|
||||
public void MethodIncludesDllImportAttributeData ()
|
||||
{
|
||||
var mi = typeof (CustomAttributeDataTest).FindMembers (MemberTypes.Method, BindingFlags.Static | BindingFlags.Public, (m, criteria) => m.Name == "pinvoke", null);
|
||||
var mi = typeof (CustomAttributeDataTest).FindMembers (MemberTypes.Method, BindingFlags.Static | BindingFlags.Public, (m, criteria) => m.Name == "readlink", null);
|
||||
var data = ((MethodInfo)(mi[0])).CustomAttributes;
|
||||
|
||||
Assert.AreEqual (2, data.Count ());
|
||||
|
||||
@@ -562,6 +562,15 @@ namespace MonoTests.System.Reflection
|
||||
var optionalCustomModifiers = parameter.GetOptionalCustomModifiers ();
|
||||
Assert.AreEqual (new[] { typeof (C), typeof (C), typeof (D), typeof (C) }, optionalCustomModifiers);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void ReturnParameter_IsDefined_False ()
|
||||
{
|
||||
Type type = typeof (object);
|
||||
MethodInfo method = type.GetMethod ("ToString");
|
||||
ParameterInfo paramInfo = method.ReturnParameter;
|
||||
Assert.IsFalse (paramInfo.IsDefined (typeof (Attribute)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -491,6 +491,35 @@ namespace MonoTests.System.Threading
|
||||
c1.Dispose ();
|
||||
}
|
||||
}
|
||||
|
||||
[Test] // https://github.com/mono/mono/issues/12421
|
||||
public void EnsurePostIsNotCalled ()
|
||||
{
|
||||
SynchronizationContext mainContext = SynchronizationContext.Current;
|
||||
var asc = new AssertSyncContext ();
|
||||
SynchronizationContext.SetSynchronizationContext (asc);
|
||||
var ct = new CancellationTokenSource ();
|
||||
var tcs = new TaskCompletionSource<bool> ();
|
||||
ct.Token.Register (() => tcs.TrySetCanceled ());
|
||||
|
||||
bool taskIsCancelled = false;
|
||||
Action awaitAction = async () => {
|
||||
try { await tcs.Task; }
|
||||
catch (OperationCanceledException) {
|
||||
taskIsCancelled = true;
|
||||
}
|
||||
};
|
||||
awaitAction ();
|
||||
ct.Cancel (); // should not trigger SynchronizationContext.Post
|
||||
Assert.IsTrue (taskIsCancelled);
|
||||
SynchronizationContext.SetSynchronizationContext (mainContext);
|
||||
}
|
||||
|
||||
class AssertSyncContext : SynchronizationContext
|
||||
{
|
||||
public override void Post (SendOrPostCallback d, object state) =>
|
||||
throw new InvalidOperationException ("SynchronizationContext.Post was not expected.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace MonoTests.System.Threading
|
||||
}, 4);
|
||||
|
||||
Assert.IsFalse (fail);
|
||||
}, 200);
|
||||
}, 5);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -2667,5 +2667,18 @@ namespace MonoTests.System
|
||||
Assert.AreEqual (1, res.Day, "#12");
|
||||
Assert.AreEqual (DateTimeKind.Utc, res.Kind, "#13");
|
||||
}
|
||||
|
||||
[Test] // https://github.com/mono/mono/issues/11317
|
||||
public void DateTimeKoCulture ()
|
||||
{
|
||||
foreach (var culture in new [] { new CultureInfo ("ko"), new CultureInfo ("ko-KR") })
|
||||
{
|
||||
var dateTimeAm = new DateTime (2018, 1, 1, 11, 0, 0);
|
||||
var dateTimePm = new DateTime (2018, 1, 1, 13, 0, 0);
|
||||
|
||||
Assert.AreEqual ("오전 11:00:00", dateTimeAm.ToString ("T", culture.DateTimeFormat));
|
||||
Assert.AreEqual ("오후 1:00:00", dateTimePm.ToString ("T", culture.DateTimeFormat));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -405,15 +405,21 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
#if !MOBILE
|
||||
// Ensure that we can convert a stacktrace to a
|
||||
// telemetry message
|
||||
//
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToState ()
|
||||
void NestedStackTraces (int depth)
|
||||
{
|
||||
if (depth == 0)
|
||||
throw new ArgumentException ("Depth 0 exception");
|
||||
|
||||
try {
|
||||
throw new Exception ("#0");
|
||||
NestedStackTraces (depth - 1);
|
||||
} catch (Exception exc) {
|
||||
throw new Exception (String.Format ("Depth {0} exception, expect nested", depth), exc);
|
||||
}
|
||||
}
|
||||
void StacktraceToStateTest (int depth)
|
||||
{
|
||||
try {
|
||||
NestedStackTraces (depth);
|
||||
} catch (Exception exc) {
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
var convert = monoType.GetMethod("ExceptionToState", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
@@ -424,59 +430,41 @@ namespace MonoTests.System
|
||||
var portable_hash = output.Item2;
|
||||
var unportable_hash = output.Item3;
|
||||
|
||||
// To see what we're working with
|
||||
// Console.WriteLine (dump);
|
||||
|
||||
Assert.IsTrue (portable_hash != 0, "#1");
|
||||
Assert.IsTrue (unportable_hash != 0, "#2");
|
||||
Assert.IsTrue (dump.Length > 0, "#3");
|
||||
|
||||
// Console.WriteLine (dump);
|
||||
// dump should look something like:
|
||||
// {
|
||||
// "protocol_version" : "0.0.1",
|
||||
// "configuration" : {
|
||||
// "version" : "5.19.0 (managed_telemetry_pipeline/d342c73e320 Wed Aug 15 14:40:40 EDT 2018)",
|
||||
// "tlc" : "normal",
|
||||
// "sigsgev" : "altstack",
|
||||
// "notifications" : "kqueue",
|
||||
// "architecture" : "amd64",
|
||||
// "disabled_features" : "none",
|
||||
// "smallconfig" : "disabled",
|
||||
// "bigarrays" : "disabled",
|
||||
// "softdebug" : "enabled",
|
||||
// "interpreter" : "enabled",
|
||||
// "llvm_support" : "disabled",
|
||||
// "suspend" : "hybrid"
|
||||
// },
|
||||
// "memory" : {
|
||||
// "Resident Size" : "40693760",
|
||||
// "Virtual Size" : "4521312256",
|
||||
// "minor_gc_time" : "216992",
|
||||
// "major_gc_time" : "0",
|
||||
// "minor_gc_count" : "6",
|
||||
// "major_gc_count" : "0",
|
||||
// "major_gc_time_concurrent" : "0"
|
||||
// },
|
||||
// "threads" : [
|
||||
// {
|
||||
// "is_managed" : false,
|
||||
// "managed_thread_ptr" : "0x0",
|
||||
// "thread_info_addr" : "0x0",
|
||||
// "native_thread_id" : "0x0",
|
||||
// "managed_exception_type" : "System.Exception",
|
||||
// "managed_frames" : [
|
||||
// {
|
||||
// "is_managed" : "true",
|
||||
// "guid" : "43A03618-E657-44B0-B9FA-F63314A3C1B2",
|
||||
// "token" : "0x60008da",
|
||||
// "native_offset" : "0xb2",
|
||||
// "il_offset" : "0x00000"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure that we can convert a stacktrace to a
|
||||
// telemetry message
|
||||
//
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateBase ()
|
||||
{
|
||||
StacktraceToStateTest (0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateDeeper ()
|
||||
{
|
||||
StacktraceToStateTest (2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateOverflow ()
|
||||
{
|
||||
// We set a limit on 15 nested exceptions. Lets check that we're valid
|
||||
// when exceeding that limit.
|
||||
StacktraceToStateTest (20);
|
||||
}
|
||||
|
||||
void DumpSingle ()
|
||||
{
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
@@ -507,6 +495,40 @@ namespace MonoTests.System
|
||||
Assert.IsTrue (dump.Length > 0, "#3");
|
||||
}
|
||||
|
||||
void DumpLogSet ()
|
||||
{
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
var convert = monoType.GetMethod("EnableCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
convert.Invoke(null, new object[] { "./" });
|
||||
}
|
||||
|
||||
void DumpLogUnset ()
|
||||
{
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
var convert = monoType.GetMethod("EnableCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
convert.Invoke(null, new object[] { null });
|
||||
}
|
||||
|
||||
void DumpLogCheck ()
|
||||
{
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
var convert = monoType.GetMethod("CheckCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
var result = convert.Invoke(null, new object[] { "./", true });
|
||||
var enumType = monoType.Assembly.GetType("Mono.Runtime+CrashReportLogLevel");
|
||||
var doneEnum = Enum.Parse(enumType, "MonoSummaryDone");
|
||||
Assert.AreEqual (doneEnum, result, "#DLC1");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void DumpICallTotalLogged ()
|
||||
{
|
||||
DumpLogSet ();
|
||||
DumpTotal ();
|
||||
DumpLogUnset ();
|
||||
DumpLogCheck ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void DumpICallSingleOnce ()
|
||||
|
||||
@@ -3295,6 +3295,7 @@ namespace MonoTests.System
|
||||
Assert.AreEqual ("System.Int32", t.FullName);
|
||||
}
|
||||
|
||||
/*
|
||||
[Test]
|
||||
#if MONOTOUCH || FULL_AOT_RUNTIME
|
||||
[ExpectedException (typeof (NotSupportedException))]
|
||||
@@ -3353,6 +3354,7 @@ namespace MonoTests.System
|
||||
var g0 = t.GetGenericArguments () [0];
|
||||
Assert.AreSame (g0, ut, "#1");
|
||||
}
|
||||
*/
|
||||
|
||||
[Test]
|
||||
public void MakeGenericType_WrongNumOfArguments ()
|
||||
|
||||
@@ -907,6 +907,7 @@
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\CompilerServices\TaskAwaiter.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\ConstrainedExecution\CriticalFinalizerObject.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\InteropServices\SafeBuffer.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Threading\CancellationToken.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Threading\ManualResetEventSlim.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Threading\NativeOverlapped.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Threading\SpinWait.cs" />
|
||||
@@ -928,6 +929,7 @@
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Reflection\MissingMetadataException.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\ReflectionBlockedAttribute.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\CancellationTokenRegistration.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\LockHolder.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\Tasks\DebuggerSupport.Dummy.cs" />
|
||||
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\Tasks\DebuggerSupport.cs" />
|
||||
@@ -1237,8 +1239,6 @@
|
||||
<Compile Include="..\referencesource\mscorlib\system\security\util\tokenizer.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\sharedstatics.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\text\encoding.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\threading\CancellationToken.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\threading\CancellationTokenSource.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\threading\SemaphoreSlim.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\threading\SpinLock.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\threading\Tasks\AsyncCausalityTracer.cs" />
|
||||
@@ -2078,8 +2078,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2146,8 +2144,6 @@
|
||||
<Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha384managed.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha512managed.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\security\cryptography\tripledescryptoserviceprovider.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.Cryptography\MD5CryptoServiceProvider.cs" />
|
||||
<Compile Include="System.Security.Cryptography\RNGCryptoServiceProvider.cs" />
|
||||
<Compile Include="System.Security.Cryptography\SHA1CryptoServiceProvider.cs" />
|
||||
@@ -2180,8 +2176,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2217,8 +2211,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2254,8 +2246,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2362,8 +2352,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2400,8 +2388,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2438,8 +2424,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2473,8 +2457,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2507,8 +2489,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2541,8 +2521,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
@@ -2579,8 +2557,6 @@
|
||||
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
|
||||
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatform.cs" />
|
||||
<Compile Include="Mono\MonoNativePlatformType.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAccessRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistryAuditRule.cs" />
|
||||
<Compile Include="System.Security.AccessControl\RegistrySecurity.cs" />
|
||||
|
||||
@@ -29,8 +29,6 @@ Mono/CertificateImportFlags.cs
|
||||
Mono/DependencyInjector.cs
|
||||
Mono/ISystemCertificateProvider.cs
|
||||
Mono/ISystemDependencyProvider.cs
|
||||
Mono/MonoNativePlatform.cs
|
||||
Mono/MonoNativePlatformType.cs
|
||||
Mono/Runtime.cs
|
||||
Mono/RuntimeHandles.cs
|
||||
Mono/RuntimeMarshal.cs
|
||||
@@ -1542,8 +1540,8 @@ corefx/BinaryEnums.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Threading/ApartmentState.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Threading/AutoResetEvent.cs
|
||||
../referencesource/mscorlib/system/threading/CancellationToken.cs
|
||||
../referencesource/mscorlib/system/threading/CancellationTokenSource.cs
|
||||
../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/CancellationToken.cs
|
||||
../../../external/corert/src/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs
|
||||
../../../external/corefx/src/System.Threading/src/System/Threading/CountdownEvent.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Threading/EventResetMode.cs
|
||||
../referencesource/mscorlib/system/threading/eventwaithandle.cs
|
||||
|
||||
@@ -2,8 +2,8 @@ Microsoft.Win32/RegistryKeyTest.cs
|
||||
Mono/DataConvertTest.cs
|
||||
../Mono/DataConverter.cs
|
||||
Mono/NativePlatformTest.cs
|
||||
../Mono/MonoNativePlatform.cs
|
||||
../Mono/MonoNativePlatformType.cs
|
||||
Mono/MonoNativePlatform.cs
|
||||
Mono/MonoNativePlatformType.cs
|
||||
System/ActivatorTest.cs
|
||||
System/AppDomainManagerTest.cs
|
||||
System/AppDomainSetupTest.cs
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include mobile_tests.exclude.sources
|
||||
Mono/NativePlatformTest.cs
|
||||
Mono/MonoNativePlatform.cs
|
||||
Mono/MonoNativePlatformType.cs
|
||||
System.Reflection.Emit/AssemblyBuilderAccessTest.cs
|
||||
System.Reflection.Emit/AssemblyBuilderTest.cs
|
||||
System.Reflection.Emit/ConstructorBuilderTest.cs
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Mono/NativePlatformTest.cs
|
||||
../Mono/MonoNativePlatform.cs
|
||||
../Mono/MonoNativePlatformType.cs
|
||||
Mono/MonoNativePlatform.cs
|
||||
Mono/MonoNativePlatformType.cs
|
||||
Microsoft.Win32/RegistryKeyTest.cs
|
||||
System.Diagnostics.Contracts/ContractAssertTest.cs
|
||||
System.Diagnostics.Contracts/ContractAssumeTest.cs
|
||||
|
||||
@@ -6,8 +6,6 @@ corert/ThreadPoolBoundHandle.platformnotsupported.cs
|
||||
corefx/Interop.GetRandomBytes.Mono.cs
|
||||
corefx/Mono.SafePasswordHandle.Unix.cs
|
||||
../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/Microsoft/Win32/SafeHandles/SafePasswordHandle.Unix.cs
|
||||
Mono/MonoNativePlatform.cs
|
||||
Mono/MonoNativePlatformType.cs
|
||||
Microsoft.Win32/IRegistryApi.cs
|
||||
Microsoft.Win32/Registry.cs
|
||||
Microsoft.Win32/RegistryKey.cs
|
||||
|
||||
@@ -445,23 +445,25 @@ namespace System.Xml {
|
||||
}
|
||||
|
||||
byte[] chProps = new byte[CharPropertiesSize];
|
||||
s_CharProperties = chProps;
|
||||
|
||||
SetProperties( s_Whitespace, fWhitespace );
|
||||
SetProperties( s_LetterXml4e, fLetter );
|
||||
SetProperties( s_NCStartName, fNCStartNameSC );
|
||||
SetProperties( s_NCName, fNCNameSC );
|
||||
SetProperties( s_CharData, fCharData );
|
||||
SetProperties( s_NCNameXml4e, fNCNameXml4e );
|
||||
SetProperties( s_Text, fText );
|
||||
SetProperties( s_AttrValue, fAttrValue );
|
||||
SetProperties( chProps, s_Whitespace, fWhitespace );
|
||||
SetProperties( chProps, s_LetterXml4e, fLetter );
|
||||
SetProperties( chProps, s_NCStartName, fNCStartNameSC );
|
||||
SetProperties( chProps, s_NCName, fNCNameSC );
|
||||
SetProperties( chProps, s_CharData, fCharData );
|
||||
SetProperties( chProps, s_NCNameXml4e, fNCNameXml4e );
|
||||
SetProperties( chProps, s_Text, fText );
|
||||
SetProperties( chProps, s_AttrValue, fAttrValue );
|
||||
|
||||
Thread.MemoryBarrier(); // For weak memory models (IA64)
|
||||
s_CharProperties = chProps;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetProperties( string ranges, byte value ) {
|
||||
private static void SetProperties(byte[] chProps, string ranges, byte value ) {
|
||||
for ( int p = 0; p < ranges.Length; p += 2 ) {
|
||||
for ( int i = ranges[p], last = ranges[p + 1]; i <= last; i++ ) {
|
||||
s_CharProperties[i] |= value;
|
||||
chProps[i] |= value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1557,6 +1557,14 @@ namespace System.ComponentModel
|
||||
return converter;
|
||||
}
|
||||
|
||||
#if MONO // from https://github.com/dotnet/corefx/pull/31739
|
||||
// This is called by System.ComponentModel.DefaultValueAttribute via reflection.
|
||||
private static object ConvertFromInvariantString(Type type, string stringValue)
|
||||
{
|
||||
return GetConverter(type).ConvertFromInvariantString(stringValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <devdoc>
|
||||
/// Gets the default event for the specified type of component.
|
||||
/// </devdoc>
|
||||
|
||||
@@ -106,7 +106,10 @@ namespace System {
|
||||
var method = ((MonoMethod)(MethodInfo) member).GetBaseMethod ();
|
||||
|
||||
while (true) {
|
||||
var param = method.GetParametersInternal () [parameter.Position];
|
||||
var parameters = method.GetParametersInternal ();
|
||||
if (parameters?.Length == 0 || parameter.Position < 0)
|
||||
return false;
|
||||
var param = parameters [parameter.Position];
|
||||
if (param.IsDefined (attributeType, false))
|
||||
return true;
|
||||
|
||||
|
||||
@@ -1248,7 +1248,11 @@ namespace System.Threading
|
||||
{
|
||||
// capture the sync context
|
||||
if (0 == (options & CaptureOptions.IgnoreSyncCtx))
|
||||
#if MONO
|
||||
syncCtxNew = ecCurrent.SynchronizationContext;
|
||||
#else
|
||||
syncCtxNew = (ecCurrent.SynchronizationContext == null) ? null : ecCurrent.SynchronizationContext.CreateCopy();
|
||||
#endif
|
||||
|
||||
#if FEATURE_REMOTING
|
||||
// copy over the Logical Call Context
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
<Compile Include="..\..\..\external\cecil\Mono.Security.Cryptography\CryptoService.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\Mono\Disposable.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\Mono\Empty.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\Mono\MergeSort.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\Mono\Type.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\symbols\mdb\Mono.Cecil.Mdb\MdbReader.cs" />
|
||||
<Compile Include="..\..\..\external\cecil\symbols\mdb\Mono.Cecil.Mdb\MdbWriter.cs" />
|
||||
|
||||
@@ -171,6 +171,202 @@ namespace UploadToSentry
|
||||
{
|
||||
CodeCollection codebase;
|
||||
|
||||
public JObject Format_0_0_3 (string fileName, JObject payload, string hash)
|
||||
{
|
||||
var event_id = new JProperty("event_id", Guid.NewGuid().ToString("n"));
|
||||
var timestamp = new JProperty("timestamp", DateTime.UtcNow.ToString("s", System.Globalization.CultureInfo.InvariantCulture));
|
||||
var exc_objs = new List<JObject> ();
|
||||
var thread_objs = new List<JObject> ();
|
||||
|
||||
var stackTraces = payload["threads"] as JArray;
|
||||
|
||||
var path = Path.GetDirectoryName (fileName); // Best differentiator in-tree for files is where they are run from
|
||||
|
||||
foreach (var st in stackTraces) {
|
||||
var thread_id = st["native_thread_id"]?.ToString();
|
||||
|
||||
var unmanaged_frames = new List<JObject>();
|
||||
var managed_frames = new List<JObject>();
|
||||
var exceptions = new List<JObject>();
|
||||
|
||||
var thread_name = st["thread_name"]?.ToString ();
|
||||
if (thread_name == null || thread_name?.Length == 0)
|
||||
thread_name = "Unnamed thread";
|
||||
|
||||
var payload_unmanaged_frames = st["unmanaged_frames"] as JArray;
|
||||
for (int fr=0; payload_unmanaged_frames != null && fr < payload_unmanaged_frames.Count; fr++)
|
||||
{
|
||||
var frame = payload_unmanaged_frames [fr] as JObject;
|
||||
var native_address = frame["native_address"];
|
||||
var unmanaged_name = frame["unmanaged_name"] != null ? frame["unmanaged_name"].ToString() : "";
|
||||
|
||||
var fn_filename = new JProperty("filename", "");
|
||||
var function = new JProperty("function", unmanaged_name);
|
||||
var module = new JProperty("module", "mono-sgen");
|
||||
var vars = new JProperty("vars", new JObject(new JProperty ("native_address", native_address)));
|
||||
var blob = new JObject(fn_filename, function, module, vars);
|
||||
|
||||
unmanaged_frames.Add (blob);
|
||||
}
|
||||
|
||||
var payload_managed_frames = st["managed_frames"] as JArray;
|
||||
for (int fr = 0; payload_managed_frames != null && fr < payload_managed_frames.Count; fr++)
|
||||
{
|
||||
var frame = payload_managed_frames [fr] as JObject;
|
||||
if (frame["is_managed"] != null && frame["is_managed"].ToString ().ToUpper () == "TRUE")
|
||||
{
|
||||
var guid_val = frame["guid"].ToString ();
|
||||
var token_val = Convert.ToUInt32(frame["token"].ToString (), 16);
|
||||
var offset_val = Convert.ToUInt32(frame["il_offset"].ToString (), 16);
|
||||
|
||||
var output_frame = codebase.Find (guid_val, token_val, offset_val);
|
||||
if (output_frame == null)
|
||||
continue;
|
||||
|
||||
var guid = new JProperty("guid", guid_val);
|
||||
var token = new JProperty("token", token_val);
|
||||
var il_offset = new JProperty("il_offset", offset_val);
|
||||
|
||||
output_frame.Add (new JProperty("vars", new JObject(guid, token, il_offset)));
|
||||
|
||||
managed_frames.Add(output_frame);
|
||||
} else {
|
||||
var native_address = frame["native_address"];
|
||||
var unmanaged_name = frame["unmanaged_name"] != null ? frame["unmanaged_name"].ToString() : "";
|
||||
|
||||
var fn_filename = new JProperty("filename", "mono-sgen");
|
||||
var function = new JProperty("function", unmanaged_name);
|
||||
var module = new JProperty("module", "");
|
||||
var vars = new JProperty("vars", frame);
|
||||
var blob = new JObject(fn_filename, function, module, vars);
|
||||
|
||||
managed_frames.Add (blob);
|
||||
}
|
||||
}
|
||||
|
||||
var payload_exceptions = st["exceptions"] as JArray;
|
||||
for (int exc=0; payload_exceptions != null && exc < payload_exceptions.Count; exc++)
|
||||
{
|
||||
var exception_obj = payload_exceptions [exc] as JObject;
|
||||
var exc_managed_frames = new List<JObject>();
|
||||
var payload_exception_frames = exception_obj ["managed_frames"] as JArray;
|
||||
for (int fr = 0; payload_exception_frames != null && fr < payload_exception_frames.Count; fr++)
|
||||
{
|
||||
var frame = payload_exception_frames [fr] as JObject;
|
||||
if (frame["is_managed"] != null && frame["is_managed"].ToString ().ToUpper () == "TRUE")
|
||||
{
|
||||
var guid_val = frame["guid"].ToString ();
|
||||
var token_val = Convert.ToUInt32(frame["token"].ToString (), 16);
|
||||
var offset_val = Convert.ToUInt32(frame["il_offset"].ToString (), 16);
|
||||
|
||||
var output_frame = codebase.Find (guid_val, token_val, offset_val);
|
||||
if (output_frame == null)
|
||||
continue;
|
||||
|
||||
var guid = new JProperty("guid", guid_val);
|
||||
var token = new JProperty("token", token_val);
|
||||
var il_offset = new JProperty("il_offset", offset_val);
|
||||
|
||||
output_frame.Add (new JProperty("vars", new JObject(guid, token, il_offset)));
|
||||
|
||||
exc_managed_frames.Add(output_frame);
|
||||
} else {
|
||||
var native_address = frame["native_address"];
|
||||
var unmanaged_name = frame["unmanaged_name"] != null ? frame["unmanaged_name"].ToString() : "";
|
||||
|
||||
var fn_filename = new JProperty("filename", "mono-sgen");
|
||||
var function = new JProperty("function", unmanaged_name);
|
||||
var module = new JProperty("module", "");
|
||||
var vars = new JProperty("vars", frame);
|
||||
var blob = new JObject(fn_filename, function, module, vars);
|
||||
|
||||
exc_managed_frames.Add (blob);
|
||||
}
|
||||
}
|
||||
|
||||
var type = new JProperty ("type", exception_obj ["type"].ToString ());
|
||||
var managed_st = new JProperty("frames", new JArray(exc_managed_frames.ToArray()));
|
||||
var exc_blob = new JObject(type, managed_st);
|
||||
|
||||
exceptions.Add (exc_blob);
|
||||
}
|
||||
|
||||
if (unmanaged_frames.Count > 0) {
|
||||
var unmanaged_st = new JObject(new JProperty("frames", new JArray(unmanaged_frames.ToArray ())));
|
||||
var id = String.Format ("{0}_unmanaged", st ["native_thread_id"]);
|
||||
var active = new JProperty ("active", "true");
|
||||
|
||||
if (st["crashed"]?.ToString ().ToUpper () == "TRUE") {
|
||||
var unmanaged_thread = new JObject (active, new JProperty ("crashed", "true"), new JProperty ("name", String.Format ("{0} unmanaged", thread_name)), new JProperty ("id", id));
|
||||
var unmanaged_exc = new JObject(new JProperty("module", String.Format("{0}_managed_frames", thread_id)),
|
||||
new JProperty("type", path),
|
||||
new JProperty("value", ""),
|
||||
new JProperty("stacktrace", unmanaged_st), new JProperty("thread_id", id));
|
||||
|
||||
thread_objs.Add(unmanaged_thread);
|
||||
exc_objs.Add (unmanaged_exc);
|
||||
} else {
|
||||
var unmanaged_thread = new JObject (active, new JProperty ("name", String.Format ("{0} Unmanaged", thread_name)),
|
||||
new JProperty ("id", id), new JProperty ("stacktrace", unmanaged_st));
|
||||
thread_objs.Add(unmanaged_thread);
|
||||
}
|
||||
}
|
||||
|
||||
if (managed_frames.Count > 0) {
|
||||
var managed_st = new JObject(new JProperty("frames", new JArray(managed_frames.ToArray())));
|
||||
// If we are the crashing thread, set the exception object to the
|
||||
// managed stacktrace and the thread object to the managed thread
|
||||
//
|
||||
// If we aren't, add the thread + st to
|
||||
var id = String.Format ("{0}_managed", st["native_thread_id"]);
|
||||
var active = new JProperty ("active", "true");
|
||||
|
||||
if (unmanaged_frames.Count == 0 && st["crashed"]?.ToString ().ToUpper () == "TRUE") {
|
||||
var managed_thread = new JObject (active, new JProperty ("crashed", "true"), new JProperty ("name", String.Format ("{0} managed", thread_name)), new JProperty ("id", id));
|
||||
var managed_exc = new JObject(new JProperty("module", String.Format("{0}_managed_frames", thread_id)),
|
||||
new JProperty("type", path),
|
||||
new JProperty("value", ""),
|
||||
new JProperty("stacktrace", managed_st), new JProperty("thread_id", id));
|
||||
|
||||
thread_objs.Add(managed_thread);
|
||||
exc_objs.Add (managed_exc);
|
||||
} else {
|
||||
var managed_thread = new JObject (active, new JProperty ("name", String.Format ("{0} managed", thread_name)),
|
||||
new JProperty ("id", id), new JProperty ("stacktrace", managed_st));
|
||||
thread_objs.Add(managed_thread);
|
||||
}
|
||||
}
|
||||
|
||||
bool first_exception = true;
|
||||
foreach (var exc_input in exceptions) {
|
||||
// The 0.0.3 managed exception only has one thread, so we want it to be active and set crashed to true.
|
||||
var active = new JProperty ("active", first_exception ? "true" : "false");
|
||||
first_exception = false;
|
||||
|
||||
var name = "Caught Managed Exception";
|
||||
|
||||
var exception_thread = new JObject (active, new JProperty ("crashed", "true"), new JProperty ("name", name), new JProperty ("id", name), new JProperty ("exception", exc_input));
|
||||
var exception_exc = new JObject(new JProperty("module", name),
|
||||
new JProperty("type", path),
|
||||
new JProperty("value", ""),
|
||||
new JProperty("stacktrace", exc_input ["frames"]));
|
||||
|
||||
thread_objs.Add (exception_thread);
|
||||
exc_objs.Add (exception_exc);
|
||||
}
|
||||
}
|
||||
|
||||
var exception = new JProperty("exception", new JObject (new JProperty ("values", new JArray(exc_objs.ToArray ()))));
|
||||
var threads = new JProperty("threads", new JObject (new JProperty ("values", new JArray(thread_objs.ToArray ()))));
|
||||
// Bake in the whole blob
|
||||
var embedded = new JProperty("extra", payload);
|
||||
var fingerprint = new JProperty ("fingerprint", new JArray (new JValue (hash)));
|
||||
|
||||
var sentry_message = new JObject (timestamp, event_id, exception, embedded, threads, fingerprint);
|
||||
|
||||
return sentry_message;
|
||||
}
|
||||
|
||||
public JObject Format_0_0_2 (string fileName, JObject payload, string hash)
|
||||
{
|
||||
var event_id = new JProperty("event_id", Guid.NewGuid().ToString("n"));
|
||||
@@ -183,7 +379,7 @@ namespace UploadToSentry
|
||||
var path = Path.GetDirectoryName (fileName); // Best differentiator in-tree for files is where they are run from
|
||||
|
||||
for (int i=0; i < stackTraces.Count; i++){
|
||||
var thread_id = stackTraces[i]["native_thread_id"].ToString();
|
||||
var thread_id = stackTraces[i]["native_thread_id"]?.ToString();
|
||||
|
||||
var unmanaged_frames = new List<JObject>();
|
||||
var managed_frames = new List<JObject>();
|
||||
@@ -337,7 +533,9 @@ namespace UploadToSentry
|
||||
Console.WriteLine("\t-- HTTP POST Success {0}", responseFromServer);
|
||||
// Clean up the streams.
|
||||
} catch (WebException ex) {
|
||||
Console.WriteLine("\t-- HTTP POST Error {0}", ex.Response.Headers [""]);
|
||||
Console.WriteLine("\t-- HTTP POST Error:", ex.Response.Headers [""]);
|
||||
for (int i=0; i < ex.Response.Headers.Count; i++)
|
||||
Console.WriteLine("\t\t {0} : {1}", ex.Response.Headers.Keys [i], ex.Response.Headers [i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,7 +561,9 @@ namespace UploadToSentry
|
||||
|
||||
var version_string = payload["protocol_version"].ToString();
|
||||
JObject sentry_message = null;
|
||||
if (version_string == "0.0.2") {
|
||||
if (version_string == "0.0.3") {
|
||||
sentry_message = Format_0_0_3 (filePath, payload, hash);
|
||||
} else if (version_string == "0.0.2") {
|
||||
sentry_message = Format_0_0_2 (filePath, payload, hash);
|
||||
} else {
|
||||
Console.WriteLine ("ERROR: Crash reporting version mismatch");
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
#define G_HAVE_ALLOCA_H
|
||||
#endif
|
||||
|
||||
#if @HAVE_UNISTD_H@ == 1
|
||||
#define G_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
typedef @GSIZE@ gsize;
|
||||
typedef @GSSIZE@ gssize;
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
#define g_markup_parse_context_parse monoeg_g_markup_parse_context_parse
|
||||
#define g_memdup monoeg_g_memdup
|
||||
#define g_mem_set_vtable monoeg_g_mem_set_vtable
|
||||
#define g_mem_get_vtable monoeg_g_mem_get_vtable
|
||||
#define g_mkdtemp monoeg_g_mkdtemp
|
||||
#define g_module_build_path monoeg_g_module_build_path
|
||||
#define g_module_close monoeg_g_module_close
|
||||
@@ -132,6 +133,10 @@
|
||||
#define g_pattern_match_string monoeg_g_pattern_match_string
|
||||
#define g_pattern_spec_free monoeg_g_pattern_spec_free
|
||||
#define g_pattern_spec_new monoeg_g_pattern_spec_new
|
||||
#define g_async_safe_fprintf monoeg_g_async_safe_fprintf
|
||||
#define g_async_safe_vfprintf monoeg_g_async_safe_vfprintf
|
||||
#define g_async_safe_printf monoeg_g_async_safe_printf
|
||||
#define g_async_safe_vprintf monoeg_g_async_safe_vprintf
|
||||
#define g_print monoeg_g_print
|
||||
#define g_printf monoeg_g_printf
|
||||
#define g_printerr monoeg_g_printerr
|
||||
@@ -268,6 +273,8 @@
|
||||
#define g_utf8_to_ucs4_fast monoeg_g_utf8_to_ucs4_fast
|
||||
#define g_vasprintf monoeg_g_vasprintf
|
||||
#define g_win32_getlocale monoeg_g_win32_getlocale
|
||||
#define g_assertion_disable_global monoeg_assertion_disable_global
|
||||
#define g_assert_abort monoeg_assert_abort
|
||||
#define g_assertion_message monoeg_assertion_message
|
||||
#define g_get_assertion_message monoeg_get_assertion_message
|
||||
#define g_malloc monoeg_malloc
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef offsetof
|
||||
# define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name)
|
||||
#endif
|
||||
@@ -304,6 +308,7 @@ typedef struct {
|
||||
} GMemVTable;
|
||||
|
||||
void g_mem_set_vtable (GMemVTable* vtable);
|
||||
void g_mem_get_vtable (GMemVTable* vtable);
|
||||
|
||||
struct _GMemChunk {
|
||||
guint alloc_size;
|
||||
@@ -762,7 +767,10 @@ const char * g_get_assertion_message (void);
|
||||
|
||||
typedef void (*GLogFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data);
|
||||
typedef void (*GPrintFunc) (const gchar *string);
|
||||
typedef void (*GAbortFunc) (void);
|
||||
|
||||
void g_assertion_disable_global (GAbortFunc func);
|
||||
void g_assert_abort (void);
|
||||
void g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data);
|
||||
GLogFunc g_log_set_default_handler (GLogFunc log_func, gpointer user_data);
|
||||
GPrintFunc g_set_print_handler (GPrintFunc func);
|
||||
@@ -1119,6 +1127,49 @@ gboolean g_file_test (const gchar *filename, GFileTest test);
|
||||
|
||||
gchar *g_mkdtemp (gchar *tmpl);
|
||||
|
||||
|
||||
/*
|
||||
* Low-level write-based printing functions
|
||||
*/
|
||||
static inline gint
|
||||
g_async_safe_vfprintf (int handle, gchar const *format, va_list args)
|
||||
{
|
||||
char print_buff [1024];
|
||||
print_buff [0] = '\0';
|
||||
g_vsnprintf (print_buff, sizeof(print_buff), format, args);
|
||||
int ret = g_write (handle, print_buff, (guint32) strlen (print_buff));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline gint
|
||||
g_async_safe_fprintf (int handle, gchar const *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
int ret = g_async_safe_vfprintf (handle, format, args);
|
||||
va_end (args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline gint
|
||||
g_async_safe_vprintf (gchar const *format, va_list args)
|
||||
{
|
||||
return g_async_safe_vfprintf (1, format, args);
|
||||
}
|
||||
|
||||
static inline gint
|
||||
g_async_safe_printf (gchar const *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
int ret = g_async_safe_vfprintf (1, format, args);
|
||||
va_end (args);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Pattern matching
|
||||
*/
|
||||
|
||||
@@ -48,12 +48,24 @@ g_mem_set_vtable (GMemVTable* vtable)
|
||||
sGMemVTable.free = vtable->free ? vtable->free : free;
|
||||
}
|
||||
|
||||
void
|
||||
g_mem_get_vtable (GMemVTable* vtable)
|
||||
{
|
||||
*vtable = sGMemVTable;
|
||||
}
|
||||
|
||||
#define G_FREE_INTERNAL sGMemVTable.free
|
||||
#define G_REALLOC_INTERNAL sGMemVTable.realloc
|
||||
#define G_CALLOC_INTERNAL sGMemVTable.calloc
|
||||
#define G_MALLOC_INTERNAL sGMemVTable.malloc
|
||||
#else
|
||||
|
||||
void
|
||||
g_mem_get_vtable (GMemVTable* vtable)
|
||||
{
|
||||
memset (vtable, 0, sizeof (*vtable));
|
||||
}
|
||||
|
||||
void
|
||||
g_mem_set_vtable (GMemVTable* vtable)
|
||||
{
|
||||
|
||||
+25
-4
@@ -40,6 +40,23 @@ static GPrintFunc stdout_handler, stderr_handler;
|
||||
static void default_stdout_handler (const gchar *string);
|
||||
static void default_stderr_handler (const gchar *string);
|
||||
|
||||
static GAbortFunc internal_abort_func;
|
||||
|
||||
void
|
||||
g_assertion_disable_global (GAbortFunc abort_func)
|
||||
{
|
||||
internal_abort_func = abort_func;
|
||||
}
|
||||
|
||||
void
|
||||
g_assert_abort (void)
|
||||
{
|
||||
if (internal_abort_func)
|
||||
internal_abort_func ();
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
||||
void
|
||||
g_printv (const gchar *format, va_list args)
|
||||
{
|
||||
@@ -122,8 +139,12 @@ g_logv_nofree (const gchar *log_domain, GLogLevelFlags log_level, const gchar *f
|
||||
{
|
||||
char *msg;
|
||||
|
||||
if (g_vasprintf (&msg, format, args) < 0)
|
||||
if (internal_abort_func) {
|
||||
g_async_safe_vprintf (format, args);
|
||||
return NULL;
|
||||
} else if (g_vasprintf (&msg, format, args) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_logstr (log_domain, log_level, msg);
|
||||
return msg;
|
||||
@@ -236,7 +257,7 @@ g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const
|
||||
{
|
||||
android_log (to_android_priority (log_level), log_domain, message);
|
||||
if (log_level & fatal)
|
||||
abort ();
|
||||
g_assert_abort ();
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -277,7 +298,7 @@ g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const
|
||||
{
|
||||
asl_log (NULL, NULL, to_asl_priority (log_level), "%s", message);
|
||||
if (log_level & fatal)
|
||||
abort ();
|
||||
g_assert_abort ();
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -307,7 +328,7 @@ g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const
|
||||
if (log_level & fatal) {
|
||||
fflush (stdout);
|
||||
fflush (stderr);
|
||||
abort ();
|
||||
g_assert_abort ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -230,7 +230,7 @@ g_find_program_in_path (const gchar *program)
|
||||
#endif
|
||||
|
||||
g_return_val_if_fail (program != NULL, NULL);
|
||||
x = p = g_strdup (g_getenv ("PATH"));
|
||||
x = p = g_getenv ("PATH");
|
||||
|
||||
if (x == NULL || *x == '\0') {
|
||||
curdir = g_get_current_dir ();
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "cil-coff.h"
|
||||
#include "metadata-internals.h"
|
||||
#include "image.h"
|
||||
#include "image-internals.h"
|
||||
#include "assembly-internals.h"
|
||||
#include "domain-internals.h"
|
||||
#include "appdomain.h"
|
||||
@@ -132,7 +133,7 @@ BOOL STDMETHODCALLTYPE _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpRes
|
||||
/* The process is terminating. */
|
||||
return TRUE;
|
||||
file_name = mono_get_module_file_name (hInst);
|
||||
image = mono_image_loaded (file_name);
|
||||
image = mono_image_loaded_internal (file_name, FALSE);
|
||||
if (image)
|
||||
mono_image_close (image);
|
||||
|
||||
|
||||
+1460
-1458
File diff suppressed because it is too large.
Load diff
@@ -660,7 +660,11 @@ mono_get_exception_argument_internal (const char *type, const char *arg, const c
|
||||
MonoException*
|
||||
mono_get_exception_argument_null (const char *arg)
|
||||
{
|
||||
return mono_get_exception_argument_internal ("ArgumentNullException", arg, NULL);
|
||||
MonoException *ex;
|
||||
MONO_ENTER_GC_UNSAFE;
|
||||
ex = mono_get_exception_argument_internal ("ArgumentNullException", arg, NULL);
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
return ex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,7 +100,7 @@ mono_get_exception_not_implemented (const char *msg);
|
||||
MONO_API MonoException *
|
||||
mono_get_exception_not_supported (const char *msg);
|
||||
|
||||
MONO_API MonoException*
|
||||
MONO_API MONO_RT_EXTERNAL_ONLY MonoException*
|
||||
mono_get_exception_argument_null (const char *arg);
|
||||
|
||||
MONO_API MonoException *
|
||||
|
||||
@@ -133,17 +133,20 @@ HANDLES(COMPROX_2, "FindProxy", ves_icall_Mono_Interop_ComInteropProxy_FindProxy
|
||||
ICALL_TYPE(TLS_PROVIDER_FACTORY, "Mono.Net.Security.MonoTlsProviderFactory", TLS_PROVIDER_FACTORY_1)
|
||||
HANDLES(TLS_PROVIDER_FACTORY_1, "IsBtlsSupported", ves_icall_Mono_TlsProviderFactory_IsBtlsSupported, MonoBoolean, 0, ())
|
||||
|
||||
ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_1)
|
||||
ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_20)
|
||||
HANDLES(RUNTIME_20, "AnnotateMicrosoftTelemetry_internal", ves_icall_Mono_Runtime_AnnotateMicrosoftTelemetry, void, 2, (const_char_ptr, const_char_ptr))
|
||||
HANDLES(RUNTIME_19, "CheckCrashReportLog_internal", ves_icall_Mono_Runtime_CheckCrashReportingLog, int, 2, (const_char_ptr, MonoBoolean))
|
||||
HANDLES(RUNTIME_1, "DisableMicrosoftTelemetry", ves_icall_Mono_Runtime_DisableMicrosoftTelemetry, void, 0, ())
|
||||
HANDLES(RUNTIME_15, "DumpStateSingle_internal", ves_icall_Mono_Runtime_DumpStateSingle, MonoString, 2, (guint64_ref, guint64_ref))
|
||||
HANDLES(RUNTIME_16, "DumpStateTotal_internal", ves_icall_Mono_Runtime_DumpStateTotal, MonoString, 2, (guint64_ref, guint64_ref))
|
||||
HANDLES(RUNTIME_2, "EnableMicrosoftTelemetry_internal", ves_icall_Mono_Runtime_EnableMicrosoftTelemetry, void, 6, (char_ptr, char_ptr, char_ptr, char_ptr, char_ptr, char_ptr))
|
||||
HANDLES(RUNTIME_18, "EnableCrashReportLog_internal", ves_icall_Mono_Runtime_EnableCrashReportingLog, void, 1, (const_char_ptr))
|
||||
HANDLES(RUNTIME_2, "EnableMicrosoftTelemetry_internal", ves_icall_Mono_Runtime_EnableMicrosoftTelemetry, void, 7, (const_char_ptr, const_char_ptr, const_char_ptr, const_char_ptr, const_char_ptr, const_char_ptr, const_char_ptr))
|
||||
HANDLES(RUNTIME_3, "ExceptionToState_internal", ves_icall_Mono_Runtime_ExceptionToState, MonoString, 3, (MonoException, guint64_ref, guint64_ref))
|
||||
HANDLES(RUNTIME_4, "GetDisplayName", ves_icall_Mono_Runtime_GetDisplayName, MonoString, 0, ())
|
||||
HANDLES(RUNTIME_12, "GetNativeStackTrace", ves_icall_Mono_Runtime_GetNativeStackTrace, MonoString, 1, (MonoException))
|
||||
ICALL(RUNTIME_17, "RegisterReportingForNativeLib_internal", ves_icall_Mono_Runtime_RegisterReportingForNativeLib)
|
||||
HANDLES(RUNTIME_13, "SendMicrosoftTelemetry_internal", ves_icall_Mono_Runtime_SendMicrosoftTelemetry, void, 3, (char_ptr, guint64, guint64))
|
||||
HANDLES(RUNTIME_14, "WriteStateToFile_internal", ves_icall_Mono_Runtime_DumpTelemetry, void, 3, (char_ptr, guint64, guint64))
|
||||
HANDLES(RUNTIME_13, "SendMicrosoftTelemetry_internal", ves_icall_Mono_Runtime_SendMicrosoftTelemetry, void, 3, (const_char_ptr, guint64, guint64))
|
||||
HANDLES(RUNTIME_14, "WriteStateToFile_internal", ves_icall_Mono_Runtime_DumpTelemetry, void, 3, (const_char_ptr, guint64, guint64))
|
||||
|
||||
ICALL_TYPE(RTCLASS, "Mono.RuntimeClassHandle", RTCLASS_1)
|
||||
HANDLES(RTCLASS_1, "GetTypeFromClass", ves_icall_Mono_RuntimeClassHandle_GetTypeFromClass, MonoType_ptr, 1, (MonoClass_ptr))
|
||||
|
||||
+114
-33
@@ -781,7 +781,7 @@ ves_icall_System_Array_FastCopy (MonoArray *source, int source_idx, MonoArray* d
|
||||
mono_value_copy_array_internal (dest, dest_idx, source_addr, length);
|
||||
} else {
|
||||
dest_addr = mono_array_addr_with_size_fast (dest, element_size, dest_idx);
|
||||
mono_gc_memmove_atomic (dest_addr, source_addr, element_size * length);
|
||||
mono_gc_memmove_atomic (dest_addr, source_addr, (size_t)element_size * length);
|
||||
}
|
||||
} else {
|
||||
mono_array_memcpy_refs_fast (dest, dest_idx, source, source_idx, length);
|
||||
@@ -5713,7 +5713,7 @@ ves_icall_Mono_RuntimeMarshal_FreeAssemblyName (MonoAssemblyName *aname, MonoBoo
|
||||
void
|
||||
ves_icall_Mono_Runtime_DisableMicrosoftTelemetry (MonoError *error)
|
||||
{
|
||||
#ifdef TARGET_OSX
|
||||
#if defined(TARGET_OSX) && !defined(DISABLE_CRASH_REPORTING)
|
||||
mono_merp_disable ();
|
||||
#else
|
||||
// Icall has platform check in managed too.
|
||||
@@ -5722,10 +5722,23 @@ ves_icall_Mono_Runtime_DisableMicrosoftTelemetry (MonoError *error)
|
||||
}
|
||||
|
||||
void
|
||||
ves_icall_Mono_Runtime_EnableMicrosoftTelemetry (char *appBundleID, char *appSignature, char *appVersion, char *merpGUIPath, char *eventType, char *appPath, MonoError *error)
|
||||
ves_icall_Mono_Runtime_AnnotateMicrosoftTelemetry (const char *key, const char *value, MonoError *error)
|
||||
{
|
||||
#ifdef TARGET_OSX
|
||||
mono_merp_enable (appBundleID, appSignature, appVersion, merpGUIPath, eventType, appPath);
|
||||
#if defined(TARGET_OSX) && !defined(DISABLE_CRASH_REPORTING)
|
||||
if (!mono_merp_enabled ())
|
||||
g_error ("Cannot add attributes to telemetry without enabling subsystem");
|
||||
mono_merp_add_annotation (key, value);
|
||||
#else
|
||||
// Icall has platform check in managed too.
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
ves_icall_Mono_Runtime_EnableMicrosoftTelemetry (const char *appBundleID, const char *appSignature, const char *appVersion, const char *merpGUIPath, const char *eventType, const char *appPath, const char *configDir, MonoError *error)
|
||||
{
|
||||
#if defined(TARGET_OSX) && !defined(DISABLE_CRASH_REPORTING)
|
||||
mono_merp_enable (appBundleID, appSignature, appVersion, merpGUIPath, eventType, appPath, configDir);
|
||||
|
||||
mono_get_runtime_callbacks ()->install_state_summarizer ();
|
||||
#else
|
||||
@@ -5734,41 +5747,50 @@ ves_icall_Mono_Runtime_EnableMicrosoftTelemetry (char *appBundleID, char *appSig
|
||||
#endif
|
||||
}
|
||||
|
||||
// Number derived from trials on relevant hardware.
|
||||
// If it seems large, please confirm it's safe to shrink
|
||||
// before doing so.
|
||||
#define MONO_MAX_SUMMARY_LEN_ICALL 500000
|
||||
|
||||
MonoStringHandle
|
||||
ves_icall_Mono_Runtime_ExceptionToState (MonoExceptionHandle exc_handle, guint64 *portable_hash_out, guint64 *unportable_hash_out, MonoError *error)
|
||||
{
|
||||
MonoStringHandle result;
|
||||
|
||||
#ifndef DISABLE_CRASH_REPORTING
|
||||
// FIXME: Push handles down into mini/mini-exceptions.c
|
||||
MonoException *exc = MONO_HANDLE_RAW (exc_handle);
|
||||
MonoThreadSummary out;
|
||||
mono_get_eh_callbacks ()->mono_summarize_exception (exc, &out);
|
||||
if (mono_get_eh_callbacks ()->mono_summarize_exception) {
|
||||
// FIXME: Push handles down into mini/mini-exceptions.c
|
||||
MonoException *exc = MONO_HANDLE_RAW (exc_handle);
|
||||
MonoThreadSummary out;
|
||||
mono_get_eh_callbacks ()->mono_summarize_exception (exc, &out);
|
||||
|
||||
*portable_hash_out = (guint64) out.hashes.offset_free_hash;
|
||||
*unportable_hash_out = (guint64) out.hashes.offset_rich_hash;
|
||||
*portable_hash_out = (guint64) out.hashes.offset_free_hash;
|
||||
*unportable_hash_out = (guint64) out.hashes.offset_rich_hash;
|
||||
|
||||
MonoStateWriter writer;
|
||||
char *scratch = g_new0 (gchar, MONO_MAX_SUMMARY_LEN_ICALL);
|
||||
mono_state_writer_init (&writer, scratch, MONO_MAX_SUMMARY_LEN_ICALL);
|
||||
mono_native_state_init (&writer);
|
||||
gboolean first_thread_added = TRUE;
|
||||
mono_native_state_add_thread (&writer, &out, NULL, first_thread_added, TRUE);
|
||||
char *output = mono_native_state_free (&writer, FALSE);
|
||||
result = mono_string_new_handle (mono_domain_get (), output, error);
|
||||
g_free (output);
|
||||
g_free (scratch);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
JsonWriter writer;
|
||||
mono_json_writer_init (&writer);
|
||||
mono_native_state_init (&writer);
|
||||
gboolean first_thread_added = TRUE;
|
||||
mono_native_state_add_thread (&writer, &out, NULL, first_thread_added, TRUE);
|
||||
char *output = mono_native_state_free (&writer, FALSE);
|
||||
result = mono_string_new_handle (mono_domain_get (), output, error);
|
||||
g_free (output);
|
||||
#else
|
||||
*portable_hash_out = 0;
|
||||
*unportable_hash_out = 0;
|
||||
result = mono_string_new_handle (mono_domain_get (), "", error);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
ves_icall_Mono_Runtime_SendMicrosoftTelemetry (char *payload, guint64 portable_hash, guint64 unportable_hash, MonoError *error)
|
||||
ves_icall_Mono_Runtime_SendMicrosoftTelemetry (const char *payload, guint64 portable_hash, guint64 unportable_hash, MonoError *error)
|
||||
{
|
||||
#ifdef TARGET_OSX
|
||||
#if defined(TARGET_OSX) && !defined(DISABLE_CRASH_REPORTING)
|
||||
if (!mono_merp_enabled ())
|
||||
g_error ("Cannot send telemetry without registering parameters first");
|
||||
|
||||
@@ -5782,7 +5804,11 @@ ves_icall_Mono_Runtime_SendMicrosoftTelemetry (char *payload, guint64 portable_h
|
||||
// Tells mono that we want to send the HANG EXC_TYPE.
|
||||
const char *signal = "SIGTERM";
|
||||
|
||||
mono_merp_invoke (crashed_pid, signal, payload, &hashes);
|
||||
gboolean success = mono_merp_invoke (crashed_pid, signal, payload, &hashes);
|
||||
if (!success) {
|
||||
//g_assert_not_reached ();
|
||||
mono_error_set_generic_error (error, "System", "Exception", "We were unable to start the Microsoft Error Reporting client.");
|
||||
}
|
||||
#else
|
||||
// Icall has platform check in managed too.
|
||||
g_assert_not_reached ();
|
||||
@@ -5790,7 +5816,7 @@ ves_icall_Mono_Runtime_SendMicrosoftTelemetry (char *payload, guint64 portable_h
|
||||
}
|
||||
|
||||
void
|
||||
ves_icall_Mono_Runtime_DumpTelemetry (char *payload, guint64 portable_hash, guint64 unportable_hash, MonoError *error)
|
||||
ves_icall_Mono_Runtime_DumpTelemetry (const char *payload, guint64 portable_hash, guint64 unportable_hash, MonoError *error)
|
||||
{
|
||||
#ifndef DISABLE_CRASH_REPORTING
|
||||
MonoStackHash hashes;
|
||||
@@ -5820,14 +5846,16 @@ ves_icall_Mono_Runtime_DumpStateSingle (guint64 *portable_hash, guint64 *unporta
|
||||
*portable_hash = (guint64) this_thread.hashes.offset_free_hash;
|
||||
*unportable_hash = (guint64) this_thread.hashes.offset_rich_hash;
|
||||
|
||||
JsonWriter writer;
|
||||
mono_json_writer_init (&writer);
|
||||
MonoStateWriter writer;
|
||||
char *scratch = g_new0 (gchar, MONO_MAX_SUMMARY_LEN_ICALL);
|
||||
mono_state_writer_init (&writer, scratch, MONO_MAX_SUMMARY_LEN_ICALL);
|
||||
mono_native_state_init (&writer);
|
||||
gboolean first_thread_added = TRUE;
|
||||
mono_native_state_add_thread (&writer, &this_thread, NULL, first_thread_added, TRUE);
|
||||
char *output = mono_native_state_free (&writer, FALSE);
|
||||
result = mono_string_new_handle (mono_domain_get (), output, error);
|
||||
g_free (output);
|
||||
g_free (scratch);
|
||||
#else
|
||||
*portable_hash = 0;
|
||||
*unportable_hash = 0;
|
||||
@@ -5842,14 +5870,30 @@ void
|
||||
ves_icall_Mono_Runtime_RegisterReportingForNativeLib (const char *path_suffix, const char *module_name)
|
||||
{
|
||||
#ifndef DISABLE_CRASH_REPORTING
|
||||
mono_get_eh_callbacks ()->mono_register_native_library (path_suffix, module_name);
|
||||
if (mono_get_eh_callbacks ()->mono_register_native_library)
|
||||
mono_get_eh_callbacks ()->mono_register_native_library (path_suffix, module_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Number derived from trials on relevant hardware.
|
||||
// If it seems large, please confirm it's safe to shrink
|
||||
// before doing so.
|
||||
#define MONO_MAX_SUMMARY_LEN_ICALL 500000
|
||||
void
|
||||
ves_icall_Mono_Runtime_EnableCrashReportingLog (const char *directory, MonoError *error)
|
||||
{
|
||||
#ifndef DISABLE_CRASH_REPORTING
|
||||
mono_summarize_set_timeline_dir (directory);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
ves_icall_Mono_Runtime_CheckCrashReportingLog (const char *directory, MonoBoolean clear, MonoError *error)
|
||||
{
|
||||
int ret;
|
||||
#ifndef DISABLE_CRASH_REPORTING
|
||||
ret = (int) mono_summarize_timeline_read_level (directory, clear != 0);
|
||||
#else
|
||||
ret = 0;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
MonoStringHandle
|
||||
ves_icall_Mono_Runtime_DumpStateTotal (guint64 *portable_hash, guint64 *unportable_hash, MonoError *error)
|
||||
@@ -5866,7 +5910,10 @@ ves_icall_Mono_Runtime_DumpStateTotal (guint64 *portable_hash, guint64 *unportab
|
||||
|
||||
mono_get_runtime_callbacks ()->install_state_summarizer ();
|
||||
|
||||
mono_summarize_timeline_start ();
|
||||
|
||||
gboolean success = mono_threads_summarize (ctx, &out, &hashes, TRUE, FALSE, scratch, MONO_MAX_SUMMARY_LEN_ICALL);
|
||||
mono_summarize_timeline_phase_log (MonoSummaryCleanup);
|
||||
|
||||
if (!success)
|
||||
return mono_string_new_handle (mono_domain_get (), "", error);
|
||||
@@ -5877,6 +5924,8 @@ ves_icall_Mono_Runtime_DumpStateTotal (guint64 *portable_hash, guint64 *unportab
|
||||
|
||||
// out is now a pointer into garbage memory
|
||||
g_free (scratch);
|
||||
|
||||
mono_summarize_timeline_phase_log (MonoSummaryDone);
|
||||
#else
|
||||
*portable_hash = 0;
|
||||
*unportable_hash = 0;
|
||||
@@ -7323,31 +7372,51 @@ G_EXTERN_C gint32 WriteZStream (gpointer stream, gpointer buffer, gint32 lengt
|
||||
gpointer
|
||||
ves_icall_System_IO_Compression_DeflateStreamNative_CreateZStream (gint32 compress, MonoBoolean gzip, gpointer feeder, gpointer data)
|
||||
{
|
||||
#ifdef MONO_CROSS_COMPILE
|
||||
return NULL;
|
||||
#else
|
||||
return CreateZStream (compress, gzip, feeder, data);
|
||||
#endif
|
||||
}
|
||||
|
||||
gint32
|
||||
ves_icall_System_IO_Compression_DeflateStreamNative_CloseZStream (gpointer stream)
|
||||
{
|
||||
#ifdef MONO_CROSS_COMPILE
|
||||
return 0;
|
||||
#else
|
||||
return CloseZStream (stream);
|
||||
#endif
|
||||
}
|
||||
|
||||
gint32
|
||||
ves_icall_System_IO_Compression_DeflateStreamNative_Flush (gpointer stream)
|
||||
{
|
||||
#ifdef MONO_CROSS_COMPILE
|
||||
return 0;
|
||||
#else
|
||||
return Flush (stream);
|
||||
#endif
|
||||
}
|
||||
|
||||
gint32
|
||||
ves_icall_System_IO_Compression_DeflateStreamNative_ReadZStream (gpointer stream, gpointer buffer, gint32 length)
|
||||
{
|
||||
#ifdef MONO_CROSS_COMPILE
|
||||
return 0;
|
||||
#else
|
||||
return ReadZStream (stream, buffer, length);
|
||||
#endif
|
||||
}
|
||||
|
||||
gint32
|
||||
ves_icall_System_IO_Compression_DeflateStreamNative_WriteZStream (gpointer stream, gpointer buffer, gint32 length)
|
||||
{
|
||||
#ifdef MONO_CROSS_COMPILE
|
||||
return 0;
|
||||
#else
|
||||
return WriteZStream (stream, buffer, length);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -7804,6 +7873,18 @@ ves_icall_System_Runtime_InteropServices_RuntimeInformation_get_RuntimeArchitect
|
||||
int
|
||||
ves_icall_Interop_Sys_DoubleToString(double value, char *format, char *buffer, int bufferLength)
|
||||
{
|
||||
#if defined(TARGET_ARM)
|
||||
/* workaround for faulty vcmp.f64 implementation on some 32bit ARM CPUs */
|
||||
guint64 bits = *(guint64 *) &value;
|
||||
if (bits == 0x1) { /* 4.9406564584124654E-324 */
|
||||
g_assert (!strcmp (format, "%.40e"));
|
||||
return snprintf (buffer, bufferLength, "%s", "4.9406564584124654417656879286822137236506e-324");
|
||||
} else if (bits == 0x4) { /* 2E-323 */
|
||||
g_assert (!strcmp (format, "%.40e"));
|
||||
return snprintf (buffer, bufferLength, "%s", "1.9762625833649861767062751714728854894602e-323");
|
||||
}
|
||||
#endif
|
||||
|
||||
return snprintf(buffer, bufferLength, format, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
#include <mono/metadata/image.h>
|
||||
|
||||
MonoImage*
|
||||
mono_image_loaded_internal (const char *name, mono_bool refonly);
|
||||
|
||||
MonoImage *
|
||||
mono_find_image_owner (void *ptr);
|
||||
|
||||
|
||||
+43
-1
@@ -35,6 +35,7 @@
|
||||
#include <mono/utils/mono-mmap.h>
|
||||
#include <mono/utils/mono-io-portability.h>
|
||||
#include <mono/utils/atomic.h>
|
||||
#include <mono/utils/mono-proclib.h>
|
||||
#include <mono/metadata/class-internals.h>
|
||||
#include <mono/metadata/assembly.h>
|
||||
#include <mono/metadata/object-internals.h>
|
||||
@@ -42,6 +43,7 @@
|
||||
#include <mono/metadata/verify-internals.h>
|
||||
#include <mono/metadata/verify.h>
|
||||
#include <mono/metadata/image-internals.h>
|
||||
#include <mono/metadata/w32process-internals.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
@@ -1057,6 +1059,20 @@ pe_image_load_cli_data (MonoImage *image)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
mono_image_load_time_date_stamp (MonoImage *image)
|
||||
{
|
||||
image->time_date_stamp = 0;
|
||||
#ifndef HOST_WIN32
|
||||
if (!image->name)
|
||||
return;
|
||||
|
||||
gunichar2 *uni_name = g_utf8_to_utf16 (image->name, -1, NULL, NULL, NULL);
|
||||
mono_pe_file_time_date_stamp (uni_name, &image->time_date_stamp);
|
||||
g_free (uni_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
mono_image_load_names (MonoImage *image)
|
||||
{
|
||||
@@ -1375,6 +1391,8 @@ do_mono_image_load (MonoImage *image, MonoImageOpenStatus *status,
|
||||
|
||||
mono_image_load_names (image);
|
||||
|
||||
mono_image_load_time_date_stamp (image);
|
||||
|
||||
load_modules (image);
|
||||
|
||||
done:
|
||||
@@ -1461,6 +1479,26 @@ do_mono_image_open (const char *fname, MonoImageOpenStatus *status,
|
||||
*/
|
||||
MonoImage *
|
||||
mono_image_loaded_full (const char *name, gboolean refonly)
|
||||
{
|
||||
MonoImage *result;
|
||||
MONO_ENTER_GC_UNSAFE;
|
||||
result = mono_image_loaded_internal (name, refonly);
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* mono_image_loaded_internal:
|
||||
* \param name path or assembly name of the image to load
|
||||
* \param refonly Check with respect to reflection-only loads?
|
||||
*
|
||||
* This routine verifies that the given image is loaded.
|
||||
* It checks either reflection-only loads only, or normal loads only, as specified by parameter.
|
||||
*
|
||||
* \returns the loaded \c MonoImage, or NULL on failure.
|
||||
*/
|
||||
MonoImage *
|
||||
mono_image_loaded_internal (const char *name, gboolean refonly)
|
||||
{
|
||||
MonoImage *res;
|
||||
|
||||
@@ -1482,7 +1520,11 @@ mono_image_loaded_full (const char *name, gboolean refonly)
|
||||
MonoImage *
|
||||
mono_image_loaded (const char *name)
|
||||
{
|
||||
return mono_image_loaded_full (name, FALSE);
|
||||
MonoImage *result;
|
||||
MONO_ENTER_GC_UNSAFE;
|
||||
result = mono_image_loaded_internal (name, FALSE);
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
return result;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -42,8 +42,10 @@ MONO_API MONO_RT_EXTERNAL_ONLY
|
||||
MonoImage *mono_image_open_from_data_with_name (char *data, uint32_t data_len, mono_bool need_copy,
|
||||
MonoImageOpenStatus *status, mono_bool refonly, const char *name);
|
||||
MONO_API void mono_image_fixup_vtable (MonoImage *image);
|
||||
MONO_API MonoImage *mono_image_loaded (const char *name);
|
||||
MONO_API MonoImage *mono_image_loaded_full (const char *name, mono_bool refonly);
|
||||
MONO_API MONO_RT_EXTERNAL_ONLY
|
||||
MonoImage *mono_image_loaded (const char *name);
|
||||
MONO_API MONO_RT_EXTERNAL_ONLY
|
||||
MonoImage *mono_image_loaded_full (const char *name, mono_bool refonly);
|
||||
MONO_API MonoImage *mono_image_loaded_by_guid (const char *guid);
|
||||
MONO_API MonoImage *mono_image_loaded_by_guid_full (const char *guid, mono_bool refonly);
|
||||
MONO_API void mono_image_init (MonoImage *image);
|
||||
|
||||
@@ -276,6 +276,7 @@ struct _MonoImage {
|
||||
|
||||
/* The module name reported in the file for this image (could be NULL for a malformed file) */
|
||||
const char *module_name;
|
||||
guint32 time_date_stamp;
|
||||
|
||||
char *version;
|
||||
gint16 md_version_major, md_version_minor;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <mono/metadata/appdomain.h>
|
||||
#include <mono/metadata/image.h>
|
||||
#include <mono/metadata/exception.h>
|
||||
#include <mono/metadata/image-internals.h>
|
||||
#include <mono/metadata/object-internals.h>
|
||||
#include <mono/metadata/metadata-internals.h>
|
||||
#include <mono/metadata/security.h>
|
||||
@@ -620,7 +621,7 @@ void mono_invoke_protected_memory_method (MonoArray *data, MonoObject *scope, gb
|
||||
error_init (error);
|
||||
|
||||
if (system_security_assembly == NULL) {
|
||||
system_security_assembly = mono_image_loaded ("System.Security");
|
||||
system_security_assembly = mono_image_loaded_internal ("System.Security", FALSE);
|
||||
if (!system_security_assembly) {
|
||||
MonoAssemblyOpenRequest req;
|
||||
mono_assembly_request_prepare (&req.request, sizeof (req), MONO_ASMCTX_DEFAULT);
|
||||
|
||||
@@ -469,6 +469,13 @@ typedef struct {
|
||||
MonoArray *out_args;
|
||||
} MonoAsyncCall;
|
||||
|
||||
typedef struct {
|
||||
MonoObject obj;
|
||||
MonoArray *frames;
|
||||
MonoArray *captured_traces;
|
||||
MonoBoolean debug_info;
|
||||
} MonoStackTrace;
|
||||
|
||||
typedef struct {
|
||||
MonoObject obj;
|
||||
gint32 il_offset;
|
||||
@@ -498,7 +505,7 @@ struct _MonoInternalThread {
|
||||
gpointer unused3;
|
||||
gunichar2 *name;
|
||||
guint32 name_len;
|
||||
guint32 state;
|
||||
guint32 state; /* must be accessed while longlived->synch_cs is locked */
|
||||
MonoException *abort_exc;
|
||||
int abort_state_handle;
|
||||
guint64 tid; /* This is accessed as a gsize in the code (so it can hold a 64bit pointer on systems that need it), but needs to reserve 64 bits of space on all machines as it corresponds to a field in managed code */
|
||||
@@ -512,7 +519,10 @@ struct _MonoInternalThread {
|
||||
gpointer appdomain_refs;
|
||||
/* This is modified using atomic ops, so keep it a gint32 */
|
||||
gint32 __interruption_requested;
|
||||
MonoCoopMutex *synch_cs;
|
||||
/* data that must live as long as this managed object is not finalized
|
||||
* or as long as the underlying thread is attached, whichever is
|
||||
* longer */
|
||||
MonoLongLivedThreadData *longlived;
|
||||
MonoBoolean threadpool_thread;
|
||||
MonoBoolean thread_interrupt_requested;
|
||||
int stack_size;
|
||||
@@ -719,6 +729,7 @@ typedef struct {
|
||||
gpointer (*create_ftnptr) (MonoDomain *domain, gpointer addr);
|
||||
gpointer (*get_addr_from_ftnptr) (gpointer descr);
|
||||
char* (*get_runtime_build_info) (void);
|
||||
const char* (*get_runtime_build_version) (void);
|
||||
gpointer (*get_vtable_trampoline) (MonoVTable *vtable, int slot_index);
|
||||
gpointer (*get_imt_trampoline) (MonoVTable *vtable, int imt_slot_index);
|
||||
gboolean (*imt_entry_inited) (MonoVTable *vtable, int imt_slot_index);
|
||||
@@ -1841,6 +1852,9 @@ mono_unhandled_exception_checked (MonoObjectHandle exc, MonoError *error);
|
||||
MonoVTable *
|
||||
mono_class_try_get_vtable (MonoDomain *domain, MonoClass *klass);
|
||||
|
||||
gboolean
|
||||
mono_runtime_run_module_cctor (MonoImage *image, MonoDomain *domain, MonoError *error);
|
||||
|
||||
gboolean
|
||||
mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error);
|
||||
|
||||
|
||||
+38
-20
@@ -383,6 +383,38 @@ unref_type_lock (TypeInitializationLock *lock)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* mono_runtime_run_module_cctor:
|
||||
* \param image the image whose module ctor to run
|
||||
* \param domain the domain to load the module class vtable in
|
||||
* \param error set on error
|
||||
* This routine runs the module ctor for \p image, if it hasn't already run
|
||||
*/
|
||||
gboolean
|
||||
mono_runtime_run_module_cctor (MonoImage *image, MonoDomain *domain, MonoError *error) {
|
||||
MONO_REQ_GC_UNSAFE_MODE;
|
||||
|
||||
if (!image->checked_module_cctor) {
|
||||
mono_image_check_for_module_cctor (image);
|
||||
if (image->has_module_cctor) {
|
||||
MonoClass *module_klass;
|
||||
MonoVTable *module_vtable;
|
||||
|
||||
module_klass = mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF | 1, error);
|
||||
if (!module_klass) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
module_vtable = mono_class_vtable_checked (domain, module_klass, error);
|
||||
if (!module_vtable)
|
||||
return FALSE;
|
||||
if (!mono_runtime_class_init_full (module_vtable, error))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* mono_runtime_class_init_full:
|
||||
* \param vtable that neeeds to be initialized
|
||||
@@ -412,23 +444,8 @@ mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error)
|
||||
klass = vtable->klass;
|
||||
|
||||
MonoImage *klass_image = m_class_get_image (klass);
|
||||
if (!klass_image->checked_module_cctor) {
|
||||
mono_image_check_for_module_cctor (klass_image);
|
||||
if (klass_image->has_module_cctor) {
|
||||
MonoClass *module_klass;
|
||||
MonoVTable *module_vtable;
|
||||
|
||||
module_klass = mono_class_get_checked (klass_image, MONO_TOKEN_TYPE_DEF | 1, error);
|
||||
if (!module_klass) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
module_vtable = mono_class_vtable_checked (vtable->domain, module_klass, error);
|
||||
if (!module_vtable)
|
||||
return FALSE;
|
||||
if (!mono_runtime_class_init_full (module_vtable, error))
|
||||
return FALSE;
|
||||
}
|
||||
if (!mono_runtime_run_module_cctor(klass_image, vtable->domain, error)) {
|
||||
return FALSE;
|
||||
}
|
||||
method = mono_class_get_cctor (klass);
|
||||
if (!method) {
|
||||
@@ -3898,16 +3915,17 @@ mono_property_set_value_handle (MonoProperty *prop, MonoObjectHandle obj, void *
|
||||
MonoObject*
|
||||
mono_property_get_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc)
|
||||
{
|
||||
MONO_REQ_GC_UNSAFE_MODE;
|
||||
MonoObject *val;
|
||||
MONO_ENTER_GC_UNSAFE;
|
||||
|
||||
ERROR_DECL (error);
|
||||
MonoObject *val = do_runtime_invoke (prop->get, obj, params, exc, error);
|
||||
val = do_runtime_invoke (prop->get, obj, params, exc, error);
|
||||
if (exc && *exc == NULL && !mono_error_ok (error)) {
|
||||
*exc = (MonoObject*) mono_error_convert_to_exception (error);
|
||||
} else {
|
||||
mono_error_cleanup (error); /* FIXME don't raise here */
|
||||
}
|
||||
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#define MONO_SEQ_POINT_FLAG_NONEMPTY_STACK 1
|
||||
#define MONO_SEQ_POINT_FLAG_EXIT_IL 2
|
||||
#define MONO_SEQ_POINT_FLAG_NESTED_CALL 4
|
||||
|
||||
/* IL offsets used to mark the sequence points belonging to method entry/exit events */
|
||||
#define METHOD_ENTRY_IL_OFFSET -1
|
||||
|
||||
@@ -112,11 +112,11 @@ sgen_client_stop_world (int generation, gboolean serial_collection)
|
||||
|
||||
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_PRE_STOP_WORLD_LOCKED, generation, serial_collection));
|
||||
|
||||
update_current_thread_stack (&generation);
|
||||
|
||||
/* We start to scan after locks are taking, this ensures we won't be interrupted. */
|
||||
sgen_process_togglerefs ();
|
||||
|
||||
update_current_thread_stack (&generation);
|
||||
|
||||
sgen_global_stop_count++;
|
||||
SGEN_LOG (3, "stopping world n %d from %p %p", sgen_global_stop_count, mono_thread_info_current (), (gpointer) (gsize) mono_native_thread_id_get ());
|
||||
TV_GETTIME (stop_world_time);
|
||||
|
||||
@@ -106,6 +106,20 @@ mono_thread_create_internal_handle (MonoDomain *domain, T func, gpointer arg, Mo
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Data owned by a MonoInternalThread that must live until both the finalizer
|
||||
* for MonoInternalThread has run, and the underlying machine thread has
|
||||
* detached.
|
||||
*
|
||||
* Normally a thread is first detached and then the InternalThread object is
|
||||
* finalized and collected. However during shutdown, when the root domain is
|
||||
* finalized, all the InternalThread objects are finalized first and the
|
||||
* machine threads are detached later.
|
||||
*/
|
||||
typedef struct {
|
||||
MonoRefCount ref;
|
||||
MonoCoopMutex *synch_cs;
|
||||
} MonoLongLivedThreadData;
|
||||
|
||||
void mono_threads_install_cleanup (MonoThreadCleanupFunc func);
|
||||
|
||||
ICALL_EXPORT
|
||||
@@ -542,6 +556,7 @@ mono_set_pending_exception_handle (MonoExceptionHandle exc);
|
||||
#define MONO_MAX_THREAD_NAME_LEN 140
|
||||
#define MONO_MAX_SUMMARY_THREADS 32
|
||||
#define MONO_MAX_SUMMARY_FRAMES 80
|
||||
#define MONO_MAX_SUMMARY_EXCEPTIONS 15
|
||||
|
||||
typedef struct {
|
||||
gboolean is_managed;
|
||||
@@ -557,7 +572,9 @@ typedef struct {
|
||||
// symbolicated string on release builds
|
||||
const char *name;
|
||||
#endif
|
||||
|
||||
const char *filename;
|
||||
guint32 image_size;
|
||||
guint32 time_date_stamp;
|
||||
} managed_data;
|
||||
struct {
|
||||
intptr_t ip;
|
||||
@@ -568,6 +585,13 @@ typedef struct {
|
||||
} unmanaged_data;
|
||||
} MonoFrameSummary;
|
||||
|
||||
typedef struct {
|
||||
MonoClass *managed_exc_type;
|
||||
|
||||
int num_managed_frames;
|
||||
MonoFrameSummary managed_frames [MONO_MAX_SUMMARY_FRAMES];
|
||||
} MonoExcSummary;
|
||||
|
||||
typedef struct {
|
||||
guint64 offset_free_hash;
|
||||
guint64 offset_rich_hash;
|
||||
@@ -589,7 +613,6 @@ typedef struct {
|
||||
|
||||
char name [MONO_MAX_THREAD_NAME_LEN];
|
||||
|
||||
intptr_t managed_thread_ptr;
|
||||
intptr_t info_addr;
|
||||
intptr_t native_thread_id;
|
||||
|
||||
@@ -603,12 +626,13 @@ typedef struct {
|
||||
int num_unmanaged_frames;
|
||||
MonoFrameSummary unmanaged_frames [MONO_MAX_SUMMARY_FRAMES];
|
||||
|
||||
int num_exceptions;
|
||||
MonoExcSummary exceptions [MONO_MAX_SUMMARY_EXCEPTIONS];
|
||||
|
||||
MonoStackHash hashes;
|
||||
|
||||
MonoContext *ctx;
|
||||
MonoContext ctx_mem;
|
||||
|
||||
MonoClass *managed_exc_type;
|
||||
} MonoThreadSummary;
|
||||
|
||||
gboolean
|
||||
|
||||
Loaded 100 of 195 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user