mono.git
7 years agoMaking sure mono_marshal_free is used instead of g_free in mono_string_builder_to_utf8
Henric Müller [Thu, 9 Jun 2016 13:21:56 +0000 (15:21 +0200)]
Making sure mono_marshal_free is used instead of g_free in mono_string_builder_to_utf8

8 years ago[System] Fixes build
Marek Safar [Mon, 16 May 2016 11:38:17 +0000 (13:38 +0200)]
[System] Fixes build

8 years ago[System] Authorization from referencesource
Marek Safar [Mon, 16 May 2016 10:13:52 +0000 (12:13 +0200)]
[System] Authorization from referencesource

8 years agoMerge pull request #2995 from marek-safar/rs-IPAddress
Marek Safar [Mon, 16 May 2016 09:07:38 +0000 (11:07 +0200)]
Merge pull request #2995 from marek-safar/rs-IPAddress

[System] IPAddress from referencesource

8 years ago[reflection] Avoid force-setting klass->has_finalize for dynamic classes, compute...
Zoltan Varga [Sun, 15 May 2016 09:18:21 +0000 (05:18 -0400)]
[reflection] Avoid force-setting klass->has_finalize for dynamic classes, compute it normally. Fixes #40953. (#2997)

8 years ago[llvmonly] Avoid generating gsharedvt out wrappers for non-generic signatures.
Zoltan Varga [Sat, 14 May 2016 21:44:51 +0000 (17:44 -0400)]
[llvmonly] Avoid generating gsharedvt out wrappers for non-generic signatures.

