mono.git
8 years agoMerge pull request #2753 from xmcclure/checked-build-updates
monojenkins [Fri, 18 Mar 2016 22:00:34 +0000 (22:00 +0000)]
Merge pull request #2753 from xmcclure/checked-build-updates

Changes to "checked build" feature

Here are some changes to checked builds I made while trying to debug some coop gc problems. The changes made are:

- Replace the checked build configure flags with a single --enable-checked-build= flag
- Runtime environment variable required for checked build asserts to run
- Report the thread transition history for more kinds of asserts
- For the `mono_threads_reset_blocking` functions, add an assert that guarantees proper nesting

In addition to this, I have documented the checked build feature as implemented here, see my pull request for the website: https://github.com/mono/website/pull/187

Overall my goals with this patch were

- Make it easier to do rapid-fire testing with the checked builds (runtime switch, default-off)
- Make the checked build implementation more internally consistent (more uniform names etc)

Notice I do make the change that instead of checked build sub-features being disabled with a blacklist, you now must enable them with a whitelist. I think this is an improvement because it makes it easier to just casually keep a checked build around  (for one thing I would have the option to ship debug builds to users with the checked build modes included but dormant) but I could be talked out of it if this change turns out to be controversial. The only thing I feel strongly about is that if the configure flag is changed back to a blacklist the environment variable should switch to a blacklist also.

If we accept this change the CI bots will need to adopt the new configure flag and environment variable.

8 years agoMerge pull request #2746 from lambdageek/dev/monoerror-mono_reflection_create_runtime...
monojenkins [Fri, 18 Mar 2016 22:00:24 +0000 (22:00 +0000)]
Merge pull request #2746 from lambdageek/dev/monoerror-mono_reflection_create_runtime_class

[System.Reflection.Emit] MonoError in mono_reflection_create_runtime_class

Depends on #2745
Bubble MonoError up to `mono_reflection_create_runtime_class`.  Use `mono_error_set_pending_exception` instead of `mono_error_raise_exception` And try to release resources on the way out.

8 years agoAdd mono_threads_reset_blocking nesting checks to gc checked mode
Andi McClure [Fri, 18 Mar 2016 19:18:38 +0000 (15:18 -0400)]
Add mono_threads_reset_blocking nesting checks to gc checked mode

8 years agoRename checked build assertion_fail to mono_fatal_with_history, use in more places
Andi McClure [Fri, 18 Mar 2016 20:07:14 +0000 (16:07 -0400)]
Rename checked build assertion_fail to mono_fatal_with_history, use in more places

8 years agoMerge pull request #2772 from WeiHeCN/master
monojenkins [Fri, 18 Mar 2016 18:15:24 +0000 (18:15 +0000)]
Merge pull request #2772 from WeiHeCN/master

Update mini-llvm.c

These header files are already included in mini-llvm-cpp.h.

8 years agoUpdate mini-llvm.c
WeiHeCN [Fri, 18 Mar 2016 03:40:41 +0000 (11:40 +0800)]
Update mini-llvm.c

8 years ago[SRE] MonoError for mono_reflection_create_runtime_class
Aleksey Kliger [Tue, 8 Mar 2016 22:52:18 +0000 (17:52 -0500)]
[SRE] MonoError for mono_reflection_create_runtime_class

1. Don't raise while holding locks.

2. Change remove_instantiations_of_and_ensure_contents (called via
  g_hash_table_foreach_remove) to populate a MonoError instead of
  throwing.  If there are multiple errors, we just stash the first one
  in user_data and clean up the rest.

3. Use mono_erro_set_pending_exception instead of
  mono_error_raise_exception since it's an icall.

8 years agoMerge pull request #2745 from lambdageek/dev/monoerror-sre-internals
monojenkins [Thu, 17 Mar 2016 21:35:31 +0000 (21:35 +0000)]
Merge pull request #2745 from lambdageek/dev/monoerror-sre-internals

[System.Reflection.Emit] Propagate MonoError through some more static functions

