Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-27[sdks] Add option to enable debug server for iOS test appAlexander Köplinger
Include .pdb files in iOS test app if the DEBUG variable is set and wait for managed debugger to attach.
2019-11-27[sdks] Fix loading of assemblies in assembly_preload_hook()Alexander Köplinger
We need to check whether the assembly name passed to us already contains .exe/.dll and append it otherwise. Fixes loading of assemblies via the hook, we were falling back to the usual path resolving logic (which doesn't work in netcore mode).
2019-11-27[sdks] Add netcore option for iOS SDKAlexander Köplinger
2019-11-27[merp] Use timeline (and generate timeline breadcrumbs) for ↵Alexis Christoforides
SendExceptionToTelemetry() (#17913) Fixes https://github.com/mono/mono/issues/17790
2019-11-27[arm] if mtriple is provided, do not set -march (#17937)Bernhard Urban-Forster
[arm] if mtriple is provided, do not set -march E.g. when passing `-march=arm -mtriple=armv7s-ios`, `-march` will win and thus ignore `armv7s`. Fixes https://github.com/mono/mono/issues/17931 * Caused by 5e318afd2e1d5f9ef0fd692abbceadcf615389a5 * Related with 4cd506823079bc15c9ee72da4f94a653f237a5e5 * Almost fixed by e431093f73360b5726e5256fd0de3108ec21b38a Hopefully we are done with it.
2019-11-27[bcl] Update BCL Linked Size (#17322)monojenkins
2019-11-27[amd64] do not stack allocate on the application stack for the transtion ↵Bernhard Urban-Forster
from alstack handling (#17922) ### Backstory This test is failing in the interpreter (ONLY on Debian9/amd64. Not Ubuntu/amd64. Not macOS/amd64): https://github.com/mono/mono/blob/0fed03ed63ed4ea742c4511d8edc3bc1c6f4044f/mcs/class/Mono.Debugger.Soft/Test/dtest.cs#L2484-L2499 Where the debuggee is just some unsafe code that tries to read from unmapped memory, thus causing a segfault. So the test expects the runtime to send a CRASH event via the managed debugger interface. This happens very late in the crash handling machinery: https://github.com/mono/mono/blob/0fed03ed63ed4ea742c4511d8edc3bc1c6f4044f/mono/mini/mini-posix.c#L1105 However, the runtime would never reach that, because it silently crashes when calling `backtrace`: https://github.com/mono/mono/blob/0fed03ed63ed4ea742c4511d8edc3bc1c6f4044f/mono/mini/mini-posix.c#L939 At the point where the SIGSEGV happens, the native stack trace looks like this: ``` Thread 1 "mono-sgen" received signal SIGSEGV, Segmentation fault. interp_exec_method_full (frame=0x555555c51f18, context=0x555555c38350, clause_args=clause_args@entry=0x0, error=0x555555c53f18, error@entry=0x7fffffffd8b0) at interp/interp.c:4463 4463 sp[-1].data.i = *(gint32*)sp[-1].data.p; (gdb) bt %0 interp_exec_method_full (frame=0x555555c51f18, context=0x555555c38350, clause_args=clause_args@entry=0x0, error=0x555555c53f18, error@entry=0x7fffffffd8b0) at interp/interp.c:4463 %1 0x000055555569237a in interp_runtime_invoke (method=<optimized out>, obj=<optimized out>, params=<optimized out>, exc=0x0, error=0x7fffffffd8b0) at interp/interp.c:1900 %2 0x0000555555590745 in mono_jit_runtime_invoke (method=0x555555bfdc38, obj=<optimized out>, params=0x7fffffffd858, exc=0x0, error=0x7fffffffd8b0) at mini-runtime.c:3001 %3 0x0000555555778c4c in do_runtime_invoke (method=0x555555bfdc38, obj=<optimized out>, params=<optimized out>, exc=<optimized out>, error=0x7fffffffd8b0) at object.c:3052 %4 0x000055555577b7d0 in do_exec_main_checked (method=0x555555bfdc38, args=<optimized out>, error=0x7fffffffd8b0) at object.c:5184 %5 0x000055555559a2aa in mono_jit_exec_internal (argv=0x7fffffffdcb8, argc=1, assembly=0x0, domain=0x555555bf9d40) at driver.c:1320 %6 mono_jit_exec (domain=domain@entry=0x555555bf9d40, assembly=assembly@entry=0x555555c66ae0, argc=argc@entry=1, argv=argv@entry=0x7fffffffdcb8) at driver.c:1265 %7 0x000055555559b8e2 in main_thread_handler (user_data=<synthetic pointer>) at driver.c:1402 %8 mono_main (argc=<optimized out>, argv=<optimized out>) at driver.c:2622 %9 0x000055555558b757 in mono_main_with_options (argv=<optimized out>, argc=<optimized out>) at main.c:52 %10 main (argc=<optimized out>, argv=<optimized out>) at main.c:434 ``` Stepping into the crash handling machinery, the picture looks a bit different: ``` Thread 1 "mono-sgen" hit Breakpoint 1, altstack_handle_and_restore (ctx=0x7fffffffd2d0, obj=0x0, flags=0) at exceptions-amd64.c:871 871 { (gdb) bt %0 altstack_handle_and_restore (ctx=0x7fffffffd2d0, obj=0x0, flags=0) at exceptions-amd64.c:871 %1 0x00005555556957de in interp_exec_method_full (frame=0x555555c53f08, context=0x555555c38350, clause_args=0x0, error=0x555555c53f18) at interp/interp.c:4461 %2 0x0000000000000000 in ?? () ``` So it looks like we messed up in the transition from altstack back to the program stack. ### The fix The problem is that `backtrace` consults the unwind information emitted at the point where SIGSEGV happens in `interp_exec_method_full ()`. However at that given program code, there is no function call that allocates space to pass arguments on the stack. Still, we massage the stack to do that in the signal handler, which does not add up with the emitted unwind information by the C compiler. Note that without the fix, crashing in `backtrace` is the worst case. In other cases we might (1) get still a correct stack trace, or (2) we get a wrong stack trace, and `backtrace` will not crash. So this PR might improve the crash experience overall. This also reverts commit cff400f3fae9775ac734f8a691339e59a272872c.
2019-11-26[interp] Non-recursive interpreter (#16461)Zoltan Varga
* Aling alloca_size to 8. * Prevent some false pinning in the monitor-resurrection.cs test when using the non-recursive interpreter. * [runtime] Add a mono_compiler_barrier () function. * Add a MONO_GET_SP opcode to pass to enter/exit_gc_safe_region, ldloca might not return a native stack address with the interpreter. * Add an interpreter/gc callback to mark the interpreter stack. * Copy only an integer in ENDFILTER. * Add a native_stack_addr field to InterpFrame so the EH code has something to compare against native stack addresses. * Add a FrameStack structure to allow allocation of InterpFrame structures and stack data outside the native stack. * Allocate InterpFrames/stack data from a frame stack instead of the native stack. * Make some calls non-recursive. * Remove an assert. * Use non-recursive calls in CALLVIRT_FAST as well. * Fix stack size allocation for vararg calls. * Add some micro optimizations to the calling code. * Add more micro optimizations. * [dtest] disable Crash test on interpreter * Add some implicit conversions to STSFLD to fix a corefx test failure. * Disable the new test.
2019-11-26WASM + Netcore. (#17915)Zoltan Varga
* [runtime] Throw an exception from Thread::StartInternal () if threads are disabled. * Add more test suites and a corefx exclusions file.
2019-11-26Add the reference assembly path for the Http implementation (#17908)Larry Ewing
2019-11-25Update dependencies from https://github.com/dotnet/arcade build 20191124.1 ↵dotnet-maestro[bot]
(#17899) - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19574.1 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19574.1
2019-11-25Remove mkinstalldirs invocation from two places (#17910)Alexander Köplinger
These can be easily replaced so we don't need to mirror over the mkinstalldirs file to the new repo
2019-11-25[configure.ac] Don't run compiler server check in netcore mode (#17911)Alexander Köplinger
We don't need it there.
2019-11-25Fix BinaryReader on BE (#17893)Calvin Buckley
Fix BinaryReader on BE The ints passed into the int array ctor needed to be endian swapped. Interestingly, the BinaryWriter implementation currently being used (not refsrc AFAIK) does this on write just fine. Fixes ReadDecimal test on AIX, and adds another test to ensure that Write(decimal) can be read back by ReadDecimal in case.
2019-11-25Fix boehm on Windows i386 builds (#17901)Alexander Köplinger
After https://github.com/mono/mono/pull/16832 was merged the run-msbuild.bat script has an additional required parameter for specifying the GC. However the script only passed the MONO_TARGET_GC property to msbuild if the script had no additional parameters which doesn't make sense. Always pass the parameter, this should fix the boehm build on Windows i386.
2019-11-25Fix issue in debugger variable inspection (#17900)Larry Ewing
2019-11-25[WIP] Make debugger agent startup faster (#17898)Marek Habersack
Mono SDB's debugger agent takes a `host:port` parameter to specify the host and port on which to listen for debugger connection. `host` is passed, via `mono_get_address_info`, to the `getaddrinfo(3)` standard library call which does the job of translating the name to the IP address. However, there's no special treatment for situations when `host` is already an IP address. In this case `getaddrinfo` takes a lot of time to perform at least two DNS lookups (if there's just a single DNS server configured) which will time out as the IP address in `host` will not be resolved by any of the servers. `getaddrinfo` takes a "hints" parameter where caller can specify some information about the `host:port` pair to make the lookup faster/easier. However, Mono doesn't specify the address family in the `hints` parameter, thus forcing the slow path of DNS lookups on `getaddrinfo`. This commit adds a new hint named `MONO_HINT_NUMERIC_HOST` (which maps to `AI_NUMERICHOST` for `getaddrinfo`) which will allow, if set, `getaddrinfo` to take a faster route in address discovery. Debugger agent will, in most cases, get an IP address to instead of host name so we call `mono_get_address_info` up to 3 times (IPv4, IPv6 and unspecified) in order to make the lookup faster.
2019-11-25Fix flawed BufferTest on big-endian (#17894)Calvin Buckley
Fix flawed BufferTest on big-endian Test ignored byte order when considering integer comparison. This tests different cases for each endian, and explains why the byte order is different.
2019-11-25[wasm] [bindings] Method invoke signature argument validation. (#17853)Kenneth Pouncey
* Implement validation for signature and argument count consistency. - throw error `Parameter count mismatch.` when arguments and signature counts are not consistent. * Fix tests that have Parameter count mismatch. * Add browser binding tests for `Parameter count mismatch
2019-11-25Add tests for Promise library.Kenneth Pouncey
- Right now only Bluebird promise library is tested right now. - If more are needed later then we can add them.
2019-11-25Add a more reliable way of identifying a Promise to be marshaled.Kenneth Pouncey
- This is left as generic as possible for now.
2019-11-25Add a more descriptive error in case of fetch response not returning back ↵Kenneth Pouncey
what it should. - An example of this is when a Promise library is being used and the Promise can not be identified correctly. Thus the internal error.
2019-11-25[interp] Resolve tokens also from wrappers during optimization (#17880)Vlad Brezae
[interp] Resolve tokens also from wrappers during optimization Remove some duplicated code.
2019-11-25[eglib] In AIX/generic POSIX, handle null addresses better (#17892)Calvin Buckley
Fixes crash in tests on AIX. Matches b0d966bd7ab887f075f6ce3d1c9858af6b52f30f
2019-11-25Allow runtime to be built with C++ on AIX (#17672)Calvin Buckley
* Allow runtime to be built with C++ on AIX Many AIX/PPC/BE specific codepaths didn't do casting properly, since C++ is much stricter than C about pointer typing. Also specify the C99 format macros early as possible, since inttypes may get included before eglib gets a chance to set the macros. Also explicitly use -pthread, since not using it is the cause of many libstdc++ crashes on AIX. * Oops, should have been that define instead * Suggested changes from Jay on style * Remove unneeded cast
2019-11-24Fix warnings in runtime build (#17887)Alexander Köplinger
This makes at least the netcore-mono build in dotnet/runtime warning-free.
2019-11-23[netcore] Disable libmonoruntime-support.la build on netcore (#17885)Alexander Köplinger
It's used for the zlib compression helpers used by System.IO.Compression in the old Mono BCL. On corefx this is handled differently so we don't need it there. To avoid automake complaining about missing files we include the .c files directly instead of in the Makefile.
2019-11-23[netcore] Disable a test which fails on the interpreterAlexander Köplinger
The test is wrong, will be fixed upstream.
2019-11-23Fix run-msbuild.bat invocation in pipeline-netcore-runtime.ymlAlexander Köplinger
2019-11-23Make configure.ac and Makefile.am work without certain directories (#17871)Alexander Köplinger
Those folders won't be present in the dotnet/runtime repository. We need to factor out AC_OUTPUT into a separate file so we can continue to share configure.ac but not the list of files in AC_OUTPUT since autotools doesn't support variables there.
2019-11-22[runtime] Treat calling a non-virtual method through an open delegate the ↵Zoltan Varga
same as the normal case instead of the OPEN_VIRTUAL case. (#17832) * [runtime] Treat calling a non-virtual method through an open delegate the same as the normal case instead of the OPEN_VIRTUAL case. * [amd64] Fix the return value mapping in gsharedvt calls, the return address might be in different registers in the caller and callee. * [runtime] Always initialize del->method_ptr even if interp_method is set, JITted code makes calls through it in mixed mode. * Add a test for open delegates and gsharedvt. * Increase nrgctx trampoline count, its needed by dynamic-method-churn.exe in full-aot-interp mode.
2019-11-22Replace embedded libgc with Unity fork of recent Boehm (bdwgc) (#16832)Jonathan Chambers
* Initial commit to migrate libgc to bdwgc. * Fix submodule url * Don't force Boehm as runtime wrapper. Was just for testing locally. * Build bdwgc as single object file. Helps with performance. * Bump bdwgc submodule. * Attempt to fix windows MSVC based build. * Remove any references to GC_INSIDE_DLL as we manually managed threads on Windows. * Allow building boehm on Windows amd64. * Allow building boehm with msvc. * Bump bdwgc to fix line endings * Use LF for sh, am, m4, and ac files in bdwgc * Bump bdwgc & libatomic_ops with fix for cygwin * Bump bdwgc to fix mono-boehm being generated as libtool wrapper script. * Link the static boehm library. * Revert "Link the static boehm library." This reverts commit 1f90d81d08308a61c890743cd79d8f6bb791bc99. * Use --export-all-symbols on cygwin/mingw to fix issues with boehm causing mono symbols not to be exported. * Fix
2019-11-22Fix InternalGetHashCode for boehm/null GC (#17859)Filip Navara
It was unintentionally shifting the address to left instead of right. It should be shift right to get rid of zeroes from the alignment.
2019-11-22Fix automake warningAlexander Köplinger
2019-11-22Remove unused `GetHttpMessageHandler` from WebAssembly.Net.Http.Kenneth Pouncey
- Remove linker.xml from project
2019-11-22[wasm] Add aot+netcore support. (#17798)Zoltan Varga
* [wasm] Compile corelib as 32 bit. * [wasm] Add a netcore cross compiler. * [wasm] Add netcore+aot support. * [aot] Load the dedup module lazily instead of at startup. The previous version didn't work on netcore because it couldn't resolve references to corlib etc. since they were not yet registered in the root domain at the time of loading. * Add more icall trampoline signatures. * Add more netcore pinvokes. * Fix the build. * Add more icall trampoline signatures. * Add an --embed-file option to the packager. * Add more netcore pinvokes. * [interp] Return FALSE for IsDynamicCodeCompiled. * Add a netcore project and targets for running BenchmarkDotNet. * Fix pinvoke tables. * Add missing files. * Fix make clean. * Add a comment. * Revert "Fix pinvoke tables." This reverts commit 998065e77614b7e621d2873510aabc3930669ca9. * Make xunit-runner into a dotnet project. Add a netcore version.
2019-11-22[netcore] Run tests with Interpreter (#17862)Egor Bogatov
* Run tests with interp and llvm * fix build * Run tests with llvm * Add a few tests to rsp for LLVM
2019-11-22Add more descriptive message to the `PlatformNotSupportedException` (#17864)Kenneth Pouncey
2019-11-21Remove handles/MonoError from Mono.RuntimeGPtrArrayHandle. (#17806)Jay Krell
2019-11-21Stop referencing files from Mono BCL in Netcore System.Private.CoreLib (#17866)Jo Shields
2019-11-21[interp] fix array_element_size intrinsic (#17857)Bernhard Urban-Forster
[interp] fix array_element_size intrinsic `mono_class_array_element_size` gives us the size of the provided MonoClass if it would be an array element. But here we want the element size of a given array's MonoClass. That's what `mono_array_element_size` is returning. This leads to all kind of weird crashes otherwise, specifically here: https://github.com/mono/mono/blob/2c20649539ac16e069a65f2a750c793eb341e50f/netcore/System.Private.CoreLib/src/System/Array.Mono.cs#L64 Which is then used later to compute the size to memset in order to clear the content of an array. If it's larger than it should be, then this will cause memory corruption. For example this would crash eventually: ```csharp using System; using System.Collections.Generic; namespace HelloWorld { class Program { static void Main(string[] args) { for (int j = 0; j < 0x1000; j++) { var d = new Dictionary<string, string> (); for (int i = 0; i < 197; i++) d.Add (i + "", i + "foo"); d.Clear (); } } } } ``` Thanks to @EgorBo for reporting.
2019-11-21[metadata] Remove native threadpool from netcore build (#17856)Alexander Köplinger
We use the managed threadpool there.
2019-11-20[llvm] Recognize GEP (#17844)Egor Bogatov
* initial impl * improve jit * fix copy-paste * disable for non-netcore * clean up
2019-11-20[interp] Move the freeing of interp method info into a callback. (#17852)Zoltan Varga
[interp] Move the freeing of interp method info into a callback.
2019-11-20enable gss on android (#17838)Egor Bogatov
2019-11-20[debugger-agent] Fix CMD_VM_ALL_THREADS returning wrong value due to ↵Alexander Köplinger
unitialized variable (#17847) `remove_gc_finalizing` wasn't initialized so its value is undefined. The `count_thread_check_gc_finalizer()` function only sets it in some cases so we could end up with the variable having an undefined (and probably not 0) value. This resulted in the returned thread count from the debuggee being wrong because we'd decrement `count` even though we shouldn't. Regression from https://github.com/mono/mono/pull/15618
2019-11-19[master] Update dependencies from dotnet/arcade dotnet/core-setup ↵dotnet-maestro[bot]
dotnet/corefx (#17690) * Update dependencies from https://github.com/dotnet/arcade build 20191102.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19552.1 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19552.1 * Update dependencies from https://github.com/dotnet/core-setup build 20191104.1 - Microsoft.NETCore.App - 5.0.0-alpha.1.19554.1 * Update dependencies from https://github.com/dotnet/corefx build 20191103.8 - Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha.1.19553.8 * Update dependencies from https://github.com/dotnet/arcade build 20191108.11 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19558.11 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19558.11 * Update dependencies from https://github.com/dotnet/core-setup build 20191109.5 - Microsoft.NETCore.App - 5.0.0-alpha.1.19559.5 * Update dependencies from https://github.com/dotnet/corefx build 20191109.6 - Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha.1.19559.6 * Update dependencies from https://github.com/dotnet/arcade build 20191117.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19567.2 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19567.2 * Update dependencies from https://github.com/dotnet/core-setup build 20191114.1 - Microsoft.NETCore.App - 5.0.0-alpha.1.19564.1 * Update dependencies from https://github.com/dotnet/corefx build 20191113.6 - Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha.1.19563.6 * Use NETCoreApp version 5.0.0-alpha.1.19563.3 Later versions have an issue and the new dotnet/runtime assets aren't ready yet. * Disable failing tests * Fix merge error
2019-11-19Fixes https://github.com/mono/mono/issues/15805 at least in terms of what ↵Steve Pfister
may be making it crash. (#17270) Adds a null check around the sslStream before trying to dispose.
2019-11-18[interp] Add some missing netcore intrinsics. (#17782)Zoltan Varga
2019-11-18Bump corefx to pick up https://github.com/mono/corefx/pull/370 (#17758)Steve Pfister
Backport of https://github.com/dotnet/corefx/pull/34560 Added HAVE_LCHFLAGS & HAVE_STAT_FLAGS to configure.