From 2393d5688bdb480a4d950e1580fcb27ff854b58c Mon Sep 17 00:00:00 2001 From: "Xamarin Public Jenkins (auto-signing)" Date: Sat, 26 Jan 2019 08:23:49 +0000 Subject: [PATCH] Imported Upstream version 5.18.0.248 Former-commit-id: 738e3044ff639637d8fe2511a8b60b065577838e --- Makefile.in | 1 + acceptance-tests/Makefile.in.REMOVED.git-id | 2 +- config.h.in | 3 + configure.REMOVED.git-id | 2 +- configure.ac.REMOVED.git-id | 2 +- data/Makefile.in | 1 + data/net_2_0/Browsers/Makefile.in | 1 + data/net_2_0/Makefile.in | 1 + data/net_4_0/Browsers/Makefile.in | 1 + data/net_4_0/Makefile.in | 1 + data/net_4_5/Browsers/Makefile.in | 1 + data/net_4_5/Makefile.in | 1 + docs/Makefile.in | 1 + ikvm-native/Makefile.in | 1 + llvm/Makefile.in | 1 + m4/Makefile.in | 1 + man/Makefile.in | 1 + mcs/build/common/Consts.cs | 4 +- mcs/class/corlib/Mono/Runtime.cs | 31 +- mcs/class/corlib/Test/System/ExceptionTest.cs | 7 +- .../Facades/System.Collections.Concurrent.dll | Bin .../Facades/System.Collections.dll | Bin .../Facades/System.Diagnostics.Debug.dll | Bin .../System.Diagnostics.FileVersionInfo.dll | Bin .../Facades/System.Diagnostics.Tools.dll | Bin .../Facades/System.Dynamic.Runtime.dll | Bin .../Facades/System.Globalization.dll | Bin .../System.IO.FileSystem.Primitives.dll | Bin .../Facades/System.IO.FileSystem.dll | Bin .../Facades/System.IO.dll | Bin .../Facades/System.Linq.Expressions.dll | Bin .../Facades/System.Linq.dll | Bin .../Facades/System.Reflection.Extensions.dll | Bin .../Facades/System.Reflection.Primitives.dll | Bin .../Facades/System.Reflection.dll | Bin .../System.Resources.ResourceManager.dll | Bin .../Facades/System.Runtime.Extensions.dll | Bin .../System.Runtime.InteropServices.dll | Bin .../Facades/System.Runtime.Numerics.dll | Bin .../Facades/System.Runtime.dll | Bin ...ystem.Security.Cryptography.Algorithms.dll | Bin ...ystem.Security.Cryptography.Primitives.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../System.Text.Encoding.Extensions.dll | Bin .../Facades/System.Text.Encoding.dll | Bin .../System.Threading.Tasks.Parallel.dll | Bin .../Facades/System.Threading.Tasks.dll | Bin .../Facades/System.Threading.dll | Bin .../Facades/System.ValueTuple.dll | Bin .../Facades/System.Xml.ReaderWriter.dll | Bin .../Facades/System.Xml.XDocument.dll | Bin .../Mono.Cecil.dll.REMOVED.git-id | 0 .../Mono.Security.dll.REMOVED.git-id | 1 + .../System.Configuration.dll.REMOVED.git-id | 1 + .../System.Core.dll.REMOVED.git-id | 1 + .../System.IO.Compression.dll | Bin 99328 -> 99328 bytes .../System.Numerics.dll.REMOVED.git-id | 1 + .../System.Security.dll.REMOVED.git-id | 0 .../System.Xml.Linq.dll.REMOVED.git-id | 0 .../System.Xml.dll.REMOVED.git-id | 1 + .../System.dll.REMOVED.git-id | 0 .../mcs.exe.REMOVED.git-id | 1 + .../mscorlib.dll.REMOVED.git-id | 1 + .../Mono.Security.dll.REMOVED.git-id | 1 - .../System.Configuration.dll.REMOVED.git-id | 1 - .../System.Core.dll.REMOVED.git-id | 1 - .../System.Numerics.dll.REMOVED.git-id | 1 - .../System.Xml.dll.REMOVED.git-id | 1 - .../mcs.exe.REMOVED.git-id | 1 - .../mscorlib.dll.REMOVED.git-id | 1 - .../Facades/System.Collections.Concurrent.dll | Bin .../Facades/System.Collections.dll | Bin .../Facades/System.Diagnostics.Debug.dll | Bin .../System.Diagnostics.FileVersionInfo.dll | Bin .../Facades/System.Diagnostics.Tools.dll | Bin .../Facades/System.Dynamic.Runtime.dll | Bin .../Facades/System.Globalization.dll | Bin .../System.IO.FileSystem.Primitives.dll | Bin .../Facades/System.IO.FileSystem.dll | Bin .../Facades/System.IO.dll | Bin .../Facades/System.Linq.Expressions.dll | Bin .../Facades/System.Linq.dll | Bin .../Facades/System.Reflection.Extensions.dll | Bin .../Facades/System.Reflection.Primitives.dll | Bin .../Facades/System.Reflection.dll | Bin .../System.Resources.ResourceManager.dll | Bin .../Facades/System.Runtime.Extensions.dll | Bin .../System.Runtime.InteropServices.dll | Bin .../Facades/System.Runtime.Numerics.dll | Bin .../Facades/System.Runtime.dll | Bin ...ystem.Security.Cryptography.Algorithms.dll | Bin ...ystem.Security.Cryptography.Primitives.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../System.Text.Encoding.Extensions.dll | Bin .../Facades/System.Text.Encoding.dll | Bin .../System.Threading.Tasks.Parallel.dll | Bin .../Facades/System.Threading.Tasks.dll | Bin .../Facades/System.Threading.dll | Bin .../Facades/System.ValueTuple.dll | Bin .../Facades/System.Xml.ReaderWriter.dll | Bin .../Facades/System.Xml.XDocument.dll | Bin .../Mono.Cecil.dll.REMOVED.git-id | 0 .../Mono.Security.dll.REMOVED.git-id | 1 + .../System.Configuration.dll.REMOVED.git-id | 1 + .../System.Core.dll.REMOVED.git-id | 1 + .../System.IO.Compression.dll | Bin 99328 -> 99328 bytes .../System.Numerics.dll.REMOVED.git-id | 1 + .../System.Security.dll.REMOVED.git-id | 0 .../System.Xml.Linq.dll.REMOVED.git-id | 0 .../System.Xml.dll.REMOVED.git-id | 1 + .../System.dll.REMOVED.git-id | 0 .../mcs.exe.REMOVED.git-id | 1 + .../mscorlib.dll.REMOVED.git-id | 1 + .../Mono.Security.dll.REMOVED.git-id | 1 - .../System.Configuration.dll.REMOVED.git-id | 1 - .../System.Core.dll.REMOVED.git-id | 1 - .../System.Numerics.dll.REMOVED.git-id | 1 - .../System.Xml.dll.REMOVED.git-id | 1 - .../mcs.exe.REMOVED.git-id | 1 - .../mscorlib.dll.REMOVED.git-id | 1 - .../Facades/System.Collections.Concurrent.dll | Bin .../Facades/System.Collections.dll | Bin .../Facades/System.Diagnostics.Debug.dll | Bin .../System.Diagnostics.FileVersionInfo.dll | Bin .../Facades/System.Diagnostics.Tools.dll | Bin .../Facades/System.Dynamic.Runtime.dll | Bin .../Facades/System.Globalization.dll | Bin .../System.IO.FileSystem.Primitives.dll | Bin .../Facades/System.IO.FileSystem.dll | Bin .../Facades/System.IO.dll | Bin .../Facades/System.Linq.Expressions.dll | Bin .../Facades/System.Linq.dll | Bin .../Facades/System.Reflection.Extensions.dll | Bin .../Facades/System.Reflection.Primitives.dll | Bin .../Facades/System.Reflection.dll | Bin .../System.Resources.ResourceManager.dll | Bin .../Facades/System.Runtime.Extensions.dll | Bin .../System.Runtime.InteropServices.dll | Bin .../Facades/System.Runtime.Numerics.dll | Bin .../Facades/System.Runtime.dll | Bin ...ystem.Security.Cryptography.Algorithms.dll | Bin ...ystem.Security.Cryptography.Primitives.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../System.Text.Encoding.Extensions.dll | Bin .../Facades/System.Text.Encoding.dll | Bin .../System.Threading.Tasks.Parallel.dll | Bin .../Facades/System.Threading.Tasks.dll | Bin .../Facades/System.Threading.dll | Bin .../Facades/System.ValueTuple.dll | Bin .../Facades/System.Xml.ReaderWriter.dll | Bin .../Facades/System.Xml.XDocument.dll | Bin .../Mono.Cecil.dll.REMOVED.git-id | 0 .../Mono.Security.dll.REMOVED.git-id | 1 + .../System.Configuration.dll.REMOVED.git-id | 1 + .../System.Core.dll.REMOVED.git-id | 1 + .../System.IO.Compression.dll | Bin 99328 -> 99328 bytes .../System.Numerics.dll.REMOVED.git-id | 1 + .../System.Security.dll.REMOVED.git-id | 0 .../System.Xml.Linq.dll.REMOVED.git-id | 0 .../System.Xml.dll.REMOVED.git-id | 1 + .../System.dll.REMOVED.git-id | 0 .../mcs.exe.REMOVED.git-id | 1 + .../mscorlib.dll.REMOVED.git-id | 1 + .../Mono.Security.dll.REMOVED.git-id | 1 - .../System.Configuration.dll.REMOVED.git-id | 1 - .../System.Core.dll.REMOVED.git-id | 1 - .../System.Numerics.dll.REMOVED.git-id | 1 - .../System.Xml.dll.REMOVED.git-id | 1 - .../mcs.exe.REMOVED.git-id | 1 - .../mscorlib.dll.REMOVED.git-id | 1 - .../Facades/System.Collections.Concurrent.dll | Bin .../Facades/System.Collections.dll | Bin .../Facades/System.Diagnostics.Debug.dll | Bin .../System.Diagnostics.FileVersionInfo.dll | Bin .../Facades/System.Diagnostics.Tools.dll | Bin .../Facades/System.Dynamic.Runtime.dll | Bin .../Facades/System.Globalization.dll | Bin .../System.IO.FileSystem.Primitives.dll | Bin .../Facades/System.IO.FileSystem.dll | Bin .../Facades/System.IO.dll | Bin .../Facades/System.Linq.Expressions.dll | Bin .../Facades/System.Linq.dll | Bin .../Facades/System.Reflection.Extensions.dll | Bin .../Facades/System.Reflection.Primitives.dll | Bin .../Facades/System.Reflection.dll | Bin .../System.Resources.ResourceManager.dll | Bin .../Facades/System.Runtime.Extensions.dll | Bin .../System.Runtime.InteropServices.dll | Bin .../Facades/System.Runtime.Numerics.dll | Bin .../Facades/System.Runtime.dll | Bin ...ystem.Security.Cryptography.Algorithms.dll | Bin ...ystem.Security.Cryptography.Primitives.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../System.Text.Encoding.Extensions.dll | Bin .../Facades/System.Text.Encoding.dll | Bin .../System.Threading.Tasks.Parallel.dll | Bin .../Facades/System.Threading.Tasks.dll | Bin .../Facades/System.Threading.dll | Bin .../Facades/System.ValueTuple.dll | Bin .../Facades/System.Xml.ReaderWriter.dll | Bin .../Facades/System.Xml.XDocument.dll | Bin .../Mono.Cecil.dll.REMOVED.git-id | 0 .../Mono.Security.dll.REMOVED.git-id | 1 + .../System.Configuration.dll.REMOVED.git-id | 1 + .../System.Core.dll.REMOVED.git-id | 1 + .../System.IO.Compression.dll | Bin 99328 -> 99328 bytes .../System.Numerics.dll.REMOVED.git-id | 1 + .../System.Security.dll.REMOVED.git-id | 0 .../System.Xml.Linq.dll.REMOVED.git-id | 0 .../System.Xml.dll.REMOVED.git-id | 1 + .../System.dll.REMOVED.git-id | 0 .../mcs.exe.REMOVED.git-id | 1 + .../mscorlib.dll.REMOVED.git-id | 1 + .../Mono.Security.dll.REMOVED.git-id | 1 - .../System.Configuration.dll.REMOVED.git-id | 1 - .../System.Core.dll.REMOVED.git-id | 1 - .../System.Numerics.dll.REMOVED.git-id | 1 - .../System.Xml.dll.REMOVED.git-id | 1 - .../mcs.exe.REMOVED.git-id | 1 - .../mscorlib.dll.REMOVED.git-id | 1 - mk/Makefile.in | 1 + mono/Makefile.in | 1 + mono/arch/Makefile.in | 1 + mono/arch/amd64/Makefile.in | 1 + mono/arch/arm/Makefile.in | 1 + mono/arch/arm64/Makefile.in | 1 + mono/arch/mips/Makefile.in | 1 + mono/arch/ppc/Makefile.in | 1 + mono/arch/s390x/Makefile.in | 1 + mono/arch/sparc/Makefile.in | 1 + mono/arch/x86/Makefile.in | 1 + mono/benchmark/Makefile.in | 1 + mono/btls/Makefile.in | 1 + mono/cil/Makefile.in | 1 + mono/dis/Makefile.in | 1 + mono/eglib/Makefile.in | 1 + mono/eglib/eglib-config.h.in | 4 + mono/eglib/eglib-remap.h | 7 + mono/eglib/glib.h | 51 +++ mono/eglib/gmem.c | 12 + mono/eglib/goutput.c | 29 +- mono/metadata/Makefile.in.REMOVED.git-id | 2 +- mono/metadata/icall-def.h | 3 +- mono/metadata/icall.c.REMOVED.git-id | 2 +- mono/metadata/image.c | 18 + mono/metadata/metadata-internals.h | 1 + mono/metadata/object-internals.h | 1 + mono/metadata/threads-types.h | 5 +- mono/metadata/threads.c.REMOVED.git-id | 2 +- .../metadata/w32process-unix.c.REMOVED.git-id | 2 +- mono/mini/Makefile.in.REMOVED.git-id | 2 +- mono/mini/debugger-state-machine.h | 2 +- mono/mini/exceptions-amd64.c | 5 +- mono/mini/exceptions-arm.c | 5 +- mono/mini/exceptions-arm64.c | 6 +- mono/mini/exceptions-mips.c | 5 +- mono/mini/exceptions-ppc.c | 5 +- mono/mini/exceptions-s390x.c | 6 +- mono/mini/exceptions-x86.c | 5 +- mono/mini/mini-exceptions.c.REMOVED.git-id | 2 +- mono/mini/mini-posix.c | 244 ++++++++---- mono/mini/mini-runtime.c.REMOVED.git-id | 2 +- mono/mini/mini-runtime.h | 3 + mono/mini/mini-unwind.h | 2 +- mono/mini/mini-wasm.c | 6 + mono/mini/mini-windows.c | 6 + mono/mini/unwind.c | 45 ++- mono/mini/version.h | 2 +- mono/profiler/Makefile.in | 1 + mono/sgen/Makefile.in | 1 + mono/tests/Makefile.am.REMOVED.git-id | 2 +- mono/tests/Makefile.in.REMOVED.git-id | 2 +- .../tests/assembly-load-reference/Makefile.in | 1 + mono/tests/gc-descriptors/Makefile.in | 1 + mono/tests/libtest.c.REMOVED.git-id | 2 +- mono/tests/merp-crash-test.cs | 358 ++++++++++++++++++ mono/tests/merp-json-valid.cs | 108 ++++++ mono/tests/testing_gac/Makefile.in | 1 + mono/unit-tests/Makefile.in | 1 + mono/utils/Makefile.in.REMOVED.git-id | 2 +- mono/utils/jemalloc/Makefile.in | 1 + mono/utils/mono-log-android.c | 2 +- mono/utils/mono-log-common.c | 2 +- mono/utils/mono-log-darwin.c | 2 +- mono/utils/mono-log-posix.c | 2 +- mono/utils/mono-log-windows.c | 2 +- mono/utils/mono-logger.c | 26 +- mono/utils/mono-merp.c | 188 +++++---- mono/utils/mono-merp.h | 2 + mono/utils/mono-proclib.c | 122 ++++++ mono/utils/mono-proclib.h | 256 +++++++++++++ mono/utils/mono-state.c | 227 +++++++++-- mono/utils/mono-state.h | 51 ++- mono/utils/mono-threads-debug.h | 8 +- mono/utils/mono-threads.c | 28 +- msvc/Makefile.in | 1 + po/Makefile.in | 1 + po/mcs/de.gmo | Bin 5406 -> 5406 bytes po/mcs/de.po.REMOVED.git-id | 2 +- po/mcs/es.gmo | Bin 16329 -> 16329 bytes po/mcs/es.po.REMOVED.git-id | 2 +- po/mcs/ja.gmo | Bin 20863 -> 20863 bytes po/mcs/ja.po.REMOVED.git-id | 2 +- po/mcs/mcs.pot | 4 +- po/mcs/pt_BR.gmo | Bin 72806 -> 72806 bytes po/mcs/pt_BR.po.REMOVED.git-id | 2 +- runtime/Makefile.in | 1 + samples/Makefile.in | 1 + scripts/Makefile.in | 1 + support/Makefile.in | 1 + tools/Makefile.in | 1 + tools/locale-builder/Makefile.in | 1 + tools/monograph/Makefile.in | 1 + tools/pedump/Makefile.in | 1 + tools/sgen/Makefile.in | 1 + 315 files changed, 1737 insertions(+), 313 deletions(-) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Collections.Concurrent.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Collections.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.Debug.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.FileVersionInfo.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.Tools.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Dynamic.Runtime.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Globalization.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.FileSystem.Primitives.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.FileSystem.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Linq.Expressions.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Linq.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.Extensions.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.Primitives.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Resources.ResourceManager.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.Extensions.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.InteropServices.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.Numerics.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Security.Cryptography.Algorithms.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Security.Cryptography.Primitives.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.CodePages.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.Extensions.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.Tasks.Parallel.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.Tasks.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.ValueTuple.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Xml.ReaderWriter.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Xml.XDocument.dll (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Mono.Cecil.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Security.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Configuration.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Core.dll.REMOVED.git-id rename mcs/class/lib/{monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33 => monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.IO.Compression.dll (99%) create mode 100644 mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Numerics.dll.REMOVED.git-id rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.Security.dll.REMOVED.git-id (100%) rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.Xml.Linq.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Xml.dll.REMOVED.git-id rename mcs/class/lib/monolite-linux/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/mcs.exe.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/mscorlib.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Mono.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Configuration.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Core.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Numerics.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Xml.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/mcs.exe.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/mscorlib.dll.REMOVED.git-id rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Collections.Concurrent.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Collections.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.Debug.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.FileVersionInfo.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.Tools.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Dynamic.Runtime.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Globalization.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.FileSystem.Primitives.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.FileSystem.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Linq.Expressions.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Linq.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.Extensions.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.Primitives.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Resources.ResourceManager.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.Extensions.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.InteropServices.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.Numerics.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Security.Cryptography.Algorithms.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Security.Cryptography.Primitives.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.CodePages.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.Extensions.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.Tasks.Parallel.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.Tasks.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.ValueTuple.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Xml.ReaderWriter.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Xml.XDocument.dll (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Mono.Cecil.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-macos/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Security.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Configuration.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Core.dll.REMOVED.git-id rename mcs/class/lib/{monolite-unix/CA4932AE-2294-4ECD-B863-BF98FDD84F33 => monolite-macos/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.IO.Compression.dll (99%) create mode 100644 mcs/class/lib/monolite-macos/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Numerics.dll.REMOVED.git-id rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.Security.dll.REMOVED.git-id (100%) rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.Xml.Linq.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-macos/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Xml.dll.REMOVED.git-id rename mcs/class/lib/monolite-macos/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-macos/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/mcs.exe.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-macos/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/mscorlib.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Mono.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Configuration.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Core.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Numerics.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Xml.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/mcs.exe.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/mscorlib.dll.REMOVED.git-id rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Collections.Concurrent.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Collections.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.Debug.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.FileVersionInfo.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.Tools.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Dynamic.Runtime.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Globalization.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.FileSystem.Primitives.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.FileSystem.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Linq.Expressions.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Linq.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.Extensions.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.Primitives.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Resources.ResourceManager.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.Extensions.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.InteropServices.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.Numerics.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Security.Cryptography.Algorithms.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Security.Cryptography.Primitives.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.CodePages.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.Extensions.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.Tasks.Parallel.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.Tasks.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.ValueTuple.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Xml.ReaderWriter.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Xml.XDocument.dll (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Mono.Cecil.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-unix/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Security.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Configuration.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Core.dll.REMOVED.git-id rename mcs/class/lib/{monolite-win32/CA4932AE-2294-4ECD-B863-BF98FDD84F33 => monolite-unix/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.IO.Compression.dll (99%) create mode 100644 mcs/class/lib/monolite-unix/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Numerics.dll.REMOVED.git-id rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.Security.dll.REMOVED.git-id (100%) rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.Xml.Linq.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-unix/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Xml.dll.REMOVED.git-id rename mcs/class/lib/monolite-unix/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-unix/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/mcs.exe.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-unix/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/mscorlib.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Mono.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Configuration.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Core.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Numerics.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Xml.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/CA4932AE-2294-4ECD-B863-BF98FDD84F33/mcs.exe.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-unix/CA4932AE-2294-4ECD-B863-BF98FDD84F33/mscorlib.dll.REMOVED.git-id rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Collections.Concurrent.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Collections.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.Debug.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.FileVersionInfo.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Diagnostics.Tools.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Dynamic.Runtime.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Globalization.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.FileSystem.Primitives.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.FileSystem.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.IO.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Linq.Expressions.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Linq.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.Extensions.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.Primitives.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Reflection.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Resources.ResourceManager.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.Extensions.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.InteropServices.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.Numerics.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Runtime.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Security.Cryptography.Algorithms.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Security.Cryptography.Primitives.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.CodePages.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.Extensions.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Text.Encoding.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.Tasks.Parallel.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.Tasks.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Threading.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.ValueTuple.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Xml.ReaderWriter.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Facades/System.Xml.XDocument.dll (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/Mono.Cecil.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-win32/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Security.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Configuration.dll.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Core.dll.REMOVED.git-id rename mcs/class/lib/{monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33 => monolite-win32/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.IO.Compression.dll (99%) create mode 100644 mcs/class/lib/monolite-win32/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Numerics.dll.REMOVED.git-id rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.Security.dll.REMOVED.git-id (100%) rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.Xml.Linq.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-win32/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Xml.dll.REMOVED.git-id rename mcs/class/lib/monolite-win32/{CA4932AE-2294-4ECD-B863-BF98FDD84F33 => 179F7FD7-9CE8-424E-84AF-0DF5B0B8B469}/System.dll.REMOVED.git-id (100%) create mode 100644 mcs/class/lib/monolite-win32/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/mcs.exe.REMOVED.git-id create mode 100644 mcs/class/lib/monolite-win32/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/mscorlib.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Mono.Security.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Configuration.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Core.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Numerics.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.Xml.dll.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/CA4932AE-2294-4ECD-B863-BF98FDD84F33/mcs.exe.REMOVED.git-id delete mode 100644 mcs/class/lib/monolite-win32/CA4932AE-2294-4ECD-B863-BF98FDD84F33/mscorlib.dll.REMOVED.git-id create mode 100644 mono/tests/merp-crash-test.cs create mode 100644 mono/tests/merp-json-valid.cs diff --git a/Makefile.in b/Makefile.in index 9decb75180..fef026eb40 100644 --- a/Makefile.in +++ b/Makefile.in @@ -271,6 +271,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/acceptance-tests/Makefile.in.REMOVED.git-id b/acceptance-tests/Makefile.in.REMOVED.git-id index fd60c4b6ae..25ac7ffc84 100644 --- a/acceptance-tests/Makefile.in.REMOVED.git-id +++ b/acceptance-tests/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -185fb4f08d318b39e998de65aba693189afa76a0 \ No newline at end of file +7f3958be9a6931aca43164ee90cc309157607744 \ No newline at end of file diff --git a/config.h.in b/config.h.in index 192eecea17..1827c4a43a 100644 --- a/config.h.in +++ b/config.h.in @@ -128,6 +128,9 @@ /* Enable checked build */ #undef ENABLE_CHECKED_BUILD +/* Enable private types checked build */ +#undef ENABLE_CHECKED_BUILD_CRASH_REPORTING + /* Enable GC checked build */ #undef ENABLE_CHECKED_BUILD_GC diff --git a/configure.REMOVED.git-id b/configure.REMOVED.git-id index 46f4426a31..5cfb0dcb8d 100644 --- a/configure.REMOVED.git-id +++ b/configure.REMOVED.git-id @@ -1 +1 @@ -71dc8fe57558a446321e50a23e91869dab8dedaa \ No newline at end of file +bdbd153c60b89936e581e8ab20760519f6c085d5 \ No newline at end of file diff --git a/configure.ac.REMOVED.git-id b/configure.ac.REMOVED.git-id index 7247375ad6..8dca919750 100644 --- a/configure.ac.REMOVED.git-id +++ b/configure.ac.REMOVED.git-id @@ -1 +1 @@ -92303c6a5292257b11be207811e10a1229c86eed \ No newline at end of file +9bc140b656340fd663721273ac122fbbd2d71135 \ No newline at end of file diff --git a/data/Makefile.in b/data/Makefile.in index b475fb6a3e..f35ba4b1bc 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -294,6 +294,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/data/net_2_0/Browsers/Makefile.in b/data/net_2_0/Browsers/Makefile.in index 6bc41f7d5e..5956659304 100644 --- a/data/net_2_0/Browsers/Makefile.in +++ b/data/net_2_0/Browsers/Makefile.in @@ -216,6 +216,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/data/net_2_0/Makefile.in b/data/net_2_0/Makefile.in index 6e30571f53..5041e25914 100644 --- a/data/net_2_0/Makefile.in +++ b/data/net_2_0/Makefile.in @@ -276,6 +276,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/data/net_4_0/Browsers/Makefile.in b/data/net_4_0/Browsers/Makefile.in index ddd68c37aa..694fb1572c 100644 --- a/data/net_4_0/Browsers/Makefile.in +++ b/data/net_4_0/Browsers/Makefile.in @@ -216,6 +216,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/data/net_4_0/Makefile.in b/data/net_4_0/Makefile.in index 0b07774895..181bc6702f 100644 --- a/data/net_4_0/Makefile.in +++ b/data/net_4_0/Makefile.in @@ -276,6 +276,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/data/net_4_5/Browsers/Makefile.in b/data/net_4_5/Browsers/Makefile.in index c09d4c48d9..ad44cac612 100644 --- a/data/net_4_5/Browsers/Makefile.in +++ b/data/net_4_5/Browsers/Makefile.in @@ -216,6 +216,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/data/net_4_5/Makefile.in b/data/net_4_5/Makefile.in index f58e712f70..723f4318b0 100644 --- a/data/net_4_5/Makefile.in +++ b/data/net_4_5/Makefile.in @@ -276,6 +276,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/docs/Makefile.in b/docs/Makefile.in index a1491c33cd..1de153f572 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -216,6 +216,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/ikvm-native/Makefile.in b/ikvm-native/Makefile.in index dd28ff8327..6981e9f38b 100644 --- a/ikvm-native/Makefile.in +++ b/ikvm-native/Makefile.in @@ -263,6 +263,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/llvm/Makefile.in b/llvm/Makefile.in index 1062e10ca9..59d3562b7a 100644 --- a/llvm/Makefile.in +++ b/llvm/Makefile.in @@ -200,6 +200,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/m4/Makefile.in b/m4/Makefile.in index c14fa8d96b..0e9df17453 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -186,6 +186,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/man/Makefile.in b/man/Makefile.in index fae99b60dd..767a8d18d0 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -218,6 +218,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs index 340ebbd0eb..103192e265 100644 --- a/mcs/build/common/Consts.cs +++ b/mcs/build/common/Consts.cs @@ -34,11 +34,11 @@ static class Consts // Use these assembly version constants to make code more maintainable. // - public const string MonoVersion = "5.18.0.247"; + public const string MonoVersion = "5.18.0.248"; public const string MonoCompany = "Mono development team"; public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoCopyright = "(c) Various Mono authors"; - public const string MonoCorlibVersion = "CA4932AE-2294-4ECD-B863-BF98FDD84F33"; + public const string MonoCorlibVersion = "179F7FD7-9CE8-424E-84AF-0DF5B0B8B469"; #if MOBILE // Versions of .NET Framework for Silverlight 4.0 diff --git a/mcs/class/corlib/Mono/Runtime.cs b/mcs/class/corlib/Mono/Runtime.cs index a0d48aa6ab..6e0c9e3185 100644 --- a/mcs/class/corlib/Mono/Runtime.cs +++ b/mcs/class/corlib/Mono/Runtime.cs @@ -204,16 +204,43 @@ namespace Mono { } } + 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 int CheckCrashReportLog (string directory_str, bool clear) + static CrashReportLogLevel CheckCrashReportLog (string directory_str, bool clear) { using (var directory_chars = RuntimeMarshal.MarshalString (directory_str)) { - return CheckCrashReportLog_internal (directory_chars.Value, clear); + 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); + } + } } } diff --git a/mcs/class/corlib/Test/System/ExceptionTest.cs b/mcs/class/corlib/Test/System/ExceptionTest.cs index 5bdb895c53..b785e71dd3 100644 --- a/mcs/class/corlib/Test/System/ExceptionTest.cs +++ b/mcs/class/corlib/Test/System/ExceptionTest.cs @@ -525,9 +525,10 @@ namespace MonoTests.System { var monoType = Type.GetType ("Mono.Runtime", false); var convert = monoType.GetMethod("CheckCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static); - var result = (int) convert.Invoke(null, new object[] { "./", true }); - var monoSummaryDone = 8; - Assert.AreEqual (monoSummaryDone, result, "#DLC1"); + 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] diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Collections.Concurrent.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Collections.Concurrent.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Collections.Concurrent.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Collections.Concurrent.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Collections.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Collections.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Collections.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Collections.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Diagnostics.Debug.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Diagnostics.Debug.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Diagnostics.Debug.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Diagnostics.Debug.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Diagnostics.FileVersionInfo.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Diagnostics.FileVersionInfo.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Diagnostics.FileVersionInfo.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Diagnostics.FileVersionInfo.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Diagnostics.Tools.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Diagnostics.Tools.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Diagnostics.Tools.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Diagnostics.Tools.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Dynamic.Runtime.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Dynamic.Runtime.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Dynamic.Runtime.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Dynamic.Runtime.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Globalization.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Globalization.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Globalization.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Globalization.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.IO.FileSystem.Primitives.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.IO.FileSystem.Primitives.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.IO.FileSystem.Primitives.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.IO.FileSystem.Primitives.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.IO.FileSystem.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.IO.FileSystem.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.IO.FileSystem.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.IO.FileSystem.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.IO.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.IO.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.IO.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.IO.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Linq.Expressions.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Linq.Expressions.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Linq.Expressions.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Linq.Expressions.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Linq.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Linq.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Linq.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Linq.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Reflection.Extensions.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Reflection.Extensions.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Reflection.Extensions.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Reflection.Extensions.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Reflection.Primitives.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Reflection.Primitives.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Reflection.Primitives.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Reflection.Primitives.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Reflection.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Reflection.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Reflection.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Reflection.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Resources.ResourceManager.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Resources.ResourceManager.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Resources.ResourceManager.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Resources.ResourceManager.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Runtime.Extensions.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Runtime.Extensions.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Runtime.Extensions.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Runtime.Extensions.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Runtime.InteropServices.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Runtime.InteropServices.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Runtime.InteropServices.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Runtime.InteropServices.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Runtime.Numerics.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Runtime.Numerics.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Runtime.Numerics.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Runtime.Numerics.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Runtime.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Runtime.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Runtime.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Runtime.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Security.Cryptography.Algorithms.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Security.Cryptography.Algorithms.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Security.Cryptography.Algorithms.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Security.Cryptography.Algorithms.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Security.Cryptography.Primitives.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Security.Cryptography.Primitives.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Security.Cryptography.Primitives.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Security.Cryptography.Primitives.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Text.Encoding.CodePages.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Text.Encoding.CodePages.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Text.Encoding.CodePages.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Text.Encoding.CodePages.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Text.Encoding.Extensions.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Text.Encoding.Extensions.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Text.Encoding.Extensions.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Text.Encoding.Extensions.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Text.Encoding.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Text.Encoding.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Text.Encoding.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Text.Encoding.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Threading.Tasks.Parallel.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Threading.Tasks.Parallel.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Threading.Tasks.Parallel.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Threading.Tasks.Parallel.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Threading.Tasks.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Threading.Tasks.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Threading.Tasks.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Threading.Tasks.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Threading.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Threading.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Threading.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Threading.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.ValueTuple.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.ValueTuple.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.ValueTuple.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.ValueTuple.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Xml.ReaderWriter.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Xml.ReaderWriter.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Xml.ReaderWriter.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Xml.ReaderWriter.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Xml.XDocument.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Xml.XDocument.dll similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Facades/System.Xml.XDocument.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Facades/System.Xml.XDocument.dll diff --git a/mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Cecil.dll.REMOVED.git-id similarity index 100% rename from mcs/class/lib/monolite-linux/CA4932AE-2294-4ECD-B863-BF98FDD84F33/Mono.Cecil.dll.REMOVED.git-id rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Cecil.dll.REMOVED.git-id diff --git a/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Security.dll.REMOVED.git-id new file mode 100644 index 0000000000..63a147f166 --- /dev/null +++ b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/Mono.Security.dll.REMOVED.git-id @@ -0,0 +1 @@ +df3e538a7e74b417e6a2d96c261a263e60962477 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Configuration.dll.REMOVED.git-id new file mode 100644 index 0000000000..2ae0359460 --- /dev/null +++ b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Configuration.dll.REMOVED.git-id @@ -0,0 +1 @@ +a7f4686bf1f799a16ff0e064a8d48db9b223a632 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Core.dll.REMOVED.git-id new file mode 100644 index 0000000000..2e16b7e73b --- /dev/null +++ b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.Core.dll.REMOVED.git-id @@ -0,0 +1 @@ +7f719b9432bba617f4b8a0698e6e2daeb4f1fd67 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.IO.Compression.dll b/mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.IO.Compression.dll similarity index 99% rename from mcs/class/lib/monolite-macos/CA4932AE-2294-4ECD-B863-BF98FDD84F33/System.IO.Compression.dll rename to mcs/class/lib/monolite-linux/179F7FD7-9CE8-424E-84AF-0DF5B0B8B469/System.IO.Compression.dll index 07d6b08b0df877c158d0482f8d08cb525f975445..0ea947d1a5dfe5e2ba6d99856b65a2b1862a866d 100644 GIT binary patch delta 135 zcmZqZU~A}Lo6x~x+IatBW6#zeMiU-^l!w{2uK#9w&)!u(A=J36diw<)#w<2w3kI#} z3u+m)rl$)tR=OK9m@`;1xB*Ew1{WZy3* #endif +#ifdef G_HAVE_UNISTD_H +#include +#endif + #ifndef offsetof # define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name) #endif @@ -175,6 +179,7 @@ typedef struct { } GMemVTable; void g_mem_set_vtable (GMemVTable* vtable); +void g_mem_get_vtable (GMemVTable* vtable); struct _GMemChunk { guint alloc_size; @@ -617,7 +622,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); @@ -966,6 +974,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 */ diff --git a/mono/eglib/gmem.c b/mono/eglib/gmem.c index eff478dcbf..fab72f6df0 100644 --- a/mono/eglib/gmem.c +++ b/mono/eglib/gmem.c @@ -43,12 +43,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) { diff --git a/mono/eglib/goutput.c b/mono/eglib/goutput.c index c93aa7e725..2cb1b1499d 100644 --- a/mono/eglib/goutput.c +++ b/mono/eglib/goutput.c @@ -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 (); } } diff --git a/mono/metadata/Makefile.in.REMOVED.git-id b/mono/metadata/Makefile.in.REMOVED.git-id index b4b8117e63..401f54dd41 100644 --- a/mono/metadata/Makefile.in.REMOVED.git-id +++ b/mono/metadata/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -e8fa1f69de3d4ece37b3a872ad6786f90d643373 \ No newline at end of file +0520a7641867371318fe0b6288ff1dc9631904da \ No newline at end of file diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h index 74d24a479a..900da62748 100644 --- a/mono/metadata/icall-def.h +++ b/mono/metadata/icall-def.h @@ -90,7 +90,8 @@ ICALL_TYPE(TLS_PROVIDER_FACTORY, "Mono.Net.Security.MonoTlsProviderFactory", TLS HANDLES(ICALL(TLS_PROVIDER_FACTORY_1, "IsBtlsSupported", ves_icall_Mono_TlsProviderFactory_IsBtlsSupported)) -ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_19) +ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_20) +HANDLES(ICALL(RUNTIME_20, "AnnotateMicrosoftTelemetry_internal", ves_icall_Mono_Runtime_AnnotateMicrosoftTelemetry)) HANDLES(ICALL(RUNTIME_19, "CheckCrashReportLog_internal", ves_icall_Mono_Runtime_CheckCrashReportingLog)) HANDLES(ICALL(RUNTIME_1, "DisableMicrosoftTelemetry", ves_icall_Mono_Runtime_DisableMicrosoftTelemetry)) HANDLES(ICALL(RUNTIME_15, "DumpStateSingle_internal", ves_icall_Mono_Runtime_DumpStateSingle)) diff --git a/mono/metadata/icall.c.REMOVED.git-id b/mono/metadata/icall.c.REMOVED.git-id index 6d3afb8e46..e44dd11583 100644 --- a/mono/metadata/icall.c.REMOVED.git-id +++ b/mono/metadata/icall.c.REMOVED.git-id @@ -1 +1 @@ -8036ee590400dd435b159424f172ea22b13f00f2 \ No newline at end of file +87961e46752535c49ce6cb1fdfdddf8b89874468 \ No newline at end of file diff --git a/mono/metadata/image.c b/mono/metadata/image.c index 8887fd98a1..7246b854a6 100644 --- a/mono/metadata/image.c +++ b/mono/metadata/image.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -42,6 +43,7 @@ #include #include #include +#include #include #include #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: diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h index 325c993912..58d9f5669d 100644 --- a/mono/metadata/metadata-internals.h +++ b/mono/metadata/metadata-internals.h @@ -275,6 +275,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; diff --git a/mono/metadata/object-internals.h b/mono/metadata/object-internals.h index 622c021da2..f63546c4d4 100644 --- a/mono/metadata/object-internals.h +++ b/mono/metadata/object-internals.h @@ -662,6 +662,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); diff --git a/mono/metadata/threads-types.h b/mono/metadata/threads-types.h index e3206ef8a7..ca3ddd52a6 100644 --- a/mono/metadata/threads-types.h +++ b/mono/metadata/threads-types.h @@ -513,7 +513,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; @@ -545,7 +547,6 @@ typedef struct { char name [MONO_MAX_THREAD_NAME_LEN]; - intptr_t managed_thread_ptr; intptr_t info_addr; intptr_t native_thread_id; diff --git a/mono/metadata/threads.c.REMOVED.git-id b/mono/metadata/threads.c.REMOVED.git-id index 98513f508a..fc1e0e3cfe 100644 --- a/mono/metadata/threads.c.REMOVED.git-id +++ b/mono/metadata/threads.c.REMOVED.git-id @@ -1 +1 @@ -5a65359cfb5af253bcef54471aa828a99654a49c \ No newline at end of file +b9d1aab2f1e058e957399b543f613801a895424e \ No newline at end of file diff --git a/mono/metadata/w32process-unix.c.REMOVED.git-id b/mono/metadata/w32process-unix.c.REMOVED.git-id index ad1a0b9750..df67f46353 100644 --- a/mono/metadata/w32process-unix.c.REMOVED.git-id +++ b/mono/metadata/w32process-unix.c.REMOVED.git-id @@ -1 +1 @@ -db46988cc26a250d0a2b0d1fa5f9bf420ffef210 \ No newline at end of file +159aed90965efd9a29b4d99db85e70e69a4cc999 \ No newline at end of file diff --git a/mono/mini/Makefile.in.REMOVED.git-id b/mono/mini/Makefile.in.REMOVED.git-id index 3e119adf95..a392a2adb6 100644 --- a/mono/mini/Makefile.in.REMOVED.git-id +++ b/mono/mini/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -f3443bae4d65727925223ee9da4ae2274e347298 \ No newline at end of file +cfcdf92817611f6e9e66a79b7e24b5a46d448c19 \ No newline at end of file diff --git a/mono/mini/debugger-state-machine.h b/mono/mini/debugger-state-machine.h index 8c179e1e19..6e8bc55e80 100644 --- a/mono/mini/debugger-state-machine.h +++ b/mono/mini/debugger-state-machine.h @@ -58,7 +58,7 @@ mono_debugger_log_suspend (DebuggerTlsData *tls); #if 0 #define DEBUGGER_STATE_MACHINE_DEBUG(level, ...) #else -#define DEBUGGER_STATE_MACHINE_DEBUG(level, ...) MOSTLY_ASYNC_SAFE_PRINTF(__VA_ARGS__) +#define DEBUGGER_STATE_MACHINE_DEBUG(level, ...) g_async_safe_printf(__VA_ARGS__) #endif void diff --git a/mono/mini/exceptions-amd64.c b/mono/mini/exceptions-amd64.c index 4fab03e79d..b4dfca90df 100644 --- a/mono/mini/exceptions-amd64.c +++ b/mono/mini/exceptions-amd64.c @@ -639,11 +639,14 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls, for (i = 0; i < AMD64_NREG; ++i) regs [i] = new_ctx->gregs [i]; - mono_unwind_frame (unwind_info, unwind_info_len, (guint8 *)ji->code_start, + gboolean success = mono_unwind_frame (unwind_info, unwind_info_len, (guint8 *)ji->code_start, (guint8*)ji->code_start + ji->code_size, (guint8 *)ip, epilog ? &epilog : NULL, regs, MONO_MAX_IREGS + 1, save_locations, MONO_MAX_IREGS, &cfa); + if (!success) + return FALSE; + for (i = 0; i < AMD64_NREG; ++i) new_ctx->gregs [i] = regs [i]; diff --git a/mono/mini/exceptions-arm.c b/mono/mini/exceptions-arm.c index 8278e0440e..a447faa60b 100644 --- a/mono/mini/exceptions-arm.c +++ b/mono/mini/exceptions-arm.c @@ -446,11 +446,14 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls, regs [MONO_MAX_IREGS + i] = *(guint64*)&(new_ctx->fregs [8 + i]); #endif - mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, + gboolean success = mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, ip, NULL, regs, MONO_MAX_IREGS + 8, save_locations, MONO_MAX_IREGS, &cfa); + if (!success) + return FALSE; + for (i = 0; i < 16; ++i) new_ctx->regs [i] = regs [i]; new_ctx->pc = regs [ARMREG_LR]; diff --git a/mono/mini/exceptions-arm64.c b/mono/mini/exceptions-arm64.c index 416de6d76e..f74fced3cd 100644 --- a/mono/mini/exceptions-arm64.c +++ b/mono/mini/exceptions-arm64.c @@ -469,12 +469,16 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls, for (int i = 0; i < 8; i++) (regs + MONO_MAX_IREGS) [i] = *((mgreg_t*)&new_ctx->fregs [8 + i]); - mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, + gboolean success = mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, ip, NULL, regs, MONO_MAX_IREGS + 8, save_locations, MONO_MAX_IREGS, &cfa); + if (!success) + return FALSE; + memcpy (&new_ctx->regs, regs, sizeof (mgreg_t) * 32); + for (int i = 0; i < 8; i++) *((mgreg_t*)&new_ctx->fregs [8 + i]) = (regs + MONO_MAX_IREGS) [i]; diff --git a/mono/mini/exceptions-mips.c b/mono/mini/exceptions-mips.c index 9efa0894fb..f7d95a2fda 100644 --- a/mono/mini/exceptions-mips.c +++ b/mono/mini/exceptions-mips.c @@ -422,11 +422,14 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls, for (i = 0; i < MONO_MAX_IREGS; ++i) regs [i] = new_ctx->sc_regs [i]; - mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, + gboolean success = mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, ip, NULL, regs, MONO_MAX_IREGS, save_locations, MONO_MAX_IREGS, &cfa); + if (!success) + return FALSE; + for (i = 0; i < MONO_MAX_IREGS; ++i) new_ctx->sc_regs [i] = regs [i]; new_ctx->sc_pc = regs [mips_ra]; diff --git a/mono/mini/exceptions-ppc.c b/mono/mini/exceptions-ppc.c index 3483ba835d..0c2e5e812b 100644 --- a/mono/mini/exceptions-ppc.c +++ b/mono/mini/exceptions-ppc.c @@ -561,11 +561,14 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls, for (i = MONO_PPC_FIRST_SAVED_GREG; i < MONO_MAX_IREGS; ++i) regs [i] = ctx->regs [i]; - mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, + gboolean success = mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, ip, NULL, regs, ppc_lr + 1, save_locations, MONO_MAX_IREGS, &cfa); + if (!success) + return FALSE; + /* we substract 4, so that the IP points into the call instruction */ MONO_CONTEXT_SET_IP (new_ctx, regs [ppc_lr] - 4); MONO_CONTEXT_SET_BP (new_ctx, cfa); diff --git a/mono/mini/exceptions-s390x.c b/mono/mini/exceptions-s390x.c index 23fecb60d2..9febaa5358 100644 --- a/mono/mini/exceptions-s390x.c +++ b/mono/mini/exceptions-s390x.c @@ -486,10 +486,14 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls, address = (char *)ip - (char *)ji->code_start; memcpy(®s, &ctx->uc_mcontext.gregs, sizeof(regs)); - mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, + gboolean success = mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8 *) ji->code_start + ji->code_size, ip, NULL, regs, 16, save_locations, MONO_MAX_IREGS, &cfa); + + if (!success) + return FALSE; + memcpy (&new_ctx->uc_mcontext.gregs, ®s, sizeof(regs)); MONO_CONTEXT_SET_IP(new_ctx, regs[14] - 2); MONO_CONTEXT_SET_BP(new_ctx, cfa); diff --git a/mono/mini/exceptions-x86.c b/mono/mini/exceptions-x86.c index a39c7ab2f6..6f9ec69536 100644 --- a/mono/mini/exceptions-x86.c +++ b/mono/mini/exceptions-x86.c @@ -820,11 +820,14 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls, regs [X86_EDI] = new_ctx->edi; regs [X86_NREG] = new_ctx->eip; - mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, + gboolean success = mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, ip, NULL, regs, MONO_MAX_IREGS + 1, save_locations, MONO_MAX_IREGS, &cfa); + if (!success) + return FALSE; + new_ctx->eax = regs [X86_EAX]; new_ctx->ebx = regs [X86_EBX]; new_ctx->ecx = regs [X86_ECX]; diff --git a/mono/mini/mini-exceptions.c.REMOVED.git-id b/mono/mini/mini-exceptions.c.REMOVED.git-id index 0cb29b424e..86c87ce3f1 100644 --- a/mono/mini/mini-exceptions.c.REMOVED.git-id +++ b/mono/mini/mini-exceptions.c.REMOVED.git-id @@ -1 +1 @@ -fa267c8a71940e33451604f8704b53e6b81735b6 \ No newline at end of file +9a3c687e45c6b1c31791b76e54cf9cc8d6ce38f6 \ No newline at end of file diff --git a/mono/mini/mini-posix.c b/mono/mini/mini-posix.c index 6459370e28..9af6f0d0f3 100644 --- a/mono/mini/mini-posix.c +++ b/mono/mini/mini-posix.c @@ -91,6 +91,14 @@ #include #endif +#include +#ifndef HOST_WIN32 +#include +#endif +#if HAVE_SYS_STAT_H +#include +#endif + #if defined(HOST_WATCHOS) void @@ -875,14 +883,21 @@ static void dump_memory_around_ip (void *ctx) { #ifdef MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX + if (!ctx) + return; + + g_async_safe_printf ("\n=================================================================\n"); + g_async_safe_printf ("\tBasic Fault Adddress Reporting\n"); + g_async_safe_printf ("=================================================================\n"); + MonoContext mctx; mono_sigctx_to_monoctx (ctx, &mctx); gpointer native_ip = MONO_CONTEXT_GET_IP (&mctx); if (native_ip) { - mono_runtime_printf_err ("Memory around native instruction pointer (%p):", native_ip); + g_async_safe_printf ("Memory around native instruction pointer (%p):", native_ip); mono_dump_mem (((guint8 *) native_ip) - 0x10, 0x40); } else { - mono_runtime_printf_err ("instruction pointer is NULL, skip dumping"); + g_async_safe_printf ("instruction pointer is NULL, skip dumping"); } #endif } @@ -918,31 +933,52 @@ print_process_map (void) #endif } +static void +assert_printer_callback (void) +{ + mono_dump_native_crash_info ("SIGABRT", NULL, NULL); +} + static void dump_native_stacktrace (const char *signal, void *ctx) { -#ifdef HAVE_BACKTRACE_SYMBOLS - void *array [256]; - char **names; - int i, size; + mono_memory_barrier (); + static gint32 middle_of_crash = 0x0; + gint32 double_faulted = mono_atomic_cas_i32 ((gint32 *)&middle_of_crash, 0x1, 0x0); + mono_memory_write_barrier (); - mono_runtime_printf_err ("\nNative stacktrace:\n"); + if (!double_faulted) { + g_assertion_disable_global (assert_printer_callback); + } else { + g_async_safe_printf ("\nAn error has occured in the native fault reporting. Some diagnostic information will be unavailable.\n"); - size = backtrace (array, 256); - names = backtrace_symbols (array, size); - for (i = 0; i < size; ++i) { - mono_runtime_printf_err ("\t%s", names [i]); +#ifndef DISABLE_CRASH_REPORTING + // In case still enabled + mono_summarize_toggle_assertions (FALSE); +#endif } - g_free (names); - /* Try to get more meaningful information using gdb */ - // FIXME: Remove locking and reenable. Can race with itself - // due to signals being handled on other threads. - // - // char *debugger_log = mono_debugger_state_str (); - // if (debugger_log) { - // fprintf (stderr, "\n\tDebugger session state:\n%s\n", debugger_log); - // } +#ifdef HAVE_BACKTRACE_SYMBOLS + + void *array [256]; + int size = backtrace (array, 256); + + g_async_safe_printf ("\n=================================================================\n"); + g_async_safe_printf ("\tNative stacktrace:\n"); + g_async_safe_printf ("=================================================================\n"); + if (size == 0) + g_async_safe_printf ("\t (No frames) \n\n"); + + for (int i = 0; i < size; ++i) { + gpointer ip = array [i]; + Dl_info info; + gboolean success = dladdr ((void*) ip, &info); + if (!success) { + g_async_safe_printf ("\t%p - Unknown\n", ip); + } else { + g_async_safe_printf ("\t%p - %s : %s\n", ip, info.dli_fname, info.dli_sname); + } + } #if !defined(HOST_WIN32) && defined(HAVE_SYS_SYSCALL_H) && (defined(SYS_fork) || HAVE_FORK) if (!mini_get_debug_options ()->no_gdb_backtrace) { @@ -950,14 +986,17 @@ dump_native_stacktrace (const char *signal, void *ctx) pid_t pid; int status; pid_t crashed_pid = getpid (); + gchar *output = NULL; + MonoStackHash hashes; #ifndef DISABLE_CRASH_REPORTING - MonoStackHash hashes; - gchar *output = NULL; - MonoContext mctx; - if (ctx) { + MonoStateMem merp_mem; + memset (&merp_mem, 0, sizeof (merp_mem)); + + if (!double_faulted) { gboolean leave = FALSE; gboolean dump_for_merp = FALSE; + #if defined(TARGET_OSX) dump_for_merp = mono_merp_enabled (); #endif @@ -970,18 +1009,34 @@ dump_native_stacktrace (const char *signal, void *ctx) #endif } - if (!leave) { + MonoContext mctx; + MonoContext *passed_ctx = NULL; + if (!leave && ctx) { mono_sigctx_to_monoctx (ctx, &mctx); + passed_ctx = &mctx; + } + + g_async_safe_printf ("\n=================================================================\n"); + g_async_safe_printf ("\tTelemetry Dumper:\n"); + g_async_safe_printf ("=================================================================\n"); + + if (!leave) { mono_summarize_timeline_start (); + mono_summarize_toggle_assertions (TRUE); + + int mono_max_summary_len = 500000; + int mono_state_tmp_file_tag = 1; + mono_state_alloc_mem (&merp_mem, mono_state_tmp_file_tag, mono_max_summary_len * sizeof (gchar)); + // Returns success, so leave if !success - leave = !mono_threads_summarize (&mctx, &output, &hashes, FALSE, TRUE, NULL, 0); + leave = !mono_threads_summarize (passed_ctx, &output, &hashes, FALSE, TRUE, (gchar *) merp_mem.mem, mono_max_summary_len); } if (!leave) { // Wait for the other threads to clean up and exit their handlers // We can't lock / wait indefinitely, in case one of these threads got stuck somehow // while dumping. - mono_runtime_printf_err ("\nWaiting for dumping threads to resume\n"); + g_async_safe_printf ("\nWaiting for dumping threads to resume\n"); sleep (1); } @@ -991,10 +1046,10 @@ dump_native_stacktrace (const char *signal, void *ctx) mono_summarize_timeline_phase_log (MonoSummaryCleanup); mono_crash_dump (output, &hashes); mono_summarize_timeline_phase_log (MonoSummaryDone); + mono_summarize_toggle_assertions (FALSE); } - } -#endif +#endif // DISABLE_CRASH_REPORTING /* * glibc fork acquires some locks, so if the crash happened inside malloc/free, @@ -1022,17 +1077,22 @@ dump_native_stacktrace (const char *signal, void *ctx) #endif #if defined(TARGET_OSX) && !defined(DISABLE_CRASH_REPORTING) - if (mono_merp_enabled ()) { + if (!double_faulted && mono_merp_enabled ()) { if (pid == 0) { - if (!ctx) { - mono_runtime_printf_err ("\nMust always pass non-null context when using merp.\n"); - } else if (output) { + if (output) { gboolean merp_upload_success = mono_merp_invoke (crashed_pid, signal, output, &hashes); - g_assert (merp_upload_success); - mono_summarize_timeline_phase_log (MonoSummaryDone); + if (!merp_upload_success) { + g_async_safe_printf("\nThe MERP upload step has failed.\n"); + } else { + // Remove + g_async_safe_printf("\nThe MERP upload step has succeeded.\n"); + mono_summarize_timeline_phase_log (MonoSummaryDone); + } + + mono_summarize_toggle_assertions (FALSE); } else { - mono_runtime_printf_err ("\nMerp dump step not run, no dump created.\n"); + g_async_safe_printf("\nMerp dump step not run, no dump created.\n"); } } } @@ -1041,12 +1101,29 @@ dump_native_stacktrace (const char *signal, void *ctx) if (pid == 0) { dup2 (STDERR_FILENO, STDOUT_FILENO); + g_async_safe_printf ("\n=================================================================\n"); + g_async_safe_printf("\tExternal Debugger Dump:\n"); + g_async_safe_printf ("=================================================================\n"); mono_gdb_render_native_backtraces (crashed_pid); - exit (1); + _exit (1); } mono_runtime_printf_err ("\nDebug info from gdb:\n"); waitpid (pid, &status, 0); + + if (double_faulted) { + g_async_safe_printf("\nExiting early due to double fault.\n"); +#ifndef DISABLE_CRASH_REPORTING + mono_state_free_mem (&merp_mem); +#endif + _exit (-1); + } + +#ifndef DISABLE_CRASH_REPORTING + output = NULL; + mono_state_free_mem (&merp_mem); +#endif + } #endif #else @@ -1057,7 +1134,7 @@ dump_native_stacktrace (const char *signal, void *ctx) * set this on start-up as DUMPABLE has security implications. */ prctl (PR_SET_DUMPABLE, 1); - mono_runtime_printf_err ("\nNo native Android stacktrace (see debuggerd output).\n"); + g_async_safe_printf("\nNo native Android stacktrace (see debuggerd output).\n"); #endif #endif } @@ -1086,31 +1163,38 @@ mono_post_native_crash_handler (const char *signal, void *ctx, MONO_SIG_HANDLER_ } #endif /* !MONO_CROSS_COMPILE */ +static gchar *gdb_path; +static gchar *lldb_path; + +void +mono_init_native_crash_info (void) +{ + gdb_path = g_find_program_in_path ("gdb"); + lldb_path = g_find_program_in_path ("lldb"); +} + static gboolean -native_stack_with_gdb (pid_t crashed_pid, const char **argv, FILE *commands, char* commands_filename) +native_stack_with_gdb (pid_t crashed_pid, const char **argv, int commands, char* commands_filename) { - gchar *gdb; - - gdb = g_find_program_in_path ("gdb"); - if (!gdb) + if (!gdb_path) return FALSE; - argv [0] = gdb; + argv [0] = gdb_path; argv [1] = "-batch"; argv [2] = "-x"; argv [3] = commands_filename; argv [4] = "-nx"; - fprintf (commands, "attach %ld\n", (long) crashed_pid); - fprintf (commands, "info threads\n"); - fprintf (commands, "thread apply all bt\n"); + g_async_safe_fprintf (commands, "attach %ld\n", (long) crashed_pid); + g_async_safe_fprintf (commands, "info threads\n"); + g_async_safe_fprintf (commands, "thread apply all bt\n"); if (mini_get_debug_options ()->verbose_gdb) { for (int i = 0; i < 32; ++i) { - fprintf (commands, "info registers\n"); - fprintf (commands, "info frame\n"); - fprintf (commands, "info locals\n"); - fprintf (commands, "up\n"); + g_async_safe_fprintf (commands, "info registers\n"); + g_async_safe_fprintf (commands, "info frame\n"); + g_async_safe_fprintf (commands, "info locals\n"); + g_async_safe_fprintf (commands, "up\n"); } } @@ -1119,33 +1203,30 @@ native_stack_with_gdb (pid_t crashed_pid, const char **argv, FILE *commands, cha static gboolean -native_stack_with_lldb (pid_t crashed_pid, const char **argv, FILE *commands, char* commands_filename) +native_stack_with_lldb (pid_t crashed_pid, const char **argv, int commands, char* commands_filename) { - gchar *lldb; - - lldb = g_find_program_in_path ("lldb"); - if (!lldb) + if (!lldb_path) return FALSE; - argv [0] = lldb; + argv [0] = lldb_path; argv [1] = "--batch"; argv [2] = "--source"; argv [3] = commands_filename; argv [4] = "--no-lldbinit"; - fprintf (commands, "process attach --pid %ld\n", (long) crashed_pid); - fprintf (commands, "thread list\n"); - fprintf (commands, "thread backtrace all\n"); + g_async_safe_fprintf (commands, "process attach --pid %ld\n", (long) crashed_pid); + g_async_safe_fprintf (commands, "thread list\n"); + g_async_safe_fprintf (commands, "thread backtrace all\n"); if (mini_get_debug_options ()->verbose_gdb) { for (int i = 0; i < 32; ++i) { - fprintf (commands, "reg read\n"); - fprintf (commands, "frame info\n"); - fprintf (commands, "frame variable\n"); - fprintf (commands, "up\n"); + g_async_safe_fprintf (commands, "reg read\n"); + g_async_safe_fprintf (commands, "frame info\n"); + g_async_safe_fprintf (commands, "frame variable\n"); + g_async_safe_fprintf (commands, "up\n"); } } - fprintf (commands, "detach\n"); - fprintf (commands, "quit\n"); + g_async_safe_fprintf (commands, "detach\n"); + g_async_safe_fprintf (commands, "quit\n"); return TRUE; } @@ -1155,46 +1236,45 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid) { #ifdef HAVE_EXECV const char *argv [10]; - FILE *commands; - char commands_filename [] = "/tmp/mono-gdb-commands.XXXXXX"; + memset (argv, 0, sizeof (char*) * 10); - if (mkstemp (commands_filename) == -1) - return; + char commands_filename [100]; + commands_filename [0] = '\0'; + g_snprintf (commands_filename, sizeof (commands_filename), "/tmp/mono-gdb-commands.%d", crashed_pid); - commands = fopen (commands_filename, "w"); - if (!commands) { - unlink (commands_filename); + // Create this file, overwriting if it already exists + int commands_handle = g_open (commands_filename, O_TRUNC | O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); + if (commands_handle == -1) { + g_async_safe_printf ("Could not make debugger temp file %s\n", commands_filename); return; } - memset (argv, 0, sizeof (char*) * 10); - #if defined(HOST_DARWIN) - if (native_stack_with_lldb (crashed_pid, argv, commands, commands_filename)) + if (native_stack_with_lldb (crashed_pid, argv, commands_handle, commands_filename)) goto exec; #endif - if (native_stack_with_gdb (crashed_pid, argv, commands, commands_filename)) + if (native_stack_with_gdb (crashed_pid, argv, commands_handle, commands_filename)) goto exec; #if !defined(HOST_DARWIN) - if (native_stack_with_lldb (crashed_pid, argv, commands, commands_filename)) + if (native_stack_with_lldb (crashed_pid, argv, commands_handle, commands_filename)) goto exec; #endif - fprintf (stderr, "mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb\n"); + g_async_safe_printf ("mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb\n"); - fclose (commands); + close (commands_handle); unlink (commands_filename); return; exec: - fclose (commands); + close (commands_handle); execv (argv [0], (char**)argv); _exit (-1); #else - fprintf (stderr, "mono_gdb_render_native_backtraces not supported on this platform\n"); + g_async_safe_printf ("mono_gdb_render_native_backtraces not supported on this platform\n"); #endif // HAVE_EXECV } diff --git a/mono/mini/mini-runtime.c.REMOVED.git-id b/mono/mini/mini-runtime.c.REMOVED.git-id index 0e984bcbcb..b195605654 100644 --- a/mono/mini/mini-runtime.c.REMOVED.git-id +++ b/mono/mini/mini-runtime.c.REMOVED.git-id @@ -1 +1 @@ -7f962aa6f0f838860b0ed2b03f06c2a44341e596 \ No newline at end of file +7a0baff28d8e75d42046f5b6695e8d5973c9dadc \ No newline at end of file diff --git a/mono/mini/mini-runtime.h b/mono/mini/mini-runtime.h index 972c4c1b30..b143bd99fa 100644 --- a/mono/mini/mini-runtime.h +++ b/mono/mini/mini-runtime.h @@ -510,6 +510,9 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid); void mono_cross_helpers_run (void); +void +mono_init_native_crash_info (void); + void mono_dump_native_crash_info (const char *signal, void *ctx, MONO_SIG_HANDLER_INFO_TYPE *info); diff --git a/mono/mini/mini-unwind.h b/mono/mini/mini-unwind.h index cdcebec821..529fbba073 100644 --- a/mono/mini/mini-unwind.h +++ b/mono/mini/mini-unwind.h @@ -177,7 +177,7 @@ mono_unwind_ops_encode_full (GSList *unwind_ops, guint32 *out_len, gboolean enab guint8* mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len); -void +gboolean mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations, mono_unwind_reg_t *regs, int nregs, diff --git a/mono/mini/mini-wasm.c b/mono/mini/mini-wasm.c index 27cf32aa20..f88a1f990f 100644 --- a/mono/mini/mini-wasm.c +++ b/mono/mini/mini-wasm.c @@ -164,6 +164,12 @@ mono_runtime_cleanup_handlers (void) { } +void +mono_init_native_crash_info (void) +{ + return; +} + gboolean mono_thread_state_init_from_handle (MonoThreadUnwindState *tctx, MonoThreadInfo *info, void *sigctx) { diff --git a/mono/mini/mini-windows.c b/mono/mini/mini-windows.c index 6f6374eff7..8291692299 100644 --- a/mono/mini/mini-windows.c +++ b/mono/mini/mini-windows.c @@ -245,6 +245,12 @@ mono_runtime_cleanup_handlers (void) #endif } +void +mono_init_native_crash_info (void) +{ + return; +} + #if G_HAVE_API_SUPPORT (HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) /* mono_chain_signal: * diff --git a/mono/mini/unwind.c b/mono/mini/unwind.c index a459a9715a..ba6b890d93 100644 --- a/mono/mini/unwind.c +++ b/mono/mini/unwind.c @@ -516,8 +516,10 @@ typedef struct { * N was saved, or NULL, if it was not saved by this frame. * MARK_LOCATIONS should contain the locations marked by mono_emit_unwind_op_mark_loc (), if any. * This function is signal safe. + * + * It returns FALSE on failure */ -void +gboolean mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations, mono_unwind_reg_t *regs, int nregs, @@ -575,7 +577,10 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, reg = decode_uleb128 (p, &p); hwreg = mono_dwarf_reg_to_hw_reg (reg); offset = decode_sleb128 (p, &p); - g_assert (reg < NUM_DWARF_REGS); + if (reg >= NUM_DWARF_REGS) { + mono_runtime_printf_err ("Unwind failure. Assertion at %s %d\n.", __FILE__, __LINE__); + return FALSE; + } reg_saved [hwreg] = TRUE; locations [hwreg].loc_type = LOC_OFFSET; locations [hwreg].offset = offset * DWARF_DATA_ALIGN; @@ -584,7 +589,10 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, reg = decode_uleb128 (p, &p); hwreg = mono_dwarf_reg_to_hw_reg (reg); offset = decode_uleb128 (p, &p); - g_assert (reg < NUM_DWARF_REGS); + if (reg >= NUM_DWARF_REGS) { + mono_runtime_printf_err ("Unwind failure. Assertion at %s %d\n.", __FILE__, __LINE__); + return FALSE; + } reg_saved [hwreg] = TRUE; locations [hwreg].loc_type = LOC_OFFSET; locations [hwreg].offset = offset * DWARF_DATA_ALIGN; @@ -606,7 +614,10 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, p += 4; break; case DW_CFA_remember_state: - g_assert (state_stack_pos == 0); + if (state_stack_pos != 0) { + mono_runtime_printf_err ("Unwind failure. Assertion at %s %d\n.", __FILE__, __LINE__); + return FALSE; + } memcpy (&state_stack [0].locations, &locations, sizeof (locations)); memcpy (&state_stack [0].reg_saved, ®_saved, sizeof (reg_saved)); state_stack [0].cfa_reg = cfa_reg; @@ -614,7 +625,10 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, state_stack_pos ++; break; case DW_CFA_restore_state: - g_assert (state_stack_pos == 1); + if (state_stack_pos != 1) { + mono_runtime_printf_err ("Unwind failure. Assertion at %s %d\n.", __FILE__, __LINE__); + return FALSE; + } state_stack_pos --; memcpy (&locations, &state_stack [0].locations, sizeof (locations)); memcpy (®_saved, &state_stack [0].reg_saved, sizeof (reg_saved)); @@ -622,16 +636,21 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, cfa_offset = state_stack [0].cfa_offset; break; case DW_CFA_mono_advance_loc: - g_assert (mark_locations [0]); + if (!mark_locations [0]) { + mono_runtime_printf_err ("Unwind failure. Assertion at %s %d\n.", __FILE__, __LINE__); + return FALSE; + } pos = mark_locations [0] - start_ip; break; default: - g_assert_not_reached (); + mono_runtime_printf_err ("Unwind failure. Illegal value for switch statement, assertion at %s %d\n.", __FILE__, __LINE__); + return FALSE; } break; } default: - g_assert_not_reached (); + mono_runtime_printf_err ("Unwind failure. Illegal value for switch statement, assertion at %s %d\n.", __FILE__, __LINE__); + return FALSE; } } @@ -641,13 +660,16 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, if (cfa_reg == -1) { mono_runtime_printf_err ("Unset cfa_reg in method %s. Memory around ip (%p):", mono_get_method_from_ip (ip), ip); mono_dump_mem (ip - 0x10, 0x40); - g_assert_not_reached (); + return FALSE; } cfa_val = (guint8*)regs [mono_dwarf_reg_to_hw_reg (cfa_reg)] + cfa_offset; for (hwreg = 0; hwreg < NUM_HW_REGS; ++hwreg) { if (reg_saved [hwreg] && locations [hwreg].loc_type == LOC_OFFSET) { int dwarfreg = mono_hw_reg_to_dwarf_reg (hwreg); - g_assert (hwreg < nregs); + if (hwreg >= nregs) { + mono_runtime_printf_err ("Unwind failure. Assertion at %s %d\n.", __FILE__, __LINE__); + return FALSE; + } if (IS_DOUBLE_REG (dwarfreg)) regs [hwreg] = *(guint64*)(cfa_val + locations [hwreg].offset); else @@ -658,6 +680,9 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, } *out_cfa = cfa_val; + + // Success + return TRUE; } void diff --git a/mono/mini/version.h b/mono/mini/version.h index 5e00cf0d1d..8fdacfdfd1 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "explicit/d4d4fb7" +#define FULL_VERSION "explicit/a4956c83" diff --git a/mono/profiler/Makefile.in b/mono/profiler/Makefile.in index 59dd82177a..45d540bc9f 100644 --- a/mono/profiler/Makefile.in +++ b/mono/profiler/Makefile.in @@ -378,6 +378,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/mono/sgen/Makefile.in b/mono/sgen/Makefile.in index 63e0bf02a4..65d5271a48 100644 --- a/mono/sgen/Makefile.in +++ b/mono/sgen/Makefile.in @@ -257,6 +257,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/mono/tests/Makefile.am.REMOVED.git-id b/mono/tests/Makefile.am.REMOVED.git-id index 0c3445f47e..8fc44c5fbd 100644 --- a/mono/tests/Makefile.am.REMOVED.git-id +++ b/mono/tests/Makefile.am.REMOVED.git-id @@ -1 +1 @@ -cfd624b2499ca4562471690b1e16c954ea02d449 \ No newline at end of file +6e8986276fc609bd4d2c34d26ae2b399744f3fcd \ No newline at end of file diff --git a/mono/tests/Makefile.in.REMOVED.git-id b/mono/tests/Makefile.in.REMOVED.git-id index 0d2c6b9e9c..00aa9dfd36 100644 --- a/mono/tests/Makefile.in.REMOVED.git-id +++ b/mono/tests/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -9289e2bc806bd5901f5361982a42d8f4947ee4fe \ No newline at end of file +4988fc44d1852615c7e57a0f2a5d26e678f5dbfe \ No newline at end of file diff --git a/mono/tests/assembly-load-reference/Makefile.in b/mono/tests/assembly-load-reference/Makefile.in index ba4dea3566..fec0d99d20 100644 --- a/mono/tests/assembly-load-reference/Makefile.in +++ b/mono/tests/assembly-load-reference/Makefile.in @@ -197,6 +197,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/mono/tests/gc-descriptors/Makefile.in b/mono/tests/gc-descriptors/Makefile.in index 97038a5cf6..4f03cf0f00 100644 --- a/mono/tests/gc-descriptors/Makefile.in +++ b/mono/tests/gc-descriptors/Makefile.in @@ -186,6 +186,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/mono/tests/libtest.c.REMOVED.git-id b/mono/tests/libtest.c.REMOVED.git-id index 51f2421106..939a402766 100644 --- a/mono/tests/libtest.c.REMOVED.git-id +++ b/mono/tests/libtest.c.REMOVED.git-id @@ -1 +1 @@ -cd8be28c44cbfa14048e49dc6cd38abbc51382a8 \ No newline at end of file +1d5418e0f5c2d4b2e8eacc41648c43bd127ae433 \ No newline at end of file diff --git a/mono/tests/merp-crash-test.cs b/mono/tests/merp-crash-test.cs new file mode 100644 index 0000000000..29287c197f --- /dev/null +++ b/mono/tests/merp-crash-test.cs @@ -0,0 +1,358 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.CompilerServices; +using System.Reflection; +using System.Web.Script.Serialization; +using Diag = System.Diagnostics; +using System.Runtime.InteropServices; + +class C +{ + class CrasherClass + { + public static List> Crashers; + public static int StresserIndex; + + static CrasherClass () + { + Crashers = new List> (); + + // Basic functionality + Crashers.Add(new Tuple ("MerpCrashManaged", MerpCrashManaged)); + // Run this test for stress tests + // + // I've ran a burn-in with all of them of + // 1,000 - 10,000 runs already. + // + // Feel free to change by moving this line. + StresserIndex = Crashers.Count - 1; + + Crashers.Add(new Tuple ("MerpCrashMalloc", MerpCrashMalloc)); + + Crashers.Add(new Tuple ("MerpCrashNullFp", MerpCrashNullFp)); + Crashers.Add(new Tuple ("MerpCrashExceptionHook", MerpCrashUnhandledExceptionHook)); + + // Specific Edge Cases + Crashers.Add(new Tuple ("MerpCrashDladdr", MerpCrashDladdr)); + Crashers.Add(new Tuple ("MerpCrashSnprintf", MerpCrashSnprintf)); + Crashers.Add(new Tuple ("MerpCrashDomainUnload", MerpCrashDomainUnload)); + Crashers.Add(new Tuple ("MerpCrashUnbalancedGCSafe", MerpCrashUnbalancedGCSafe)); + } + + public static void + MerpCrashManaged () + { + unsafe { Console.WriteLine("{0}", *(int*) -1); } + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashSnprintf (); + + // This test tries to test the writer's reentrancy + public static void + MerpCrashSnprintf () + { + mono_test_MerpCrashSnprintf (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashDladdr (); + + public static void + MerpCrashDladdr () + { + mono_test_MerpCrashDladdr (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashMalloc (); + + public static void + MerpCrashMalloc () + { + mono_test_MerpCrashMalloc (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashLoaderLock (); + + public static void + MerpCrashLoaderLock () + { + mono_test_MerpCrashLoaderLock (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashDomainUnload (); + + public static void + MerpCrashDomainUnload () + { + mono_test_MerpCrashDomainUnload (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashUnbalancedGCSafe (); + + public static void + MerpCrashUnbalancedGCSafe () + { + mono_test_MerpCrashUnbalancedGCSafe (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashNullFp (); + + public static void + MerpCrashNullFp () + { + mono_test_MerpCrashNullFp (); + } + + [DllImport("libtest")] + public static extern void mono_test_MerpCrashUnhandledExceptionHook (); + + public static void + MerpCrashUnhandledExceptionHook () + { + AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(HandleException); + throw new Exception ("This is Unhandled"); + } + + public static void HandleException (object sender, UnhandledExceptionEventArgs e) + { + Console.WriteLine ("And now to crash inside the hook"); + mono_test_MerpCrashUnhandledExceptionHook (); + } + } + + static string configDir = "./"; + + public static void + CrashWithMerp (int testNum) + { + SetupCrash (configDir); + CrasherClass.Crashers [Convert.ToInt32 (testNum)].Item2 (); + } + + public static string env = Environment.GetEnvironmentVariable ("MONO_PATH"); + public static string this_assembly_path = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); + + public static void + SetupCrash (string configDir) + { + var monoType = Type.GetType ("Mono.Runtime", false); + var m = monoType.GetMethod("EnableMicrosoftTelemetry", BindingFlags.NonPublic | BindingFlags.Static); + + // This leads to open -a /bin/cat, which errors out, but errors + // in invoking merp are only logged errors, not fatal assertions. + var merpGUIPath = "/bin/cat"; + var appBundleId = "com.xam.Minimal"; + var appSignature = "Test.Xam.Minimal"; + var appVersion = "123456"; + var eventType = "AppleAppCrash"; + var appPath = "/where/mono/lives"; + var m_params = new object[] { appBundleId, appSignature, appVersion, merpGUIPath, eventType, appPath, configDir }; + + m.Invoke(null, m_params); + + DumpLogSet (); + } + + public static void + TestValidateAndCleanup (string configDir, bool silent) + { + DumpLogCheck (); + + var xmlFilePath = String.Format("{0}CustomLogsMetadata.xml", configDir); + var paramsFilePath = String.Format("{0}MERP.uploadparams.txt", configDir); + var crashFilePath = String.Format("{0}lastcrashlog.txt", configDir); + + // Fixme: Maybe parse these json files rather than + // just checking they exist + var xmlFileExists = File.Exists (xmlFilePath); + var paramsFileExists = File.Exists (paramsFilePath); + var crashFileExists = File.Exists (crashFilePath); + + if (xmlFileExists) { + var text = File.ReadAllText (xmlFilePath); + if (!silent) + Console.WriteLine ("Xml file {0}", text); + File.Delete (xmlFilePath); + } + + if (paramsFileExists) { + var text = File.ReadAllText (paramsFilePath); + if (!silent) + Console.WriteLine ("Params file {0}", text); + File.Delete (paramsFilePath); + } + + if (crashFileExists) { + var crashFile = File.ReadAllText (crashFilePath); + File.Delete (crashFilePath); + + var checker = new JavaScriptSerializer (); + + // Throws if invalid json + if (!silent) + Console.WriteLine("Validating: {0}", crashFile); + try { + var obj = checker.DeserializeObject (crashFile); + } catch (Exception e) { + throw new Exception (String.Format ("Invalid json: {0}", crashFile)); + } + + File.Delete (crashFilePath); + // Assert it has the required merp fields + } + + if (!xmlFileExists) + throw new Exception (String.Format ("Did not produce {0}", xmlFilePath)); + + if (!paramsFileExists) + throw new Exception (String.Format ("Did not produce {0}", paramsFilePath)); + + if (!crashFileExists) + throw new Exception (String.Format ("Did not produce {0}", crashFilePath)); + } + + public static void + Cleanup (string configDir) + { + var xmlFilePath = String.Format("{0}CustomLogsMetadata.xml", configDir); + var paramsFilePath = String.Format("{0}MERP.uploadparams.txt", configDir); + var crashFilePath = String.Format("{0}lastcrashlog.txt", configDir); + + // Fixme: Maybe parse these json files rather than + // just checking they exist + var xmlFileExists = File.Exists (xmlFilePath); + var paramsFileExists = File.Exists (paramsFilePath); + var crashFileExists = File.Exists (crashFilePath); + + if (xmlFileExists) + File.Delete (xmlFilePath); + + if (paramsFileExists) + File.Delete (paramsFilePath); + + if (crashFileExists) + File.Delete (crashFilePath); + } + + static void DumpLogSet () + { + var monoType = Type.GetType ("Mono.Runtime", false); + var convert = monoType.GetMethod("EnableCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static); + convert.Invoke(null, new object[] { "./" }); + } + + static void DumpLogUnset () + { + var monoType = Type.GetType ("Mono.Runtime", false); + var convert = monoType.GetMethod("EnableCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static); + convert.Invoke(null, new object[] { null }); + } + + static void DumpLogCheck () + { + var monoType = Type.GetType ("Mono.Runtime", false); + var convert = monoType.GetMethod("CheckCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static); + var result = (int) convert.Invoke(null, new object[] { "./", true }); + // Value of enum + string [] levels = new string [] { "None", "Setup", "SuspendHandshake", "UnmanagedStacks", "ManagedStacks", "StateWriter", "StateWriterDone", "MerpWriter", "MerpInvoke", "Cleanup", "Done", "DoubleFault" }; + + if ("MerpInvoke" == levels [result]) { + Console.WriteLine ("Merp invoke command failed, expected failure?"); + } else if ("Done" != levels [result]) { + throw new Exception (String.Format ("Crash level not done, failed in stage: {0}", levels [result])); + } + } + + + public static void + SpawnCrashingRuntime (string runtime, int testNum, bool silent) + { + var asm = "merp-crash-test.exe"; + var pi = new Diag.ProcessStartInfo (); + pi.UseShellExecute = false; + pi.FileName = runtime; + pi.Arguments = String.Format ("{0} {1}", asm, testNum);; + pi.Environment ["MONO_PATH"] = env; + + if (!silent) + Console.WriteLine ("MONO_PATH={0} {1} {2} {3}", env, runtime, asm, testNum); + + var process = Diag.Process.Start (pi); + process.WaitForExit (); + + TestValidateAndCleanup (configDir, silent); + } + + public static void Main (string [] args) + { + if (args.Length == 0) { + string processExe = Diag.Process.GetCurrentProcess ().MainModule.FileName; + if (processExe == null) + throw new ArgumentException ("Couldn't get name of running file"); + else if (string.IsNullOrEmpty (processExe)) + throw new ArgumentException ("Couldn't find mono runtime."); + else if (!Path.GetFileName (processExe).StartsWith ("mono")) + throw new ArgumentException (String.Format("Running native app {0} isn't 'mono'")); + + var failures = new Exception [CrasherClass.Crashers.Count]; + int failure_count = 0; + for (int i=0; i < CrasherClass.Crashers.Count; i++) { + try { + SpawnCrashingRuntime (processExe, i, false); + } catch (Exception e) { + failures [i] = e; + if (e.InnerException != null) + failures [i] = e.InnerException; + failure_count++; + } + } + + Console.WriteLine ("\n\n##################"); + Console.WriteLine ("Merp Test Results:"); + Console.WriteLine ("##################\n\n"); + + if (failure_count > 0) { + for (int i=0; i < CrasherClass.Crashers.Count; i++) { + if (failures [i] != null) { + Console.WriteLine ("Crash reporter failed test {0}", CrasherClass.Crashers [i].Item1); + Console.WriteLine ("Cause: {0}\n{1}\n", failures [i].Message, failures [i].StackTrace); + } + } + } + + if (failure_count > 0) + return; + + Console.WriteLine ("\n\n##################"); + Console.WriteLine ("Merp Stress Test:"); + Console.WriteLine ("##################\n\n"); + + Console.WriteLine ("Starting crash stress test\n"); + int iter = 0; + for (iter=0; iter < 20; iter++) { + Console.WriteLine ("\n#############################################"); + Console.WriteLine ("\tMerp Stress Test Iteration {0}", iter); + Console.WriteLine ("#############################################\n"); + try { + SpawnCrashingRuntime (processExe, CrasherClass.StresserIndex, true); + } catch (Exception e) { + Console.WriteLine ("Stress test caught failure. Shutting down after {1} iterations.\n {0} \n\n", e.InnerException, iter); + Cleanup (configDir); + throw; + } + } + Console.WriteLine ("Ending crash stress test. No failures caught.\n"); + + return; + } else { + CrashWithMerp (Convert.ToInt32 (args [0])); + } + } +} diff --git a/mono/tests/merp-json-valid.cs b/mono/tests/merp-json-valid.cs new file mode 100644 index 0000000000..9c914d5140 --- /dev/null +++ b/mono/tests/merp-json-valid.cs @@ -0,0 +1,108 @@ +using System; +using System.IO; +using System.Runtime.CompilerServices; +using System.Reflection; +using System.Web.Script.Serialization; + +class C +{ + public static void + JsonValidateState () + { + var monoType = Type.GetType ("Mono.Runtime", false); + var convert = monoType.GetMethod("DumpStateSingle", BindingFlags.NonPublic | BindingFlags.Static); + var output = (Tuple) convert.Invoke(null, Array.Empty ()); + var checker = new JavaScriptSerializer (); + + Console.WriteLine ("Validating: {0}", output.Item1); + checker.DeserializeObject (output.Item1); + } + + public static void + JsonValidateMerp () + { + var monoType = Type.GetType ("Mono.Runtime", false); + var m = monoType.GetMethod("EnableMicrosoftTelemetryNext", BindingFlags.NonPublic | BindingFlags.Static); + + // This leads to open -a /bin/cat, which errors out, but errors + // in invoking merp are only logged errors, not fatal assertions. + var merpGUIPath = "/bin/cat"; + var appBundleId = "com.xam.Minimal"; + var appSignature = "Test.Xam.Minimal"; + var appVersion = "123456"; + var eventType = "AppleAppCrash"; + var appPath = "/where/mono/lives"; + var configDir = "./"; + + var m_params = new object[] { appBundleId, appSignature, appVersion, merpGUIPath, eventType, appPath, configDir }; + + m.Invoke(null, m_params); + + var add_method = monoType.GetMethod("AnnotateMicrosoftTelemetry", BindingFlags.NonPublic | BindingFlags.Static); + var add_params = new object[] { "sessionId", "12345" }; + add_method.Invoke(null, add_params); + + try { + throw new Exception (""); + } catch (Exception exc) { + var send = monoType.GetMethod("SendExceptionToTelemetry", BindingFlags.NonPublic | BindingFlags.Static); + var send_params = new object[] {exc}; + + bool caught_expected_exception = false; + try { + send.Invoke(null, send_params); + } catch (Exception exc2) { + if (exc2.InnerException != null && exc2.InnerException.Message == "We were unable to start the Microsoft Error Reporting client.") + caught_expected_exception = true; + else + throw new Exception (String.Format ("Got exception from Merp icall with wrong message {0}", exc2.InnerException != null ? exc2.InnerException.Message : exc2.Message)); + } + } + + var xmlFilePath = String.Format("{0}CustomLogsMetadata.xml", configDir); + var paramsFilePath = String.Format("{0}MERP.uploadparams.txt", configDir); + var crashFilePath = String.Format("{0}lastcrashlog.txt", configDir); + + // Fixme: Maybe parse these json files rather than + // just checking they exist + var xmlFileExists = File.Exists (xmlFilePath); + var paramsFileExists = File.Exists (paramsFilePath); + var crashFileExists = File.Exists (crashFilePath); + + if (xmlFileExists) { + File.ReadAllText (xmlFilePath); + File.Delete (xmlFilePath); + } + + if (paramsFileExists) { + File.ReadAllText (paramsFilePath); + File.Delete (paramsFilePath); + } + + if (crashFileExists) { + var crashFile = File.ReadAllText (crashFilePath); + //File.Delete (crashFilePath); + + var checker = new JavaScriptSerializer (); + + // Throws if invalid json + Console.WriteLine("Validating: {0}", crashFile); + checker.DeserializeObject (crashFile); + } + + if (!xmlFileExists) + throw new Exception (String.Format ("Did not produce {0}", xmlFilePath)); + + if (!paramsFileExists) + throw new Exception (String.Format ("Did not produce {0}", paramsFilePath)); + + if (!crashFileExists) + throw new Exception (String.Format ("Did not produce {0}", crashFilePath)); + } + + public static void Main () + { + JsonValidateState (); + JsonValidateMerp (); + } +} diff --git a/mono/tests/testing_gac/Makefile.in b/mono/tests/testing_gac/Makefile.in index 08bf5b0731..6450e2a173 100644 --- a/mono/tests/testing_gac/Makefile.in +++ b/mono/tests/testing_gac/Makefile.in @@ -188,6 +188,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/mono/unit-tests/Makefile.in b/mono/unit-tests/Makefile.in index b42c8d0541..2809feef36 100644 --- a/mono/unit-tests/Makefile.in +++ b/mono/unit-tests/Makefile.in @@ -533,6 +533,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/mono/utils/Makefile.in.REMOVED.git-id b/mono/utils/Makefile.in.REMOVED.git-id index d99cf04024..1a4265700a 100644 --- a/mono/utils/Makefile.in.REMOVED.git-id +++ b/mono/utils/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -3823cf113bebc2c58050be45202d28aff1d460eb \ No newline at end of file +71b2e7107f57cfdb66cab141459f7fb8267f8824 \ No newline at end of file diff --git a/mono/utils/jemalloc/Makefile.in b/mono/utils/jemalloc/Makefile.in index d4df85308f..1fede5af4c 100644 --- a/mono/utils/jemalloc/Makefile.in +++ b/mono/utils/jemalloc/Makefile.in @@ -193,6 +193,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/mono/utils/mono-log-android.c b/mono/utils/mono-log-android.c index fba61f7607..542ce24a2f 100644 --- a/mono/utils/mono-log-android.c +++ b/mono/utils/mono-log-android.c @@ -73,7 +73,7 @@ mono_log_write_logcat (const char *log_domain, GLogLevelFlags level, mono_bool h __android_log_write (apriority, log_domain, message); if (apriority == ANDROID_LOG_FATAL) - abort (); + g_assert_abort (); } /** diff --git a/mono/utils/mono-log-common.c b/mono/utils/mono-log-common.c index dd20f86b13..c3e7cbebb6 100644 --- a/mono/utils/mono-log-common.c +++ b/mono/utils/mono-log-common.c @@ -132,7 +132,7 @@ mono_log_write_logfile (const char *log_domain, GLogLevelFlags level, mono_bool fflush(logFile); if (level & G_LOG_LEVEL_ERROR) - abort(); + g_assert_abort (); } /** diff --git a/mono/utils/mono-log-darwin.c b/mono/utils/mono-log-darwin.c index f5f03bb4bf..d0ba23cb51 100644 --- a/mono/utils/mono-log-darwin.c +++ b/mono/utils/mono-log-darwin.c @@ -38,7 +38,7 @@ mono_log_write_asl (const char *log_domain, GLogLevelFlags level, mono_bool hdr, message); if (level & G_LOG_LEVEL_ERROR) - abort(); + g_assert_abort (); } void diff --git a/mono/utils/mono-log-posix.c b/mono/utils/mono-log-posix.c index a7968265ac..73d8b3283a 100644 --- a/mono/utils/mono-log-posix.c +++ b/mono/utils/mono-log-posix.c @@ -82,7 +82,7 @@ mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, c syslog (mapSyslogLevel(level), "%s", message); if (level & G_LOG_LEVEL_ERROR) - abort(); + g_assert_abort (); } /** diff --git a/mono/utils/mono-log-windows.c b/mono/utils/mono-log-windows.c index a39360398b..db3575a09d 100644 --- a/mono/utils/mono-log-windows.c +++ b/mono/utils/mono-log-windows.c @@ -103,7 +103,7 @@ mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, c fflush(logFile); if (level & G_LOG_LEVEL_ERROR) - abort(); + g_assert_abort (); } /** diff --git a/mono/utils/mono-logger.c b/mono/utils/mono-logger.c index 059814beb9..ba915ae293 100644 --- a/mono/utils/mono-logger.c +++ b/mono/utils/mono-logger.c @@ -9,6 +9,8 @@ #include "mono-compiler.h" #include "mono-logger-internals.h" +#include + typedef struct { GLogLevelFlags level; @@ -545,24 +547,26 @@ mono_dump_mem (gpointer d, int len) guint8 *data = (guint8 *) d; for (int off = 0; off < len; off += 0x10) { - char *line = g_strdup_printf ("%p ", data + off); + g_async_safe_printf("%p ", data + off); for (int i = 0; i < 0x10; i++) { - if ((i + off) >= len) - line = g_strdup_printf ("%s ", line); - else - line = g_strdup_printf ("%s%02x ", line, data [off + i]); + if ((i + off) >= len) { + g_async_safe_printf("%s", " "); + } else { + g_async_safe_printf("%02x ", data [off + i]); + } } - line = g_strdup_printf ("%s ", line); + g_async_safe_printf(" "); for (int i = 0; i < 0x10; i++) { - if ((i + off) >= len) - line = g_strdup_printf ("%s ", line); - else - line = g_strdup_printf ("%s%c", line, conv_ascii_char (data [off + i])); + if ((i + off) >= len) { + g_async_safe_printf("%s", " "); + } else { + g_async_safe_printf("%c", conv_ascii_char (data [off + i])); + } } - mono_runtime_printf_err ("%s", line); + g_async_safe_printf ("\n"); } } diff --git a/mono/utils/mono-merp.c b/mono/utils/mono-merp.c index cb15913491..e5de5e81c0 100644 --- a/mono/utils/mono-merp.c +++ b/mono/utils/mono-merp.c @@ -45,12 +45,19 @@ static const char * os_version_string (void) { #ifdef HAVE_SYS_UTSNAME_H - struct utsname name; + static struct utsname name; + static const char *version_string; - memset (&name, 0, sizeof (name)); // WSL does not always nul terminate. + if (!version_string) { + memset (&name, 0, sizeof (name)); // WSL does not always nul terminate. - if (uname (&name) >= 0) - return g_strdup_printf ("%s", name.release); + if (uname (&name) >= 0) + version_string = name.release; + } + if (!version_string) + version_string = ""; + + return version_string; #endif return ""; } @@ -110,6 +117,7 @@ typedef struct { const char *eventType; MonoStackHash hashes; + GSList *annotations; } MERPStruct; typedef struct { @@ -127,10 +135,16 @@ typedef struct { const char *moduleVersion; gboolean log; + GSList *annotations; } MerpOptions; static MerpOptions config; +typedef struct { + char *key; + char *value; +} MonoMerpAnnotationEntry; + static const char * get_merp_bitness (MerpArch arch) { @@ -226,25 +240,25 @@ mono_merp_write_params (MERPStruct *merp) int handle = g_open (merp->merpFilePath, O_TRUNC | O_WRONLY | O_CREAT, merp_file_permissions); g_assertf (handle != -1, "Could not open MERP file at %s", merp->merpFilePath); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "ApplicationBundleId: %s\n", merp->bundleIDArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "ApplicationVersion: %s\n", merp->versionArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "ApplicationBitness: %s\n", get_merp_bitness (merp->archArg)); + g_async_safe_fprintf(handle, "ApplicationBundleId: %s\n", merp->bundleIDArg); + g_async_safe_fprintf(handle, "ApplicationVersion: %s\n", merp->versionArg); + g_async_safe_fprintf(handle, "ApplicationBitness: %s\n", get_merp_bitness (merp->archArg)); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "ApplicationName: %s\n", merp->serviceNameArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "ApplicationPath: %s\n", merp->servicePathArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "BlameModuleName: %s\n", merp->moduleName); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "BlameModuleVersion: %s\n", merp->moduleVersion); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "BlameModuleOffset: 0x%llx\n", (unsigned long long)merp->moduleOffset); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "ExceptionType: %s\n", get_merp_exctype (merp->exceptionArg)); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "StackChecksum: 0x%llx\n", merp->hashes.offset_free_hash); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "StackHash: 0x%llx\n", merp->hashes.offset_rich_hash); + g_async_safe_fprintf(handle, "ApplicationName: %s\n", merp->serviceNameArg); + g_async_safe_fprintf(handle, "ApplicationPath: %s\n", merp->servicePathArg); + g_async_safe_fprintf(handle, "BlameModuleName: %s\n", merp->moduleName); + g_async_safe_fprintf(handle, "BlameModuleVersion: %s\n", merp->moduleVersion); + g_async_safe_fprintf(handle, "BlameModuleOffset: 0x%llx\n", (unsigned long long)merp->moduleOffset); + g_async_safe_fprintf(handle, "ExceptionType: %s\n", get_merp_exctype (merp->exceptionArg)); + g_async_safe_fprintf(handle, "StackChecksum: 0x%llx\n", merp->hashes.offset_free_hash); + g_async_safe_fprintf(handle, "StackHash: 0x%llx\n", merp->hashes.offset_rich_hash); // Provided by icall - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "OSVersion: %s\n", merp->osVersion); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "LanguageID: 0x%x\n", merp->uiLidArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "SystemManufacturer: %s\n", merp->systemManufacturer); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "SystemModel: %s\n", merp->systemModel); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "EventType: %s\n", merp->eventType); + g_async_safe_fprintf(handle, "OSVersion: %s\n", merp->osVersion); + g_async_safe_fprintf(handle, "LanguageID: 0x%x\n", merp->uiLidArg); + g_async_safe_fprintf(handle, "SystemManufacturer: %s\n", merp->systemManufacturer); + g_async_safe_fprintf(handle, "SystemModel: %s\n", merp->systemModel); + g_async_safe_fprintf(handle, "EventType: %s\n", merp->eventType); close (handle); return TRUE; @@ -310,6 +324,7 @@ get_apple_model (char *buffer, size_t max_length) static void mono_init_merp (const intptr_t crashed_pid, const char *signal, MonoStackHash *hashes, MERPStruct *merp) { + mono_memory_barrier (); g_assert (mono_merp_enabled ()); merp->merpFilePath = config.merpFilePath; @@ -345,6 +360,8 @@ mono_init_merp (const intptr_t crashed_pid, const char *signal, MonoStackHash *h merp->eventType = config.eventType; merp->hashes = *hashes; + + merp->annotations = config.annotations; } static gboolean @@ -353,33 +370,41 @@ mono_merp_write_fingerprint_payload (const char *non_param_data, const MERPStruc int handle = g_open (merp->crashLogPath, O_TRUNC | O_WRONLY | O_CREAT, merp_file_permissions); g_assertf (handle != -1, "Could not open crash log file at %s", merp->crashLogPath); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "{\n"); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\"payload\" : \n"); + g_async_safe_fprintf(handle, "{\n"); + g_async_safe_fprintf(handle, "\t\"payload\" : \n"); g_write (handle, non_param_data, (guint32)strlen (non_param_data)); \ - MOSTLY_ASYNC_SAFE_FPRINTF(handle, ",\n"); + g_async_safe_fprintf(handle, ",\n"); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\"parameters\" : \n{\n"); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"ApplicationBundleId\" : \"%s\",\n", merp->bundleIDArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"ApplicationVersion\" : \"%s\",\n", merp->versionArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"ApplicationBitness\" : \"%s\",\n", get_merp_bitness (merp->archArg)); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"ApplicationName\" : \"%s\",\n", merp->serviceNameArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"BlameModuleName\" : \"%s\",\n", merp->moduleName); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"BlameModuleVersion\" : \"%s\",\n", merp->moduleVersion); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"BlameModuleOffset\" : \"0x%lx\",\n", merp->moduleOffset); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"ExceptionType\" : \"%s\",\n", get_merp_exctype (merp->exceptionArg)); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"StackChecksum\" : \"0x%llx\",\n", merp->hashes.offset_free_hash); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"StackHash\" : \"0x%llx\",\n", merp->hashes.offset_rich_hash); + g_async_safe_fprintf(handle, "\t\"parameters\" : \n{\n"); + g_async_safe_fprintf(handle, "\t\t\"ApplicationBundleId\" : \"%s\",\n", merp->bundleIDArg); + g_async_safe_fprintf(handle, "\t\t\"ApplicationVersion\" : \"%s\",\n", merp->versionArg); + g_async_safe_fprintf(handle, "\t\t\"ApplicationBitness\" : \"%s\",\n", get_merp_bitness (merp->archArg)); + g_async_safe_fprintf(handle, "\t\t\"ApplicationName\" : \"%s\",\n", merp->serviceNameArg); + g_async_safe_fprintf(handle, "\t\t\"BlameModuleName\" : \"%s\",\n", merp->moduleName); + g_async_safe_fprintf(handle, "\t\t\"BlameModuleVersion\" : \"%s\",\n", merp->moduleVersion); + g_async_safe_fprintf(handle, "\t\t\"BlameModuleOffset\" : \"0x%lx\",\n", merp->moduleOffset); + g_async_safe_fprintf(handle, "\t\t\"ExceptionType\" : \"%s\",\n", get_merp_exctype (merp->exceptionArg)); + g_async_safe_fprintf(handle, "\t\t\"StackChecksum\" : \"0x%llx\",\n", merp->hashes.offset_free_hash); + g_async_safe_fprintf(handle, "\t\t\"StackHash\" : \"0x%llx\",\n", merp->hashes.offset_rich_hash); + g_async_safe_fprintf(handle, "\t\t\"Extra\" : \n\t\t{\n"); + + for (GSList *cursor = merp->annotations; cursor; cursor = cursor->next) { + MonoMerpAnnotationEntry *iter = (MonoMerpAnnotationEntry *) cursor->data; + g_async_safe_fprintf(handle, "\t\t\t\"%s\" : \"%s\"\n", iter->key, iter->value); + } + + g_async_safe_fprintf(handle, "\t\t},\n"); // Provided by icall - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"OSVersion\" : \"%s\",\n", merp->osVersion); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"LanguageID\" : \"0x%x\",\n", merp->uiLidArg); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"SystemManufacturer\" : \"%s\",\n", merp->systemManufacturer); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"SystemModel\" : \"%s\",\n", merp->systemModel); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t\t\"EventType\" : \"%s\"\n", merp->eventType); + g_async_safe_fprintf(handle, "\t\t\"OSVersion\" : \"%s\",\n", merp->osVersion); + g_async_safe_fprintf(handle, "\t\t\"LanguageID\" : \"0x%x\",\n", merp->uiLidArg); + g_async_safe_fprintf(handle, "\t\t\"SystemManufacturer\" : \"%s\",\n", merp->systemManufacturer); + g_async_safe_fprintf(handle, "\t\t\"SystemModel\" : \"%s\",\n", merp->systemModel); + g_async_safe_fprintf(handle, "\t\t\"EventType\" : \"%s\"\n", merp->eventType); // End of parameters - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\t}\n"); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "}\n"); + g_async_safe_fprintf(handle, "\t}\n"); + g_async_safe_fprintf(handle, "}\n"); // End of object close (handle); @@ -399,43 +424,43 @@ mono_write_wer_template (MERPStruct *merp) g_assertf (handle != -1, "Could not open WER XML file at %s", merp->werXmlPath); // Provided by icall - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\n"); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\n"); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\n"); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", merp->eventType); + g_async_safe_fprintf(handle, "\n"); + g_async_safe_fprintf(handle, "\n"); + g_async_safe_fprintf(handle, "\n"); + g_async_safe_fprintf(handle, "%s\n", merp->eventType); int i=0; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, merp->bundleIDArg, i); + g_async_safe_fprintf(handle, "%s\n", i, merp->bundleIDArg, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, merp->versionArg, i); + g_async_safe_fprintf(handle, "%s\n", i, merp->versionArg, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, get_merp_bitness (merp->archArg), i); + g_async_safe_fprintf(handle, "%s\n", i, get_merp_bitness (merp->archArg), i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, merp->serviceNameArg, i); + g_async_safe_fprintf(handle, "%s\n", i, merp->serviceNameArg, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, merp->moduleName, i); + g_async_safe_fprintf(handle, "%s\n", i, merp->moduleName, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, merp->moduleVersion, i); + g_async_safe_fprintf(handle, "%s\n", i, merp->moduleVersion, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "0x%zx\n", i, merp->moduleOffset, i); + g_async_safe_fprintf(handle, "0x%zx\n", i, merp->moduleOffset, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, get_merp_exctype (merp->exceptionArg), i); + g_async_safe_fprintf(handle, "%s\n", i, get_merp_exctype (merp->exceptionArg), i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "0x%llx\n", i, merp->hashes.offset_free_hash, i); + g_async_safe_fprintf(handle, "0x%llx\n", i, merp->hashes.offset_free_hash, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "0x%llx\n", i, merp->hashes.offset_rich_hash, i); + g_async_safe_fprintf(handle, "0x%llx\n", i, merp->hashes.offset_rich_hash, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, merp->osVersion, i); + g_async_safe_fprintf(handle, "%s\n", i, merp->osVersion, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "0x%x\n", i, merp->uiLidArg, i); + g_async_safe_fprintf(handle, "0x%x\n", i, merp->uiLidArg, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, merp->systemManufacturer, i); + g_async_safe_fprintf(handle, "%s\n", i, merp->systemManufacturer, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "%s\n", i, merp->systemModel, i); + g_async_safe_fprintf(handle, "%s\n", i, merp->systemModel, i); i++; - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\n"); - MOSTLY_ASYNC_SAFE_FPRINTF(handle, "\n"); + g_async_safe_fprintf(handle, "\n"); + g_async_safe_fprintf(handle, "\n"); close (handle); @@ -446,34 +471,54 @@ mono_write_wer_template (MERPStruct *merp) gboolean mono_merp_invoke (const intptr_t crashed_pid, const char *signal, const char *non_param_data, MonoStackHash *hashes) { - MERPStruct merp; - memset (&merp, 0, sizeof (merp)); + MonoStateMem mem; + int merp_tmp_file_tag = 2; + gboolean alloc_success = mono_state_alloc_mem (&mem, merp_tmp_file_tag, sizeof (MERPStruct)); + if (!alloc_success) + return FALSE; + + MERPStruct *merp = (MERPStruct *) mem.mem; + memset (merp, 0, sizeof (*merp)); mono_summarize_timeline_phase_log (MonoSummaryMerpWriter); - mono_init_merp (crashed_pid, signal, hashes, &merp); - if (!mono_merp_write_params (&merp)) + mono_init_merp (crashed_pid, signal, hashes, merp); + + if (!mono_merp_write_params (merp)) return FALSE; - if (!mono_merp_write_fingerprint_payload (non_param_data, &merp)) + if (!mono_merp_write_fingerprint_payload (non_param_data, merp)) return FALSE; - if (!mono_write_wer_template (&merp)) + if (!mono_write_wer_template (merp)) return FALSE; // Start program mono_summarize_timeline_phase_log (MonoSummaryMerpInvoke); - gboolean success = mono_merp_send (&merp); + gboolean success = mono_merp_send (merp); if (success) mono_summarize_timeline_phase_log (MonoSummaryCleanup); + mono_state_free_mem (&mem); + return success; } +void +mono_merp_add_annotation (const char *key, const char *value) +{ + MonoMerpAnnotationEntry *entry = g_new0 (MonoMerpAnnotationEntry, 1); + entry->key = g_strdup (key); + entry->value = g_strdup (value); + config.annotations = g_slist_prepend (config.annotations, entry); +} + void mono_merp_disable (void) { + mono_memory_barrier (); + if (!config.enable_merp) return; @@ -484,12 +529,17 @@ mono_merp_disable (void) g_free ((char*)config.eventType); g_free ((char*)config.appPath); g_free ((char*)config.moduleVersion); + g_slist_free (config.annotations); memset (&config, 0, sizeof (config)); + + mono_memory_barrier (); } void mono_merp_enable (const char *appBundleID, const char *appSignature, const char *appVersion, const char *merpGUIPath, const char *eventType, const char *appPath, const char *configDir) { + mono_memory_barrier (); + g_assert (!config.enable_merp); char *prefix = NULL; @@ -517,6 +567,8 @@ mono_merp_enable (const char *appBundleID, const char *appSignature, const char config.log = g_getenv ("MONO_MERP_VERBOSE") != NULL; config.enable_merp = TRUE; + + mono_memory_barrier (); } gboolean diff --git a/mono/utils/mono-merp.h b/mono/utils/mono-merp.h index 292e28bb0c..ff5f58e1ed 100644 --- a/mono/utils/mono-merp.h +++ b/mono/utils/mono-merp.h @@ -51,6 +51,8 @@ gboolean mono_merp_enabled (void); gboolean mono_merp_invoke (const intptr_t crashed_pid, const char *signal, const char *dump_file, MonoStackHash *hashes); +void +mono_merp_add_annotation (const char *key, const char *value); #endif // TARGET_OSX diff --git a/mono/utils/mono-proclib.c b/mono/utils/mono-proclib.c index 328f84a333..3e288efb73 100644 --- a/mono/utils/mono-proclib.c +++ b/mono/utils/mono-proclib.c @@ -20,6 +20,10 @@ #include #endif +#include +#include +#include + #if defined(_POSIX_VERSION) #ifdef HAVE_SYS_ERRNO_H #include @@ -967,6 +971,124 @@ mono_atexit (void (*func)(void)) #endif } +#ifndef HOST_WIN32 + +gboolean +mono_pe_file_time_date_stamp (gunichar2 *filename, guint32 *out) +{ + void *map_handle; + gint32 map_size; + gpointer file_map = mono_pe_file_map (filename, &map_size, &map_handle); + if (!file_map) + return FALSE; + + /* Figure this out when we support 64bit PE files */ + if (1) { + IMAGE_DOS_HEADER *dos_header = (IMAGE_DOS_HEADER *)file_map; + if (dos_header->e_magic != IMAGE_DOS_SIGNATURE) { + mono_pe_file_unmap (file_map, map_handle); + return FALSE; + } + + IMAGE_NT_HEADERS32 *nt_headers = (IMAGE_NT_HEADERS32 *)((guint8 *)file_map + GUINT32_FROM_LE (dos_header->e_lfanew)); + if (nt_headers->Signature != IMAGE_NT_SIGNATURE) { + mono_pe_file_unmap (file_map, map_handle); + return FALSE; + } + + *out = nt_headers->FileHeader.TimeDateStamp; + } else { + g_assert_not_reached (); + } + + mono_pe_file_unmap (file_map, map_handle); + return TRUE; +} + +gpointer +mono_pe_file_map (gunichar2 *filename, gint32 *map_size, void **handle) +{ + gchar *filename_ext = NULL; + gchar *located_filename = NULL; + int fd = -1; + struct stat statbuf; + gpointer file_map = NULL; + + /* According to the MSDN docs, a search path is applied to + * filename. FIXME: implement this, for now just pass it + * straight to open + */ + + filename_ext = mono_unicode_to_external (filename); + if (filename_ext == NULL) { + g_async_safe_printf ("%s: unicode conversion returned NULL", __func__); + + goto exit; + } + + fd = open (filename_ext, O_RDONLY, 0); + if (fd == -1 && (errno == ENOENT || errno == ENOTDIR) && IS_PORTABILITY_SET) { + gint saved_errno = errno; + + located_filename = mono_portability_find_file (filename_ext, TRUE); + if (!located_filename) { + errno = saved_errno; + + g_async_safe_printf ("%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno)); + goto error; + } + + fd = open (located_filename, O_RDONLY, 0); + if (fd == -1) { + g_async_safe_printf ("%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno)); + goto error; + } + } + else if (fd == -1) { + g_async_safe_printf ("%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno)); + goto error; + } + + if (fstat (fd, &statbuf) == -1) { + g_async_safe_printf ("%s: Error stat()ing file %s: %s", __func__, filename_ext, strerror (errno)); + goto error; + } + *map_size = statbuf.st_size; + + /* Check basic file size */ + if (statbuf.st_size < sizeof(IMAGE_DOS_HEADER)) { + g_async_safe_printf ("%s: File %s is too small: %lld", __func__, filename_ext, (long long) statbuf.st_size); + + goto exit; + } + + file_map = mono_file_map (statbuf.st_size, MONO_MMAP_READ | MONO_MMAP_PRIVATE, fd, 0, handle); + if (file_map == NULL) { + g_async_safe_printf ("%s: Error mmap()int file %s: %s", __func__, filename_ext, strerror (errno)); + goto error; + } +exit: + if (fd != -1) + close (fd); + g_free (located_filename); + g_free (filename_ext); + return file_map; +error: + goto exit; +} + +void +mono_pe_file_unmap (gpointer file_map, void *handle) +{ + gint res; + + res = mono_file_unmap (file_map, handle); + if (G_UNLIKELY (res != 0)) + g_error ("%s: mono_file_unmap failed, error: \"%s\" (%d)", __func__, g_strerror (errno), errno); +} + +#endif /* HOST_WIN32 */ + /* * This function returns the cpu usage in percentage, * normalized on the number of cores. diff --git a/mono/utils/mono-proclib.h b/mono/utils/mono-proclib.h index 356a1ab7e0..ba95b94b93 100644 --- a/mono/utils/mono-proclib.h +++ b/mono/utils/mono-proclib.h @@ -78,5 +78,261 @@ gint32 mono_cpu_usage (MonoCpuUsageState *prev); int mono_atexit (void (*func)(void)); +#ifndef HOST_WIN32 + +#include +#include + +#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 + +#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 +#define IMAGE_DIRECTORY_ENTRY_IMPORT 1 +#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 + +#define IMAGE_SIZEOF_SHORT_NAME 8 + +#if G_BYTE_ORDER != G_LITTLE_ENDIAN +#define IMAGE_DOS_SIGNATURE 0x4d5a +#define IMAGE_NT_SIGNATURE 0x50450000 +#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0xb10 +#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0xb20 +#else +#define IMAGE_DOS_SIGNATURE 0x5a4d +#define IMAGE_NT_SIGNATURE 0x00004550 +#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b +#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b +#endif + +typedef struct { + guint16 e_magic; + guint16 e_cblp; + guint16 e_cp; + guint16 e_crlc; + guint16 e_cparhdr; + guint16 e_minalloc; + guint16 e_maxalloc; + guint16 e_ss; + guint16 e_sp; + guint16 e_csum; + guint16 e_ip; + guint16 e_cs; + guint16 e_lfarlc; + guint16 e_ovno; + guint16 e_res[4]; + guint16 e_oemid; + guint16 e_oeminfo; + guint16 e_res2[10]; + guint32 e_lfanew; +} IMAGE_DOS_HEADER; + +typedef struct { + guint16 Machine; + guint16 NumberOfSections; + guint32 TimeDateStamp; + guint32 PointerToSymbolTable; + guint32 NumberOfSymbols; + guint16 SizeOfOptionalHeader; + guint16 Characteristics; +} IMAGE_FILE_HEADER; + +typedef struct { + guint32 VirtualAddress; + guint32 Size; +} IMAGE_DATA_DIRECTORY; + +typedef struct { + guint16 Magic; + guint8 MajorLinkerVersion; + guint8 MinorLinkerVersion; + guint32 SizeOfCode; + guint32 SizeOfInitializedData; + guint32 SizeOfUninitializedData; + guint32 AddressOfEntryPoint; + guint32 BaseOfCode; + guint32 BaseOfData; + guint32 ImageBase; + guint32 SectionAlignment; + guint32 FileAlignment; + guint16 MajorOperatingSystemVersion; + guint16 MinorOperatingSystemVersion; + guint16 MajorImageVersion; + guint16 MinorImageVersion; + guint16 MajorSubsystemVersion; + guint16 MinorSubsystemVersion; + guint32 Win32VersionValue; + guint32 SizeOfImage; + guint32 SizeOfHeaders; + guint32 CheckSum; + guint16 Subsystem; + guint16 DllCharacteristics; + guint32 SizeOfStackReserve; + guint32 SizeOfStackCommit; + guint32 SizeOfHeapReserve; + guint32 SizeOfHeapCommit; + guint32 LoaderFlags; + guint32 NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +} IMAGE_OPTIONAL_HEADER32; + +typedef struct { + guint16 Magic; + guint8 MajorLinkerVersion; + guint8 MinorLinkerVersion; + guint32 SizeOfCode; + guint32 SizeOfInitializedData; + guint32 SizeOfUninitializedData; + guint32 AddressOfEntryPoint; + guint32 BaseOfCode; + guint64 ImageBase; + guint32 SectionAlignment; + guint32 FileAlignment; + guint16 MajorOperatingSystemVersion; + guint16 MinorOperatingSystemVersion; + guint16 MajorImageVersion; + guint16 MinorImageVersion; + guint16 MajorSubsystemVersion; + guint16 MinorSubsystemVersion; + guint32 Win32VersionValue; + guint32 SizeOfImage; + guint32 SizeOfHeaders; + guint32 CheckSum; + guint16 Subsystem; + guint16 DllCharacteristics; + guint64 SizeOfStackReserve; + guint64 SizeOfStackCommit; + guint64 SizeOfHeapReserve; + guint64 SizeOfHeapCommit; + guint32 LoaderFlags; + guint32 NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +} IMAGE_OPTIONAL_HEADER64; + +#if SIZEOF_VOID_P == 8 +typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER; +#else +typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER; +#endif + +typedef struct { + guint32 Signature; + IMAGE_FILE_HEADER FileHeader; + IMAGE_OPTIONAL_HEADER32 OptionalHeader; +} IMAGE_NT_HEADERS32; + +typedef struct { + guint32 Signature; + IMAGE_FILE_HEADER FileHeader; + IMAGE_OPTIONAL_HEADER64 OptionalHeader; +} IMAGE_NT_HEADERS64; + +#if SIZEOF_VOID_P == 8 +typedef IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS; +#else +typedef IMAGE_NT_HEADERS32 IMAGE_NT_HEADERS; +#endif + +typedef struct { + guint8 Name[IMAGE_SIZEOF_SHORT_NAME]; + union { + guint32 PhysicalAddress; + guint32 VirtualSize; + } Misc; + guint32 VirtualAddress; + guint32 SizeOfRawData; + guint32 PointerToRawData; + guint32 PointerToRelocations; + guint32 PointerToLinenumbers; + guint16 NumberOfRelocations; + guint16 NumberOfLinenumbers; + guint32 Characteristics; +} IMAGE_SECTION_HEADER; + +#define IMAGE_FIRST_SECTION32(header) ((IMAGE_SECTION_HEADER *)((gsize)(header) + G_STRUCT_OFFSET (IMAGE_NT_HEADERS32, OptionalHeader) + GUINT16_FROM_LE (((IMAGE_NT_HEADERS32 *)(header))->FileHeader.SizeOfOptionalHeader))) + +#define RT_CURSOR 0x01 +#define RT_BITMAP 0x02 +#define RT_ICON 0x03 +#define RT_MENU 0x04 +#define RT_DIALOG 0x05 +#define RT_STRING 0x06 +#define RT_FONTDIR 0x07 +#define RT_FONT 0x08 +#define RT_ACCELERATOR 0x09 +#define RT_RCDATA 0x0a +#define RT_MESSAGETABLE 0x0b +#define RT_GROUP_CURSOR 0x0c +#define RT_GROUP_ICON 0x0e +#define RT_VERSION 0x10 +#define RT_DLGINCLUDE 0x11 +#define RT_PLUGPLAY 0x13 +#define RT_VXD 0x14 +#define RT_ANICURSOR 0x15 +#define RT_ANIICON 0x16 +#define RT_HTML 0x17 +#define RT_MANIFEST 0x18 + +typedef struct { + guint32 Characteristics; + guint32 TimeDateStamp; + guint16 MajorVersion; + guint16 MinorVersion; + guint16 NumberOfNamedEntries; + guint16 NumberOfIdEntries; +} IMAGE_RESOURCE_DIRECTORY; + +typedef struct { + union { + struct { +#if G_BYTE_ORDER == G_BIG_ENDIAN + guint32 NameIsString:1; + guint32 NameOffset:31; +#else + guint32 NameOffset:31; + guint32 NameIsString:1; +#endif + }; + guint32 Name; +#if G_BYTE_ORDER == G_BIG_ENDIAN + struct { + guint16 __wapi_big_endian_padding; + guint16 Id; + }; +#else + guint16 Id; +#endif + }; + union { + guint32 OffsetToData; + struct { +#if G_BYTE_ORDER == G_BIG_ENDIAN + guint32 DataIsDirectory:1; + guint32 OffsetToDirectory:31; +#else + guint32 OffsetToDirectory:31; + guint32 DataIsDirectory:1; +#endif + }; + }; +} IMAGE_RESOURCE_DIRECTORY_ENTRY; + +typedef struct { + guint32 OffsetToData; + guint32 Size; + guint32 CodePage; + guint32 Reserved; +} IMAGE_RESOURCE_DATA_ENTRY; + + + +gboolean +mono_pe_file_time_date_stamp (gunichar2 *filename, guint32 *out); + +gpointer +mono_pe_file_map (gunichar2 *filename, gint32 *map_size, void **handle); + +void +mono_pe_file_unmap (gpointer file_map, void *handle); +#endif /* HOST_WIN32 */ + #endif /* __MONO_PROC_LIB_H__ */ diff --git a/mono/utils/mono-state.c b/mono/utils/mono-state.c index 32ec48579c..fb9c3efaad 100644 --- a/mono/utils/mono-state.c +++ b/mono/utils/mono-state.c @@ -36,6 +36,86 @@ extern GCStats mono_gc_stats; #include #include +#ifdef HAVE_SYS_MMAN_H +#include +#endif + +#ifdef HAVE_EXECINFO_H +#include +#endif + +// Fixme: put behind preprocessor symbol? +static void +assert_not_reached_mem (const char *msg) +{ + g_async_safe_printf ("%s\n", msg); + +#if 0 + pid_t crashed_pid = getpid (); + // Break here + g_async_safe_printf ("Attach to PID %d. Supervisor thread will signal us shortly.\n", crashed_pid); + while (TRUE) { + // Sleep for 1 second. + g_usleep (1000 * 1000); + } +#endif + + g_error (msg); +} + +static void +assert_not_reached_fn_ptr_free (gpointer ptr) +{ + // Wrap the macro to provide as a function pointer + assert_not_reached_mem ("Attempted to call free during merp dump"); +} + +static gpointer +assert_not_reached_fn_ptr_malloc (gsize size) +{ + // Wrap the macro to provide as a function pointer + assert_not_reached_mem ("Attempted to call malloc during merp dump"); + return NULL; +} + +static gpointer +assert_not_reached_fn_ptr_realloc (gpointer obj, gsize size) +{ + // Wrap the macro to provide as a function pointer + assert_not_reached_mem ("Attempted to call realloc during merp dump"); + return NULL; +} + +static gpointer +assert_not_reached_fn_ptr_calloc (gsize n, gsize x) +{ + // Wrap the macro to provide as a function pointer + assert_not_reached_mem ("Attempted to call calloc during merp dump"); + return NULL; +} + +void +mono_summarize_toggle_assertions (gboolean enable) +{ +#if defined(ENABLE_CHECKED_BUILD_CRASH_REPORTING) && defined (ENABLE_OVERRIDABLE_ALLOCATORS) + static GMemVTable g_mem_vtable_backup; + static gboolean saved; + + if (enable) { + g_mem_get_vtable (&g_mem_vtable_backup); + saved = TRUE; + + GMemVTable g_mem_vtable_assert = { assert_not_reached_fn_ptr_malloc, assert_not_reached_fn_ptr_realloc, assert_not_reached_fn_ptr_free, assert_not_reached_fn_ptr_calloc }; + g_mem_set_vtable (&g_mem_vtable_assert); + } else if (saved) { + g_mem_set_vtable (&g_mem_vtable_backup); + saved = FALSE; + } + + mono_memory_barrier (); +#endif +} + typedef struct { const char *directory; MonoSummaryStage level; @@ -98,12 +178,18 @@ mono_summarize_timeline_phase_log (MonoSummaryStage next) out_level = MonoSummarySuspendHandshake; break; case MonoSummarySuspendHandshake: - out_level = MonoSummaryDumpTraversal; + out_level = MonoSummaryUnmanagedStacks; break; - case MonoSummaryDumpTraversal: + case MonoSummaryUnmanagedStacks: + out_level = MonoSummaryManagedStacks; + break; + case MonoSummaryManagedStacks: out_level = MonoSummaryStateWriter; break; case MonoSummaryStateWriter: + out_level = MonoSummaryStateWriterDone; + break; + case MonoSummaryStateWriterDone: #ifdef TARGET_OSX if (mono_merp_enabled ()) { out_level = MonoSummaryMerpWriter; @@ -124,10 +210,10 @@ mono_summarize_timeline_phase_log (MonoSummaryStage next) break; case MonoSummaryDone: - MOSTLY_ASYNC_SAFE_PRINTF ("Trying to log crash reporter timeline, already at done %d\n", log.level); + g_async_safe_printf ("Trying to log crash reporter timeline, already at done %d\n", log.level); return; default: - MOSTLY_ASYNC_SAFE_PRINTF ("Trying to log crash reporter timeline, illegal state %d\n", log.level); + g_async_safe_printf ("Trying to log crash reporter timeline, illegal state %d\n", log.level); return; } @@ -154,6 +240,62 @@ mono_summarize_timeline_phase_log (MonoSummaryStage next) return; } +static void +mem_file_name (long tag, char *name, size_t limit) +{ + name [0] = '\0'; + pid_t pid = getpid (); + g_snprintf (name, limit, "mono_crash.mem.%d.%lx.blob", pid, tag); +} + +gboolean +mono_state_alloc_mem (MonoStateMem *mem, long tag, size_t size) +{ + char name [100]; + mem_file_name (tag, name, sizeof (name)); + + memset (mem, 0, sizeof (*mem)); + mem->tag = tag; + mem->size = size; + + mem->handle = g_open (name, O_RDWR | O_CREAT | O_EXCL, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); + if (mem->handle < 1) + return FALSE; + + lseek (mem->handle, mem->size, SEEK_SET); + g_write (mem->handle, "", 1); + + mem->mem = (gpointer *) mmap (0, mem->size, PROT_READ | PROT_WRITE, MAP_SHARED, mem->handle, 0); + if (mem->mem == GINT_TO_POINTER (-1)) + g_assert_not_reached (); + + return TRUE; +} + +void +mono_state_free_mem (MonoStateMem *mem) +{ + if (!mem->mem) + return; + + msync(mem->mem, mem->size, MS_SYNC); + munmap (mem->mem, mem->size); + + // Note: We aren't calling msync on this file. + // There is no guarantee that we're going to persist + // changes to it at all, in the case that we fail before + // removing it. Don't try to debug where in the crash we were + // by the file contents. + if (mem->handle) + close (mem->handle); + else + g_async_safe_printf ("NULL handle mono-state mem on freeing\n"); + + char name [100]; + mem_file_name (mem->tag, name, sizeof (name)); + unlink (name); +} + static gboolean timeline_has_level (const char *directory, char *log_file, size_t log_file_size, gboolean clear, MonoSummaryStage stage) { @@ -171,13 +313,21 @@ mono_summarize_timeline_read_level (const char *directory, gboolean clear) { char out_file [200]; + if (!directory) + directory = log.directory; + + if (!directory) + return MonoSummaryNone; + // Make sure that clear gets to erase all of these files if they exist gboolean has_level_done = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryDone); gboolean has_level_cleanup = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryCleanup); gboolean has_level_merp_invoke = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryMerpInvoke); gboolean has_level_merp_writer = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryMerpWriter); gboolean has_level_state_writer = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryStateWriter); - gboolean has_level_dump_traversal = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryDumpTraversal); + gboolean has_level_state_writer_done = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryStateWriterDone); + gboolean has_level_managed_stacks = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryManagedStacks); + gboolean has_level_unmanaged_stacks = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummaryUnmanagedStacks); gboolean has_level_suspend_handshake = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummarySuspendHandshake); gboolean has_level_setup = timeline_has_level (directory, out_file, sizeof(out_file), clear, MonoSummarySetup); @@ -189,10 +339,14 @@ mono_summarize_timeline_read_level (const char *directory, gboolean clear) return MonoSummaryMerpInvoke; else if (has_level_merp_writer) return MonoSummaryMerpWriter; + else if (has_level_state_writer_done) + return MonoSummaryStateWriterDone; else if (has_level_state_writer) return MonoSummaryStateWriter; - else if (has_level_dump_traversal) - return MonoSummaryDumpTraversal; + else if (has_level_managed_stacks) + return MonoSummaryManagedStacks; + else if (has_level_unmanaged_stacks) + return MonoSummaryUnmanagedStacks; else if (has_level_suspend_handshake) return MonoSummarySuspendHandshake; else if (has_level_setup) @@ -201,11 +355,6 @@ mono_summarize_timeline_read_level (const char *directory, gboolean clear) return MonoSummaryNone; } -#define MONO_MAX_SUMMARY_LEN 500000 -static gchar static_dump_str [MONO_MAX_SUMMARY_LEN]; - -static MonoStateWriter static_writer; - static void assert_has_space (MonoStateWriter *writer) { @@ -324,6 +473,21 @@ mono_native_state_add_frame (MonoStateWriter *writer, MonoFrameSummary *frame) } #endif + assert_has_space (writer); + mono_state_writer_indent (writer); + mono_state_writer_object_key (writer, "filename"); + mono_state_writer_printf(writer, "\"%s\",\n", frame->managed_data.filename); + + assert_has_space (writer); + mono_state_writer_indent (writer); + mono_state_writer_object_key (writer, "sizeofimage"); + mono_state_writer_printf(writer, "\"0x%x\",\n", frame->managed_data.image_size); + + assert_has_space (writer); + mono_state_writer_indent (writer); + mono_state_writer_object_key (writer, "timestamp"); + mono_state_writer_printf(writer, "\"0x%x\",\n", frame->managed_data.time_date_stamp); + assert_has_space (writer); mono_state_writer_indent (writer); mono_state_writer_object_key (writer, "il_offset"); @@ -416,13 +580,18 @@ mono_native_state_add_thread (MonoStateWriter *writer, MonoThreadSummary *thread assert_has_space (writer); mono_state_writer_indent (writer); - mono_state_writer_object_key (writer, "crashed"); - mono_state_writer_printf(writer, "%s,\n", crashing_thread ? "true" : "false"); + mono_state_writer_object_key (writer, "offset_free_hash"); + mono_state_writer_printf(writer, "\"0x%" PRIx64 "\",\n", thread->hashes.offset_free_hash); assert_has_space (writer); mono_state_writer_indent (writer); - mono_state_writer_object_key (writer, "managed_thread_ptr"); - mono_state_writer_printf(writer, "\"0x%" PRIx64 "\",\n", (guint64) thread->managed_thread_ptr); + mono_state_writer_object_key (writer, "offset_rich_hash"); + mono_state_writer_printf(writer, "\"0x%" PRIx64 "\",\n", thread->hashes.offset_rich_hash); + + assert_has_space (writer); + mono_state_writer_indent (writer); + mono_state_writer_object_key (writer, "crashed"); + mono_state_writer_printf(writer, "%s,\n", crashing_thread ? "true" : "false"); assert_has_space (writer); mono_state_writer_indent (writer); @@ -542,8 +711,6 @@ mono_native_state_add_ee_info (MonoStateWriter *writer) #define MONO_ARCHITECTURE MONO_ARCH_ARCHITECTURE #endif -static char *mono_runtime_build_info; - static void mono_native_state_add_version (MonoStateWriter *writer) { @@ -556,9 +723,7 @@ mono_native_state_add_version (MonoStateWriter *writer) assert_has_space (writer); mono_state_writer_indent (writer); mono_state_writer_object_key (writer, "version"); - if (!mono_runtime_build_info) - mono_runtime_build_info = mono_get_runtime_callbacks ()->get_runtime_build_info (); - mono_state_writer_printf(writer, "\"%s\",\n", mono_runtime_build_info); + mono_state_writer_printf(writer, "\"(%s) (%s)\",\n", VERSION, mono_get_runtime_callbacks ()->get_runtime_build_version ()); assert_has_space (writer); mono_state_writer_indent (writer); @@ -813,28 +978,24 @@ mono_state_writer_init (MonoStateWriter *writer, gchar *output_str, int len) } void -mono_summarize_native_state_begin (gchar *mem, int size) +mono_summarize_native_state_begin (MonoStateWriter *writer, gchar *mem, int size) { - // Shared global mutable memory, only use when VM crashing - if (!mem) - mono_state_writer_init (&static_writer, static_dump_str, MONO_MAX_SUMMARY_LEN); - else - mono_state_writer_init (&static_writer, mem, size); - - mono_native_state_init (&static_writer); + g_assert (mem); + mono_state_writer_init (writer, mem, size); + mono_native_state_init (writer); } char * -mono_summarize_native_state_end (void) +mono_summarize_native_state_end (MonoStateWriter *writer) { - return mono_native_state_emit (&static_writer); + return mono_native_state_emit (writer); } void -mono_summarize_native_state_add_thread (MonoThreadSummary *thread, MonoContext *ctx, gboolean crashing_thread) +mono_summarize_native_state_add_thread (MonoStateWriter *writer, MonoThreadSummary *thread, MonoContext *ctx, gboolean crashing_thread) { static gboolean not_first_thread = FALSE; - mono_native_state_add_thread (&static_writer, thread, ctx, !not_first_thread, crashing_thread); + mono_native_state_add_thread (writer, thread, ctx, !not_first_thread, crashing_thread); not_first_thread = TRUE; } diff --git a/mono/utils/mono-state.h b/mono/utils/mono-state.h index 8cc1dd12c5..6ab3a8cfeb 100644 --- a/mono/utils/mono-state.h +++ b/mono/utils/mono-state.h @@ -21,17 +21,19 @@ #define MONO_NATIVE_STATE_PROTOCOL_VERSION "0.0.2" typedef enum { - MonoSummaryNone = 0, - MonoSummarySetup = 1, - MonoSummarySuspendHandshake = 2, - MonoSummaryDumpTraversal = 3, - MonoSummaryStateWriter = 4, - MonoSummaryMerpWriter = 5, - MonoSummaryMerpInvoke = 6, - MonoSummaryCleanup = 7, - MonoSummaryDone = 8, + MonoSummaryNone, + MonoSummarySetup, + MonoSummarySuspendHandshake, + MonoSummaryUnmanagedStacks, + MonoSummaryManagedStacks, + MonoSummaryStateWriter, + MonoSummaryStateWriterDone, + MonoSummaryMerpWriter, + MonoSummaryMerpInvoke, + MonoSummaryCleanup, + MonoSummaryDone, - MonoSummaryDoubleFault = 9 + MonoSummaryDoubleFault } MonoSummaryStage; typedef struct { @@ -41,6 +43,15 @@ typedef struct { int indent; } MonoStateWriter; +typedef struct { + gpointer *mem; + gsize size; + + // File Information + gint handle; + gint64 tag; +} MonoStateMem; + MONO_BEGIN_DECLS // Logging @@ -59,6 +70,11 @@ mono_summarize_double_fault_log (void); MonoSummaryStage mono_summarize_timeline_read_level (const char *directory, gboolean clear); +// Enable checked-build assertions on summary workflow +// Turns all potential hangs into instant faults +void +mono_summarize_toggle_assertions (gboolean enable); + // Json State Writer /* @@ -66,13 +82,13 @@ mono_summarize_timeline_read_level (const char *directory, gboolean clear); */ void -mono_summarize_native_state_begin (char *mem, int size); +mono_summarize_native_state_begin (MonoStateWriter *writer, gchar *mem, int size); char * -mono_summarize_native_state_end (void); +mono_summarize_native_state_end (MonoStateWriter *writer); void -mono_summarize_native_state_add_thread (MonoThreadSummary *thread, MonoContext *ctx, gboolean crashing_thread); +mono_summarize_native_state_add_thread (MonoStateWriter *writer, MonoThreadSummary *thread, MonoContext *ctx, gboolean crashing_thread); /* * These use memory from the caller @@ -95,7 +111,14 @@ mono_native_state_add_thread (MonoStateWriter *writer, MonoThreadSummary *thread void mono_crash_dump (const char *jsonFile, MonoStackHash *hashes); +// Signal-safe file allocators + +gboolean +mono_state_alloc_mem (MonoStateMem *mem, long tag, size_t size); + +void +mono_state_free_mem (MonoStateMem *mem); + MONO_END_DECLS #endif // DISABLE_CRASH_REPORTING - #endif // MONO_UTILS_NATIVE_STATE diff --git a/mono/utils/mono-threads-debug.h b/mono/utils/mono-threads-debug.h index 366e20f2d7..faf077a342 100644 --- a/mono/utils/mono-threads-debug.h +++ b/mono/utils/mono-threads-debug.h @@ -5,12 +5,12 @@ #ifndef __MONO_UTILS_MONO_THREADS_DEBUG_H__ #define __MONO_UTILS_MONO_THREADS_DEBUG_H__ +#include +#include + /* Logging - enable them below if you need specific logging for the category you need */ #define MOSTLY_ASYNC_SAFE_FPRINTF(handle, ...) do { \ - char __buff[1024]; \ - __buff [0] = '\0'; \ - g_snprintf (__buff, sizeof(__buff), __VA_ARGS__); \ - g_write (handle, __buff, (guint32)strlen (__buff)); \ + g_async_safe_fprintf (handle, __VA_ARGS__); \ } while (0) #define MOSTLY_ASYNC_SAFE_PRINTF(...) MOSTLY_ASYNC_SAFE_FPRINTF(1, __VA_ARGS__); diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c index 21a28132e7..715294cebb 100644 --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@ -270,26 +270,26 @@ dump_threads (void) { MonoThreadInfo *cur = mono_thread_info_current (); - MOSTLY_ASYNC_SAFE_PRINTF ("STATE CUE CARD: (? means a positive number, usually 1 or 2, * means any number)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x0\t- starting (GOOD, unless the thread is running managed code)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x1\t- detached (GOOD, unless the thread is running managed code)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x2\t- running (BAD, unless it's the gc thread)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x?03\t- async suspended (GOOD)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x?04\t- self suspended (GOOD)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x?05\t- async suspend requested (BAD)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x6\t- blocking (BAD, unless there's no suspend initiator)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x?07\t- blocking async suspended (GOOD)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x?08\t- blocking self suspended (GOOD)\n"); - MOSTLY_ASYNC_SAFE_PRINTF ("\t0x?09\t- blocking suspend requested (BAD in coop; GOOD in hybrid)\n"); + g_async_safe_printf ("STATE CUE CARD: (? means a positive number, usually 1 or 2, * means any number)\n"); + g_async_safe_printf ("\t0x0\t- starting (GOOD, unless the thread is running managed code)\n"); + g_async_safe_printf ("\t0x1\t- detached (GOOD, unless the thread is running managed code)\n"); + g_async_safe_printf ("\t0x2\t- running (BAD, unless it's the gc thread)\n"); + g_async_safe_printf ("\t0x?03\t- async suspended (GOOD)\n"); + g_async_safe_printf ("\t0x?04\t- self suspended (GOOD)\n"); + g_async_safe_printf ("\t0x?05\t- async suspend requested (BAD)\n"); + g_async_safe_printf ("\t0x6\t- blocking (BAD, unless there's no suspend initiator)\n"); + g_async_safe_printf ("\t0x?07\t- blocking async suspended (GOOD)\n"); + g_async_safe_printf ("\t0x?08\t- blocking self suspended (GOOD)\n"); + g_async_safe_printf ("\t0x?09\t- blocking suspend requested (BAD in coop; GOOD in hybrid)\n"); FOREACH_THREAD_SAFE_ALL (info) { #ifdef TARGET_MACH char thread_name [256] = { 0 }; pthread_getname_np (mono_thread_info_get_tid (info), thread_name, 255); - MOSTLY_ASYNC_SAFE_PRINTF ("--thread %p id %p [%p] (%s) state %x %s\n", info, (void *) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, thread_name, info->thread_state, info == cur ? "GC INITIATOR" : "" ); + g_async_safe_printf ("--thread %p id %p [%p] (%s) state %x %s\n", info, (void *) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, thread_name, info->thread_state, info == cur ? "GC INITIATOR" : "" ); #else - MOSTLY_ASYNC_SAFE_PRINTF ("--thread %p id %p [%p] state %x %s\n", info, (void *) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, info->thread_state, info == cur ? "GC INITIATOR" : "" ); + g_async_safe_printf ("--thread %p id %p [%p] state %x %s\n", info, (void *) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, info->thread_state, info == cur ? "GC INITIATOR" : "" ); #endif } FOREACH_THREAD_SAFE_END } @@ -314,7 +314,7 @@ mono_threads_wait_pending_operations (void) dump_threads (); - MOSTLY_ASYNC_SAFE_PRINTF ("WAITING for %d threads, got %d suspended\n", (int)pending_suspends, i); + g_async_safe_printf ("WAITING for %d threads, got %d suspended\n", (int)pending_suspends, i); g_error ("suspend_thread suspend took %d ms, which is more than the allowed %d ms", (int)mono_stopwatch_elapsed_ms (&suspension_time), sleepAbortDuration); } mono_stopwatch_stop (&suspension_time); diff --git a/msvc/Makefile.in b/msvc/Makefile.in index 390e393075..230bab4fca 100644 --- a/msvc/Makefile.in +++ b/msvc/Makefile.in @@ -186,6 +186,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/po/Makefile.in b/po/Makefile.in index 07cee47e60..319bba5111 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -246,6 +246,7 @@ GTKX11 = @GTKX11@ HAVE_ALLOCA_H = @HAVE_ALLOCA_H@ HAVE_MSGFMT = @HAVE_MSGFMT@ HAVE_NINJA = @HAVE_NINJA@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index 7c1de73999db28fbfa813e6888e3eee41c3c64a0..ecafecc26e113c8efa5f5d42932d8047f8a71038 100644 GIT binary patch delta 20 bcmbQIHBW29Q!aKh1p^B!1GCL1p^B!1LMtaxQw^}N`nS= diff --git a/po/mcs/de.po.REMOVED.git-id b/po/mcs/de.po.REMOVED.git-id index d64843c453..da700e31e4 100644 --- a/po/mcs/de.po.REMOVED.git-id +++ b/po/mcs/de.po.REMOVED.git-id @@ -1 +1 @@ -ef6d5f83473d22299ce94380126e5acc6f6297b9 \ No newline at end of file +89135daef3ceb7ec433f4172cb3f2c3620d558c2 \ No newline at end of file diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index fcdd3dbf7d982818ed614e188b6e2b48e9a2a6fb..5488e258176a5562531a184334024c051dcf722d 100644 GIT binary patch delta 20 bcmX?Ef3kjqo+7)Mf`NsVf!StL#VK+CQNaeV delta 20 bcmX?Ef3kjqo+7)cf`NsVf$?Tj#VK+CQKJT| diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index 4189cfc4ba..9c323434ae 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -65729580e849916435378dcd798485e8dab616b5 \ No newline at end of file +3773c25bad86ce0c6617eb152809cc4281865c24 \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index 443937d69b18748e06a1412c3c6ca63d2ab6d829..fa9d6191928c4aa84b29138e5a43ce6840f91a30 100644 GIT binary patch delta 22 dcmeyri1Gg-#tj_m>}CoE7FGskoB7oXv;bif2MhoJ delta 22 dcmeyri1Gg-#tj_m?4}9^7FGtvoB7oXv;biB2M7QF diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index 9f2d500bad..cdb28849ae 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -4eaec50717e811f3a8acb1129ac8550a1fd554cd \ No newline at end of file +f624d84e6494f53c8367dce472bdfd241a3b0ed8 \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index 2ce0228dda..58ee28b470 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: mono 5.18.0.247\n" +"Project-Id-Version: mono 5.18.0.248\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2019-01-25 08:03+0000\n" +"POT-Creation-Date: 2019-01-26 08:06+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index 867ba15c96ac3ad8f96d4c89f9203e8e9446974a..834f420e967d7207bea8fced5b5505c447bbe5e4 100644 GIT binary patch delta 22 ecmaF1gXP%{mJM-J+07ITEUXO7Hm6QyYzF{t3J8J# delta 22 ecmaF1gXP%{mJM-J*-aG;EUXNSH>XZzYzF{s>