Some externally visible changes include:
* Bubble MonoError up to one more SRE icall: `System.Reflection.Emit.CustomAttributeBuilder.GetBlob()`
* `fix_partial_generic_class` and `ensure_generic_class_runtime_vtable` now expect their callers to set the class failure state which they do under slightly more circumstances now than previously (now: whenever there's an error set from the above functions; before: only when we had trouble initializing the generic type definition.)
* Previous API for `mono_reflection_bind_generic_parameters` didn't make it clear whether NULL was a valid return value or not.  Now when we return NULL we always set the `error` out-arg. So non-NULL is success and NULL is failure.

8 years ago[reflection] MonoError for mono_marshal_spec_from_builder
Aleksey Kliger [Tue, 8 Mar 2016 00:02:34 +0000 (19:02 -0500)]
[reflection] MonoError for mono_marshal_spec_from_builder

8 years ago[reflection] Mark mono_reflection_get_custom_attrs_blob external only.
Aleksey Kliger [Mon, 7 Mar 2016 21:59:14 +0000 (16:59 -0500)]
[reflection] Mark mono_reflection_get_custom_attrs_blob external only.

The runtime should use mono_reflection_get_custom_attrs_blob_checked.
The icall is now ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob.

8 years ago[reflection] MonoError for resolve_object
Aleksey Kliger [Mon, 7 Mar 2016 21:16:55 +0000 (16:16 -0500)]
[reflection] MonoError for resolve_object

8 years ago[reflection] MonoError for ensure_complete_type
Aleksey Kliger [Mon, 7 Mar 2016 18:55:00 +0000 (13:55 -0500)]
[reflection] MonoError for ensure_complete_type

8 years ago[reflection] MonoError for mono_reflection_get_dynamic_overrides
Aleksey Kliger [Mon, 7 Mar 2016 18:37:00 +0000 (13:37 -0500)]
[reflection] MonoError for mono_reflection_get_dynamic_overrides

8 years ago[reflection] MonoError for mono_reflection_method_get_handle
Aleksey Kliger [Mon, 7 Mar 2016 17:07:00 +0000 (12:07 -0500)]
[reflection] MonoError for mono_reflection_method_get_handle

8 years ago[SRE] Don't set failiure flag in ensure_generic_class_runtime_vtable
Aleksey Kliger [Mon, 14 Mar 2016 20:28:59 +0000 (13:28 -0700)]
[SRE] Don't set failiure flag in ensure_generic_class_runtime_vtable

Leave it up to the caller to set the flag.

8 years ago[SRE] Don't set class failure in fix_partial_generic class
Aleksey Kliger [Mon, 14 Mar 2016 18:50:32 +0000 (11:50 -0700)]
[SRE] Don't set class failure in fix_partial_generic class

Leave it to callers to set it based on the MonoError.

Also return a boolean indicating whether we succeeded or failed.

8 years ago[reflection] MonoError for fix_partial_generic_class
Aleksey Kliger [Mon, 7 Mar 2016 17:02:18 +0000 (12:02 -0500)]
[reflection] MonoError for fix_partial_generic_class

8 years ago[SRE] Use MonoError for mono_reflection_bind_generic_parameters
Aleksey Kliger [Mon, 7 Mar 2016 16:38:06 +0000 (11:38 -0500)]
[SRE] Use MonoError for mono_reflection_bind_generic_parameters

This commit also changes the behavior of
mono_reflection_bind_generic_parameters slightly: if the passed in class
isn't generic, it sets error and returns NULL.  (It wasn't clearly
previously whether NULL was an error condition or not - with this commit
we clarify that a NULL result is an error).

8 years ago[reflection] Use MonoError in encode_{cattr_value,named_val}
Aleksey Kliger [Fri, 4 Mar 2016 21:44:24 +0000 (16:44 -0500)]
[reflection] Use MonoError in encode_{cattr_value,named_val}

8 years ago[reflection] MonoError in get_{prop,field}_name_and_type
Aleksey Kliger [Fri, 4 Mar 2016 21:29:31 +0000 (16:29 -0500)]
[reflection] MonoError in get_{prop,field}_name_and_type

8 years ago[reflection] MonoError in parameters_to_signature
Aleksey Kliger [Fri, 4 Mar 2016 21:21:08 +0000 (16:21 -0500)]
[reflection] MonoError in parameters_to_signature

And a few other static fns

8 years ago[gacutil] Add support for pdb file
Marek Safar [Thu, 17 Mar 2016 16:13:18 +0000 (17:13 +0100)]
[gacutil] Add support for pdb file

8 years ago[build] Fix more incomplete mcs references names
Marek Safar [Thu, 17 Mar 2016 16:07:30 +0000 (17:07 +0100)]
[build] Fix more incomplete mcs references names

8 years ago[mcs] Allow local variables and parameters on lhs of nameof expression. Fixes #39455
Marek Safar [Thu, 17 Mar 2016 15:58:44 +0000 (16:58 +0100)]
[mcs] Allow local variables and parameters on lhs of nameof expression. Fixes #39455

8 years ago[mono] Remove al2/dmcs from TEST_SUPPORT_FILES too
Alexander Köplinger [Thu, 17 Mar 2016 13:08:49 +0000 (14:08 +0100)]
[mono] Remove al2/dmcs from TEST_SUPPORT_FILES too

8 years ago[mono] Remove dmcs from temp install folder
Alexander Köplinger [Thu, 17 Mar 2016 13:04:00 +0000 (14:04 +0100)]
[mono] Remove dmcs from temp install folder

