mono.git
6 years agoMerge pull request #5010 from Unity-Technologies/boehm-gc-alloc-fixed-sre
Aleksey Kliger (λgeek) [Fri, 16 Jun 2017 14:38:37 +0000 (10:38 -0400)]
Merge pull request #5010 from Unity-Technologies/boehm-gc-alloc-fixed-sre

Boehm GC Fixes - SRE and Handle Stack

6 years agoMerge pull request #5049 from mono/fixSdbTests
David Karlaš [Fri, 16 Jun 2017 13:04:54 +0000 (15:04 +0200)]
Merge pull request #5049 from mono/fixSdbTests

Fixed Mono.Debugger.Soft unit tests

6 years agoEnable translation of WSEACCESS (10013) on mobile (#5050)
Marek Habersack [Fri, 16 Jun 2017 09:30:16 +0000 (11:30 +0200)]
Enable translation of WSEACCESS (10013) on mobile (#5050)

This error can occur on mobile devices during network operations
as evidenced in https://bugzilla.xamarin.com/show_bug.cgi?id=56653
and having an actual description of the error printed in this case
makes it easier for the user to discover what's going on.

6 years agoFixed Mono.Debugger.Soft unit tests and added new `new String('a', 3);` unit test...
David Karlaš [Fri, 16 Jun 2017 07:46:36 +0000 (09:46 +0200)]
Fixed Mono.Debugger.Soft unit tests and added new `new String('a', 3);` unit test after `return;`

6 years agoMerge pull request #5042 from mono/sdbSyncDebuggerLibs
David Karlaš [Fri, 16 Jun 2017 06:41:17 +0000 (08:41 +0200)]
Merge pull request #5042 from mono/sdbSyncDebuggerLibs

Upstreaming changes from mono/debugger-libs to Mono.Debugger.Soft

6 years agoBug 44266 - Unable to change variable values whilst debugging
David Karlaš [Fri, 16 Jun 2017 06:21:55 +0000 (08:21 +0200)]
Bug 44266 - Unable to change variable values whilst debugging
https://github.com/mono/debugger-libs/commit/ac17c08938408abc7f5aaf0f862d83bbd2b56d42

6 years agocaching thread state
David Karlaš [Fri, 16 Jun 2017 06:19:07 +0000 (08:19 +0200)]
caching thread state
https://github.com/mono/debugger-libs/commit/e3e665525a59823563c23babaf5d0e29a44a644a

6 years agoUpdated SourceLocation with end line and end column
David Karlaš [Fri, 16 Jun 2017 06:18:14 +0000 (08:18 +0200)]
Updated SourceLocation with end line and end column
https://github.com/mono/debugger-libs/commit/479a84ce506e7cf25d6aac4353d59b7fc6526a17

6 years agoFix one extra allocation on MethodMirror.FullName
David Karlaš [Fri, 16 Jun 2017 06:17:00 +0000 (08:17 +0200)]
Fix one extra allocation on MethodMirror.FullName
https://github.com/mono/debugger-libs/commit/cfea89011ef690fe2cd9fefccf6b34ee1d4b1584

6 years agoBug 36053 - Broken enum values conversion
David Karlaš [Fri, 16 Jun 2017 06:16:05 +0000 (08:16 +0200)]
Bug 36053 - Broken enum values conversion
plus moved some code to correct location
https://github.com/mono/debugger-libs/commit/d65261617baddb5b41f665b0eb717cd1f81873b6

6 years agoFixed fetching Enum values on older runtimes
David Karlaš [Fri, 16 Jun 2017 06:14:53 +0000 (08:14 +0200)]
Fixed fetching Enum values on older runtimes
https://github.com/mono/debugger-libs/commit/525c3a685d52eb6ed053ee23c358e54dc091d9cb

6 years ago[Debugger] Set the encoding of the error/output readers.
David Karlaš [Fri, 16 Jun 2017 06:13:36 +0000 (08:13 +0200)]
[Debugger] Set the encoding of the error/output readers.
Bug 40556 - Output pad no longer displays unicode characters
https://github.com/mono/debugger-libs/commit/c10de4dd44493156a112fdc0d315db75e0457a2d

6 years agoMerge pull request #5032 from kumpera/profiler-reorder-heap-events
Rodrigo Kumpera [Fri, 16 Jun 2017 00:56:05 +0000 (20:56 -0400)]
Merge pull request #5032 from kumpera/profiler-reorder-heap-events

Fix how HEAP_START / HEAP_END works

6 years agoAdd back missing TypeConverter that got removed in last commit
Alexander Köplinger [Thu, 15 Jun 2017 23:20:03 +0000 (01:20 +0200)]
Add back missing TypeConverter that got removed in last commit

Also bump API snapshot with the latest changes.

6 years agoUse CoreFX sources for System.Printing (#5041)
Frederik Carlier [Thu, 15 Jun 2017 22:57:02 +0000 (00:57 +0200)]
Use CoreFX sources for System.Printing (#5041)

6 years agoUse CoreFX sources for System.Drawing.Imaging (#5048)
Frederik Carlier [Thu, 15 Jun 2017 22:55:18 +0000 (00:55 +0200)]
Use CoreFX sources for System.Drawing.Imaging (#5048)

* Use CoreFX sources for System.Drawing.Imaging

* Bump API snapshot

6 years agoIn mono_thread_info_suspend_lock in non-coop, don't assert MonoThreadInfo* is non...
Aleksey Kliger [Thu, 15 Jun 2017 17:50:10 +0000 (13:50 -0400)]
In mono_thread_info_suspend_lock in non-coop, don't assert MonoThreadInfo* is non-NULL

mono_thread_info_suspend_lock () can be called from boehm-gc.c
on_gc_notification before the new thread's start_wrapper calls
mono_thread_info_attach but after pthread_create calls the start wrapper.

As a result, the asserts in mono_thread_info_suspend_lock_with_info can catch
the new thread in an inconsistent state.

6 years ago[msvc] Update csproj files
monojenkins [Thu, 15 Jun 2017 16:24:15 +0000 (16:24 +0000)]
[msvc] Update csproj files

6 years agoUse Drawing2D classes from CoreFX
Frederik Carlier [Thu, 15 Jun 2017 12:35:07 +0000 (14:35 +0200)]
Use Drawing2D classes from CoreFX

6 years agoEnsure monodoc/Test/ exists, with an empty file
Jo Shields [Thu, 15 Jun 2017 12:18:26 +0000 (13:18 +0100)]
Ensure monodoc/Test/ exists, with an empty file

This prevents build failures building monodoc tests, as git cannot check out empty directories, but Test/ must exist for `make check` to work

6 years agoInitialize new handle chunks on in mono_handle_stack_alloc ()
Aleksey Kliger [Thu, 15 Jun 2017 14:39:57 +0000 (10:39 -0400)]
Initialize new handle chunks on in mono_handle_stack_alloc ()

6 years agoUse Brush classes from CoreFX (#5039)
Frederik Carlier [Thu, 15 Jun 2017 09:29:35 +0000 (11:29 +0200)]
Use Brush classes from CoreFX (#5039)

6 years agoRevert "[win] set HAVE_ONLINE_VES" (#5038)
Bernhard Urban [Thu, 15 Jun 2017 04:45:50 +0000 (06:45 +0200)]
Revert "[win] set HAVE_ONLINE_VES" (#5038)

This reverts commit 501e77f91215d31c56aa63de0c99c91d8b13bfa5.

superseded by https://github.com/mono/mono/pull/5000

6 years ago[arm64] Fix the patching of MONO_PATCH_INFO_METHOD_JUMP so it handles thunks properly...
Zoltan Varga [Thu, 15 Jun 2017 01:54:01 +0000 (21:54 -0400)]
[arm64] Fix the patching of MONO_PATCH_INFO_METHOD_JUMP so it handles thunks properly. Allocate thunk space for tail calls. Fixes asserts in the System.Numerics xunit tests. (#5026)

6 years ago[packaging] Add missing .pc files to Windows folder
Alexander Köplinger [Thu, 15 Jun 2017 00:16:18 +0000 (02:16 +0200)]
[packaging] Add missing .pc files to Windows folder

It got accidentally ignored by the root .gitignore.

6 years ago[profiler] Handle zero object heap dumps in mprof-report and fix the test suite.
Rodrigo Kumpera [Wed, 14 Jun 2017 20:08:14 +0000 (13:08 -0700)]
[profiler] Handle zero object heap dumps in mprof-report and fix the test suite.

6 years ago[profiler] Emit post-gc sync point with the world stopped to avoid racing with alloca...
Rodrigo Kumpera [Tue, 13 Jun 2017 23:41:13 +0000 (16:41 -0700)]
[profiler] Emit post-gc sync point with the world stopped to avoid racing with allocating threads not stopped on the GC lock.

6 years ago[sgen] Don't report GC moves with the world running and before a GC happened - it...
Rodrigo Kumpera [Tue, 13 Jun 2017 23:39:14 +0000 (16:39 -0700)]
[sgen] Don't report GC moves with the world running and before a GC happened - it makes no sense!.

6 years ago[sgen] Move STW GC events to sgen-stw.c so they are properly reported.
Rodrigo Kumpera [Tue, 13 Jun 2017 23:34:24 +0000 (16:34 -0700)]
[sgen] Move STW GC events to sgen-stw.c so they are properly reported.

6 years ago[profiler] Move HEAP_START and HEAP_EVENTS to happen outside of heap shots.
Rodrigo Kumpera [Tue, 13 Jun 2017 23:26:07 +0000 (16:26 -0700)]
[profiler] Move HEAP_START and HEAP_EVENTS to happen outside of heap shots.

They now are produced every time a GC spills heap events such as roots, moves and objects.

Additionally, I changed GC syncpoints to happen in case any GC events are active.
It's a safer choice with little penalty. Figuring out the actual combinations that would require them is non-trivial.

6 years ago[packaging] Fix wrong argument in Windows script
Alexander Köplinger [Wed, 14 Jun 2017 18:35:50 +0000 (20:35 +0200)]
[packaging] Fix wrong argument in Windows script

6 years ago[jit] Add a ExceptionTraceIp structure to represents entries in MonoException.trace_i...
Zoltan Varga [Wed, 14 Jun 2017 18:28:01 +0000 (14:28 -0400)]
[jit] Add a ExceptionTraceIp structure to represents entries in MonoException.trace_ips, making it easier to add more information to it in the future. NFC. (#5025)

6 years agoMerge pull request #5020 from lambdageek/fix-strict-loader-image-cache-hit
Aleksey Kliger (λgeek) [Wed, 14 Jun 2017 18:17:10 +0000 (14:17 -0400)]
Merge pull request #5020 from lambdageek/fix-strict-loader-image-cache-hit

[loader] If using strict strong names, recheck loaded assm before returning it.

6 years ago[packaging] Fix prerequisite in Windows script
Alexander Köplinger [Wed, 14 Jun 2017 16:29:43 +0000 (18:29 +0200)]
[packaging] Fix prerequisite in Windows script

6 years agoUse CoreFX sources for System.Drawing.Text (#5036)
Frederik Carlier [Wed, 14 Jun 2017 16:20:07 +0000 (18:20 +0200)]
Use CoreFX sources for System.Drawing.Text (#5036)

6 years agoUse CoreFX sources for System.Drawing.Imaging (#5035)
Frederik Carlier [Wed, 14 Jun 2017 16:17:19 +0000 (18:17 +0200)]
Use CoreFX sources for System.Drawing.Imaging (#5035)

* Use CoreFX sources for System.Drawing.Imaging

* Bump API snapshot

6 years agoUse source from CoreFX for System.Drawing.Drawing2D (#5034)
Frederik Carlier [Wed, 14 Jun 2017 16:12:32 +0000 (18:12 +0200)]
Use source from CoreFX for System.Drawing.Drawing2D (#5034)

6 years ago[packaging] Remove msiexec prerequisite from Windows script
Alexander Köplinger [Wed, 14 Jun 2017 15:31:04 +0000 (17:31 +0200)]
[packaging] Remove msiexec prerequisite from Windows script

We're using lessmsi now.

6 years ago[packaging] Exit Windows packaging script on error
Alexander Köplinger [Wed, 14 Jun 2017 14:29:29 +0000 (16:29 +0200)]
[packaging] Exit Windows packaging script on error

Also quote passed in mdk path.

6 years agoUse GC memory for handle stack under Boehm so it's scanned. Cleanup handle stack...
Jonathan Chambers [Wed, 14 Jun 2017 00:32:06 +0000 (20:32 -0400)]
Use GC memory for handle stack under Boehm so it's scanned. Cleanup handle stack on thread unregister.

6 years ago[metadata] s/HAVE_ONLINE_VES/ENABLE_ILGEN/g
Bernhard Urban [Fri, 9 Jun 2017 11:10:36 +0000 (13:10 +0200)]
[metadata] s/HAVE_ONLINE_VES/ENABLE_ILGEN/g

6 years ago[configure] move HAVE_ONLINE_VES away from autotools to a header file
Bernhard Urban [Fri, 9 Jun 2017 11:10:36 +0000 (13:10 +0200)]
[configure] move HAVE_ONLINE_VES away from autotools to a header file

6 years agoBump corefx
Alexander Köplinger [Tue, 13 Jun 2017 23:26:44 +0000 (01:26 +0200)]
Bump corefx

6 years ago[Mono.Security] Fix typo in CryptographicException message
saraedum [Tue, 13 Jun 2017 23:42:22 +0000 (01:42 +0200)]
[Mono.Security] Fix typo in CryptographicException message

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

6 years ago[loader] If using strict strong names, recheck loaded assm before returning it.
Aleksey Kliger [Mon, 12 Jun 2017 22:11:26 +0000 (18:11 -0400)]
[loader] If using strict strong names, recheck loaded assm before returning it.

Suppose we have two versions of an assembly: AsmA 1.0.0.0 and AsmA 2.0.0.0 that
we want to load into the same domain at the same time (for example we want to
load AsmB and AsmC that statically reference the two versions, respectively, or
maybe we used reflection).  Suppose version 1 got loaded first (and we found it
on our MONO_PATH in "somepathdir/AsmA.dll").  Now we want to load version 2.
The problem is that if version 1 is on MONO_PATH first, we'll find a filename
that matches ("somepathdir/AsmA.dll") and try to open that image.  Then we'll
end up here in mono_assembly_open_predicate() after the mono_image_open_a_lot()
call hits the image cache.  So we get back an image and image->assembly is
version 1.

The old behavior would just return any non-NULL image->assembly.  The new
behavior is to check the predicate and reject opening the propose file if the
predicate doesn't match.  (If we're not using the strict loader, or if there's
no predicate set, return the existing image->assembly as before).

6 years ago[tests] Strict assembly loading of two version of the same assm should work.
Aleksey Kliger [Tue, 13 Jun 2017 22:30:50 +0000 (18:30 -0400)]
[tests] Strict assembly loading of two version of the same assm should work.

In particular, we should be able to use classes/methods that are unique to each
version.  We should not get only one version loaded.

6 years ago[MacSDK] Remove quotes in nuget wrapper script
Alexander Köplinger [Tue, 13 Jun 2017 22:45:58 +0000 (00:45 +0200)]
[MacSDK] Remove quotes in nuget wrapper script

None of the other wrapper scripts quote the Mono path and this
broke the Windows packaging script which extracts nuget from the
Mac package.

6 years agoRevert "[exceptions] only do SIGSEGV related actions for SIGSEGVs in mono_handle_nati...
Bernhard Urban [Wed, 7 Jun 2017 21:07:34 +0000 (23:07 +0200)]
Revert "[exceptions] only do SIGSEGV related actions for SIGSEGVs in mono_handle_native_crash"

This reverts commit a27bc024f1732edb6b1edddd96d6c90f4a2983f8.

We never want the crash handler to be recursive.

6 years ago[aot] fix compilation for targets that do not set MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES...
Bernhard Urban [Tue, 13 Jun 2017 19:56:52 +0000 (21:56 +0200)]
[aot] fix compilation for targets that do not set MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES (#5017)

6 years agoMerge pull request #5011 from kumpera/quiet-mode
Rodrigo Kumpera [Tue, 13 Jun 2017 19:53:46 +0000 (15:53 -0400)]
Merge pull request #5011 from kumpera/quiet-mode

Don't emit profiler events we don't need to.

6 years ago[profiler] Don't emit sync point on restart the world unless gc moves are enabled.
Rodrigo Kumpera [Tue, 13 Jun 2017 19:53:31 +0000 (12:53 -0700)]
[profiler] Don't emit sync point on restart the world unless gc moves are enabled.

6 years ago[profiler] Add + prefix to file names to append the pid. This makes enabling it with...
Rodrigo Kumpera [Mon, 12 Jun 2017 23:36:53 +0000 (16:36 -0700)]
[profiler] Add + prefix to file names to append the pid. This makes enabling it with env vars doable.

6 years agoBump bockbuild (#5023)
Marius Ungureanu [Tue, 13 Jun 2017 18:52:42 +0000 (21:52 +0300)]
Bump bockbuild (#5023)

6 years ago[ci] Get rid of remaining usages of WORKSPACE env var
Alexander Köplinger [Tue, 13 Jun 2017 16:07:47 +0000 (18:07 +0200)]
[ci] Get rid of remaining usages of WORKSPACE env var

Most of it was already removed in ea519ada8c38cae67f56e27ca70d32923ce9f23a

6 years agoBump corefx
Marek Safar [Tue, 13 Jun 2017 11:44:43 +0000 (13:44 +0200)]
Bump corefx

6 years ago[packaging] Fix path to wrapper.bat for Windows MSI
Alexander Köplinger [Tue, 13 Jun 2017 14:18:21 +0000 (16:18 +0200)]
[packaging] Fix path to wrapper.bat for Windows MSI

6 years agoMerge pull request #5002 from BrzVlad/feature-sgen-modes
Vlad Brezae [Tue, 13 Jun 2017 11:14:47 +0000 (14:14 +0300)]
Merge pull request #5002 from BrzVlad/feature-sgen-modes

[sgen] SGen modes

6 years agoMerge pull request #5021 from BrzVlad/fix-parallel-fixes
Vlad Brezae [Tue, 13 Jun 2017 11:07:29 +0000 (14:07 +0300)]
Merge pull request #5021 from BrzVlad/fix-parallel-fixes

[sgen] Fix parallel fixes

6 years ago[profiler] Fix issue found by review.
Rodrigo Kumpera [Tue, 13 Jun 2017 05:08:28 +0000 (22:08 -0700)]
[profiler] Fix issue found by review.

6 years ago[packaging] Simplify Windows packaging scripts
Alexander Köplinger [Mon, 12 Jun 2017 20:44:55 +0000 (22:44 +0200)]
[packaging] Simplify Windows packaging scripts

We don't need to build in a separate checkout of mono anymore.
Also use .pkg passed in from upstream build.

6 years ago[packaging] Move Windows MSI scripts into repository
Alexander Köplinger [Sat, 10 Jun 2017 00:34:30 +0000 (02:34 +0200)]
[packaging] Move Windows MSI scripts into repository

They lived in https://github.com/mono/release before, moving them
into the main repo allows us to version them more easily.

Note: I intend to do more cleanup on those scripts in the future,
this is just the first step.

6 years ago[man] Add entries for sgen modes and new major/minor types
Vlad Brezae [Thu, 8 Jun 2017 23:22:59 +0000 (02:22 +0300)]
[man] Add entries for sgen modes and new major/minor types

6 years ago[sgen] Add sgen modes
Vlad Brezae [Mon, 1 May 2017 20:56:34 +0000 (23:56 +0300)]
[sgen] Add sgen modes

Group gc params configurations into general gc modes. The default mode (SGEN_MODE_NONE) is what we've been using so far, meaning old default features. The other modes can include experimental features.

6 years ago[profiler] Remove heapshot request polling from all over the place and depend only...
Rodrigo Kumpera [Mon, 12 Jun 2017 20:21:37 +0000 (13:21 -0700)]
[profiler] Remove heapshot request polling from all over the place and depend only on the finalizer callback.

We the profiler now emiting a lot less events by default, all the existing polling no longer makes sense as they won't matter in the common path.

Instead we make sure the finalization end callback is always installed and poll from it.

This introduces the risk of a heapdump never happening or experiencing long delays because there are either too many finalizers or one of them hung.
It's an acceptable risk.

6 years ago[build] Bumps mcs bootstrap requirement
Marek Safar [Mon, 12 Jun 2017 16:56:10 +0000 (18:56 +0200)]
[build] Bumps mcs bootstrap requirement

6 years ago[msvc] Update csproj files (#4898)
monojenkins [Mon, 12 Jun 2017 20:55:04 +0000 (21:55 +0100)]
[msvc] Update csproj files (#4898)

6 years ago[profiler] When using heapshot, don't collect roots when not doing a heapshot.
Rodrigo Kumpera [Fri, 9 Jun 2017 23:06:50 +0000 (16:06 -0700)]
[profiler] When using heapshot, don't collect roots when not doing a heapshot.

6 years ago[profiler] Don't emit sync points during GC if we don't need to.
Rodrigo Kumpera [Fri, 9 Jun 2017 21:56:32 +0000 (14:56 -0700)]
[profiler] Don't emit sync points during GC if we don't need to.

6 years ago[profiler] Don't emit thread and gc events if they are not enabled.
Rodrigo Kumpera [Fri, 9 Jun 2017 21:09:29 +0000 (14:09 -0700)]
[profiler] Don't emit thread and gc events if they are not enabled.

6 years agoMerge pull request #4967 from kumpera/profiler-arg-cleanup
Rodrigo Kumpera [Mon, 12 Jun 2017 17:07:24 +0000 (10:07 -0700)]
Merge pull request #4967 from kumpera/profiler-arg-cleanup

Rework profiler argument handling.

6 years agoBump corefx
Marek Safar [Mon, 12 Jun 2017 13:58:03 +0000 (15:58 +0200)]
Bump corefx

6 years agoFix OpenMappedWebConfiguration throws: System.IndexOutOfRangeException, when using...
Pablo Ruiz García [Sun, 11 Jun 2017 23:55:26 +0000 (01:55 +0200)]
Fix OpenMappedWebConfiguration throws: System.IndexOutOfRangeException, when using RazorGenerator under mono (#5013)

6 years agoFix System.Numerics xunit tests and add them to CI (#5006)
Alexander Köplinger [Sun, 11 Jun 2017 23:44:50 +0000 (01:44 +0200)]
Fix System.Numerics xunit tests and add them to CI (#5006)

* Fix System.Numerics xunit tests and add them to CI

Xunit.Extensions.NetCore.dll is available as a net46 version now
so we can just use it instead of building it from our buildtools fork.
This also allows us to remove the fork from our submodules.

We were missing running the System.Numerics xunit tests in CI,
this adds them so we catch breaks like these earlier.

* Skip tests on Windows, they seem to fail there

6 years ago[mcs] C#7 type pattern matching
Marek Safar [Sun, 11 Jun 2017 07:51:44 +0000 (09:51 +0200)]
[mcs] C#7 type pattern matching

6 years ago[sdb] Fix passing of nullable parameters in invokes. Fixes #57160. (#5012)
Zoltan Varga [Sat, 10 Jun 2017 03:53:39 +0000 (23:53 -0400)]
[sdb] Fix passing of nullable parameters in invokes. Fixes #57160. (#5012)

6 years ago[sgen] Avoid using parallel minors for small nurseries
Vlad Brezae [Fri, 9 Jun 2017 22:50:20 +0000 (01:50 +0300)]
[sgen] Avoid using parallel minors for small nurseries

It is not effective and it can lead to regressions, due to the added synchronizations and work splitting.

6 years ago[sgen] Disable parallel mode if not enough cores
Vlad Brezae [Fri, 9 Jun 2017 22:43:04 +0000 (01:43 +0300)]
[sgen] Disable parallel mode if not enough cores

6 years ago[sgen] Use logical cpu count for number of workers
Vlad Brezae [Fri, 9 Jun 2017 22:33:09 +0000 (01:33 +0300)]
[sgen] Use logical cpu count for number of workers

It actually leads to better performance. The downside is the creation of more sgen workers. This is currently capped at 8.

6 years agoUse regular allocator rather than GC memory for SRE related types since the contained...
Jonathan Chambers [Fri, 9 Jun 2017 22:16:26 +0000 (18:16 -0400)]
Use regular allocator rather than GC memory for SRE related types since the contained GC tracked hash tables are now themselves roots since 863ddf25bfb4e88db7225dd4968a4403840c42af.
Fixes crash due to MonoDynamicAssembly or MonoDynamicImage being collected under Boehm as they were unreferenced GC memory.

6 years agoRemove the mono-profiler- prefix from all source files in the profiler subdir.
Rodrigo Kumpera [Fri, 9 Jun 2017 20:24:20 +0000 (13:24 -0700)]
Remove the mono-profiler- prefix from all source files in the profiler subdir.

Additionally, rename arg-parsing.c to log-args.c so it's clear it's part of the log profiler.

6 years ago[profiler]Use g_warning and remove bad usage() line
Rodrigo Kumpera [Fri, 9 Jun 2017 20:04:22 +0000 (13:04 -0700)]
[profiler]Use g_warning and remove bad usage() line

6 years agoMerge pull request #4998 from kumpera/fix_56684
Rodrigo Kumpera [Fri, 9 Jun 2017 18:44:43 +0000 (14:44 -0400)]
Merge pull request #4998 from kumpera/fix_56684

[corlib] Don't pass RuntimeMethodHandle across domains. Fixes #56684

6 years agoMerge pull request #4997 from lambdageek/bug-57222
Aleksey Kliger (λgeek) [Fri, 9 Jun 2017 17:40:28 +0000 (13:40 -0400)]
Merge pull request #4997 from lambdageek/bug-57222

[sre] FieldBuilder:RuntimeResolve shouldn't lookup by name (Fixes #57222)

6 years agoBump corefx
Marek Safar [Fri, 9 Jun 2017 11:54:24 +0000 (13:54 +0200)]
Bump corefx

6 years ago[marshal] allocate dummy string always in root domain
Bernhard Urban [Wed, 7 Jun 2017 16:28:32 +0000 (18:28 +0200)]
[marshal] allocate dummy string always in root domain

otherwise it can happen that the dummy string is allocated in a
different domain, and when it's onloaded the GC root points to an
invalid object.

6 years agoBunch of minor fixes.
Rodrigo Kumpera [Thu, 8 Jun 2017 22:40:40 +0000 (15:40 -0700)]
Bunch of minor fixes.

6 years agoRemove env var.
Rodrigo Kumpera [Thu, 8 Jun 2017 22:37:43 +0000 (15:37 -0700)]
Remove env var.

6 years agoupdate usage, print warning on output:-FILENAME and add a TODO.
Rodrigo Kumpera [Thu, 8 Jun 2017 22:36:06 +0000 (15:36 -0700)]
update usage, print warning on output:-FILENAME and add a TODO.

6 years agoRemove spurious header. Change from enum to bucket of defines.
Rodrigo Kumpera [Thu, 8 Jun 2017 22:21:45 +0000 (15:21 -0700)]
Remove spurious header. Change from enum to bucket of defines.

6 years ago[test] Test SRE of a class with two methods with the same name.
Aleksey Kliger [Thu, 8 Jun 2017 21:44:54 +0000 (17:44 -0400)]
[test] Test SRE of a class with two methods with the same name.

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57222

Although methods aren't affected by this bug, I added a regression test for
this case anyway in case the implementation changes.

Currently MethodBuilder.RuntimeResolve() goes through a different codepath - it
calls RuntimeType.GetMethod (MethodInfo) which calls into an icall which looks
for a method with a matching token rather than a matching name.

6 years ago[corlib] Don't pass RuntimeMethodHandle across domains. Fixes #56684
Rodrigo Kumpera [Thu, 8 Jun 2017 21:10:38 +0000 (14:10 -0700)]
[corlib] Don't pass RuntimeMethodHandle across domains. Fixes #56684

We can't pass RuntimeMethodHandle across AppDomains since that can lead to memory corruption.

The way this happens is that when Domain (A) passes a method handle (M) to Domain (B), (B) will get the reflection object for
which will add that MonoMethod to the per-domain reflection hashtable. This won't cause the assembly of (M) to be registered with (B).

When (A) is unloaded, it might be the only domain referencing the assembly of (M), cause it to unload resulting in (B) having a dangling
pointer to (M) on its reflection hashtable.

The fix is to serialize enough lookup data across the wire so we can do type/method lookup using reflection on the target domain.
It might be slower, but this only happens on some remoting slowpaths anyways.

Finally, we can't simply register the assembly of (M) into domain (B) as that list (MonoDomain::domain_assemblies) is used for type loading,
thus breaking the target domain in some scenarios.

6 years ago[sre] FieldBuilder:RuntimeResolve shouldn't lookup by name. (Fixes #57222)
Aleksey Kliger [Thu, 8 Jun 2017 19:56:30 +0000 (15:56 -0400)]
[sre] FieldBuilder:RuntimeResolve shouldn't lookup by name. (Fixes #57222)

RuntimeType:GetField (FieldInfo) looks up the field by name and attributes,
which doesn't work for SRE because it is legal to create multiple fields with
the same name and type and attributes.  So lookup using the
RuntimeFieldHandle (aka MonoClassField*) instead.

6 years ago[test] Test SRE of a class with two fields with same name
Aleksey Kliger [Thu, 8 Jun 2017 20:11:14 +0000 (16:11 -0400)]
[test] Test SRE of a class with two fields with same name

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57222

6 years agoMerge pull request #4995 from lambdageek/dev-monodis-show-field-tokens
Aleksey Kliger (λgeek) [Thu, 8 Jun 2017 19:54:04 +0000 (15:54 -0400)]
Merge pull request #4995 from lambdageek/dev-monodis-show-field-tokens

[monodis] Document --show-tokens and show field tokens

6 years ago[amd64] Fix a check in mono_emit_stack_alloc (). (#4985)
Zoltan Varga [Thu, 8 Jun 2017 19:47:27 +0000 (15:47 -0400)]
[amd64] Fix a check in mono_emit_stack_alloc (). (#4985)

6 years ago[monodis] Show field tokens in --show-tokens mode
Aleksey Kliger [Thu, 8 Jun 2017 15:38:31 +0000 (11:38 -0400)]
[monodis] Show field tokens in --show-tokens mode

6 years ago[monodis] Print table name (when valid) in --show-tokens mode
Aleksey Kliger [Thu, 8 Jun 2017 15:37:57 +0000 (11:37 -0400)]
[monodis] Print table name (when valid) in --show-tokens mode

6 years ago[monodis] Document --show-tokens
Aleksey Kliger [Thu, 8 Jun 2017 15:36:45 +0000 (11:36 -0400)]
[monodis] Document --show-tokens

6 years agoMerge pull request #4994 from lewurm/interp-aot-mode-fix-windows
Niklas Therning [Thu, 8 Jun 2017 12:48:10 +0000 (14:48 +0200)]
Merge pull request #4994 from lewurm/interp-aot-mode-fix-windows

[win] set HAVE_ONLINE_VES

6 years ago[win] set HAVE_ONLINE_VES
Bernhard Urban [Thu, 8 Jun 2017 09:50:19 +0000 (11:50 +0200)]
[win] set HAVE_ONLINE_VES