Alexander Kyte [Wed, 10 Aug 2016 19:47:59 +0000 (15:47 -0400)]
Merge pull request #2780 from alexanderkyte/seq_point_optimize
[runtime] Implement performant unbounded-depth sequence point search
Aleksey Kliger [Wed, 10 Aug 2016 18:56:09 +0000 (14:56 -0400)]
[marshal] Ensure uses_handles is initialized.
Marek Safar [Wed, 10 Aug 2016 14:48:18 +0000 (16:48 +0200)]
[mono-api-html] Show assembly version differences
Niklas Therning [Wed, 10 Aug 2016 15:04:53 +0000 (17:04 +0200)]
Merge pull request #3213 from henricm/fix-for-win-securestring-to-bstr
Fix for win securestring to bstr
Marek Safar [Wed, 10 Aug 2016 13:54:04 +0000 (15:54 +0200)]
[mcs] Report second level references mismatch only for really used references. Fixes #42702
monojenkins [Tue, 9 Aug 2016 22:30:10 +0000 (00:30 +0200)]
Merge pull request #3387 from xmcclure/test-suite-bump
Update ms-test-suite to fix broken test
Alexander Köplinger [Tue, 9 Aug 2016 19:50:44 +0000 (21:50 +0200)]
[WinForms] Fix a test to correctly check for Mono
typeof (int).GetType ().GetType ().Name is now RuntimeType since https://github.com/mono/mono/pull/3045.
We did not notice this since most of our bots don't run with en-US locale set which this test requires.
Alexander Köplinger [Tue, 9 Aug 2016 13:08:06 +0000 (15:08 +0200)]
[mono] Use -size 0 instead of -empty as find argument
The latter is not supported by the "find" binary in Alpine. The former works everywhere.
Alexander Köplinger [Tue, 9 Aug 2016 12:45:18 +0000 (14:45 +0200)]
[mini] Fix mktemp argument in test_op_il_seq_point.sh
mktemp on e.g. Alpine requires at least six 'X' characters in the template argument.
Alexander Köplinger [Tue, 9 Aug 2016 11:50:02 +0000 (13:50 +0200)]
[mdoc] Remove --exclude=.svn from diff arguments
We don't use svn anymore since a very long time and some diff implementations (e.g. in Alpine) don't support --exclude.
Removing the argument is an easy fix.
Alexander Köplinger [Tue, 9 Aug 2016 11:46:37 +0000 (13:46 +0200)]
[acceptance-tests] Run ms-test-suite with debug symbols
So we get line numbers in stack traces.
Zoltan Varga [Tue, 9 Aug 2016 20:51:30 +0000 (22:51 +0200)]
[runtime] Use a coop semaphore instead of the io-layer one in the monitor code. (#3382)
Andi McClure [Tue, 9 Aug 2016 20:45:24 +0000 (16:45 -0400)]
Update ms-test-suite to fix broken test
Alexander Kyte [Tue, 9 Aug 2016 19:03:27 +0000 (15:03 -0400)]
Merge pull request #3386 from alexanderkyte/nunit_lite_return_status
[runtime] Make nunitlite return failure exit code when tests fail
Marek Safar [Tue, 9 Aug 2016 19:02:27 +0000 (21:02 +0200)]
Merge pull request #3373 from marek-safar/net-4.6.2
[bcl] Update Reference Source to .NET Framework 4.6.2
Alexander Kyte [Tue, 9 Aug 2016 18:35:48 +0000 (14:35 -0400)]
[runtime] Return failure return status if nunit-lite test suite fails
Alexander Kyte [Tue, 9 Aug 2016 18:45:02 +0000 (14:45 -0400)]
[runtime] Bump nunit-lite dependency for runner change
Marek Safar [Tue, 9 Aug 2016 17:44:45 +0000 (19:44 +0200)]
[System] Remove one no longer needed uri workaround. Fixes #43032
Marek Safar [Mon, 8 Aug 2016 16:30:44 +0000 (18:30 +0200)]
[bcl] Update Reference Source to .NET Framework 4.6.2
Henric Müller [Fri, 10 Jun 2016 12:33:17 +0000 (14:33 +0200)]
Moving BSTR conv to native code in SecureStringToBSTR.
Previous implementation laid out the BSTR structure
in directly memory in C# code. This layout was not correct
for windows.
Furthermore memory was allocated using AllocCoTaskMem but later freed
using SysFreeString which on windows are different memory areas.
Third issue is that SecureString asumes big-endian when copying the chars
to its internal byte buffer. So on little-endian environments,
a swap of bytes is needed before the buffer is sent to native side
for BSTR conversion. This should probably be handled internally in
SecureString instead.
Kamil Rytarowski [Tue, 9 Aug 2016 10:41:54 +0000 (12:41 +0200)]
Handle NetBSD specific iconv(3) call prototype (#3376)
In the past there were wars between constified and unconstified
second parameter.. NetBSD went with constifying it. POSIX went without
const and most other OSes standarized. NetBSD is still having
incompatible function prototype.
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <iconv.h>
size_t
iconv(iconv_t cd, const char ** restrict src, size_t * restrict srcleft,
char ** restrict dst, size_t * restrict dstleft);
Marcos Henrich [Tue, 9 Aug 2016 09:34:06 +0000 (10:34 +0100)]
Merge pull request #3353 from esdrubal/st-format
[corlib] Removed MVID and AOTID metadata.
Alexander Köplinger [Tue, 9 Aug 2016 00:12:17 +0000 (02:12 +0200)]
[ci] Another Python 3 fix in babysitter
```
File "./scripts/ci/babysitter", line 424, in run
for xml in (xml_list + wrote_xml):
TypeError: can only concatenate list (not "map") to list
```
Kamil Rytarowski [Tue, 9 Aug 2016 00:00:44 +0000 (02:00 +0200)]
Define _NETBSD_SOURCE for mincore(2) (#3380)
Kamil Rytarowski [Mon, 8 Aug 2016 23:59:31 +0000 (01:59 +0200)]
Fix the definition of legacy_closer(), detected on NetBSD (#3377)
Alexander Köplinger [Mon, 8 Aug 2016 21:48:53 +0000 (23:48 +0200)]
[ci] Python3 fix in babysitter script
iteritems() was removed in py3, we can just use items() instead since we're iterating
over the list anyway so we don't need the lazy evaluation behavior of iteritems().
Kamil Rytarowski [Mon, 8 Aug 2016 21:21:38 +0000 (23:21 +0200)]
Introduce mono-threads-netbsd.c (#3374)
Kamil Rytarowski [Mon, 8 Aug 2016 21:20:49 +0000 (23:20 +0200)]
Fix shell portability, detected with NetBSD/pkgsrc (#3375)
Aleksey Kliger (λgeek) [Mon, 8 Aug 2016 20:39:13 +0000 (16:39 -0400)]
Merge pull request #3349 from lambdageek/handle-icalls-in-jit
[handles] Add coop handles in wrapper to icalls with HANDLES() declaration
Aleksey Kliger [Fri, 5 Aug 2016 19:07:54 +0000 (15:07 -0400)]
[marshal] Assert if adding handles to an out or inout parameter of an icall.
Eventually should support this (System.RuntimeType.GetInterfaceMapData
could use it, for one) but for now just assert.
Aleksey Kliger [Thu, 4 Aug 2016 22:13:22 +0000 (18:13 -0400)]
[marshal] Load payload from return handle
Aleksey Kliger [Thu, 4 Aug 2016 22:12:50 +0000 (18:12 -0400)]
[marshal] If an icall is getting handles and MonoError added, it better
check for exceptions.
Aleksey Kliger [Wed, 3 Aug 2016 20:33:18 +0000 (16:33 -0400)]
[marshal] Wrap icall managed obj input arguments with handles.
Aleksey Kliger [Tue, 2 Aug 2016 22:01:25 +0000 (18:01 -0400)]
[runtime] Modify Zoltan's prototype to query icall-def.h handles tables
TODO: there's a gratuitous call to mono_lookup_internal_call_full().
Should really cache the uses_handle info along with the addr since the
lookup by name is rather involved.
Aleksey Kliger [Wed, 27 Jul 2016 22:50:13 +0000 (18:50 -0400)]
[runtime] Add HANDLES() macro to icall-def.h
The HANDLES() macro can be wrapped around an ICALL() to signal that
the icall should use the coop handles machinery from handles.h
Zoltan Varga [Mon, 13 Jun 2016 19:14:44 +0000 (15:14 -0400)]
Add RuntimeStructs class.
Zoltan Varga [Sun, 12 Jun 2016 21:30:59 +0000 (17:30 -0400)]
Pass a MonoError argument to icalls.
João Matos [Mon, 8 Aug 2016 16:26:28 +0000 (17:26 +0100)]
Merge pull request #3372 from ntherning/fix-g_win32_getlocale
Explicitly use the ANSI version of GetLocaleInfo() in g_win32_getlocale()
Niklas Therning [Mon, 8 Aug 2016 15:17:19 +0000 (17:17 +0200)]
Explicitly use the ANSI version of GetLocaleInfo() in g_win32_getlocale()
Since UNICODE is defined when Mono is compiled under Windows the
GetLocaleInfo() macro will expand to GetLocaleInfoW() which returns the
current locale identifier in g_win32_getlocale() in 16-bit Unicode.
g_win32_getlocale() however expects an 8-bit encoding. By using
GetLocaleInfoA() explicitly we'll get the identifier back as an ordinary 8-bit
C string.
This patch fixes the mono/tests/threadpool-exceptions5.exe test.
Marcos Henrich [Wed, 3 Aug 2016 16:30:25 +0000 (17:30 +0100)]
[corlib] Removed MVID and AOTID metadata.
MVID and AOTID metadata is no longer displayed at the end of the stack
trace.
Now, every stack frame contains a MVID and AOTID inlined.
An IL offset stackframe looks like:
at StackTraceDumper.Main () [0x00000] in <
a3ec873a838c42c29f4eba7cab7d1dfb>:0
A native offset stack frame looks like:
at StackTraceDumper.<Main>m__0 () <0x100e15d50 + 0x00029> in <
a3ec873a838c42c29f4eba7cab7d1dfb#
b37a9d11247b811ffffdaff8090d8a59>:0
Alexander Köplinger [Mon, 8 Aug 2016 09:47:08 +0000 (11:47 +0200)]
Merge pull request #2903 from krytarowski/netbsd-support-4
Implement mremap(2) usage on NetBSD
Zoltan Varga [Sun, 7 Aug 2016 23:40:17 +0000 (01:40 +0200)]
Fix the loaded llvm build.
Ludovic Henry [Sun, 7 Aug 2016 16:58:45 +0000 (18:58 +0200)]
Merge pull request #3370 from ludovic-henry/fix-finalizer-wait
[gc] Fix crash when doing WaitForPendingFinalizers
Ludovic Henry [Sun, 7 Aug 2016 11:45:56 +0000 (13:45 +0200)]
[gc] Fix crash when doing WaitForPendingFinalizers
The crash would come from a use-after-free of stack memory: in coop_cond_timedwait_alertable, we would allocate the struct we pass to the mono_thread_info_install_interrupt function on the stack. But there is no guarantee as to when break_coop_alertable_wait is run. The fix is to allocate the data passed to mono_thread_info_install_interrupt on the heap, and free it in the callback, or if it hasn't been interrupted.
Vincent Povirk [Sun, 7 Aug 2016 07:29:41 +0000 (02:29 -0500)]
[x86] Only pinvoke methods are stdcall. (#3354)
For xamarin bug 30146.
Zoltan Varga [Sat, 6 Aug 2016 17:03:34 +0000 (13:03 -0400)]
[runtime] Fix the loaded llvm build.
Marek Safar [Sat, 6 Aug 2016 07:31:04 +0000 (09:31 +0200)]
Merge pull request #3356 from marek-safar/cecil-update
Cecil update
Zoltan Varga [Fri, 5 Aug 2016 22:58:58 +0000 (18:58 -0400)]
[runtime] Store the original invoke method in WrapperInfo for delegate invokes, use that to fix the check in find_aot_method_in_amodule ().
Marek Safar [Fri, 5 Aug 2016 15:49:58 +0000 (17:49 +0200)]
[monosymbolicate] Update project file
Marek Safar [Fri, 5 Aug 2016 12:39:55 +0000 (14:39 +0200)]
[Mono.Cecil] Add special handling of legacy 0.9.5 version
Marek Safar [Fri, 5 Aug 2016 11:35:30 +0000 (13:35 +0200)]
[mono-symbolicate] Better test failure reporting
Marek Safar [Fri, 5 Aug 2016 10:43:19 +0000 (12:43 +0200)]
[mdoc] Update project file
Marek Safar [Thu, 4 Aug 2016 11:33:46 +0000 (13:33 +0200)]
[Mono.Contract] Less obsolete warnings
Marek Safar [Wed, 3 Aug 2016 09:07:33 +0000 (11:07 +0200)]
[bcl] Reflect cecil breaking changes
Marek Safar [Mon, 1 Aug 2016 15:55:19 +0000 (17:55 +0200)]
Update Cecil to the latest master
Alexander Köplinger [Fri, 5 Aug 2016 20:54:59 +0000 (22:54 +0200)]
Merge pull request #3363 from akoeplinger/fix-42938
[xbuild] Use the xbuild ToolsVersion even if another one is specified in the csproj
Zoltan Varga [Fri, 5 Aug 2016 20:29:14 +0000 (16:29 -0400)]
[arm] Fix aot support in the sdb soft breakpoint trampolines.
Alexander Köplinger [Fri, 5 Aug 2016 17:44:48 +0000 (19:44 +0200)]
[ci] Don't build mobile profiles in a monolite build
The mobile profiles rely on system resgen2 which is not present in a monolite build.
Niklas Therning [Fri, 5 Aug 2016 17:25:39 +0000 (19:25 +0200)]
Merge pull request #3359 from ntherning/sgen-avoid-scanning-stack-guard-page-on-windows
Prevent SGen from scanning the guard page used by Windows to dynamically grow the stack
Alexander Köplinger [Fri, 5 Aug 2016 16:58:44 +0000 (18:58 +0200)]
Merge pull request #3361 from xmcclure/babysitter-xml
Add mono/tests support to CI babysitter
Zoltan Varga [Fri, 10 Jun 2016 13:42:16 +0000 (09:42 -0400)]
Initial prototype for handling handle stack setup and argument/return value conversion in icall wrappers.
Niklas Therning [Fri, 5 Aug 2016 15:16:28 +0000 (17:16 +0200)]
Merge pull request #3365 from ntherning/fix-gc-graystack-stress-on-win64
Fixes the mono/tests/gc-graystack-stress test on Windows x64
Alexander Köplinger [Fri, 5 Aug 2016 14:50:04 +0000 (16:50 +0200)]
Merge pull request #3337 from akoeplinger/fix-alpine
Fix Alpine build
Alexander Köplinger [Wed, 3 Aug 2016 14:08:30 +0000 (16:08 +0200)]
[ci] Add a CI_TAGS option for building with monolite
Also ensure that all the CI_TAGS check work with multiple values.
Alexander Köplinger [Tue, 2 Aug 2016 15:48:06 +0000 (17:48 +0200)]
[ci] Run "make" in parallel in run-jenkins.sh
To speed up the build.
Ludovic Henry [Fri, 5 Aug 2016 13:05:34 +0000 (15:05 +0200)]
Merge pull request #3288 from ludovic-henry/iolayer-extract-threading
[io-layer] Extract threading code
Niklas Therning [Thu, 4 Aug 2016 14:51:57 +0000 (16:51 +0200)]
Prevent SGen from scanning the guard page used by Windows to dynamically grow
the stack.
Windows uses a guard page before the committed stack memory pages to detect
when the stack needs to be grown. If we suspend a thread just after a function
prolog has decremented the stack pointer to point into the guard page but
before the thread has been able to read or write to that page, starting the
stack scan at the thread's ESP/RSP will raise a STATUS_GUARD_PAGE_VIOLATION and
the process will crash.
This patch uses VirtualQuery() to determine whether the thread's stack_start
value points into the guard page. If it does the stack scan will instead be
started at the following, non-guard page.
Marek Safar [Fri, 5 Aug 2016 12:28:38 +0000 (14:28 +0200)]
Bump binary-reference-assemblies
Niklas Therning [Fri, 5 Aug 2016 12:18:27 +0000 (14:18 +0200)]
Fixes the mono/tests/gc-graystack-stress test on Windows x64
Windows x64 only has 1 MB of stack per thread which is less than other x86
64-bit OSes. Using 10000 for "depth" in this test causes a stack overflow on
Windows x64. This patch changes "depth" to 5000 only on Windows x64. 5000 will
fit within the default stack size.
Ludovic Henry [Fri, 5 Aug 2016 08:59:21 +0000 (10:59 +0200)]
Merge pull request #3355 from ludovic-henry/process-fix-exited
[process] Fix Process.Exited event triggered too soon
Miguel de Icaza [Fri, 5 Aug 2016 03:56:46 +0000 (23:56 -0400)]
Remove stray comment
Zoltan Varga [Thu, 4 Aug 2016 22:15:30 +0000 (18:15 -0400)]
[arm] Fix the initialization of the variable holding the single step trampoline address when using soft breakpoints + aot.
Alexander Kyte [Thu, 4 Aug 2016 20:03:14 +0000 (16:03 -0400)]
Merge pull request #3360 from alexanderkyte/mini_fix_timeout
[runtime] Increase mini bitcode timeout and add parallelism
Alexander Kyte [Thu, 4 Aug 2016 19:59:17 +0000 (15:59 -0400)]
[mobile_static] Give bitcode mini tests parallelism and more time
Alexander Köplinger [Thu, 4 Aug 2016 19:53:46 +0000 (21:53 +0200)]
[xbuild] Use the xbuild ToolsVersion even if another one is specified in the csproj
This is the recent behavior in .NET/MSBuild as well [1]:
> Starting in Visual Studio 2013, the MSBuild Toolset version is the same
> as the Visual Studio version number. MSBuild defaults to this Toolset
> within Visual Studio and on the command line, regardless of the
> toolset version specified in project file.
With this change xbuild will always use its own version instead
of the one specified in the project, unlessa ToolsVersion is forced
via the /tv switch on the command line.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=42938
[1] https://msdn.microsoft.com/en-us/library/
bb383796.aspx#Anchor_1
Andi McClure [Thu, 4 Aug 2016 19:09:34 +0000 (15:09 -0400)]
Add NUnit XML support to test babysitter, also document the communication protocol better
For test harnesses which don't support the full babysitter protocol,
the test harness can now report back paths to NUnit-format XML files
containing test results, or the paths to those XML files can be given
by whoever invoked the babysitter script. Failures listed in the XMLs
are included in the babysitter log.
test-runner.cs has been modified to report its XMLs, so we should now
see mono/tests failures in the babysitter log.
João Matos [Thu, 4 Aug 2016 17:27:37 +0000 (18:27 +0100)]
Merge pull request #3357 from tritao/zip_delete_entries
[System.IO.Compression] Remove the entry from ZipArchive entries when its deleted
Ludovic Henry [Thu, 4 Aug 2016 10:30:35 +0000 (12:30 +0200)]
[process] Fix Process.Exited event triggered too early
The Process.Exited event would be triggered too early, leading to crash in code using this event to access the process exit code. This is because in Process.ExitCode, we first check that the process has really exited.
Niklas Therning [Thu, 4 Aug 2016 14:45:59 +0000 (16:45 +0200)]
Merge pull request #3358 from ntherning/disable-sgen-red-zone-on-win64
Set SGen's REDZONE_SIZE=0 on Win64
Niklas Therning [Thu, 4 Aug 2016 14:07:11 +0000 (16:07 +0200)]
Set SGen's REDZONE_SIZE=0 on Win64 since the ABI defines no red zone and the
ABI states that "All memory beyond the current address of RSP is considered
volatile".
On Windows the stack grows dynamically as the thread needs more stack space.
Windows places a guard page before the page at the top of stack and when this
guard page is accessed by the thread Windows will add a new page to the stack
and resume the thread.
Before this fix SGen on Win64 subtracted 128 from the stack pointer of a
suspended thread and started the stack scan from this address. In the case
when the stack pointer would be less than 128 from the start of the memory
page SGen would attempt to read from the previous page. If this happens to be
the guard page a STATUS_GUARD_PAGE_VIOLATION exception is raised and the
process crashes. The sgen-weakref-stress.exe triggered this bug on almost
every invocation.
Ludovic Henry [Thu, 7 Jul 2016 17:44:03 +0000 (19:44 +0200)]
[io-layer] Remove threads.h, thread-private.h and wthreads.c
Ludovic Henry [Fri, 15 Jul 2016 01:55:42 +0000 (03:55 +0200)]
[io-layer] Remove unused _WAPI_THREAD_CURRENT
Ludovic Henry [Thu, 7 Jul 2016 17:31:50 +0000 (19:31 +0200)]
[io-layer] Extract thread MonoW32HandleOps
Ludovic Henry [Thu, 7 Jul 2016 17:13:11 +0000 (19:13 +0200)]
[io-layer] Extract GetThreadPriority and SetThreadPriority
Ludovic Henry [Thu, 7 Jul 2016 16:26:17 +0000 (18:26 +0200)]
[io-layer] Extract wapi_create_thread_handle
Ludovic Henry [Thu, 7 Jul 2016 15:27:49 +0000 (17:27 +0200)]
[io-layer] Extract wapi_thread_own_mutex and wapi_thread_disown_mutex
Ludovic Henry [Thu, 7 Jul 2016 15:07:40 +0000 (17:07 +0200)]
[io-layer] Extract wapi_current_thread_desc
Ludovic Henry [Thu, 7 Jul 2016 14:51:06 +0000 (16:51 +0200)]
[io-layer] Extract wapi_ref_thread_handle
Ludovic Henry [Thu, 7 Jul 2016 14:48:58 +0000 (16:48 +0200)]
[io-layer] Remove _wapi_thread_cur_apc_pending
Ludovic Henry [Thu, 7 Jul 2016 14:37:47 +0000 (16:37 +0200)]
[io-layer] Extract wapi_get_current_thread_handle
Ludovic Henry [Thu, 7 Jul 2016 13:59:16 +0000 (15:59 +0200)]
[io-layer] Extract wapi_thread_handle_set_exited
Ludovic Henry [Thu, 7 Jul 2016 12:25:35 +0000 (14:25 +0200)]
[io-layer] Make _wapi_getpid, _wapi_thread_own_mutex, _wapi_thread_disown_mutex and _wapi_mutex_abandon functions public
Ludovic Henry [Wed, 6 Jul 2016 13:17:50 +0000 (15:17 +0200)]
[io-layer] Make _WapiHandle_thread struct public
Ludovic Henry [Wed, 6 Jul 2016 13:08:06 +0000 (15:08 +0200)]
[mono-threads] Split platform and suspend specific functions
We split mono-threads-{posix,windows,mach}.c functions in 2 categories:
- platform: depends on the host the runtime is compiled on (possible values: posix or windows)
- suspend: depends on the mono-threads suspend backend in use (possible values: posix, windows or mach)
Ludovic Henry [Wed, 6 Jul 2016 12:25:44 +0000 (14:25 +0200)]
[io-layer] Make wait.c not depend on _wapi_thread_cur_apc_pending
João Matos [Thu, 4 Aug 2016 12:21:13 +0000 (13:21 +0100)]
[System.IO.Compression] Remove the entry from ZipArchive entries when its deleted. Fixes #43022.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43022.
Marek Safar [Thu, 4 Aug 2016 10:57:12 +0000 (12:57 +0200)]
[mcs] Better error reporting for missing types during conversion
Miguel de Icaza [Thu, 4 Aug 2016 03:14:51 +0000 (23:14 -0400)]
[build] Update order.xml data
Zoltan Varga [Wed, 3 Aug 2016 23:50:11 +0000 (19:50 -0400)]
[arm64] Assert that the displacement is not out of range int he b/bl macros, instead of in arm_get_disp (), so the assert location is more meaningful.
Alexander Kyte [Wed, 3 Aug 2016 17:35:21 +0000 (13:35 -0400)]
Merge pull request #3352 from alexanderkyte/mini_bitcode_fix
[runtime] Provide Mono.Simd.dll to llvmonlycheck+fullaotcheck