8 years ago[mono] Remove al2 from temp install folder
Marek Safar [Thu, 17 Mar 2016 12:56:53 +0000 (13:56 +0100)]
[mono] Remove al2 from temp install folder

8 years ago[acceptance-tests] Bump ms-test-suite to pick up 4a95604fdf2c0523e68eaad64a17d22eebb0...
Alexander Köplinger [Thu, 17 Mar 2016 12:55:42 +0000 (13:55 +0100)]
[acceptance-tests] Bump ms-test-suite to pick up 4a95604fdf2c0523e68eaad64a17d22eebb051b3:

8 years ago[runtime] Cleanup the debug info module before the images module since ppdb debug...
Zoltan Varga [Thu, 17 Mar 2016 11:06:02 +0000 (12:06 +0100)]
[runtime] Cleanup the debug info module before the images module since ppdb debug info depends on images. Fixes #39715.

8 years ago[ppdb] Avoid an assert if the ppdb image has an empty guid heap, it can happen if...
Zoltan Varga [Thu, 17 Mar 2016 10:33:07 +0000 (11:33 +0100)]
[ppdb] Avoid an assert if the ppdb image has an empty guid heap, it can happen if the assembly has no types thus no document guids. Fixes #39644.

8 years ago[arm] Avoid storing fp arguments below the stack pointer if the param area has size...
Zoltan Varga [Thu, 17 Mar 2016 10:14:41 +0000 (11:14 +0100)]
[arm] Avoid storing fp arguments below the stack pointer if the param area has size 0. Fixes #38161.

8 years agoBump referencesource
Marek Safar [Thu, 17 Mar 2016 09:23:28 +0000 (10:23 +0100)]
Bump referencesource

8 years agoMerge pull request #2766 from lambdageek/dev/monoerror-jit
Aleksey Kliger (λgeek) [Wed, 16 Mar 2016 22:24:00 +0000 (15:24 -0700)]
Merge pull request #2766 from lambdageek/dev/monoerror-jit

[runtime] Propagate error from class loading when JIT-ing

8 years ago[acceptance-test] Ensure the exit code of the main test script is used
Alexander Köplinger [Wed, 16 Mar 2016 21:15:15 +0000 (22:15 +0100)]
[acceptance-test] Ensure the exit code of the main test script is used

Due to our usage of chained commands it'd use the exit code of the last command,
which is not what we want. We use chaining because e.g. in the ms-test-suite
case we still want to run the systemruntimebringup suite even if the conformance
suite had a failing test.

8 years ago[runtime] Propagate error from class loading when JIT-ing
Aleksey Kliger [Wed, 16 Mar 2016 17:28:04 +0000 (10:28 -0700)]
[runtime] Propagate error from class loading when JIT-ing

This is another approach to a341404ecdd3b5ca2ed0ab1e9a5bcb9b5ccd2566
which was backed out because it was
stale (2a899492c30740f6785883fae14bb1ddacbc8b77).

8 years ago[bcl] Remove wrong IVT attributes
Marek Safar [Wed, 16 Mar 2016 17:34:05 +0000 (18:34 +0100)]
[bcl] Remove wrong IVT attributes

8 years agoMerge pull request #2765 from akoeplinger/mcs-fix-test-windows-backslash
Marek Safar [Wed, 16 Mar 2016 17:18:27 +0000 (18:18 +0100)]
Merge pull request #2765 from akoeplinger/mcs-fix-test-windows-backslash

[compiler-tester] Fix incorrect failure with Windows paths in error messages

8 years agoRevert "Merge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort"
Marek Safar [Wed, 16 Mar 2016 14:55:40 +0000 (15:55 +0100)]
Revert "Merge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort"

This reverts commit a341404ecdd3b5ca2ed0ab1e9a5bcb9b5ccd2566, reversing
changes made to 04a177b2be47ec1de995b3abb8cd378a15590647.

8 years ago[build] Add missing explicit references in docs
Marek Safar [Wed, 16 Mar 2016 14:42:55 +0000 (15:42 +0100)]
[build] Add missing explicit references in docs

8 years agoMerge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort
Zoltan Varga [Wed, 16 Mar 2016 09:54:02 +0000 (10:54 +0100)]
Merge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort

[runtime] Fixes an abort caused by a TypeLoadException in certain ins…

8 years ago[corlib] RuntimeEnvironment from referencesource
Marek Safar [Wed, 16 Mar 2016 09:44:01 +0000 (10:44 +0100)]
[corlib] RuntimeEnvironment from referencesource

