mono.git
7 years agoMerge pull request #4444 from lateralusX/jlorenss/windows-unwind-info
Johan Lorensson [Fri, 10 Mar 2017 10:16:23 +0000 (11:16 +0100)]
Merge pull request #4444 from lateralusX/jlorenss/windows-unwind-info

Improve unwind support on Windows x64.

7 years agoUpdate Bockbuild
Alexis Christoforides [Fri, 10 Mar 2017 05:03:06 +0000 (00:03 -0500)]
Update Bockbuild

7 years ago[arm64] Fix the saving/restoring of fp regs in exception filters, we were saving...
Zoltan Varga [Fri, 10 Mar 2017 04:35:04 +0000 (23:35 -0500)]
[arm64] Fix the saving/restoring of fp regs in exception filters, we were saving/restoring them from the incorrect position in MonoContext.fregs. (#4499)

7 years ago[runtime] Add a test to verify that pedump works. (#4486)
Zoltan Varga [Fri, 10 Mar 2017 04:03:29 +0000 (23:03 -0500)]
[runtime] Add a test to verify that pedump works. (#4486)

7 years agoUpdate Bockbuild
Alexis Christoforides [Fri, 10 Mar 2017 03:43:48 +0000 (22:43 -0500)]
Update Bockbuild

7 years ago[MacSDK] Fix Ironlangs build with latest MSBuild
Alexis Christoforides [Fri, 10 Mar 2017 02:23:47 +0000 (21:23 -0500)]
[MacSDK] Fix Ironlangs build with latest MSBuild

7 years agoMerge pull request #4494 from kumpera/important-android-fixes
Rodrigo Kumpera [Thu, 9 Mar 2017 21:14:35 +0000 (13:14 -0800)]
Merge pull request #4494 from kumpera/important-android-fixes

[runtime] Make sure we use lower numbered signals on Android.

7 years ago[api] Remove dead mono_load_image API.
Jon Purdy [Thu, 9 Mar 2017 20:41:56 +0000 (12:41 -0800)]
[api] Remove dead mono_load_image API.

7 years ago[socket] ret might not have been initialized (#4495)
Ludovic Henry [Thu, 9 Mar 2017 18:35:04 +0000 (13:35 -0500)]
[socket] ret might not have been initialized (#4495)

7 years ago[Mono.Options] Add missing test file to test sources
Alexander Köplinger [Thu, 9 Mar 2017 18:25:33 +0000 (19:25 +0100)]
[Mono.Options] Add missing test file to test sources

It was missed in c1b9fc566a365cf6923218eae9098d0fd0e632ae

7 years ago[msvc] Update csproj files (#4479)
monojenkins [Thu, 9 Mar 2017 18:22:15 +0000 (18:22 +0000)]
[msvc] Update csproj files (#4479)

7 years ago[mkbundle] Encode directory separator character on Windows (#4493)
Marek Habersack [Thu, 9 Mar 2017 15:25:08 +0000 (16:25 +0100)]
[mkbundle] Encode directory separator character on Windows (#4493)

When storing satellite assemblies, mkbundle prefixes their names with a
directory name derived from the language/locale of the assembly. It uses the
platform's default directory separator character which on Windows defaults to
'\' and that causes problems when building such a bundle on Windows since \ is
an escape sequence prefix inside strings and not escaping it with another \
leads to gcc errors when building the genrated source.

This commit fixes the problem by quoting the directory separator character
properly on Windows.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52845

7 years ago[ci] Remove ppc64el checks from run-test-default.sh
Alexander Köplinger [Thu, 9 Mar 2017 14:16:03 +0000 (15:16 +0100)]
[ci] Remove ppc64el checks from run-test-default.sh

This was initially done so we didn't get orange builds
when ppc64el was in the same job as our other archs.

ppc64el was since moved into a separate job so we can
stop skipping the test suites.

Also fixed badges in README.md for ppc64el and s390x

7 years agoShorten function name length for static functions.
lateralusX [Thu, 9 Mar 2017 14:10:11 +0000 (15:10 +0100)]
Shorten function name length for static functions.

7 years ago[mcs] Codegen for auto-property backing field initialization used as assignment....
Marek Safar [Thu, 9 Mar 2017 14:05:25 +0000 (15:05 +0100)]
[mcs] Codegen for auto-property backing field initialization used as assignment. Fixes #53166

7 years ago[Mono.Posix] UnixSIgnal.WaitOne() doesn't block for 0 timeout (#4489)
Daniel C. Weber [Thu, 9 Mar 2017 02:09:50 +0000 (03:09 +0100)]
[Mono.Posix] UnixSIgnal.WaitOne() doesn't block for 0 timeout (#4489)

For timeouts of 0 milliseconds, WaitOne may produce incorrect results. In case of timeout, the result of WaitAny denotes the amount of milliseconds that have timed out. WaitOne relies on WaitAny and interprets the result falsely as the index of the completed handle. This change introduces a check on the timeout and returns `IsSet` when the handle is not allowed to block.

This is in accordance to Microsofts [documentation of WaitOne](https://msdn.microsoft.com/de-de/library/cc189983(v=vs.110).aspx) which states "If millisecondsTimeout is zero, the method does not block. It tests the state of the wait handles and returns immediately.".

[Here](https://github.com/StephenCleary/AsyncEx.Interop.WaitHandles/blob/master/src/Nito.AsyncEx.Interop.WaitHandles/WaitHandleInterop.cs#L51) is an example of some code relying on correct output of `WaitOne(0)` that is effectively broken by the current behaviour.

7 years ago[runtime] Make sure we use lower numbered signals on Android.
Rodrigo Kumpera [Fri, 3 Mar 2017 18:15:49 +0000 (10:15 -0800)]
[runtime] Make sure we use lower numbered signals on Android.

Android on 32bits arm shipped broken headers that made sigset_t be 32 bits instead of 64.

This means that it's not possible to use signals whose value are >= 32. The default implementation
uses RT signals when available (and they are on Android). But RT signals don't work as expected
as their value is >= 32.

This fix hardcodes some safe signals on Android and add asserts about their values to avoid regressions.

See 5005c6f3fbc1da584c6a550281689cc23f59fe6d for more details.

7 years ago[interp] remove g_error call
Bernhard Urban [Wed, 8 Mar 2017 20:05:10 +0000 (21:05 +0100)]
[interp] remove g_error call

can hit this case in racy code (e.g. tests/thread5.cs)

7 years ago[interp] fix another data.klass access. due to generics it has to be resolved with...
Bernhard Urban [Wed, 8 Mar 2017 00:25:38 +0000 (01:25 +0100)]
[interp] fix another data.klass access.  due to generics it has to be resolved with a runtime helper

7 years ago[interp] support stelem for g{,u}int64
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] support stelem for g{,u}int64

7 years ago[interp] pass single fp correctly to icall trampoline
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] pass single fp correctly to icall trampoline

add test to basic-math.cs that tests this specifically.

7 years ago[interp] fix type init exception propagation for methods that trigger static constructors
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] fix type init exception propagation for methods that trigger static constructors

7 years ago[interp] support non-empty stack in switch branches
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] support non-empty stack in switch branches

7 years ago[interp] fix for ldflda unsafe corner case
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] fix for ldflda unsafe corner case

7 years ago[interp] propogate OOM exception on array instantiation
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] propogate OOM exception on array instantiation

7 years ago[exceptions.cs] enable one more test
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[exceptions.cs] enable one more test

7 years ago[interp] respect lower_bound on array access and share behaviour with .Set, .Get...
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] respect lower_bound on array access and share behaviour with .Set, .Get and .Address

7 years ago[interp] throw overflow exception on long to ulong cast where long is negative
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] throw overflow exception on long to ulong cast where long is negative

7 years ago[interp] throw overflow exception on ulong to long cast where ulong is too large...
Bernhard Urban [Tue, 7 Mar 2017 09:47:00 +0000 (10:47 +0100)]
[interp] throw overflow exception on ulong to long cast where ulong is too large to fit in long

7 years ago[interp] throw overflow exception on (0/-1)
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] throw overflow exception on (0/-1)

7 years ago[interp] fix overflow corner cases for integer
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] fix overflow corner cases for integer

7 years ago[interp] fix a mem leak in transform
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] fix a mem leak in transform