8 years agomkbundle commands for cross compilation. (#2970)
Miguel de Icaza [Sat, 14 May 2016 04:32:14 +0000 (21:32 -0700)]
mkbundle commands for cross compilation. (#2970)

* Start of packager for mkbundle

* [mkbundle] Add fingerprint and directory at end of package

* [mkbundle] Update embedding file format, add support for --options, support for --runtime, chmod +x

* [driver] Add a way to parse arbitrary command line options

* [mkbundle] Align the assemblies on a page boundary, do not release directory buffer

* Work-around odd compiler error by using memcpy

* Update makefile

* Fix the windows build

* [Windows] Export the new mono_parse_options_from API

* Implement the various cross-compiler target fetching commands

* Clean

8 years ago[System] IPAddress from referencesource
Marek Safar [Fri, 13 May 2016 11:10:47 +0000 (13:10 +0200)]
[System] IPAddress from referencesource

8 years ago[System] Replace few System.Net types with referencesource
Marek Safar [Fri, 13 May 2016 16:09:13 +0000 (18:09 +0200)]
[System] Replace few System.Net types with referencesource

8 years ago[coop] Avoid calling mono_marshal_set_last_error () in the managed-to-native wrapper...
Zoltan Varga [Fri, 13 May 2016 15:35:20 +0000 (11:35 -0400)]
[coop] Avoid calling mono_marshal_set_last_error () in the managed-to-native wrapper inside the blocking block. Also make sure the prepare/finish_blocking jit icalls have no wrappers, so calling them doesn't involve trampolines.

8 years agoMerge pull request #2974 from lambdageek/dev/monoerror-misc_fixes
Aleksey Kliger (λgeek) [Fri, 13 May 2016 15:07:00 +0000 (11:07 -0400)]
Merge pull request #2974 from lambdageek/dev/monoerror-misc_fixes

[runtime] Eliminate some mono_error_raise_exception calls

8 years agoFix a warning.
Zoltan Varga [Fri, 13 May 2016 14:11:01 +0000 (10:11 -0400)]
Fix a warning.

8 years ago[llvmonly] Make sure that linkonce methods need no initialization since they could...
Zoltan Varga [Fri, 13 May 2016 14:09:32 +0000 (10:09 -0400)]
[llvmonly] Make sure that linkonce methods need no initialization since they could be called before the AOT module they belong to is loaded. Still not enabled, since they seem to actually increase executable size.

8 years ago[System] Remove unused files
Marek Safar [Fri, 13 May 2016 12:06:15 +0000 (14:06 +0200)]
[System] Remove unused files

8 years agoMerge pull request #2984 from amccague/ping-task-fix
Marek Safar [Thu, 12 May 2016 21:24:05 +0000 (23:24 +0200)]
Merge pull request #2984 from amccague/ping-task-fix

Resolved bug (8554) with Task Based Ping API

8 years agoMerge pull request #2990 from akoeplinger/fix-fsharp
Alexander Köplinger [Thu, 12 May 2016 16:01:32 +0000 (18:01 +0200)]
Merge pull request #2990 from akoeplinger/fix-fsharp

[bcl] Add stub Mono.Posix.dll to 4.0 folder so FSharp bootstrapping works

8 years ago[arm] Make sure MONO_CONTEXT_GET_CURRENT () sets sp to an aligned value on watchos.
Zoltan Varga [Thu, 12 May 2016 15:51:02 +0000 (11:51 -0400)]
[arm] Make sure MONO_CONTEXT_GET_CURRENT () sets sp to an aligned value on watchos.

8 years ago[bcl] Add stub Mono.Posix.dll to 4.0 folder so FSharp bootstrapping works
Alexander Köplinger [Thu, 12 May 2016 15:47:03 +0000 (17:47 +0200)]
[bcl] Add stub Mono.Posix.dll to 4.0 folder so FSharp bootstrapping works

It was checking the existence of the file which doesn't work anymore after the -api rename.
This was already fixed upstream in https://github.com/fsharp/fsharp/pull/525 but the bootstrap package doesn't have the fix yet.

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

8 years ago[runtime] MonoError-ize mono_mlist_{alloc,prepend,append}
Aleksey Kliger [Fri, 22 Apr 2016 16:22:51 +0000 (12:22 -0400)]
[runtime] MonoError-ize mono_mlist_{alloc,prepend,append}

Mark the various functions external only.  Runtime should use the
_checked variants.

8 years ago[runtime] Eliminate some uses of mono_error_raise_exception
Aleksey Kliger [Thu, 21 Apr 2016 19:38:08 +0000 (15:38 -0400)]
[runtime] Eliminate some uses of mono_error_raise_exception

8 years ago[cominterop] Get rid of uses of mono_error_raise_exception
Aleksey Kliger [Thu, 21 Apr 2016 19:21:54 +0000 (15:21 -0400)]
[cominterop] Get rid of uses of mono_error_raise_exception

in icalls

8 years ago[cominterop] MonoError-ize mono_string_from_bstr
Aleksey Kliger [Thu, 21 Apr 2016 18:52:57 +0000 (14:52 -0400)]
[cominterop] MonoError-ize mono_string_from_bstr

Runtime should use mono_string_from_bstr_checked. The icall is
mono_string_from_bstr_icall. Marked mono_string_from_bstr external only.

8 years agoFix an bug added by 5b9f9751baedfeba4a0771fb18b50cba3c5ea69b.
Zoltan Varga [Thu, 12 May 2016 14:01:45 +0000 (10:01 -0400)]
Fix an bug added by 5b9f9751baedfeba4a0771fb18b50cba3c5ea69b.

8 years agoMerge pull request #2853 from alexrp/thread-name-improvements
Alex Rønne Petersen [Thu, 12 May 2016 12:14:30 +0000 (14:14 +0200)]
Merge pull request #2853 from alexrp/thread-name-improvements

More thread name improvements

8 years ago[threads] Add a missing mono_hazard_pointer_clear () in thread_cleanup ().
Alex Rønne Petersen [Sat, 9 Apr 2016 11:24:13 +0000 (13:24 +0200)]
[threads] Add a missing mono_hazard_pointer_clear () in thread_cleanup ().

8 years ago[threads] mono_thread_set_name_internal (): Rename 'managed' arg to 'permanent'.
Alex Rønne Petersen [Fri, 8 Apr 2016 01:23:40 +0000 (03:23 +0200)]
[threads] mono_thread_set_name_internal (): Rename 'managed' arg to 'permanent'.

The actual meaning is about whether or not the name is allowed to change after
having been set by the mono_thread_set_name_internal () call; it has nothing to
do with whether the call came from managed per se.

8 years ago[threads] Don't consider MONO_THREAD_FLAG_NAME_SET when setting thread name at thread...
Alex Rønne Petersen [Fri, 8 Apr 2016 01:20:11 +0000 (03:20 +0200)]
[threads] Don't consider MONO_THREAD_FLAG_NAME_SET when setting thread name at thread startup.

If we did consider this, an internal runtime thread that had its name set by a
mono_thread_set_name_internal (..., FALSE /*managed*/, ...) call prior to
starting would not have its native name set nor its name reported to the
profiler.

8 years ago[threads] Don't exempt thread pool threads from the 'name already set' check + exception.
Alex Rønne Petersen [Fri, 8 Apr 2016 01:15:44 +0000 (03:15 +0200)]
[threads] Don't exempt thread pool threads from the 'name already set' check + exception.

MS.NET doesn't, so we shouldn't either.

Bug: https://bugzilla.xamarin.com/show_bug.cgi?id=23206

8 years ago[threads] Only mark a thread as having a name set if the given name is non-null.
Alex Rønne Petersen [Fri, 8 Apr 2016 01:13:58 +0000 (03:13 +0200)]
[threads] Only mark a thread as having a name set if the given name is non-null.

This is consistent with MS.NET behavior.

8 years ago[threads] Rename mono_thread_info_set_name () to mono_native_thread_set_name ().
Alex Rønne Petersen [Fri, 8 Apr 2016 01:02:56 +0000 (03:02 +0200)]
[threads] Rename mono_thread_info_set_name () to mono_native_thread_set_name ().

This function has nothing to do with MonoThreadInfo structures, so the name is
somewhat misleading. It only requires a native thread ID.

8 years ago[domain] Remove an unnecessary call to mono_thread_info_set_name ().
Alex Rønne Petersen [Fri, 8 Apr 2016 01:02:17 +0000 (03:02 +0200)]
[domain] Remove an unnecessary call to mono_thread_info_set_name ().

We now do this in the thread main function.

8 years agoBump nunit-lite to get compiler warning fix.
Rolf Bjarne Kvinge [Thu, 12 May 2016 10:39:33 +0000 (12:39 +0200)]
Bump nunit-lite to get compiler warning fix.

commit //github.com/mono/NUnitLite@7065bc89e8661cad447140752c0fce118644e06e
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Thu May 12 12:30:28 2016 +0200

    Fix compiler warning.

8 years ago[arm] Implement a dummy version of MONO_CONTEXT_GET_CURRENT () on watchos, only the...
Zoltan Varga [Thu, 12 May 2016 10:15:23 +0000 (06:15 -0400)]
[arm] Implement a dummy version of MONO_CONTEXT_GET_CURRENT () on watchos, only the sp register is set, this is the only one needed by sgen.

8 years ago[arm] Fix the DISABLE_JIT build.
Zoltan Varga [Thu, 12 May 2016 07:52:13 +0000 (03:52 -0400)]
[arm] Fix the DISABLE_JIT build.

8 years ago[aot] Add some MonoError machinery to aot-runtime.c.
Zoltan Varga [Thu, 12 May 2016 02:31:22 +0000 (22:31 -0400)]
[aot] Add some MonoError machinery to aot-runtime.c.

8 years agoMerge pull request #2971 from BrzVlad/feature-cross-binprot
Vlad Brezae [Wed, 11 May 2016 19:37:35 +0000 (22:37 +0300)]
Merge pull request #2971 from BrzVlad/feature-cross-binprot

[sgen] Cross platform binary protocol grep

8 years agoMerge pull request #2986 from akoeplinger/fix-mono310-bootstrapping
Alexander Köplinger [Wed, 11 May 2016 19:29:21 +0000 (21:29 +0200)]
Merge pull request #2986 from akoeplinger/fix-mono310-bootstrapping

[System] Rename variable to fix bootstrapping with Mono 3.10 mcs

8 years ago[corlib] Put back instance creation using activation attributes. Fixes #40758
Marek Safar [Wed, 11 May 2016 16:24:52 +0000 (18:24 +0200)]
[corlib] Put back instance creation using activation attributes. Fixes #40758

8 years agoMerge pull request #2982 from ludovic-henry/fix-cross-monocontext
Ludovic Henry [Wed, 11 May 2016 15:09:49 +0000 (11:09 -0400)]
Merge pull request #2982 from ludovic-henry/fix-cross-monocontext

Revert "[MonoContext] Make cross compiler a specific case"

8 years agoMerge pull request #2985 from akoeplinger/fix-bug39305
Alexander Köplinger [Wed, 11 May 2016 12:57:20 +0000 (14:57 +0200)]
Merge pull request #2985 from akoeplinger/fix-bug39305

[corlib] Make CountdownEventTests.Signal_Concurrent more reliable

8 years ago[arm] Implement hardfp support in gsharedvt. Store the caller/callee CallInfo into...
Zoltan Varga [Wed, 11 May 2016 12:55:33 +0000 (12:55 +0000)]
[arm] Implement hardfp support in gsharedvt. Store the caller/callee CallInfo into GSharedVtCallInfo and iterate over it instead of extending the slot based code for simplicity.

8 years ago[System] Rename variable to fix bootstrapping with Mono 3.10 mcs
Alexander Köplinger [Wed, 11 May 2016 12:36:57 +0000 (14:36 +0200)]
[System] Rename variable to fix bootstrapping with Mono 3.10 mcs

We were seeing compilation errors like this:

```
System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs(71,20): error CS0135: `oid' conflicts with a declaration in a child block
System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs(74,17): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 38 warnings
make[9]: *** [../../class/lib/basic/secxml/System.dll] Error 1
```

The new foreach variables introduced in 4a6e5d24e174b9d2860300503b4a79396d7ae96d with the same "oid" name as the global constant apparently confused the older mcs compiler.

Rename them to avoid this.

8 years ago[corlib] Make CountdownEventTests.Signal_Concurrent more reliable
Alexander Köplinger [Wed, 11 May 2016 12:11:28 +0000 (14:11 +0200)]
[corlib] Make CountdownEventTests.Signal_Concurrent more reliable

We were seeing random failures of the test in the iOS simulator and devices.

Looking at the test, it seems to me like the 1000ms timeout is just too short. In a single iteration we're
enqueuing 500 threadpool workitems and effectively give each of them just 2ms to run and signal the CountdownEvent.

Indeed I can easily repro this in the simulator on my box if I lower the timeout to 900ms.
This may be a side effect of the new threadpool which starts threads more conservatively afaik.

Bumping the timeout should fix this.

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

8 years agoTask Based Ping - removed illegal use of `?.`
amccague [Wed, 11 May 2016 12:06:15 +0000 (13:06 +0100)]
Task Based Ping - removed illegal use of `?.`

8 years agoResolved bug (8554) with Task Based Ping API
amccague [Wed, 11 May 2016 11:23:05 +0000 (12:23 +0100)]
Resolved bug (8554) with Task Based Ping API

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

Added unit tests to cover the Asynchronous API and the Task Based API.

Fixed an issue with the Task Based API that would previously throw a
`NullReferenceException` when started as the `CancellationTokenSource`
was not instantiated.
The `CancellationTokenSource` was also not disposed of after use.

8 years agoMerge remote-tracking branch 'mono/master' into ping-task-fix
amccague [Wed, 11 May 2016 11:04:53 +0000 (12:04 +0100)]
Merge remote-tracking branch 'mono/master' into ping-task-fix

8 years agoMerge pull request #2973 from marek-safar/rs-Uri
Marek Safar [Wed, 11 May 2016 10:23:48 +0000 (12:23 +0200)]
Merge pull request #2973 from marek-safar/rs-Uri

[System] Uri handling from reference source

8 years ago[System] Uri handling from reference source
Marek Safar [Mon, 9 May 2016 17:42:41 +0000 (19:42 +0200)]
[System] Uri handling from reference source

Fixes many issues in our uri handling

8 years ago[arm] Remove the unfinished nacl codegen code.
Zoltan Varga [Wed, 11 May 2016 07:36:20 +0000 (07:36 +0000)]
[arm] Remove the unfinished nacl codegen code.

8 years ago[arm] Implement hardfp support for dyncalls.
Zoltan Varga [Wed, 11 May 2016 07:18:24 +0000 (07:18 +0000)]
[arm] Implement hardfp support for dyncalls.

8 years ago[arm] Fix float32 + hardfp support.
Zoltan Varga [Wed, 11 May 2016 06:38:08 +0000 (06:38 +0000)]
[arm] Fix float32 + hardfp support.

8 years agoMerge pull request #2983 from akoeplinger/fix-bug40462
Aleksey Kliger (λgeek) [Tue, 10 May 2016 21:06:54 +0000 (17:06 -0400)]
Merge pull request #2983 from akoeplinger/fix-bug40462

[corlib] Ignore DirectoryNotFoundException in FileStreamTest.OpenCharDeviceRepeatedly test

8 years ago[MonoContext] Fix sgen STW cross compilation
Ludovic Henry [Tue, 10 May 2016 19:45:45 +0000 (15:45 -0400)]
[MonoContext] Fix sgen STW cross compilation

8 years ago[corlib] Ignore DirectoryNotFoundException in FileStreamTest.OpenCharDeviceRepeatedly...
Alexander Köplinger [Tue, 10 May 2016 19:05:32 +0000 (21:05 +0200)]
[corlib] Ignore DirectoryNotFoundException in FileStreamTest.OpenCharDeviceRepeatedly test

It seems that older iOS6 devices don't allow access to /dev, as a DirectoryNotFoundException is
thrown when accessing /dev/zero in the FileStreamTest.OpenCharDeviceRepeatedly test there.

Ignore this exception and the test in those cases.

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

8 years agoRevert "[MonoContext] Make cross compiler a specific case"
Ludovic Henry [Tue, 10 May 2016 18:31:20 +0000 (14:31 -0400)]
Revert "[MonoContext] Make cross compiler a specific case"

This reverts commit 09ae5b01c1fabcf3ca39a918d92fdd25457f0b12.

This would break the XA and XI builds

8 years agoMerge pull request #2981 from rolfbjarne/fix-rebuild-offsets-tool
Marek Safar [Tue, 10 May 2016 18:12:51 +0000 (20:12 +0200)]
Merge pull request #2981 from rolfbjarne/fix-rebuild-offsets-tool

[offsets-tool] Only create the .stamp-clone file if the clone succeeds.

8 years ago[offsets-tool] Only create the .stamp-clone file if the clone succeeds.
Rolf Bjarne Kvinge [Tue, 10 May 2016 17:43:13 +0000 (19:43 +0200)]
[offsets-tool] Only create the .stamp-clone file if the clone succeeds.

This makes rebuilds work if the clone was cancelled.

8 years ago[System]: Lazy-init X509ChainPolicy.ExtraStore when called from SystemCertificateVali...
Martin Baulig [Tue, 10 May 2016 17:37:51 +0000 (13:37 -0400)]
[System]: Lazy-init X509ChainPolicy.ExtraStore when called from SystemCertificateValidator.  Fixes #40899.

AppleTLS supports a lazily-initialized X509Certificate, but not X509Certificate2 so
we need to fall-back to using Mono.Security.X509 whenever we need an X509Certificate2.
To avoid unnecessary fallbacks, the private Mono.Net.Security APIs use X509Certificate
instead of X509Certificate2.

Since 'ExtraStore' returns X509Certificate2Collection, we need to convert these to
X509Certificate2.

(cherry picked from commit 05e2372339b8d0b6065376096216b91098c88a8b)

8 years agoMerge pull request #2978 from ludovic-henry/coop-fix-reset-blocking
Ludovic Henry [Tue, 10 May 2016 17:38:02 +0000 (13:38 -0400)]
Merge pull request #2978 from ludovic-henry/coop-fix-reset-blocking

[threads] Fix reset blocking state transition

8 years agoMerge remote-tracking branch 'mono/master' into ping-task-fix
amccague [Tue, 10 May 2016 16:27:56 +0000 (17:27 +0100)]
Merge remote-tracking branch 'mono/master' into ping-task-fix

8 years agoMerge pull request #2933 from ludovic-henry/referencesource-monitor
Marek Safar [Tue, 10 May 2016 15:50:11 +0000 (17:50 +0200)]
Merge pull request #2933 from ludovic-henry/referencesource-monitor

[corlib] Import System.Threading.Monitor

8 years ago[mcs] More tweaks to undefined tie-breaking rules. Fixes #40945
Marek Safar [Tue, 10 May 2016 15:37:10 +0000 (17:37 +0200)]
[mcs] More tweaks to undefined tie-breaking rules. Fixes #40945

8 years ago[llvmonly] Avoid sharing refs and intptrs in gsharedvt wrappers, it doesn't work...
Zoltan Varga [Tue, 10 May 2016 09:59:51 +0000 (05:59 -0400)]
[llvmonly] Avoid sharing refs and intptrs in gsharedvt wrappers, it doesn't work yet.

8 years ago[llvmonly] Disable linkonce methods, they don't work yet.
Zoltan Varga [Tue, 10 May 2016 09:57:25 +0000 (05:57 -0400)]
[llvmonly] Disable linkonce methods, they don't work yet.

8 years ago[runtime] Check for a null argument in mono_monitor_enter_v4_fast () before calling...
Zoltan Varga [Tue, 10 May 2016 06:17:49 +0000 (02:17 -0400)]
[runtime] Check for a null argument in mono_monitor_enter_v4_fast () before calling mono_monitor_try_enter_internal (), the latter would set a pending exception, but the JITted code calling enter_v4_fast () doesn't check for it.

8 years ago[jit] Set the real_offset of inlined bblocks to the il offset where the method was...
Zoltan Varga [Tue, 10 May 2016 05:58:00 +0000 (01:58 -0400)]
[jit] Set the real_offset of inlined bblocks to the il offset where the method was inlined, so get_most_deep_clause () in llvm works correctly with inlined methods.

8 years ago[llvmonly] Transform the error returned by init_method () into an exception and throw...
Zoltan Varga [Tue, 10 May 2016 05:43:21 +0000 (01:43 -0400)]
[llvmonly] Transform the error returned by init_method () into an exception and throw it, it can be an exception thrown by a cctor.

8 years ago[sgen] Support binary protocol cross platform grep-ing across platforms with unequal...
Vlad Brezae [Fri, 6 May 2016 01:03:31 +0000 (04:03 +0300)]
[sgen] Support binary protocol cross platform grep-ing across platforms with unequal word sizes

8 years ago[sgen] Pack structs for binary protocol entries
Vlad Brezae [Fri, 6 May 2016 00:32:17 +0000 (03:32 +0300)]
[sgen] Pack structs for binary protocol entries

We save space and support cross platform grep-ing across platforms with the same word size.

8 years ago[sgen] Split protocol entry grep from argument parsing
Vlad Brezae [Thu, 5 May 2016 21:51:48 +0000 (00:51 +0300)]
[sgen] Split protocol entry grep from argument parsing

8 years ago[sgen] Extract entry stream code into new file
Vlad Brezae [Thu, 5 May 2016 21:17:45 +0000 (00:17 +0300)]
[sgen] Extract entry stream code into new file

8 years ago[sgen] Use types with explicit size for protocol entries, on the reader end
Vlad Brezae [Thu, 5 May 2016 20:29:32 +0000 (23:29 +0300)]
[sgen] Use types with explicit size for protocol entries, on the reader end

8 years ago[threads] Fix reset blocking state transition
Ludovic Henry [Mon, 9 May 2016 22:32:50 +0000 (18:32 -0400)]
[threads] Fix reset blocking state transition

There would previously be a race between reset blocking and a STW, that would happen as follow:
 - T1 goes into blocking - T1 state is BLOCKING(0)
 - T2 suspends T1  - T1 state is BLOCKING(1)
 - T1 does a reset blocking -> T1 state is SELF SUSPEND REQUESTED
 - T2 calls `mono_thread_info_get_suspend_state` on T1 --- SIGABRT as we cannot get suspend state when state is SELF SUSPEND REQUESTED
 - T1 does polling -> T1 state is SELF SUSPENDED

The fix is for reset blocking to work like done blocking: switch to BLOCKING AND SUSPENDED.

8 years agoUse available memory instead of physical memory as metric for allocation-heavy tests
Alexander Köplinger [Mon, 9 May 2016 22:25:23 +0000 (00:25 +0200)]
Use available memory instead of physical memory as metric for allocation-heavy tests

We were seeing issues on the new Jenkins Azure boxes which had 7GB of physical memory but only about 1GB free at the time of the test, so it'd fail.
Checking the available memory should fix this.

8 years agoMerge pull request #2967 from lambdageek/dev/coop-threadpool-exceptions5
Aleksey Kliger (λgeek) [Mon, 9 May 2016 19:11:47 +0000 (15:11 -0400)]
Merge pull request #2967 from lambdageek/dev/coop-threadpool-exceptions5

[runtime] Pending exception takes precedence over Thread.Abort ()

8 years agoMerge pull request #2954 from lambdageek/dev/monoerror-field_static_get_value
Aleksey Kliger (λgeek) [Mon, 9 May 2016 18:56:50 +0000 (14:56 -0400)]
Merge pull request #2954 from lambdageek/dev/monoerror-field_static_get_value

MonoError for mono_field_static_get_value

8 years ago[runtime] Pending exception takes precedence over Thread.Abort ()
Aleksey Kliger [Wed, 4 May 2016 23:10:29 +0000 (19:10 -0400)]
[runtime] Pending exception takes precedence over Thread.Abort ()

If there's a pending exception and an AbortRequested, the pending
excpetion should be thrown.

This fixes threadpool-exceptions5.cs in coop mode.

There are two situations where this could happen.

1. Like threadpool-exception5.cs we have a threadpool worker thread
  request an abort and then its async callback runs and throws an
  exception.  In this case apparently the async callback's exception
  should be allowed to unwind and hit the unhandled exception handler.

2. A thread catches ThreadAbortException and then posts a pending
  exception of some other excpetion from the catch clause.  In this case
  we unwind that other exception, and when it's caught we rethrow the
  abort.

8 years ago[System] Cleanup uri tests
Marek Safar [Mon, 9 May 2016 15:39:13 +0000 (17:39 +0200)]
[System] Cleanup uri tests

8 years ago[runtime] MonoError-ize mono_field_static_get_value
Aleksey Kliger [Thu, 21 Apr 2016 16:34:45 +0000 (12:34 -0400)]
[runtime] MonoError-ize mono_field_static_get_value

Mark it external only.  Runtime should use mono_field_static_get_value_checked.

8 years ago[runtime] MonoError-ize mono_field_static_get_value_for_thread
Aleksey Kliger [Thu, 21 Apr 2016 15:59:56 +0000 (11:59 -0400)]
[runtime] MonoError-ize mono_field_static_get_value_for_thread

8 years ago[runtime] MonoError-ize get_default_field_value
Aleksey Kliger [Thu, 21 Apr 2016 15:48:00 +0000 (11:48 -0400)]
[runtime] MonoError-ize get_default_field_value

8 years ago[runtime] MonoError-ize mono_get_constant_value_from_blob
Aleksey Kliger [Thu, 21 Apr 2016 15:45:23 +0000 (11:45 -0400)]
[runtime] MonoError-ize mono_get_constant_value_from_blob

8 years ago[arm] Enable native types for Xamarin.WatchOS.dll too. Enable Unwind_Backtrace suppor...
Zoltan Varga [Mon, 9 May 2016 11:15:51 +0000 (07:15 -0400)]
[arm] Enable native types for Xamarin.WatchOS.dll too. Enable Unwind_Backtrace support on watchos.

8 years ago[llvm] Enable OP_LADD_OVF opcodes on 32 bit platforms too. Avoid optimizing long...
Zoltan Varga [Mon, 9 May 2016 11:14:12 +0000 (07:14 -0400)]
[llvm] Enable OP_LADD_OVF opcodes on 32 bit platforms too. Avoid optimizing long shift opcodes when using llvm. Enable support for hardfp calling conventions on arm.

8 years ago[arm] Use the hardfp abi on watchos.
Zoltan Varga [Mon, 9 May 2016 11:11:21 +0000 (07:11 -0400)]
[arm] Use the hardfp abi on watchos.

8 years ago[ppdb] Avoid using pdb files for assemblies which are not compiled by csc using ...
Zoltan Varga [Mon, 9 May 2016 01:13:38 +0000 (21:13 -0400)]
[ppdb] Avoid using pdb files for assemblies which are not compiled by csc using /debug:portable. Fixes #40886.

8 years ago[llvm] Add support for OP_GC_SAFE_POINT.
Zoltan Varga [Sun, 8 May 2016 22:51:45 +0000 (18:51 -0400)]
[llvm] Add support for OP_GC_SAFE_POINT.

8 years ago[arm] Align the stack correctly in the gsharedvt trampoline on platforms with frame...
Zoltan Varga [Fri, 6 May 2016 22:22:09 +0000 (18:22 -0400)]
[arm] Align the stack correctly in the gsharedvt trampoline on platforms with frame alignment greater than 8 (watchos).

8 years ago[arm] Define MONO_ARCH_DISABLE_HW_TRAPS on watchos.
Zoltan Varga [Fri, 6 May 2016 22:20:52 +0000 (18:20 -0400)]
[arm] Define MONO_ARCH_DISABLE_HW_TRAPS on watchos.

8 years ago[System]: Fix certificate validation with empty hostname.
Martin Baulig [Fri, 6 May 2016 20:09:54 +0000 (16:09 -0400)]
[System]: Fix certificate validation with empty hostname.

When the system certificate validator is invoked with an empty hostname
(caller does not want us to validate the hostname), then we need to pass
null to SecPolicyCreateSSL() and not the empty string.

(cherry picked from commit f29804d149bed8032dabd862c9823bf5e74b0db4)

8 years ago[System]: Add comment to the obsoletion of Mono-specific ServicePointManager APIs.
Martin Baulig [Fri, 6 May 2016 19:50:33 +0000 (15:50 -0400)]
[System]: Add comment to the obsoletion of Mono-specific ServicePointManager APIs.

(cherry picked from commit 1b4921b57321cbb353951e23c9841d7c7b6ce3b7)

8 years ago[System]: Obsolete the Mono-specific cipher suite callbacks in ServicePointManager.
Martin Baulig [Thu, 5 May 2016 21:19:20 +0000 (17:19 -0400)]
[System]: Obsolete the Mono-specific cipher suite callbacks in ServicePointManager.

(cherry picked from commit fa75386bb88de96d58487673885b969c9d784f30)

8 years ago[corlib]: Cleanup X509Helper.Import().
Martin Baulig [Thu, 5 May 2016 19:55:54 +0000 (15:55 -0400)]
[corlib]: Cleanup X509Helper.Import().

Only attempt the automatic PEM->DER conversion when no password was given
and make this version of X509Helper.Import() also take care of the fallback.

(cherry picked from commit 63a214c3f02c6ac28d19a8ca95f7f39c1e31a072)

8 years agoMerge pull request #2968 from lambdageek/dev/coop-unify-jit_thread_attach
Aleksey Kliger (λgeek) [Fri, 6 May 2016 17:33:38 +0000 (13:33 -0400)]
Merge pull request #2968 from lambdageek/dev/coop-unify-jit_thread_attach

[runtime] Unify codepath in mono_jit_thread_attach

8 years ago[runtime] Unify codepath in mono_jit_thread_attach
Aleksey Kliger [Thu, 5 May 2016 22:09:28 +0000 (18:09 -0400)]
[runtime] Unify codepath in mono_jit_thread_attach

Previously we had separate codepaths in mono_jit_thread_attach for coop
and non-coop modes.

Now there's a common codepath for attaching the thread, and separate
code paths for performing coop state machine transitions and computing
the return value cookie.

Fixes Mono.Debugger.Soft tests under coop.

8 years agoMerge pull request #2963 from ludovic-henry/fix-unified-suspend
Rodrigo Kumpera [Thu, 5 May 2016 23:21:56 +0000 (19:21 -0400)]
Merge pull request #2963 from ludovic-henry/fix-unified-suspend

[threads] Fix some unified suspend bugs

8 years ago[sgen] Fix possible race condition between world stop and restart
Ludovic Henry [Tue, 3 May 2016 18:56:49 +0000 (14:56 -0400)]
[sgen] Fix possible race condition between world stop and restart

8 years ago[sgen] Do not skip starting and detaching thread during suspend
Ludovic Henry [Mon, 2 May 2016 21:58:16 +0000 (17:58 -0400)]
[sgen] Do not skip starting and detaching thread during suspend

By skipping thread which have a NULL domain or lmf, we would also skip threads which are in RUNNING mode, but which are still attaching to the runtime. They could have in practice called `mono_thread_info_attach`, without having executed any managed code or set a domain yet. Because we would simply discard the suspending for these threads, we could potentially not suspend them, meaning they would keep running, even potentially run some managed code, while the GC is still running.

To fix that, we need to slightly modify the expectation of sgen STW when using unified suspend. The non-unified expectation of sgen STW would be that even if a thread has a non-initialized domain or lmf, it should still be suspended, but not scanned. The unified expectation of sgen STW would be that if a thread has a non-initialized domain or lmf, then the thread shouldn't be suspended. That second behaviour works well if we only consider that the domain or lmf could be non-initialized when the thread is detaching, but that consideration is just wrong. The main example is the beginning of `start_wrapper_internal` (in threads.c:637), where we have non-initialized domain and lmf, but where the thread is in RUNNING state, and about to access some managed memory.

8 years ago[threads] Correct comment
Ludovic Henry [Wed, 6 Apr 2016 08:34:24 +0000 (09:34 +0100)]
[threads] Correct comment

8 years ago[sgen] Improve STW debugging output
Ludovic Henry [Fri, 1 Apr 2016 16:09:50 +0000 (17:09 +0100)]
[sgen] Improve STW debugging output