8 years ago[tests] Don't use AppDomain.AppendPrivateBinPath for assembly-load-remap.exe
Alexander Köplinger [Wed, 16 Mar 2016 02:33:24 +0000 (03:33 +0100)]
[tests] Don't use AppDomain.AppendPrivateBinPath for assembly-load-remap.exe

It's not supposed to contain a full path to a directory, but rather a relative path
to a subdirectory of the ApplicationBase. However, this isn't enforced in all cases
by Mono so setting a full path worked when the path doesn't contain a '.' because then
the code in [1] doesn't clear the variable and the path is added to the domain->search_path.

This caused the test to fail on Wrench on the mono-4.4.0 lane because the path contains
a dot while confusingly it worked fine on master.

Fixing this by appending the xbuild_14 path via an alternative (albeit slightly hacky)
method related to the standard MONO_PATH env var. Because the variable is only read
once at app startup we need to call into the runtime to explicitly set the new path
before trying to load the MSBuild 14 assemblies. This is fine since we only
want to test that the correct assembly version is loaded and nothing else.

[1] https://github.com/mono/mono/blob/37b2b9fbc25a2199aba1d794117924d4828360a7/mono/metadata/appdomain.c#L1319-L1337

8 years ago[runtime] Fixes an abort caused by a TypeLoadException in certain instances
James Venning [Wed, 16 Mar 2016 00:20:36 +0000 (10:20 +1000)]
[runtime] Fixes an abort caused by a TypeLoadException in certain instances

8 years ago[System]: Fix certificate validation on Linux. Bug #39307.
Martin Baulig [Tue, 15 Mar 2016 22:50:08 +0000 (18:50 -0400)]
[System]: Fix certificate validation on Linux.  Bug #39307.

8 years ago[System]: Properly propagate exceptions in 'MonoTlsStream'.
Martin Baulig [Sun, 28 Feb 2016 04:53:46 +0000 (23:53 -0500)]
[System]: Properly propagate exceptions in 'MonoTlsStream'.

(cherry picked from commit a7ab399d093f4aac3f24b862e6075ab9f4fdb9e1)

8 years ago[System]: Copy 'ServicePoint.Certificate' and 'ClientCertificate' from the references...
Martin Baulig [Sun, 28 Feb 2016 03:15:29 +0000 (22:15 -0500)]
[System]: Copy 'ServicePoint.Certificate' and 'ClientCertificate' from the referencesource.

(cherry picked from commit 76e0f64862732c3fb4f5647d5a2687ad9557be45)

8 years ago[System]: In 'WebConnection.EndWrite()': always call EndWrite() on the underlying...
Martin Baulig [Thu, 18 Feb 2016 22:44:16 +0000 (17:44 -0500)]
[System]: In 'WebConnection.EndWrite()': always call EndWrite() on the underlying socket.

(cherry picked from commit dd9d66a7c28ba77bf5ef7e4d7f6cb60ca3feb5a9)

8 years ago[System.Net.Http] Make HttpClientTest.GetString_Many test more reliable
Alexander Köplinger [Tue, 15 Mar 2016 20:16:24 +0000 (21:16 +0100)]
[System.Net.Http] Make HttpClientTest.GetString_Many test more reliable

It's flaky on Jenkins, removing the dependency on an external server and instead using a local HttpListener
to answer the requests should hopefully make it more reliable.

8 years ago[mcs] Partially revert c9d4cc55a175d1cfc1f6d8f13e92606ef09dada1
Marek Safar [Tue, 15 Mar 2016 20:05:58 +0000 (21:05 +0100)]
[mcs] Partially revert c9d4cc55a175d1cfc1f6d8f13e92606ef09dada1

8 years ago[mcs] Don't sign sqlmetal and linker tools
Marek Safar [Tue, 15 Mar 2016 17:41:43 +0000 (18:41 +0100)]
[mcs] Don't sign sqlmetal and linker tools

8 years ago[compiler-tester] Expand members error reporting to avoid problems with members called {}
Marek Safar [Tue, 15 Mar 2016 17:06:49 +0000 (18:06 +0100)]
[compiler-tester] Expand members error reporting to avoid problems with members called {}

8 years agoMerge pull request #2747 from lambdageek/dev/monoerror-mono_remote_class
monojenkins [Tue, 15 Mar 2016 17:00:19 +0000 (17:00 +0000)]
Merge pull request #2747 from lambdageek/dev/monoerror-mono_remote_class

[runtime] Add MonoError to mono_remote_class

8 years ago[tools] Don't install cil-stringreplacer
Alexander Köplinger [Tue, 15 Mar 2016 14:44:10 +0000 (15:44 +0100)]
[tools] Don't install cil-stringreplacer

It's a tool that is only used during the Mono class lib build.

