Vlad Brezae [Mon, 11 Apr 2016 20:38:19 +0000 (04:38 +0800)]
Merge pull request #2802 from BrzVlad/feature-evacuation-opt2
[sgen] Reduce number of evacuated objects
Marek Safar [Mon, 11 Apr 2016 18:35:31 +0000 (20:35 +0200)]
[build] Remove unused lib paths
Marek Safar [Mon, 11 Apr 2016 18:33:47 +0000 (20:33 +0200)]
[mcs] Dynamic context in constructor initializers or field initializers is static. Fixes #40088
Vlad Brezae [Mon, 11 Apr 2016 16:23:50 +0000 (00:23 +0800)]
Merge pull request #2819 from BrzVlad/fix-major-log
[sgen] Fix major size logging
monojenkins [Mon, 11 Apr 2016 16:15:24 +0000 (17:15 +0100)]
Merge pull request #2867 from alexrp/sgen-block-size-ppc
[sgen] Set ARCH_MIN_MS_BLOCK_SIZE to 64k on both ppc32 and ppc64.
This fixes a problem that was happening on Debian ppc32 build machines. Since
they are set up as a 32-bit userland on a 64-bit kernel, Mono would be compiled
with an ARCH_MIN_MS_BLOCK_SIZE value of 16k. However, at runtime, the system
page size would be 64k (due to the 64-bit kernel with PPC_64K_PAGES set).
Signed-off-by: `Alex Rønne Petersen <alexrp@xamarin.com>`
Alex Rønne Petersen [Mon, 11 Apr 2016 16:12:09 +0000 (18:12 +0200)]
Merge pull request #2866 from alexrp/solaris-10-tls
[configure] Use __thread instead of pthread TLS on Solaris/x86.
Marek Safar [Mon, 11 Apr 2016 15:59:17 +0000 (17:59 +0200)]
[mcs] Use Array.Empty for empty arrays when available
Marek Safar [Mon, 11 Apr 2016 14:11:34 +0000 (16:11 +0200)]
[mcs] Tie-breaking rules are applied also for non-equivalent parameter types. Fixess #40183
Marek Safar [Sat, 9 Apr 2016 14:34:56 +0000 (16:34 +0200)]
[mcs] Add tie breaking rule when candidate is in expanded form only and best has default arguments
monojenkins [Mon, 11 Apr 2016 15:50:26 +0000 (16:50 +0100)]
Merge pull request #2868 from akoeplinger/maccore-fixes
[metadata] Ifdef out an icall that is not available in the DISABLE_REFLECTION_EMIT case
It caused errors like the following on the maccore builds:
```
CCLD libmonosgen-2.0.la
Undefined symbols for architecture armv7k:
"_mono_reflection_get_custom_attrs_blob_checked", referenced from:
_ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob in libmonoruntimesgen.a(libmonoruntimesgen_la-icall.o)
ld: symbol(s) not found for architecture armv7k
```
---
This is the last patch required for getting maccore master to build again with mono master.
@monojenkins merge
Miguel de Icaza [Mon, 11 Apr 2016 14:42:51 +0000 (10:42 -0400)]
Compiler-less mkbundle support in Mono.
This is the support that makes it so that mkbundle can create self-contained executables without requiring a native toolchain to be present. Also is the foundation to allow cross-compilation of self-contained executables.
This works by concatenating the runtime with the various dependencies and configuration files, attaching a directory at the end of the file and a signature to flag this as a runtime that has embedded resources in the executable file itself.
This works by modifying the runtime startup to check for a special signature at the end of the main executable, if it is not present, execution resumes as usual. Otherwise a directory is read from the end of the file which contains both the kind of file (assembly, configuration file, and so on), as well as pointer to the contents in the file. Then the regular Mono APIs to load resources are used to load these.This is the support that makes it so that mkbundle can create self-contained executables without requiring a native toolchain to be present. Also is the foundation to allow cross-compilation of self-contained executables.
This works by concatenating the runtime with the various dependencies and configuration files, attaching a directory at the end of the file and a signature to flag this as a runtime that has embedded resources in the executable file itself.
This works by modifying the runtime startup to check for a special signature at the end of the main executable, if it is not present, execution resumes as usual. Otherwise a directory is read from the end of the file which contains both the kind of file (assembly, configuration file, and so on), as well as pointer to the contents in the file. Then the regular Mono APIs to load resources are used to load these.
Alexander Köplinger [Mon, 11 Apr 2016 13:50:42 +0000 (15:50 +0200)]
[metadata] Ifdef out an icall that is not available in the DISABLE_REFLECTION_EMIT case
It caused errors like the following on the maccore builds:
```
CCLD libmonosgen-2.0.la
Undefined symbols for architecture armv7k:
"_mono_reflection_get_custom_attrs_blob_checked", referenced from:
_ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob in libmonoruntimesgen.a(libmonoruntimesgen_la-icall.o)
ld: symbol(s) not found for architecture armv7k
```
Alexander Köplinger [Mon, 11 Apr 2016 12:05:06 +0000 (14:05 +0200)]
Merge pull request #2865 from akoeplinger/maccore-fixes
A few small fixes for maccore
Mathieu Malaterre [Mon, 11 Apr 2016 09:04:47 +0000 (11:04 +0200)]
[sgen] Set ARCH_MIN_MS_BLOCK_SIZE to 64k on both ppc32 and ppc64.
This fixes a problem that was happening on Debian ppc32 build machines. Since
they are set up as a 32-bit userland on a 64-bit kernel, Mono would be compiled
with an ARCH_MIN_MS_BLOCK_SIZE value of 16k. However, at runtime, the system
page size would be 64k (due to the 64-bit kernel with PPC_64K_PAGES set).
Signed-off-by: Alex Rønne Petersen <alexrp@xamarin.com>
Alex Rønne Petersen [Mon, 11 Apr 2016 07:41:12 +0000 (09:41 +0200)]
[configure] Use __thread instead of pthread TLS on Solaris/x86.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=32020
Tested on Solaris/x86 by Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>.
Alexander Köplinger [Mon, 11 Apr 2016 00:38:22 +0000 (02:38 +0200)]
[mini] Add a stub for mono_arch_create_handler_block_trampoline to tramp-arm64.c
Otherwise it's not defined in the DISABLE_JIT case.
Alexander Köplinger [Sun, 10 Apr 2016 23:34:11 +0000 (01:34 +0200)]
[metadata] reflection.c: add missing MonoError parameter for mono_reflection_lookup_dynamic_token
It was missed in the recent refactoring in
96373eb62e4a73876b5ded49449ccb0fd16c40e8
Alexander Köplinger [Sun, 10 Apr 2016 23:29:10 +0000 (01:29 +0200)]
[metadata] Guard access to mb->locals_list with DISABLE_JIT ifdef
The field is only available when DISABLE_JIT is not defined.
Alexander Köplinger [Sun, 10 Apr 2016 16:46:37 +0000 (18:46 +0200)]
[build] Remove EXTENSION_include and _exclude from library.make
We do not have any .sources or .exclude.sources in mono-extensions anymore so this is no longer needed.
Alexander Köplinger [Sun, 10 Apr 2016 16:02:35 +0000 (18:02 +0200)]
Merge pull request #2864 from cptjazz/python3_compatibility
Make versions script compatible to python3: Add () when using `print'.
Miguel de Icaza [Sun, 10 Apr 2016 14:44:18 +0000 (10:44 -0400)]
Merge pull request #2854 from alexrp/lock-free-queue-docs
[utils/lfq] Clarify and document the lock-free queue API.
Alexander Jesner [Sun, 10 Apr 2016 14:19:56 +0000 (16:19 +0200)]
Make versions script compatible to python3: Add () when using `print'.
Vlad Brezae [Tue, 22 Mar 2016 19:11:39 +0000 (21:11 +0200)]
[sgen] Evacuate from emptier blocks to fuller ones
We don't evacuate from full blocks. When it comes to blocks that have free slots, instead of evacuating all of them to a new set of blocks, aim to keep the fuller blocks around and evacuate the emptier ones into them.
Vlad Brezae [Tue, 22 Mar 2016 18:16:07 +0000 (20:16 +0200)]
[sgen] Don't evacuate full blocks
Alexis Christoforides [Sun, 10 Apr 2016 00:07:58 +0000 (20:07 -0400)]
Merge pull request #2851 from mono/mono-symbolicate-ikvm-master
[mono-symbolicate] Use IKVM.Reflection instead of System.Reflection
Marek Safar [Sat, 9 Apr 2016 07:44:25 +0000 (09:44 +0200)]
[mcs] Codegen of try-catch-finally with await inside both try and catch. Fixes #39866
monojenkins [Fri, 8 Apr 2016 22:45:18 +0000 (23:45 +0100)]
Merge pull request #2860 from lewurm/fix-cfgdump-related-stuff
Fix `cfgdump` related stuff
Bernhard Urban [Fri, 8 Apr 2016 19:03:30 +0000 (12:03 -0700)]
[jit] include cfgdump.h in common_sources
Bernhard Urban [Fri, 8 Apr 2016 18:59:51 +0000 (11:59 -0700)]
[cfg-dump] fix warning
monojenkins [Fri, 8 Apr 2016 17:55:19 +0000 (18:55 +0100)]
Merge pull request #2856 from alexrp/profiler-fix-sem
[profiler] Fix incorrect initial writer semaphore value.
This was used during debugging. I forgot to revert it back to 0 before posting
the pull request (#2838). This led to ~3-5% more CPU usage by the writer thread
than actually necessary; it now sits around 0-1% for typical workloads.
Alex Rønne Petersen [Fri, 8 Apr 2016 01:48:42 +0000 (03:48 +0200)]
[utils/lfq] Clarify and document the lock-free queue API.
Martin Baulig [Fri, 8 Apr 2016 12:18:46 +0000 (14:18 +0200)]
[corlib]: Add internal callback to 'X509Helper' to use System's X509Helper2.
(cherry picked from commit
5eaf4db0918f4e59c47b22e6379236a55f6c813e)
Martin Baulig [Fri, 8 Apr 2016 13:41:13 +0000 (15:41 +0200)]
[Mono.Security]: Cleanup 'CertificateValidationHelper'.
The overloaded GetValidator() which takes both 'MonoTlsSettings'
and 'MonoTlsProvider' is actually used by the test suite, so let's
keep it public.
(cherry picked from commit
0977d531d2579c9051a6a2e6d0cb47e4f720bea4)
monojenkins [Fri, 8 Apr 2016 16:40:17 +0000 (17:40 +0100)]
Merge pull request #2857 from malaterre/master
Remove an undefined behavior
Found using gcc -fsanitize=bounds
Alexander Köplinger [Fri, 8 Apr 2016 15:22:23 +0000 (17:22 +0200)]
[ci] Don't use babysitter on Windows/cygwin
babysitter generates some temp paths in python when running under cygwin, which breaks down
when those paths are passed to the native Windows mono.exe during testing:
Exception in TestRunnerThread ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\cygdrive\c\WINDOWS\TEMP\tmpC4K5yK\babysitter_report_current_test_file.txt".
Martin Baulig [Fri, 8 Apr 2016 12:57:26 +0000 (14:57 +0200)]
[System]: Use MonoTlsProviderFactory.GetDefaultProviderInternal() to cache the result.
(cherry picked from commit
6d41d1562f6cec0da94229fb33e0c42ae2bf22e9)
Mathieu Malaterre [Fri, 8 Apr 2016 10:49:17 +0000 (12:49 +0200)]
Remove an undefined behavior
Found using gcc -fsanitize=bounds
Alex Rønne Petersen [Fri, 8 Apr 2016 10:44:17 +0000 (12:44 +0200)]
Merge pull request #2855 from malaterre/master
Remove a simple memory leak
Alex Rønne Petersen [Fri, 8 Apr 2016 10:36:20 +0000 (12:36 +0200)]
[profiler] Fix incorrect initial writer semaphore value.
This was used during debugging. I forgot to revert it back to 0 before posting
the pull request (#2838). This led to ~3-5% more CPU usage by the writer thread
than actually necessary; it now sits around 0-1% for typical workloads.
Mathieu Malaterre [Fri, 8 Apr 2016 06:50:19 +0000 (08:50 +0200)]
Remove a simple memory leak
monojenkins [Fri, 8 Apr 2016 04:20:40 +0000 (05:20 +0100)]
Merge pull request #2852 from alexrp/master
[profiler] Fix usage of the lock-free queue API.
* Free nodes hazardously.
* No need to unpoison nodes since we're not reusing them.
* Fix memory leak when emptying coverage queues.
Alex Rønne Petersen [Fri, 8 Apr 2016 00:49:22 +0000 (02:49 +0200)]
[profiler] Fix a warning.
Alex Rønne Petersen [Thu, 7 Apr 2016 23:18:09 +0000 (01:18 +0200)]
[profiler] Fix usage of the lock-free queue API.
* Free nodes hazardously.
* No need to unpoison nodes since we're not reusing them.
* Fix memory leak when emptying coverage queues.
Alexander Köplinger [Fri, 8 Apr 2016 00:18:00 +0000 (02:18 +0200)]
Merge pull request #2850 from madewokherd/inetpton
[configure] Also check that inet_pton is defined when building for Windows.
Alex Rønne Petersen [Thu, 7 Apr 2016 23:17:46 +0000 (01:17 +0200)]
[utils/hp] Export mono_thread_hazardous_try_free () for use in the profiler.
Alexander Köplinger [Thu, 7 Apr 2016 23:17:41 +0000 (01:17 +0200)]
[ci] Remove quotes from windows msbuild command
Turns out it wasn't the right fix.
Alexander Köplinger [Thu, 7 Apr 2016 22:52:33 +0000 (00:52 +0200)]
[ci] Don't enable the mobile profiles on the community archs
It only takes time and e.g. causes issues if e.g. AOT doesn't work.
Alexis Christoforides [Thu, 7 Apr 2016 22:01:42 +0000 (18:01 -0400)]
Remove unused Mono.Cecil references
Alexis Christoforides [Thu, 7 Apr 2016 21:53:14 +0000 (17:53 -0400)]
[mono-symbolicate] Use IKVM.Reflection instead of System.Reflection
This is so that the tool can work independently of runtime assembly resolution (ie. to load alternate corlibs)
monojenkins [Thu, 7 Apr 2016 21:15:36 +0000 (22:15 +0100)]
Merge pull request #2788 from lambdageek/dev/monoerror-reflection-no-more-raise
[reflection] No more mono_*_raise_*
No more `mono_error_raise_exception` and `mono_raise_exception` in `reflection.c`
monojenkins [Thu, 7 Apr 2016 20:26:04 +0000 (21:26 +0100)]
Merge pull request #2769 from lewurm/jit-cfg-dump
[jit] mini IR dumping feature for IGV
related doc PR: https://github.com/mono/website/pull/189
Martin Baulig [Thu, 7 Apr 2016 19:07:22 +0000 (21:07 +0200)]
[Mono.Security]: Add new internal 'MonoTlsProvider' APIs.
(cherry picked from commit
c02a885bd62631c4ff5cde5443f1b1e0cdccc237)
Martin Baulig [Thu, 7 Apr 2016 16:41:53 +0000 (18:41 +0200)]
[BoringTls]: Register via 'MonoTlsProviderFactory'.
(cherry picked from commit
e43a5f73320fbde80c36ed294ea1ba7b06cf58bb)
monojenkins [Thu, 7 Apr 2016 19:06:02 +0000 (20:06 +0100)]
Merge pull request #2824 from lambdageek/dev/monoerror-icalls-noraise
[runtime] Set pending exception in icalls instead of raising.
Vincent Povirk [Thu, 7 Apr 2016 18:18:47 +0000 (13:18 -0500)]
[configure] Also check that inet_pton is defined when building for Windows.
The version of mingw-w64 on Debian wheezy has this symbol in its libraries
but not its headers.
monojenkins [Thu, 7 Apr 2016 17:35:18 +0000 (18:35 +0100)]
Merge pull request #2848 from alexrp/master
[libgc] Fix broken AC_TRY_COMPILE() invocation in configure.ac.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=40144
Tested on PowerPC by `Mathieu Malaterre <malat@debian.org>`.
Aleksey Kliger [Tue, 22 Mar 2016 22:06:15 +0000 (18:06 -0400)]
[SRE] Remove uses of mono_error_raise_exception
1. icall `mono_image_module_basic_init`
2. icall `mono_reflection_sighelper_get_signature_local`
3. icall `mono_reflection_sighelper_get_signature_field`
4. API function mono_module_get_object
5. API function mono_type_get_object
6. API function mono_method_get_object
7. API function mono_field_get_object
8. API function mono_property_get_object
9. API function mono_event_get_object
Aleksey Kliger [Tue, 22 Mar 2016 20:51:48 +0000 (16:51 -0400)]
[reflection] Remove last uses of mono_raise_exception
1. static function `create_custom_attr` (set MonoError exception instance)
2. icall `mono_reflection_resolve_custom_attribute_data` (set pending
exception from MonoError). Also rename it to
ves_icall_System_Reflection_CustomAttributeData_ResolveArgumentsInternal
3. icall `mono_reflection_bind_generic_method_parameters` (set pending
exception from MonoError) Not renaming this one because it's actually
used for two icalls:
System.Reflection.Emit.MethodBuilder.MakeGenericMethod and System.Reflection.MonoMethod.MakeGenericMethod_impl
Aleksey Kliger [Tue, 15 Mar 2016 22:29:38 +0000 (15:29 -0700)]
[SRE] MonoError-ize reflection_methodbuilder_to_mono_method
Aleksey Kliger [Tue, 15 Mar 2016 18:14:29 +0000 (11:14 -0700)]
[SRE] MonoError-ize mono_reflection_create_generic_class
Change icall name to
ves_icall_System_Reflection_Emit_TypeBuilder_create_generic_class
Give mono_reflection_create_generic_class a MonoError argument,
and get rid of the redundant mono_reflection_create_generic_class_checked
Alexander Köplinger [Thu, 7 Apr 2016 14:57:54 +0000 (16:57 +0200)]
[ci] Fall back to timeout command if babysitter doesn't work
Some Jenkins workers (e.g. the s390x one) have an earlier python version installed where the babysitter doesn't work.
Fall back to timeout in those cases.
Martin Baulig [Thu, 7 Apr 2016 13:55:27 +0000 (15:55 +0200)]
[BoringTls]: Merge the work branch.
* Mono.Security.Interface.ICertificateValidator2:
new internal interface, deriving from ICertificateValidator.
* Mono.Security.Interface.CertificateValidationHelper:
the internal GetValidator() now returns ICertificateValidator2.
* Mono.Security.Interface.MonoTlsProvider:
make HasCustomSystemCertificateValidator and InvokeSystemCertificateValidator()
internal and use ICertificateValidator2.
* Mono.Net.Security.ChainValidator:
implement ICertificateValidator2; we may now be called with a
fully-built X509Chain.
* corlib, System, Mono.Security:
add [assembly: InternalsVisibleTo].
Jo Shields [Thu, 7 Apr 2016 14:28:59 +0000 (15:28 +0100)]
[ci] Escape run-step.sh invocations, for paths with spaces in
monojenkins [Thu, 7 Apr 2016 07:20:22 +0000 (08:20 +0100)]
Merge pull request #2847 from vargaz/get-type-reflection
[runtime] Fix type_from_parsed_name () to work in the presence of inl…
…ining done by LLVM.
monojenkins [Thu, 7 Apr 2016 06:45:21 +0000 (07:45 +0100)]
Merge pull request #2809 from lambdageek/dev/monoerror-threads
[runtime] Don't call mono_raise_exception in thread utilities
Alex Rønne Petersen [Thu, 7 Apr 2016 06:37:30 +0000 (08:37 +0200)]
[libgc] Fix broken AC_TRY_COMPILE() invocation in configure.ac.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=40144
Tested on PowerPC by Mathieu Malaterre <malat@debian.org>.
monojenkins [Thu, 7 Apr 2016 04:00:33 +0000 (05:00 +0100)]
Merge pull request #2838 from alexrp/profiler-writer-thread-cpu2
[profiler] Use a semaphore to signal the writer thread.
We would previously constantly try to dequeue from the writer queue which would
result in extremely high CPU usage, making many apps (e.g. Xamarin Studio)
nearly unusable.
Zoltan Varga [Thu, 7 Apr 2016 02:41:10 +0000 (22:41 -0400)]
[arm64] Enable Unwind_Backtrace () support on arm64.
Zoltan Varga [Wed, 6 Apr 2016 23:14:49 +0000 (19:14 -0400)]
[runtime] Fix type_from_parsed_name () to work in the presence of inlining done by LLVM.
monojenkins [Thu, 7 Apr 2016 00:34:46 +0000 (01:34 +0100)]
Merge pull request #2841 from lambdageek/dev/bug-40060
[corlib] Type.GetType parser and resolver improvements
We have two type parsers the one invoked by `Type.GetType(string)` (and some others) which is implemented in C in `reflection.c`, and the one invoked by `Type.GetType(string, Func<...>, Func<...>)` implemented in managed code as `System.TypeSpec`.
In both cases `string→Type` conversion goes in two stages: parsing and resolution. Parsing just changes the string into an AST. And resolution crawls the AST and constructs the appropriate types.
This fixes [Bugzilla #40060](https://bugzilla.xamarin.com/show_bug.cgi?id=40060)
1. Fix the resolver on the native side for types like `"System.Generic.Collections.Dictionary[System.Int32,MyType]"` where the generic type is from corlib and a type argument is from the current assembly.
2. Fix `get_caller_no_reflection` to work correctly when the call stack has a System.Reflection method as the immediate caller of the icall.
3. Fix the resolver on the native side to work when it's called from corlib's System namespace, not just System.Reflection.
4. Fix the managed parser to work with types like `"MyGeneric[MyType]"` where the generic argument is not an assembly qualified name or there's a mixture of aqn and non-aqn type arguments. Also rationalize how the code handles assembly qualification in general.
5. Test cases
Ankit Jain [Thu, 7 Apr 2016 00:29:06 +0000 (20:29 -0400)]
Merge pull request #2844 from radical/assign-proj-config
[xbuild] Fix bug #40094 - AssignProjectConfiguration should fallback to project path if ..
Alex Rønne Petersen [Tue, 5 Apr 2016 08:35:43 +0000 (10:35 +0200)]
[profiler] Use a semaphore to signal the writer thread.
We would previously constantly try to dequeue from the writer queue which would
result in extremely high CPU usage, making many apps (e.g. Xamarin Studio)
nearly unusable.
Alex Rønne Petersen [Wed, 6 Apr 2016 23:12:10 +0000 (01:12 +0200)]
Merge pull request #2839 from alexrp/profiler-thread-detach
[profiler] Detach helper/writer threads before shutting them down.
Aleksey Kliger [Tue, 29 Mar 2016 19:27:05 +0000 (15:27 -0400)]
[threads] Add MonoError arg to init_root_domain_thread
Aleksey Kliger [Tue, 29 Mar 2016 19:14:30 +0000 (15:14 -0400)]
[threads] MonoError-ize mono_thread_set_name_internal
Alexander Köplinger [Wed, 6 Apr 2016 21:31:06 +0000 (23:31 +0200)]
Replace android-libunwind submodule with a local copy
We can't keep it as a real git submodule since the repo contains an "aux" folder that breaks on Windows.
Aleksey Kliger [Tue, 29 Mar 2016 19:13:54 +0000 (15:13 -0400)]
[MonoError] Add mono_error_set_invalid_operation utility function
to construct System.InvalidOperationException
Aleksey Kliger [Tue, 29 Mar 2016 18:34:54 +0000 (14:34 -0400)]
[threads] Add MonoError arg to create_thread
instead of throw_on_failure flag, pass a MonoError outarg and let the
caller decide what to do with it.
Aleksey Kliger [Tue, 29 Mar 2016 21:09:05 +0000 (17:09 -0400)]
[runtime] Don't call mono_raise_exception in ves_icall_Mono_Runtime_GetNativeStackTrace
Alex Rønne Petersen [Wed, 6 Apr 2016 05:17:05 +0000 (07:17 +0200)]
[profiler] Detach helper/writer threads before shutting them down.
Alex Rønne Petersen [Wed, 6 Apr 2016 05:16:49 +0000 (07:16 +0200)]
[threads] Export mono_thread_info_detach () for use in the profiler.
Alexander Köplinger [Wed, 6 Apr 2016 20:34:52 +0000 (22:34 +0200)]
[ci] Put windows msbuild command in quotes
Rodrigo Kumpera [Wed, 6 Apr 2016 20:28:34 +0000 (16:28 -0400)]
Merge pull request #2837 from alexrp/master
Bunch of improvements surrounding thread names and reporting of such to the profiler
Ankit Jain [Wed, 6 Apr 2016 18:16:33 +0000 (14:16 -0400)]
[xbuild] Fix #40094, part 2/2: AssignProjectConfiguration - Fallback to
.. project path for lookup, if lookup by guid fails.
Fixes bxc #40094 .
Ankit Jain [Wed, 6 Apr 2016 18:11:17 +0000 (14:11 -0400)]
[xbuild] Fix #40094, part 1/2: SolutionParser: Emit `AbsolutePath="..."`
.. attribute for CurrentSolutionConfigurationContents .
<CurrentSolutionConfigurationContents>
<SolutionConfiguration xmlns="">
<ProjectConfiguration Project="{
82323650-6C2A-4FAC-91C6-
A715C2FE9CB2}" AbsolutePath="/Users/ankit/test/msbuild/bug40094/App1/App1\App1\App1.csproj">
Release|AnyCPU
</ProjectConfiguration>
...
Related to fix for bxc #40094
Aleksey Kliger [Tue, 5 Apr 2016 22:18:37 +0000 (18:18 -0400)]
[corlib] TypeSpec.Parse for non-assembly qualified names.
Previously for types like "Foo[P,Q]" the recursive call of the parser
would incorrectly consume the delimiter after a type argument (ie the
',' or ']') which would leave the caller potentially past the end of the
string which would signal a failed parse. New behavior is to peek at
the delimiter but leave it up to the caller to consume.
Also `Type.GetType(name, null, null)` should behave like
`Type.GetType(name)` (previously it dropped generic type arguments).
Aleksey Kliger [Tue, 5 Apr 2016 19:30:22 +0000 (15:30 -0400)]
[runtime] type_from_parsed_name can be called from System or System.Reflection
type_from_parsed_name is a helper for
ves_icall_System_Type_internal_from_name which is called directly from
System.Type as well as indirectly by System.TypeNameParse. We should
skip over all those classes to find the managed caller.
This fixes the remainder of [40060](https://bugzilla.xamarin.com/show_bug.cgi?id=40060)
Aleksey Kliger [Tue, 5 Apr 2016 19:24:23 +0000 (15:24 -0400)]
[runtime] Fix bug in get_caller_no_reflection
In order to find the user code that called some corlib API
that calls an icall, we write:
dest = m = mono_method_get_last_managed ();
mono_stack_walk_no_il (get_caller_no_reflection, &dest);
if (!dest) dest = m;
The get_caller_no_reflection walk works in two stages: in the first
stage we look for the target method (the initial value of dest) when we
find the target we set dest to NULL and then the second stage continues
walking upward past the reflection APIs.
However if the target method is itself in System.Reflection, the
old implementation would skip over it even in the first stage and we'd
never find the target method and exhaust the whole stack.
The fix is to move the check for the target method before the check for
the Reflection API methods.
Aleksey Kliger [Tue, 5 Apr 2016 15:33:23 +0000 (11:33 -0400)]
[runtime] Add a rootimage arg to mono_reflection_get_type_checked
And in type_from_parsed_name pass the calling image as the metadata
context even if the initial class we're looking for is in corlib.
This lets calls like
Type.GetType ("System.Collections.Generic.Dictionary<int, MyClass<int>>")
succeed. (Previously we would firs try to find
System.Collections.Generic.Dictionary in the calling assembly,
which would fail outside of corlib, and then we'd retry with the
rootimage as corlib which would find Dictionary, but fail to find
MyClass. Note that this was only broken if the outermost type was in
corlib. It always worked deeper in generic type arguments provided
we startd in the calling assmebly:
Type.GetType ("MyClass<System.Collections.Generic.Dictionary<int, MyClass<int>>>")
This fixes part of [40060](https://bugzilla.xamarin.com/show_bug.cgi?id=40060)
Joao Matos [Wed, 6 Apr 2016 17:06:29 +0000 (18:06 +0100)]
[runtime] Deduplicate MONO_ZERO_LEN_ARRAY into mono-compiler.h.
Joao Matos [Wed, 6 Apr 2016 16:55:55 +0000 (17:55 +0100)]
[runtime] Factor out (MonoMarshalConv)-1 into its own define.
Thanks to @marek-safar for suggestion.
João Matos [Wed, 6 Apr 2016 16:46:56 +0000 (17:46 +0100)]
Merge pull request #2842 from akoeplinger/fix-monodroid-build
Fix monodroid build
Alexander Köplinger [Wed, 6 Apr 2016 15:38:56 +0000 (17:38 +0200)]
Add android-libunwind submodule and fix path in mini-exceptions-native-unwinder.c
This was hosted in mono-extensions before. It is licensed under the MIT license:
https://android.googlesource.com/platform/external/libunwind/+/android-6.0.1_r24/LICENSE
Aleksey Kliger [Wed, 6 Apr 2016 14:20:32 +0000 (10:20 -0400)]
[corlib] Test Type.GetType(string,null,null) and anonymous type parsing
Rodrigo Kumpera [Wed, 6 Apr 2016 15:24:52 +0000 (11:24 -0400)]
Merge pull request #2836 from kumpera/cwt_toggleref
Fixed a toggleref and CWT iteraction bug.
Alexander Köplinger [Wed, 6 Apr 2016 15:20:11 +0000 (17:20 +0200)]
[mini] Remove duplicated methods from tramp-arm64-gsharedvt.c
They are already defined in arch-stubs.c
Alexander Köplinger [Wed, 6 Apr 2016 15:19:36 +0000 (17:19 +0200)]
[mini] Fix incorrect ifdef in the arm64 gsharedvt files
It used MONO_ARCH_GSHARED_SUPPORTED instead of MONO_ARCH_GSHAREDVT_SUPPORTED.
Alexander Köplinger [Wed, 6 Apr 2016 15:16:49 +0000 (17:16 +0200)]
[mini] Add missing include to mini-exceptions-native-unwinder.c
It complained about mono_runtime_printf_err() not being defined.
Alexander Köplinger [Wed, 6 Apr 2016 15:14:02 +0000 (17:14 +0200)]
[mini] Fix ARM assembler syntax for MRC
According to http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0068b/CIHEEIDJ.html the MRC instruction is documented as:
MRC{cond} coproc, opcode1, Rd, CRn, CRm{, opcode2}
with coproc being "the name of the coprocessor the instruction isfor. The standard name is pn, where n is an integer in the range 0-15."
GCC seemed to accept the operand without the 'p' prefix but clang raised an "invalid operand for instruction" error.
Joao Matos [Wed, 6 Apr 2016 15:08:28 +0000 (16:08 +0100)]
[runtime] Fixed invalid comparisons to MonoMarshalConv in marshal.c.
In some platforms, C enums might be considered unsigned, and in that case we'd get the following warning:
mono/mono/metadata/marshal.c:5108:12: warning: comparison of constant -1 with expression of type 'MonoMarshalConv' is always false
[-Wtautological-constant-out-of-range-compare]
if (conv == -1) {
~~~~ ^ ~~
The explicit cast should do the right thing.