7 years ago[interp] allocate one more slot for tracking stack types
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] allocate one more slot for tracking stack types

due to the way basic block handling is done in the interpreter, it can
happen that we have one additional element on the stack (as opposed to
what metadata tells us)

7 years ago[makefile] cleanup richeck target
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[makefile] cleanup richeck target

7 years ago[interp] support stelem for guint8
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] support stelem for guint8

7 years ago[interp] support reference case for unbox.any
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] support reference case for unbox.any

7 years ago[interp] remove STTHIS completly.
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] remove STTHIS completly.

7 years ago[interp] throw exceptions from icalls
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] throw exceptions from icalls

7 years ago[interp] proper overflowcheck for size passed to cee_newarr
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] proper overflowcheck for size passed to cee_newarr

7 years ago[interp] throw NRE in mint_vcall insn if receiver is null
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] throw NRE in mint_vcall insn if receiver is null

7 years ago[interp] respect generic context for cee_sizeof
Bernhard Urban [Tue, 7 Mar 2017 09:46:59 +0000 (10:46 +0100)]
[interp] respect generic context for cee_sizeof

7 years ago[interp] set proper type info for cee_ldtoken bytecode
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] set proper type info for cee_ldtoken bytecode

7 years ago[interp] refactor Array::Address, so that readonly. prefix is respected properly
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] refactor Array::Address, so that readonly. prefix is respected properly