8 years ago[getline] Fix condition where Console.WriteLi<TAB><ENTER> completed to Console.WriteL...
Miguel de Icaza [Tue, 15 Mar 2016 14:25:57 +0000 (10:25 -0400)]
[getline] Fix condition where Console.WriteLi<TAB><ENTER> completed to Console.WriteLinene

8 years ago[repl] Further fine tuning; Show newlines as actual newlines in strings, plus fix...
Miguel de Icaza [Tue, 15 Mar 2016 14:22:20 +0000 (10:22 -0400)]
[repl] Further fine tuning;   Show newlines as actual newlines in strings, plus fix quoting of chars < 32

8 years ago[repl] Do not escape space when pretty printing strings
Miguel de Icaza [Tue, 15 Mar 2016 14:11:55 +0000 (10:11 -0400)]
[repl] Do not escape space when pretty printing strings

8 years ago[build] Use full filename for csc references
Marek Safar [Tue, 15 Mar 2016 12:58:30 +0000 (13:58 +0100)]
[build] Use full filename for csc references

8 years ago[compiler-tester] Remove moonlight build
Marek Safar [Tue, 15 Mar 2016 12:55:59 +0000 (13:55 +0100)]
[compiler-tester] Remove moonlight build

8 years ago[monodoc] Remove redundant codepage argument
Marek Safar [Tue, 15 Mar 2016 12:55:30 +0000 (13:55 +0100)]
[monodoc] Remove redundant codepage argument

8 years ago[System.Xml.Linq] Simplify dependencies
Marek Safar [Tue, 15 Mar 2016 12:53:54 +0000 (13:53 +0100)]
[System.Xml.Linq] Simplify dependencies

8 years ago[Mono.Security.Providers.NewSystemSource] Use LIB_REFS to track references
Marek Safar [Tue, 15 Mar 2016 12:50:00 +0000 (13:50 +0100)]
[Mono.Security.Providers.NewSystemSource] Use LIB_REFS to track references

8 years ago[system.runtime.serialization] Use correct IVT key for System.ServiceModel.Web
Marek Safar [Tue, 15 Mar 2016 12:48:24 +0000 (13:48 +0100)]
[system.runtime.serialization] Use correct IVT key for System.ServiceModel.Web

8 years agoMerge pull request #2543 from ermshiperete/Xamarin-31021
Alex Rønne Petersen [Tue, 15 Mar 2016 11:41:02 +0000 (12:41 +0100)]
Merge pull request #2543 from ermshiperete/Xamarin-31021

Don't ignore drives with type "aufs" or "overlay" (Xamarin-31021)

8 years agoMerge pull request #2757 from akoeplinger/fix-coreclr-test
Alexander Köplinger [Tue, 15 Mar 2016 00:16:54 +0000 (01:16 +0100)]
Merge pull request #2757 from akoeplinger/fix-coreclr-test

Two coreclr test fixes

8 years agoFix the build.
Zoltan Varga [Mon, 14 Mar 2016 21:52:16 +0000 (22:52 +0100)]
Fix the build.

8 years ago[corlib] Fix Delegate.Combine() to throw on non-matching types
Alexander Köplinger [Sun, 13 Mar 2016 01:42:26 +0000 (02:42 +0100)]
[corlib] Fix Delegate.Combine() to throw on non-matching types

This was inadvertently removed in https://github.com/mono/mono/commit/611a43ee0f672adbac3e25dc77731843a3d10cf1 from MulticastDelegate.CombineImpl().

Add the type check back in the Delegate base class, we already do the same in Remove().

Add unit tests to cover the behavior to the corlib test suite. (reverted from commit f29878dc713f4e148fe0a1e703fae8929e6fb6e0)

Needed to update some monodoc tests to match that an exception is now thrown again.

8 years agoMerge pull request #2755 from xmcclure/disable-omit-fp
Andi McClure [Mon, 14 Mar 2016 18:12:24 +0000 (14:12 -0400)]
Merge pull request #2755 from xmcclure/disable-omit-fp

"disable_omit_fp" option for MONO_DEBUG

8 years agoMerge pull request #2750 from radical/tasklogger
Marek Safar [Mon, 14 Mar 2016 17:47:22 +0000 (18:47 +0100)]
Merge pull request #2750 from radical/tasklogger

[xbuild] TaskLoggingHelper: Implement support for correctly using tas…

8 years ago[xbuild] TaskLoggingHelper: Implement support for correctly using task resources
Ankit Jain [Thu, 10 Mar 2016 19:33:52 +0000 (14:33 -0500)]
[xbuild] TaskLoggingHelper: Implement support for correctly using task resources

- make task resources available to TaskLoggingHelper
- verify TaskLoggingHelper method args
- tests

8 years ago[jit] Remove some loader error usage.
Zoltan Varga [Mon, 14 Mar 2016 15:22:09 +0000 (16:22 +0100)]
[jit] Remove some loader error usage.

8 years ago[corlib] Fix UIntPtr.ToString() 64bit implementation
Alexander Köplinger [Sun, 13 Mar 2016 02:06:52 +0000 (03:06 +0100)]
[corlib] Fix UIntPtr.ToString() 64bit implementation

Cast to ulong instead of uint, this is also what referencesource does:
https://github.com/Microsoft/referencesource/blob/d925d870f3cb3f6acdb14e71522ece7054e2233b/mscorlib/system/uintptr.cs#L114-L122

Also bump coreclr submodule to bring in another UIntPtr fix.

8 years ago[mcs] Better check for automatically implemented property inside a type with an expli...
Marek Safar [Mon, 14 Mar 2016 12:34:48 +0000 (13:34 +0100)]
[mcs] Better check for automatically implemented property inside a type with an explicit StructLayout. Fixes #39574

8 years ago[system.net.http] The backslash character may be used as a single-character quoting...
Marek Safar [Mon, 14 Mar 2016 11:35:04 +0000 (12:35 +0100)]
[system.net.http] The backslash character may be used as a single-character quoting mechanism within quoted-string. Fixes #39569

8 years agoFix the build.
Zoltan Varga [Mon, 14 Mar 2016 09:15:33 +0000 (10:15 +0100)]
Fix the build.

8 years agoMerge pull request #2754 from markusbeth/fix-mono-config
monojenkins [Mon, 14 Mar 2016 04:35:14 +0000 (04:35 +0000)]
Merge pull request #2754 from markusbeth/fix-mono-config

fixed replacement of $mono_libdir in config file

strncpy does not NUL-terminate the destination string in this case so one cannot use strcat to append

This fixes the error "malloc: top chunk is corrupt" as reported on mono-devel-list back in 2015-10-20 (subject: "malloc error executing OBS-built mono") at least for me.

8 years agoMerge pull request #2756 from vargaz/llvm-jit-3.9
monojenkins [Sun, 13 Mar 2016 20:35:18 +0000 (20:35 +0000)]
Merge pull request #2756 from vargaz/llvm-jit-3.9

[llvm] Finish JIT support for llvm 3.9.

8 years ago[llvm] Finish JIT support for llvm 3.9.
Zoltan Varga [Sun, 13 Mar 2016 18:49:10 +0000 (19:49 +0100)]
[llvm] Finish JIT support for llvm 3.9.

8 years ago[mono-config] fix copying of prefix during replacement
Bernhard Urban [Sat, 12 Mar 2016 00:05:36 +0000 (16:05 -0800)]
[mono-config] fix copying of prefix during replacement

8 years ago[acceptance-tests] Bump coreclr and ms-test-suite to bring in some fixes
Alexander Köplinger [Sat, 12 Mar 2016 00:03:14 +0000 (01:03 +0100)]
[acceptance-tests] Bump coreclr and ms-test-suite to bring in some fixes

Also disable a test that makes no sense.

8 years agoMerge pull request #2752 from kumpera/the_loader_error_highlander
monojenkins [Fri, 11 Mar 2016 23:05:20 +0000 (23:05 +0000)]
Merge pull request #2752 from kumpera/the_loader_error_highlander

This removed the last source of loader error from the runtime

The last source was on the AOT compiler in load_image.

I hooked enough MonoError to bubble the issue to a reasonably higher layer.

@vargaz please review.

8 years agofixed more srtncpy bugs
Markus Beth [Fri, 11 Mar 2016 21:52:34 +0000 (22:52 +0100)]
fixed more srtncpy bugs

8 years agoMerge pull request #2740 from lambdageek/dev/monoerror-reflection-icalls1
Rodrigo Kumpera [Fri, 11 Mar 2016 21:25:06 +0000 (16:25 -0500)]
Merge pull request #2740 from lambdageek/dev/monoerror-reflection-icalls1

[reflection] MonoError for a few icalls

8 years agoMerge pull request #2739 from lambdageek/dev/monoerror-type_load_class
Rodrigo Kumpera [Fri, 11 Mar 2016 21:06:25 +0000 (16:06 -0500)]
Merge pull request #2739 from lambdageek/dev/monoerror-type_load_class

[MonoError] Use class name for mono_error_set_type_load_class() exceptions

8 years ago[aot] Load errors in mono_aot_get_method_from_vt_slot must not be fatal as failed...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[aot] Load errors in mono_aot_get_method_from_vt_slot must not be fatal as failed slots will simply use the JIT.