7 years ago[interp] cee_{stfld,ldfld{,a}} can access static fields too
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] cee_{stfld,ldfld{,a}} can access static fields too

7 years ago[interp] fix cee_initobj for reference type
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] fix cee_initobj for reference type

7 years ago[interp] implement cee_cpobj
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] implement cee_cpobj

7 years ago[interp] transform all kind of clauses
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] transform all kind of clauses

still need to handle filter clauses correctly during stack walking.

7 years ago[interp] clear storage for sp, vt_sp and locals properly
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] clear storage for sp, vt_sp and locals properly

7 years ago[interp] implement cee_unbox and cee_ldobj correctly
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] implement cee_unbox and cee_ldobj correctly

unbox is supposed to push a managed pointer on the stack and ldobj does
the actual value copy.  unbox_any is basically unbox+ldobj according to
the spec.

fixes random crashes in test_0_regress_80622:iltests.il

7 years ago[interp] fix issues around conv.ovf.* bytecodes
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] fix issues around conv.ovf.* bytecodes

7 years ago[interp] fix localloc instruction, storage must be cleared
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] fix localloc instruction, storage must be cleared

7 years ago[interp] clear locals storage also on pointer type
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] clear locals storage also on pointer type

7 years ago[interp] add iltests.exe to regression suite and mark crashing tests
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] add iltests.exe to regression suite and mark crashing tests

7 years ago[interp] add interpreter specific create_trampoline callback
Bernhard Urban [Tue, 7 Mar 2017 09:46:58 +0000 (10:46 +0100)]
[interp] add interpreter specific create_trampoline callback

7 years ago[generics.cs] enable one more test for interpreter
Bernhard Urban [Tue, 7 Mar 2017 09:46:57 +0000 (10:46 +0100)]
[generics.cs] enable one more test for interpreter

7 years ago[interp] implement constrained calls to interface methods correctly
Bernhard Urban [Tue, 7 Mar 2017 09:46:57 +0000 (10:46 +0100)]
[interp] implement constrained calls to interface methods correctly

compare with 9adc7023e66a04f162efa041ff2452222a85c977