8 years ago[xbuild] Remove ErrorTest.TestExecute1()
Ankit Jain [Fri, 11 Mar 2016 19:46:51 +0000 (14:46 -0500)]
[xbuild] Remove ErrorTest.TestExecute1()

This was an incorrect test. Tasks can't really be used like this
especially this once since it tries to Log an error, but it hasn't been
assigned a BuildEngine yet!

Other fixes in TaskLoggingHelper expose this issue.

8 years ago"disable_omit_fp" can now be included in MONO_DEBUG
Andi McClure [Fri, 11 Mar 2016 19:30:49 +0000 (14:30 -0500)]
"disable_omit_fp" can now be included in MONO_DEBUG

Option disables a compiler optimization that omits framepointers from the stack.

8 years agoMerge pull request #2751 from akoeplinger/fix-msbuild-remapping
monojenkins [Fri, 11 Mar 2016 15:45:21 +0000 (15:45 +0000)]
Merge pull request #2751 from akoeplinger/fix-msbuild-remapping

Fix msbuild remapping

First commit:
```
Revert "Do not remap framework assembly if it's version is higher than the runtime version"

It would cause issues on mobile, cause the runtime version is 2.0.5.0 there and loading
e.g. System.dll v4.0 would no longer be mapped to that version anymore after this change.
```
---
Second commit:
```
[runtime] Stop remapping higher versions of
 Microsoft.Build.Framework/Engine and remap Microsoft.Build.Utilities/Tasks
 (.v3.5)

The previous remapping was added in 725ed3f82400b1466ca17e99b85adcbde54238ca, but it didn't actually
fix the bug in https://bugzilla.xamarin.com/show_bug.cgi?id=32561.

The underlying cause of the bug is that in Mono 4.0 we removed the 2.0/3.5 profiles.
This meant that Microsoft.Build.Utilities.dll and Microsoft.Build.Utilities.v3.5.dll weren't installed
in the GAC anymore, because MSBuild 4.0 uses Microsoft.Build.Utilities.v4.0.dll, so the app failed
to load the 2.0 version of the assembly. The same applies for the .Tasks variants.

We remap earlier versions of the Microsoft.Build.Utilities/Tasks assemblies to the v4.0 version.
I've introduced another item in the AssemblyVersionMap struct which allows remapping to target a different
assembly name, because MSBuild made the questionable decision to put the version number in the assembly name.
While strictly speaking this is not what .NET is doing (it just fails there if .NET 2.0 isn't installed)
on Mono there's no way to install those older profiles anymore, so we remap them to v4.0 to keep apps working.

Newer versions of Microsoft.Build.Framework/Engine (like 12.0, 14.0) however have the same name, so we need to be
more careful here and only do a remapping to the 4.0 version if it's an earlier version (e.g. 2.0 -> 4.0).
This avoids issues with accidentally remapping 14.0 -> 4.0.

I tested the app from the bug report and it now works fine.
```

8 years ago[runtime] Stop remapping higher versions of Microsoft.Build.Framework/Engine and...
Alexander Köplinger [Thu, 10 Mar 2016 21:17:12 +0000 (22:17 +0100)]
[runtime] Stop remapping higher versions of Microsoft.Build.Framework/Engine and remap Microsoft.Build.Utilities/Tasks (.v3.5)

The previous remapping was added in 725ed3f82400b1466ca17e99b85adcbde54238ca, but it didn't actually
fix the bug in https://bugzilla.xamarin.com/show_bug.cgi?id=32561.

The underlying cause of the bug is that in Mono 4.0 we removed the 2.0/3.5 profiles.
This meant that Microsoft.Build.Utilities.dll and Microsoft.Build.Utilities.v3.5.dll weren't installed
in the GAC anymore, because MSBuild 4.0 uses Microsoft.Build.Utilities.v4.0.dll, so the app failed
to load the 2.0 version of the assembly. The same applies for the .Tasks variants.

We remap earlier versions of the Microsoft.Build.Utilities/Tasks assemblies to the v4.0 version.
I've introduced another item in the AssemblyVersionMap struct which allows remapping to target a different
assembly name, because MSBuild made the questionable decision to put the version number in the assembly name.
While strictly speaking this is not what .NET is doing (it just fails there if .NET 2.0 isn't installed)
on Mono there's no way to install those older profiles anymore, so we remap them to v4.0 to keep apps working.

Newer versions of Microsoft.Build.Framework/Engine (like 12.0, 14.0) however have the same name, so we need to be
more careful here and only do a remapping to the 4.0 version if it's an earlier version (e.g. 2.0 -> 4.0).
This avoids issues with accidentally remapping 14.0 -> 4.0.

I tested the app from the bug report and it now works fine.

8 years agofixed replacement of $mono_libdir in config file
Markus Beth [Fri, 11 Mar 2016 00:47:19 +0000 (01:47 +0100)]
fixed replacement of $mono_libdir in config file

strncpy does not terminate the destination string in this case so one
cannot use strcat to append

8 years ago[System] Bump CTS timeout in BlockingCollectionTests
Alexander Köplinger [Thu, 10 Mar 2016 23:37:16 +0000 (00:37 +0100)]
[System] Bump CTS timeout in BlockingCollectionTests

Saw a few failures on Jenkins on the slower ARM machines over the last days:

```
) MonoTests.System.Collections.Concurrent.BlockingCollectionTests.AddAnyCancellable : System.OperationCanceledException : The operation was canceled.
at System.Collections.Concurrent.BlockingCollection`1[T].TryAddToAnyCore (System.Collections.Concurrent.BlockingCollection`1[] collections, System.Collections.Concurrent.T item, Int32 millisecondsTimeout, CancellationToken externalCancellationToken) [0x00092] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/external/referencesource/System/sys/system/collections/concurrent/BlockingCollection.cs:1041
at System.Collections.Concurrent.BlockingCollection`1[T].TryAddToAny (System.Collections.Concurrent.BlockingCollection`1[] collections, System.Collections.Concurrent.T item, Int32 millisecondsTimeout, CancellationToken cancellationToken) [0x00006] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/external/referencesource/System/sys/system/collections/concurrent/BlockingCollection.cs:971
at System.Collections.Concurrent.BlockingCollection`1[T].AddToAny (System.Collections.Concurrent.BlockingCollection`1[] collections, System.Collections.Concurrent.T item, CancellationToken cancellationToken) <0x4421bf18 + 0x0002b> in <filename unknown>:0
at MonoTests.System.Collections.Concurrent.BlockingCollectionTests.AddAnyCancellable () [0x00031] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/System/Test/System.Collections.Concurrent/BlockingCollectionTests.cs:276
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003d] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/corlib/System.Reflection/StrongNameKeyPair.cs:103
```

100ms is likely just too short, bumping it.

8 years agoMerge pull request #2749 from BrzVlad/fix-suspend-deadlock
monojenkins [Thu, 10 Mar 2016 23:20:19 +0000 (23:20 +0000)]
Merge pull request #2749 from BrzVlad/fix-suspend-deadlock

[runtime] Fix deadlock while unwinding the stack of suspended thread

A suspended thread, in non-coop case, can be holding runtime locks. When the suspender tries to unwind the stack for this thread, it might require taking of runtime locks (ex. in aot case we might search for the jit info in the aot image and then register it, which requires the domain lock). Mark the suspender thread as running in async context while it unwinds other threads.

8 years agoRuntime enable for checked-build asserts
Andi McClure [Thu, 10 Mar 2016 22:42:06 +0000 (17:42 -0500)]
Runtime enable for checked-build asserts

In addition to --enable-checked-build, it is now mandatory to put the
requested checked-build modes in the environment variable
MONO_CHECK_MODE at runtime.

Also add a MONO_CHECK_THREAD_TRANSITION_HISTORY environement variable
for thread transition history length (instead of hardcoding 3).

8 years agoReplace the checked build configure flags with a single --enable-checked-build= flag
Andi McClure [Thu, 10 Mar 2016 22:39:57 +0000 (17:39 -0500)]
Replace the checked build configure flags with a single --enable-checked-build= flag

Also make the define names more consistent.

8 years ago[aot] Add MonoError to decode_method_ref.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[aot] Add MonoError to decode_method_ref.

8 years ago[aot] Add MonoError to decode_method_ref_with_target.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[aot] Add MonoError to decode_method_ref_with_target.

8 years ago[aot] Introduce MonoError in decode_resolve_method_ref.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[aot] Introduce MonoError in decode_resolve_method_ref.

8 years agoRevert "Do not remap framework assembly if it's version is higher than the runtime...
Alexander Köplinger [Thu, 10 Mar 2016 21:06:09 +0000 (22:06 +0100)]
Revert "Do not remap framework assembly if it's version is higher than the runtime version"

This reverts commit 100bd760a46811121b4b47ebba941d4fb98486ab.

It would cause issues on mobile, cause the runtime version is 2.0.5.0 there and loading e.g. System.dll v4.0 would
no longer be mapped to that version anymore after this change.

8 years ago[aot] Introduce MonoError in decode_generic_context.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[aot] Introduce MonoError in decode_generic_context.

8 years ago[aot] Add MonoError to load_image.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[aot] Add MonoError to load_image.

8 years ago[aot] Wire up MonoError into decode_klass_ref, decode_type and decode_generic_inst.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[aot] Wire up MonoError into decode_klass_ref, decode_type and decode_generic_inst.