7 years ago[interp] support readonly. prefix for ldelema
Bernhard Urban [Tue, 7 Mar 2017 09:46:57 +0000 (10:46 +0100)]
[interp] support readonly. prefix for ldelema

7 years ago[interp] respect variance in interface dispatch
Bernhard Urban [Tue, 7 Mar 2017 09:46:57 +0000 (10:46 +0100)]
[interp] respect variance in interface dispatch

7 years ago[interp] inflate also on CEE_CALL etc.
Bernhard Urban [Tue, 7 Mar 2017 09:46:57 +0000 (10:46 +0100)]
[interp] inflate also on CEE_CALL etc.

also, remove weird hack for delegate.invoke ()

7 years ago[offsets-tool] Remove dependencies on android directory layout by adding a --targetdi...
Zoltan Varga [Wed, 8 Mar 2017 16:57:31 +0000 (11:57 -0500)]
[offsets-tool] Remove dependencies on android directory layout by adding a --targetdir=dir argument argument which points to the mono build directory corresponding to the target abi. Only allow one --abi= argument on android. (#4487)

7 years ago[System] Collections from CoreFX
Marek Safar [Mon, 6 Mar 2017 17:05:23 +0000 (18:05 +0100)]
[System] Collections from CoreFX

7 years agoBump corefx
Marek Safar [Tue, 7 Mar 2017 17:09:43 +0000 (18:09 +0100)]
Bump corefx

7 years ago[ci] Check if X server is available before running WinForms tests (#4477)
Alexander Köplinger [Wed, 8 Mar 2017 11:48:28 +0000 (12:48 +0100)]
[ci] Check if X server is available before running WinForms tests (#4477)

This should hopefully "fix" the mass fails in the WinForms
tests we sometimes see in CI.

We're using the simplest WinForms code that invokes the XplatUI
and causes the X connection to be established, if this fails
then something is seriously wrong and we skip the WinForms tests.

7 years ago[arm] Implement aot support for handler block trampolines.
Zoltan Varga [Wed, 8 Mar 2017 01:34:51 +0000 (20:34 -0500)]
[arm] Implement aot support for handler block trampolines.

7 years ago[arm64] Implement aot support for handler block trampolines.
Zoltan Varga [Tue, 7 Mar 2017 23:20:02 +0000 (18:20 -0500)]
[arm64] Implement aot support for handler block trampolines.

7 years agoMerge pull request #4481 from migueldeicaza/master
Alexander Kyte [Tue, 7 Mar 2017 18:26:34 +0000 (13:26 -0500)]
Merge pull request #4481 from migueldeicaza/master

[mkbundle] Fixes the embedding of dependency assemblies + test

7 years ago[runtime] Fix pedump.
Zoltan Varga [Tue, 7 Mar 2017 17:24:39 +0000 (12:24 -0500)]
[runtime] Fix pedump.

7 years agoRFI - Support building System.Drawing for NETCOREAPP2.0 (#4483)
Frederik Carlier [Tue, 7 Mar 2017 10:26:38 +0000 (11:26 +0100)]
RFI - Support building System.Drawing for NETCOREAPP2.0 (#4483)

7 years ago[mono/tests] Don't use -lib:<dir> use -r:<dir>/asm.dll for framework assemblies
Aleksey Kliger [Fri, 3 Mar 2017 22:37:09 +0000 (17:37 -0500)]
[mono/tests] Don't use -lib:<dir> use -r:<dir>/asm.dll for framework assemblies

Apparently Roslyn looks in -lib directories only if it doesn't find the needed
assembly in MONO_PATH first.  On the other hand, using a full path with -r will
take priority over the assemblies in system directories.

7 years ago[mini] Run tests with --runtime=mobile for testing_aot_full profile
Aleksey Kliger [Fri, 3 Mar 2017 15:30:10 +0000 (10:30 -0500)]
[mini] Run tests with --runtime=mobile for testing_aot_full profile

7 years ago[runtime] Redirect mobile System.Net.Http to version 4.0.0.0
Aleksey Kliger [Thu, 2 Mar 2017 17:51:45 +0000 (12:51 -0500)]
[runtime] Redirect mobile System.Net.Http to version 4.0.0.0

per mcs/class/System.Net.Http/Assembly/AssemblyInfo.cs
our System.Net.Http AssemblyVersion is 4.0.0.0 when using mobile.

7 years ago[Mono.Options] Update documentation build
Marek Safar [Mon, 6 Mar 2017 22:59:41 +0000 (23:59 +0100)]
[Mono.Options] Update documentation build

7 years ago[Mono.Options] Add Mono.Options.Command, .CommandSet
Jonathan Pryor [Tue, 31 Jan 2017 20:27:32 +0000 (15:27 -0500)]
[Mono.Options] Add Mono.Options.Command, .CommandSet

Mono.Options.CommandSet allows easily having separate commands and
associated command options, allowing creation of a *suite* along the
lines of **git**(1), **svn**(1), etc.

CommandSet allows intermixing plain text strings for `--help` output,
Option values -- as supported by OptionSet -- and Command instances,
which have a name, optional help text, and an optional OptionSet.

var suite = new CommandSet ("suite-name") {
// Use strings and option values, as with OptionSet
"usage: suite-name COMMAND [OPTIONS]+",
{ "v:", "verbosity", (int? v) => Verbosity = v.HasValue ? v.Value : Verbosity+1 },
// Commands may also be specified
new Command ("command-name", "command help") {
Options = new OptionSet {/*...*/},
Run     = args => { /*...*/},
},
new MyCommandSubclass (),
};
suite.Run (new string[]{...});

CommandSet provides a `help` command, and forwards `help COMMAND`
to the registered Command instance by invoking Command.Invoke()
with `--help` as an option.

7 years ago[mkbundle] Fixes the embedding of dependency assemblies + test
Miguel de Icaza [Mon, 6 Mar 2017 19:39:13 +0000 (14:39 -0500)]
[mkbundle] Fixes the embedding of dependency assemblies + test

7 years agoFix the build.
Zoltan Varga [Mon, 6 Mar 2017 18:12:11 +0000 (13:12 -0500)]
Fix the build.

7 years ago[coop handles] Assert if interior ptr handle passed to mono_gchandle_from_handle
Aleksey Kliger [Wed, 22 Feb 2017 20:56:08 +0000 (15:56 -0500)]
[coop handles] Assert if interior ptr handle passed to mono_gchandle_from_handle

7 years ago[coop handles] Use a bitmap per HandleChunk to track interior ptr handles
Aleksey Kliger [Wed, 22 Feb 2017 19:50:41 +0000 (14:50 -0500)]
[coop handles] Use a bitmap per HandleChunk to track interior ptr handles

instead of using a flag byte in each HandleChunkElem.

7 years ago[reflection] Use coop handles for MonoMethodInfo.get_method_info and MonoPropertyInfo...
Aleksey Kliger [Wed, 25 Jan 2017 21:30:18 +0000 (16:30 -0500)]
[reflection] Use coop handles for MonoMethodInfo.get_method_info and MonoPropertyInfo.get_property_info

7 years ago[marshal] Pin valuetype ref icall arguments.
Aleksey Kliger [Wed, 25 Jan 2017 21:11:40 +0000 (16:11 -0500)]
[marshal] Pin valuetype ref icall arguments.

There are now 4 kinds of arguments to icalls:
  1. Plain old values like 'int', 'bool', etc.  Passed from the wrapper to the
     icall as is.
  2. Objects in the managed heap.  Passed using coop handles.
  3. 'out' objects in the managed heap.  A NULL coop handle is passed in
     and its final value is written back out to the caller's out argument.
  4. Value types passed by 'ref' or 'out'.  An "interior" coop handle is created which has
     the effect of pinning the object into which the ref points (if it points
     to the stack, nothign happens).  The argument is passed to the icall as a
     raw reference (MonoFoo*, not MonoFooHandle).  The ref will be unpinned
     when the icall wrapper returns.

7 years ago[coop handles] Add handles for interior pointers / valuetype handles
Aleksey Kliger [Mon, 23 Jan 2017 23:23:14 +0000 (18:23 -0500)]
[coop handles] Add handles for interior pointers / valuetype handles

- Call mono_handle_stack_scan for both the precise and the imprecise gc scans.
- For now assert during scan that all handles are to the beginning of an
  object.
- Add TYPED_VALUE_HANDLE_DECL Macro to declare valuetype handles:
     TYPED_VALUE_HANDLE_DECL (MonoMethodInfo);
     /* Declare MonoMethodInfoValueHandle and MonoMethodInfoValueHandleOut */
- Add MONO_HANDLE_NEW_GET_VALPTR (h, type, field) macro to create a new handle that
  points to "field" (of type "type") in the object "h".

7 years agoMake System.Drawing unit tests use Assert.Throws instead of [ExpectedException] ...
Frederik Carlier [Mon, 6 Mar 2017 17:12:35 +0000 (18:12 +0100)]
Make System.Drawing unit tests use Assert.Throws instead of [ExpectedException] (#4476)

* Use Assert.Throws<> intstead of ExpectedException

* System.Drawing.Tests: Use Assert.Throws instead of ExpectedException

7 years ago[resx2sr] Handle duplicate keys
Marek Safar [Mon, 6 Mar 2017 14:51:24 +0000 (15:51 +0100)]
[resx2sr] Handle duplicate keys

7 years ago[sgen] use memmove as src and dst can overlap
Bernhard Urban [Fri, 3 Mar 2017 22:41:19 +0000 (23:41 +0100)]
[sgen] use memmove as src and dst can overlap

valgrind said this on `mcs --version`:

```
==807== Thread 1:
==807== Source and destination overlap in memcpy(0x413f050, 0x413f050,
8)
==807==    at 0x4C32513: memcpy@@GLIBC_2.14 (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==807==    by 0x7FB6DD: sgen_qsort_rec (sgen-qsort.c:76)
==807==    by 0x7FB8CC: sgen_qsort (sgen-qsort.c:118)
==807==    by 0x7ED834: major_free_swept_blocks (sgen-marksweep.c:2136)
==807==    by 0x7F0590: sgen_memgov_calculate_minor_collection_allowance
(sgen-memory-governor.c:114)
==807==    by 0x7F0D2E: sgen_memgov_major_collection_end
(sgen-memory-governor.c:278)
==807==    by 0x7A6C71: major_finish_collection (sgen-gc.c:2116)
==807==    by 0x7A6E23: major_do_collection (sgen-gc.c:2158)
==807==    by 0x7A7464: sgen_perform_collection (sgen-gc.c:2355)
==807==    by 0x7A85AF: sgen_gc_collect (sgen-gc.c:2854)
==807==    by 0x77C022: mono_gc_collect (sgen-mono.c:2574)
==807==    by 0x726A18: mono_domain_finalize (gc.c:439)
==807==
==807== Source and destination overlap in memcpy(0x413f078, 0x413f078,
8)
==807==    at 0x4C32513: memcpy@@GLIBC_2.14 (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==807==    by 0x7FB6DD: sgen_qsort_rec (sgen-qsort.c:76)
==807==    by 0x7FB798: sgen_qsort_rec (sgen-qsort.c:92)
==807==    by 0x7FB8CC: sgen_qsort (sgen-qsort.c:118)
==807==    by 0x7ED834: major_free_swept_blocks (sgen-marksweep.c:2136)
==807==    by 0x7F0590: sgen_memgov_calculate_minor_collection_allowance
(sgen-memory-governor.c:114)
==807==    by 0x7F0D2E: sgen_memgov_major_collection_end
(sgen-memory-governor.c:278)
==807==    by 0x7A6C71: major_finish_collection (sgen-gc.c:2116)
==807==    by 0x7A6E23: major_do_collection (sgen-gc.c:2158)
==807==    by 0x7A7464: sgen_perform_collection (sgen-gc.c:2355)
==807==    by 0x7A85AF: sgen_gc_collect (sgen-gc.c:2854)
==807==    by 0x77C022: mono_gc_collect (sgen-mono.c:2574)
==807==
==807== Source and destination overlap in memcpy(0x413f088, 0x413f088,
8)
==807==    at 0x4C32513: memcpy@@GLIBC_2.14 (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==807==    by 0x7FB6DD: sgen_qsort_rec (sgen-qsort.c:76)
==807==    by 0x7FB798: sgen_qsort_rec (sgen-qsort.c:92)
==807==    by 0x7FB798: sgen_qsort_rec (sgen-qsort.c:92)
==807==    by 0x7FB8CC: sgen_qsort (sgen-qsort.c:118)
==807==    by 0x7ED834: major_free_swept_blocks (sgen-marksweep.c:2136)
==807==    by 0x7F0590: sgen_memgov_calculate_minor_collection_allowance
(sgen-memory-governor.c:114)
==807==    by 0x7F0D2E: sgen_memgov_major_collection_end
(sgen-memory-governor.c:278)
==807==    by 0x7A6C71: major_finish_collection (sgen-gc.c:2116)
==807==    by 0x7A6E23: major_do_collection (sgen-gc.c:2158)
==807==    by 0x7A7464: sgen_perform_collection (sgen-gc.c:2355)
==807==    by 0x7A85AF: sgen_gc_collect (sgen-gc.c:2854)
```

7 years ago[cert-sync] Don't import into BTLS store if BTLS is not available (#4475)
Alexander Köplinger [Mon, 6 Mar 2017 11:06:55 +0000 (12:06 +0100)]
[cert-sync] Don't import into BTLS store if BTLS is not available (#4475)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53015

7 years agoFinalize the implementation of SignedXml.ComputeSignature(). (#4452)
Vladimir Kazakov [Mon, 6 Mar 2017 10:12:04 +0000 (12:12 +0200)]
Finalize the implementation of SignedXml.ComputeSignature(). (#4452)

* Finalize the implementation of SignedXml.ComputeSignature().

The implementation was taken from Reference Source, which makes the behaviour of this method the same as in .NET Framework, as well as makes it possible to use custom signature descriptions.

7 years ago[jit] Fix an assert in mono_unwind_ops_encode_full () caused by an off-by-one error...
Zoltan Varga [Mon, 6 Mar 2017 07:31:49 +0000 (02:31 -0500)]
[jit] Fix an assert in mono_unwind_ops_encode_full () caused by an off-by-one error. Fixes #53066.

7 years ago[arm64] Fix the passing of small arguments on the stack in the gsharedvt trampoline...
Zoltan Varga [Sun, 5 Mar 2017 05:25:34 +0000 (00:25 -0500)]
[arm64] Fix the passing of small arguments on the stack in the gsharedvt trampoline, the calculation of their stack offset was incorrect in two places. Fixes #52866.

7 years ago[msvc] Update csproj files (#4474)
monojenkins [Sat, 4 Mar 2017 21:52:47 +0000 (21:52 +0000)]
[msvc] Update csproj files (#4474)

7 years ago[metadata] Fix a possible crash when looking up a p/invoke function. (#4471)
Vincent Povirk [Sat, 4 Mar 2017 17:03:56 +0000 (11:03 -0600)]
[metadata] Fix a possible crash when looking up a p/invoke function. (#4471)

It's possible for two threads to modify the same MonoMethodPInvoke.addr
in mono_lookup_pinvoke_call, with one thread setting it to NULL inside the
loop, and the other thread having completed the loop and expecting it to
be non-NULL.

Use an intermediate variable to prevent addr becoming non-NULL.

7 years ago[corert] Import System.Threading.ThreadPoolBoundHandle
Ludovic Henry [Fri, 3 Mar 2017 15:39:29 +0000 (10:39 -0500)]
[corert] Import System.Threading.ThreadPoolBoundHandle

7 years ago[corert] Import System.Diagnostics.Debug
Ludovic Henry [Fri, 3 Mar 2017 13:59:38 +0000 (08:59 -0500)]
[corert] Import System.Diagnostics.Debug

7 years ago[System.Core] Collections from corefx
Marek Safar [Thu, 2 Mar 2017 15:47:05 +0000 (16:47 +0100)]
[System.Core] Collections from corefx

7 years ago[mono/tests] run the managed test runner using TOOLS_RUNTIME
Aleksey Kliger [Thu, 2 Mar 2017 19:08:04 +0000 (14:08 -0500)]
[mono/tests] run the managed test runner using TOOLS_RUNTIME

The test runner itself should use the tools runtime, but the AOT step and the
tests themselves will be launched in the profile that's being tested.

7 years ago[fullaot] configure.ac: pass --runtime=mobile to AOT_{BUILD,RUN}_FLAGS
Aleksey Kliger [Wed, 1 Mar 2017 20:59:55 +0000 (15:59 -0500)]
[fullaot] configure.ac: pass --runtime=mobile to AOT_{BUILD,RUN}_FLAGS

For the profiles where we compile the BCL with -d:MOBILE, (where the
`[assembly: AssemblyVersion (Consts.FxVersion)]` attribute ends up pointing to
the mobile version) make sure we AOT and run the tests using the mobile
runtime.  This ensures that for the framework assemblies the version number in
the assembly matches the version number that the internal runtime remapping (
`mono/metadata/assembly.c` `framework_assemblies` array)

7 years ago[threads] Remove ThreadState_StopRequested (#4462)
Ludovic Henry [Fri, 3 Mar 2017 02:26:00 +0000 (21:26 -0500)]
[threads] Remove ThreadState_StopRequested (#4462)

7 years ago[jit] Remove some duplicate declarations.
Zoltan Varga [Fri, 3 Mar 2017 00:45:10 +0000 (19:45 -0500)]
[jit] Remove some duplicate declarations.

7 years ago[jit] Fix MethodAccessExceptions, the caller and callee were switched. (#4465)
Zoltan Varga [Fri, 3 Mar 2017 00:21:08 +0000 (19:21 -0500)]
[jit] Fix MethodAccessExceptions, the caller and callee were switched. (#4465)

7 years ago[threads] Remove mono_threads_create_thread (#4411)
Ludovic Henry [Thu, 2 Mar 2017 23:47:41 +0000 (18:47 -0500)]
[threads] Remove mono_threads_create_thread (#4411)

7 years ago[runtime] Fix an infinite loop in the runtime class init code. (#4455)
Zoltan Varga [Thu, 2 Mar 2017 21:08:00 +0000 (16:08 -0500)]
[runtime] Fix an infinite loop in the runtime class init code. (#4455)

The following can happen:
* Thread T1 starts initialization of C1
* Thread T2 starts initialization of C2
* T2 starts initialization of C1, it gets blocked on T1.
* T1 finishes initializing C1.
* T1 starts initialization of C3.
* T1 starts initialization of C2. It sees that T2 is
  still blocked on T1, but its not actually blocked, since
  C1 is finished. Still, we record that T1 is blocked.
* T3 starts initialization of C2, it gets into an infinite
  loop in the while loop, since the blocked_thread_hash
  now indicates that T1 and T2 are blocked on each other.

The solution is to not mark a thread as blocked, if its waiting
for a thread which is waiting on a finished lock. Fixes hangs
when running csc.

7 years ago[threads] Remove dead field cached_culture_info (#4410)
Ludovic Henry [Thu, 2 Mar 2017 21:06:27 +0000 (16:06 -0500)]
[threads] Remove dead field cached_culture_info (#4410)