mono.git
9 years agoMerge pull request #1081 from rneatherway/bug17537
Alexander Köplinger [Wed, 31 Dec 2014 11:38:41 +0000 (12:38 +0100)]
Merge pull request #1081 from rneatherway/bug17537

Allow CLR binaries to be passed to Process.Start

9 years agoMerge pull request #1482 from akoeplinger/fix-codetaskfactory-2
Marek Safar [Tue, 30 Dec 2014 21:24:48 +0000 (22:24 +0100)]
Merge pull request #1482 from akoeplinger/fix-codetaskfactory-2

[Microsoft.Build.Tasks] Rework CodeTaskFactory to use CodeDom and implement parameter support

9 years ago[Microsoft.Build.Tasks] Rework CodeTaskFactory to use CodeDom and implement parameter...
Alexander Köplinger [Sun, 28 Dec 2014 02:04:37 +0000 (03:04 +0100)]
[Microsoft.Build.Tasks] Rework CodeTaskFactory to use CodeDom and implement parameter support

Removed the old string-based code and use CodeDom APIs for everything.
Implemented parameter support by adding the necessary properties to the generated class.
Fixed bug where the task references weren't passed to the compiler.
This should now work with VB code as well (assuming the compiler is installed).

9 years ago[runtime] Added support for builds with cross-compiled LLVM.
João Matos [Wed, 24 Dec 2014 19:48:46 +0000 (19:48 +0000)]
[runtime] Added support for builds with cross-compiled LLVM.

9 years ago[runtime] Fixed mini-llvm.c build with MinGW.
João Matos [Wed, 24 Dec 2014 19:48:01 +0000 (19:48 +0000)]
[runtime] Fixed mini-llvm.c build with MinGW.

MinGW-w64 lacks a definition for bzero which we use in the rest of this file, provide a simple implementation that should get the job done.

9 years agoMerge pull request #1479 from mfoliveira/ppc64el-build-errors-v2-mit
João Matos [Wed, 24 Dec 2014 18:31:03 +0000 (13:31 -0500)]
Merge pull request #1479 from mfoliveira/ppc64el-build-errors-v2-mit

Fix build errors in mono-context.c on ppc64el

9 years agoFix build errors in mono-context.c on ppc64el
Mauricio Faria de Oliveira [Tue, 23 Dec 2014 00:08:33 +0000 (22:08 -0200)]
Fix build errors in mono-context.c on ppc64el

Build error #1:

libtool: compile:  gcc <...> -c mono-context.c  -fPIC -DPIC -o .libs/mono-context.o
mono-context.c: In function 'mono_sigctx_to_monoctx':
mono-context.c:435:68: error: 'MONO_SAVED_GREGS' undeclared (first use in this function)
  memcpy (&mctx->regs, &UCONTEXT_REG_Rn(uc, 13), sizeof (mgreg_t) * MONO_SAVED_GREGS);
                                                            ^
mono-context.c:435:68: note: each undeclared identifier is reported only once for each function it appears in
mono-context.c:436:70: error: 'MONO_SAVED_FREGS' undeclared (first use in this function)
  memcpy (&mctx->fregs, &UCONTEXT_REG_FPRn(uc, 14), sizeof (double) * MONO_SAVED_FREGS);
                                                              ^
The MONO_SAVED_GREGS and MONO_SAVED_FREGS macros are defined in mini-ppc.h.
The problem happens because commit 7e056cd346ccab104715e19d51d0ceccd51b696d
moved code using them from exceptions-ppc.h (which includes mini-ppc.h) to
mono-context.c (which doesn't), where they're not #included.

So, include mini-ppc.h in mono-context.c (in the existing powerpc ifdef block).

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Build error #2:

Now, it turns out mini-ppc.h doesn't know MonoMethod, MonoMethodSignature, and MonoObject.
So, include object.h (MonoObject), which includes metadata.h (MonoMethod and MonoMethodSignature),
in mini-ppc.h.

libtool: compile: gcc <...>  -c mono-context.c  -fPIC -DPIC -o .libs/mono-context.o
In file included from mono-context.c:427:0:
../../mono/mini/mini-ppc.h:37:2: error: unknown type name 'MonoMethod'
  MonoMethod *method;
  ^
../../mono/mini/mini-ppc.h:306:31: error: unknown type name 'MonoMethodSignature'
 mono_ppc_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
                       ^
../../mono/mini/mini-ppc.h:306:64: error: unknown type name 'MonoMethodSignature'
 mono_ppc_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
                                                        ^
../../mono/mini/mini-ppc.h:312:27: error: unknown type name 'MonoObject'
 mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, mgreg_t *int_regs, gdouble *fp_regs, gboolean rethrow) MONO_INTERNAL;
                   ^

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
9 years agoMerge pull request #1478 from mono/revert-1475-ppc64el-build-errors
João Matos [Wed, 24 Dec 2014 16:43:37 +0000 (11:43 -0500)]
Merge pull request #1478 from mono/revert-1475-ppc64el-build-errors

Revert "Fix build errors in mono-context.c on ppc64el"

9 years agoRevert "Fix build errors in mono-context.c on ppc64el"
João Matos [Wed, 24 Dec 2014 16:42:17 +0000 (16:42 +0000)]
Revert "Fix build errors in mono-context.c on ppc64el"

9 years ago[System.IO.Compression.FileSystem] Fix infinite loop in ZipFile.Open(string,ZipArchiv...
Miguel de Icaza [Wed, 24 Dec 2014 10:38:12 +0000 (08:38 -0200)]
[System.IO.Compression.FileSystem] Fix infinite loop in ZipFile.Open(string,ZipArchiveMode)

9 years agoMerge pull request #1475 from mfoliveira/ppc64el-build-errors
João Matos [Tue, 23 Dec 2014 15:11:59 +0000 (10:11 -0500)]
Merge pull request #1475 from mfoliveira/ppc64el-build-errors

Fix build errors in mono-context.c on ppc64el

9 years agoFix build errors in mono-context.c on ppc64el
Mauricio Faria de Oliveira [Tue, 23 Dec 2014 00:08:33 +0000 (22:08 -0200)]
Fix build errors in mono-context.c on ppc64el

Build error #1:

libtool: compile:  gcc <...> -c mono-context.c  -fPIC -DPIC -o .libs/mono-context.o
mono-context.c: In function 'mono_sigctx_to_monoctx':
mono-context.c:435:68: error: 'MONO_SAVED_GREGS' undeclared (first use in this function)
  memcpy (&mctx->regs, &UCONTEXT_REG_Rn(uc, 13), sizeof (mgreg_t) * MONO_SAVED_GREGS);
                                                            ^
mono-context.c:435:68: note: each undeclared identifier is reported only once for each function it appears in
mono-context.c:436:70: error: 'MONO_SAVED_FREGS' undeclared (first use in this function)
  memcpy (&mctx->fregs, &UCONTEXT_REG_FPRn(uc, 14), sizeof (double) * MONO_SAVED_FREGS);
                                                              ^
The MONO_SAVED_GREGS and MONO_SAVED_FREGS macros are defined in mini-ppc.h.
The problem happens because commit 7e056cd346ccab104715e19d51d0ceccd51b696d
moved code using them from exceptions-ppc.h (which includes mini-ppc.h) to
mono-context.c (which doesn't), where they're not #included.

So, include mini-ppc.h in mono-context.c (in the existing powerpc ifdef block).

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Build error #2:

Now, it turns out mini-ppc.h doesn't know MonoMethod, MonoMethodSignature, and MonoObject.
So, include object.h (MonoObject), which includes metadata.h (MonoMethod and MonoMethodSignature),
in mini-ppc.h.

libtool: compile: gcc <...>  -c mono-context.c  -fPIC -DPIC -o .libs/mono-context.o
In file included from mono-context.c:427:0:
../../mono/mini/mini-ppc.h:37:2: error: unknown type name 'MonoMethod'
  MonoMethod *method;
  ^
../../mono/mini/mini-ppc.h:306:31: error: unknown type name 'MonoMethodSignature'
 mono_ppc_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
                       ^
../../mono/mini/mini-ppc.h:306:64: error: unknown type name 'MonoMethodSignature'
 mono_ppc_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
                                                        ^
../../mono/mini/mini-ppc.h:312:27: error: unknown type name 'MonoObject'
 mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, mgreg_t *int_regs, gdouble *fp_regs, gboolean rethrow) MONO_INTERNAL;
                   ^

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
9 years agoMerge pull request #1472 from Aetf/zh-CHS-patch-fix-25554
Alex Rønne Petersen [Mon, 22 Dec 2014 17:50:07 +0000 (18:50 +0100)]
Merge pull request #1472 from Aetf/zh-CHS-patch-fix-25554

Add zh-CHS parent_lcid handling

9 years ago[sgen] Fix debug output for descriptor types.
Mark Probst [Sun, 21 Dec 2014 22:03:20 +0000 (14:03 -0800)]
[sgen] Fix debug output for descriptor types.

9 years agofix coding style
Aetf [Mon, 22 Dec 2014 09:41:23 +0000 (17:41 +0800)]
fix coding style

9 years agoAdd zh-CHS parent_lcid handling
Aetf [Sun, 21 Dec 2014 09:31:04 +0000 (17:31 +0800)]
Add zh-CHS parent_lcid handling

9 years agoMerge pull request #1470 from cmp-/fix-mutex-trylock-windows
João Matos [Sat, 20 Dec 2014 15:55:26 +0000 (10:55 -0500)]
Merge pull request #1470 from cmp-/fix-mutex-trylock-windows

Fix mono_mutex_trylock on Windows

9 years agoFix mono_mutex_trylock on Windows
cmp [Sat, 20 Dec 2014 15:23:16 +0000 (16:23 +0100)]
Fix mono_mutex_trylock on Windows

mono_mutex_trylock is expected to return nonzero on failure, while
TryEnterCriticalSection returns nonzero on success.

9 years agoMerge pull request #1465 from akoeplinger/msbuild-getdirnameoffileabove
Marek Safar [Fri, 19 Dec 2014 23:09:49 +0000 (00:09 +0100)]
Merge pull request #1465 from akoeplinger/msbuild-getdirnameoffileabove

[xbuild] Implement GetDirectoryNameOfFileAbove ()

9 years agoMerge pull request #1375 from echampet/cleanup
Zoltan Varga [Fri, 19 Dec 2014 19:59:51 +0000 (14:59 -0500)]
Merge pull request #1375 from echampet/cleanup

TARGET_J2EE cleanup.

9 years ago[Mono.DataConverter] Make it easier to use in PCL libraries
Miguel de Icaza [Fri, 19 Dec 2014 19:55:09 +0000 (14:55 -0500)]
[Mono.DataConverter] Make it easier to use in PCL libraries

9 years agoMerge pull request #1469 from akoeplinger/msbuild-missing-api
Marek Safar [Fri, 19 Dec 2014 15:15:05 +0000 (16:15 +0100)]
Merge pull request #1469 from akoeplinger/msbuild-missing-api

[xbuild] Add missing property 'StandardOutputImportance' to ToolTask

9 years agoRespond to code review feedback
Alexander Köplinger [Fri, 19 Dec 2014 02:51:58 +0000 (03:51 +0100)]
Respond to code review feedback

9 years agoRespond to code review feedback
Alexander Köplinger [Fri, 19 Dec 2014 02:45:25 +0000 (03:45 +0100)]
Respond to code review feedback

9 years ago[runtime] Add support to trace generics
Ludovic Henry [Thu, 18 Dec 2014 20:47:21 +0000 (15:47 -0500)]
[runtime] Add support to trace generics

9 years ago[runtime] Fix #24605 : "counters not enabled" message with embeders
Ludovic Henry [Fri, 5 Dec 2014 16:03:36 +0000 (11:03 -0500)]
[runtime] Fix #24605 : "counters not enabled" message with embeders

9 years ago[xbuild] Add missing property 'StandardOutputImportance' to ToolTask
Alexander Köplinger [Thu, 18 Dec 2014 18:58:51 +0000 (19:58 +0100)]
[xbuild] Add missing property 'StandardOutputImportance' to ToolTask

It's a stub and is currently not used by xbuild.

9 years ago[xbuild] Implement GetDirectoryNameOfFileAbove ()
Alexander Köplinger [Thu, 18 Dec 2014 11:20:32 +0000 (12:20 +0100)]
[xbuild] Implement GetDirectoryNameOfFileAbove ()

The method looks for the given file starting at the given path and traverses
the directory tree up until the file is found or root is reached.

9 years agoMerge pull request #1462 from ExonyLimited/fix-25442
Marcos Henrich [Wed, 17 Dec 2014 07:28:17 +0000 (07:28 +0000)]
Merge pull request #1462 from ExonyLimited/fix-25442

Performance fix for TimeZoneInfo.GetApplicableRule(), addresses #25442

9 years agoPerformance fix for TimeZoneInfo.GetApplicableRule(), addresses #25442
Craig Minihan [Wed, 17 Dec 2014 01:19:36 +0000 (17:19 -0800)]
Performance fix for TimeZoneInfo.GetApplicableRule(), addresses #25442
* Main use case - JSON.NET serialization of CLR objects containing DateTime fields, GetUtcOffset()=>GetApplicableRule() are the highest Mono methods in the profiler
* The property DateTime.Date access in the foreach is very expensive, this has been moved outside the foreach
* Performance for DateTime.Now passed as a parameter is 10x better than before
* This is the simplest possible change to yield an improvement, it would be better to replace the O(N) loop logic with a binary search - this yields a further 2-3x performance improvement, when master is building I may submit later

9 years ago[build] Fix bootstrap profile dependencies lib location
Marek Safar [Tue, 16 Dec 2014 23:08:10 +0000 (00:08 +0100)]
[build] Fix bootstrap profile dependencies lib location

9 years ago[sgen] Never inline sgen_par_object_get_size().
Mark Probst [Thu, 23 Oct 2014 18:22:24 +0000 (11:22 -0700)]
[sgen] Never inline sgen_par_object_get_size().

This makes at least graph4 a lot faster.

9 years agoBump the referencesource submodule
Marek Habersack [Tue, 16 Dec 2014 20:48:15 +0000 (21:48 +0100)]
Bump the referencesource submodule

The new referenced commit in the submodule changes the macro used in the
mobile profile to disable CAS from MOBILE to DISABLE_CAS_USE

9 years ago[runtime] remove_block_if_useless now ignores OP_IL_SEQ_POINT.
Marcos Henrich [Tue, 16 Dec 2014 20:26:43 +0000 (20:26 +0000)]
[runtime] remove_block_if_useless now ignores OP_IL_SEQ_POINT.

9 years ago[runtime] mini-amd64 seq_point_info_var is only required to debug.
Marcos Henrich [Tue, 16 Dec 2014 20:25:50 +0000 (20:25 +0000)]
[runtime] mini-amd64 seq_point_info_var is only required to debug.

9 years ago[runtime] Added gen-compact-seq-points option to MONO_DEBUG.
Marcos Henrich [Tue, 16 Dec 2014 20:23:58 +0000 (20:23 +0000)]
[runtime] Added gen-compact-seq-points option to MONO_DEBUG.
gen-compact-seq-points can be used to enable the generation of the sequence points data required to map native offsets to IL offsets.

9 years agoMerge pull request #1336 from esdrubal/datatablereadxmlschema
João Matos [Tue, 16 Dec 2014 19:28:01 +0000 (14:28 -0500)]
Merge pull request #1336 from esdrubal/datatablereadxmlschema

DataTabe.ReadXmlSchema now handles non Schema base element.

9 years agoMerge pull request #1349 from martinjt/MachineKeyProtect
João Matos [Tue, 16 Dec 2014 19:26:08 +0000 (14:26 -0500)]
Merge pull request #1349 from martinjt/MachineKeyProtect

Implement MachineKey.Protect and MachineKey.Unprotect

9 years agoMerge pull request #1459 from akoeplinger/fix-website-links
João Matos [Tue, 16 Dec 2014 19:19:03 +0000 (14:19 -0500)]
Merge pull request #1459 from akoeplinger/fix-website-links

Updated the Mono website links in the man pages

9 years ago[System.IO.Compression] Fixed DeflateStream native error when handling empty input.
João Matos [Tue, 16 Dec 2014 18:54:19 +0000 (18:54 +0000)]
[System.IO.Compression] Fixed DeflateStream native error when handling empty input.

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

9 years ago[buid] Fix bootstrap issue on cygwin
Marek Safar [Tue, 16 Dec 2014 14:59:33 +0000 (15:59 +0100)]
[buid] Fix bootstrap issue on cygwin

9 years agoUpdated the Mono website links in the man pages
Alexander Köplinger [Tue, 16 Dec 2014 14:05:05 +0000 (15:05 +0100)]
Updated the Mono website links in the man pages

Even though the old links still work, we can save everyone an unnecessary redirect by using the new links.

9 years agoFix command stream encoding for FTP requests.
Marek Habersack [Mon, 15 Dec 2014 22:34:32 +0000 (23:34 +0100)]
Fix command stream encoding for FTP requests.

Whenever a connection to an FTP server is established, FtpWebRequest
sends an option command to the server to enable UTF8 encoding for the
transfer. So far we've failed to check the request status of that
command and assumed that UTF8 is enabled but *also* failed to actually
use the encoding when sending commands (we had the ASCII encoding
hard-coded). This resulted in failed requests whenever a command named a
file or path which included non-ASCII characters. This patch does two
things:

 * checks the status of the UTF8 enabling command and uses UTF8 encoding
   only if it succeeded. Otherwise Encoding.Default is used.
 * uses the encoding detected above for the command stream.

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

[Tests will follow at a later date]

9 years agoAdd per thread profiling support to s390x
Neale Ferguson [Mon, 15 Dec 2014 19:12:15 +0000 (14:12 -0500)]
Add per thread profiling support to s390x

9 years agoMerge pull request #1456 from directhex/fix_Microsoft.Build.Execution.BuildManagerTes...
Jo Shields [Mon, 15 Dec 2014 18:38:53 +0000 (18:38 +0000)]
Merge pull request #1456 from directhex/fix_Microsoft.Build.Execution.BuildManagerTest.BuildCommonResolveAssemblyReferences

Fix Microsoft.Build.Execution.BuildManagerTest.BuildCommonResolveAssemblyReferences

9 years ago[System] Relaxed Ping test to work under Linux.
João Matos [Mon, 15 Dec 2014 17:06:27 +0000 (17:06 +0000)]
[System] Relaxed Ping test to work under Linux.

So in Linux the PingTimeOut test was returning TtlExpired and failing the assertion. Since I'm not exactly sure how ping behaves under all platforms, relax the test to only make sure it doesn't succeed.

9 years agoUse net_4_5 libraries for xbuild tests, regardless of target.
Jo Shields [Mon, 15 Dec 2014 16:59:48 +0000 (16:59 +0000)]
Use net_4_5 libraries for xbuild tests, regardless of target.

This works around failures caused by tests asking for other frameworks (like 4.0) on Mono 4.0, which only has 4.5

9 years agoMove XBUILD_FRAMEWORK_FOLDERS_PATH definition somewhere useful & export
Jo Shields [Mon, 15 Dec 2014 16:58:14 +0000 (16:58 +0000)]
Move XBUILD_FRAMEWORK_FOLDERS_PATH definition somewhere useful & export

This variable isn't being passed to the child xbuild process during testing, making it sorta useless.

9 years ago[FileSystemWatcher] Properly handle multicast delegates.
Alexis Christoforides [Mon, 15 Dec 2014 15:38:37 +0000 (10:38 -0500)]
[FileSystemWatcher] Properly handle multicast delegates.
Reverted the async delegate firing which is how Caching et al. expect FSW events; and properly handle the multicast case.

Also fixing a typo/regression in @2f1a136583c90cae805441e63b94bc4f277bb953

9 years agoBump referencesource
Marcos Henrich [Mon, 15 Dec 2014 15:54:46 +0000 (15:54 +0000)]
Bump referencesource

9 years agoForce MSBuildExtensionsPath to point to in-tree xbuild data
Jo Shields [Mon, 15 Dec 2014 14:32:18 +0000 (14:32 +0000)]
Force MSBuildExtensionsPath to point to in-tree xbuild data

As-is, on non-Mac, Xbuild looks for MSBuildExtensionsPath in the folder specified by --prefix, i.e. /usr/local/mono/xbuild by default (which may not & should not exist).

9 years agoRevert "Use ";" not Empty as bad TargetFrameworkDirectory value"
Jo Shields [Mon, 15 Dec 2014 13:37:19 +0000 (13:37 +0000)]
Revert "Use ";" not Empty as bad TargetFrameworkDirectory value"

This reverts commit 7b58afa1c8f37c0c82e8d95e8b274834b2fecbbc.

Apparently this bad value passes on mac/wrench. So it's not a good failure condition for the test.

9 years agoUse ";" not Empty as bad TargetFrameworkDirectory value
Jo Shields [Mon, 15 Dec 2014 12:07:29 +0000 (12:07 +0000)]
Use ";" not Empty as bad TargetFrameworkDirectory value

After manager.Build is called, a "null" empty for TargetFrameworkDirectory is
a string containing only ";" - a "good" value is the target framework
directory with a trailing ";". By testing for string.Empty, we don't actually
test whether the value has been correctly populated (causing all subsequent
failures).

9 years ago[System.Runtime.Serialization] Further baby steps
Miguel de Icaza [Sun, 14 Dec 2014 05:02:45 +0000 (00:02 -0500)]
[System.Runtime.Serialization] Further baby steps

9 years ago[System.Runtime.Serialization] Dip toes into using ReferenceSource
Miguel de Icaza [Sun, 14 Dec 2014 04:50:34 +0000 (23:50 -0500)]
[System.Runtime.Serialization] Dip toes into using ReferenceSource

9 years ago[Console/TerminfoDriver] Look in the TERMINFO directory if set
Miguel de Icaza [Sun, 14 Dec 2014 04:49:51 +0000 (23:49 -0500)]
[Console/TerminfoDriver] Look in the TERMINFO directory if set

9 years ago[System/SR] Brings some strings from .NET Core
Miguel de Icaza [Sun, 14 Dec 2014 00:58:06 +0000 (19:58 -0500)]
[System/SR] Brings some strings from .NET Core

Used the following script to do this:

var d = XDocument.Load ("Strings.resx");
foreach (var j in d.XPathSelectElements ("/root/data")){ var v = j.XPathSelectElement ("value"); Console.WriteLine ("\tpublic const string {0}=\"{1}\";", j.Attribute ("name").Value, v.Value); }

9 years ago[Console] Updated to terminfo renderer.
Miguel de Icaza [Sun, 14 Dec 2014 00:36:43 +0000 (19:36 -0500)]
[Console] Updated to terminfo renderer.

This brings .NET's parameterized terminfo renderer, various fixes and
semantic changes.

The existing implementation of the Console did not have a proper an
implementation of terminfo's parameterized sequences.  Instead of
this, a collection of hacks existed to hardcode both light colors and
cursor position.  These are now gone, since the parameterized strings
do contain the correct values for this.

The search path for terminfo now picks the most modern location for
terminfo.   With the old paths in place.

The lookup for terminfo databases only supported the lookup based on
the first character of a terminal, so for example, for xterm this was
$terminfo_dir/x/xterm, but OSX and maybe other systems now store the
files in $terminfo_dir/78/xterm (where 78 is the hex representation of
'x', the first letter of the terminal name).

The fallback is still in place for other Unix systems.

We no longer use the built-in terminfo databases as the first pick,
instead we try to load the system terminfo database before we use the
built-in versions.

Worth figuring out if we want to remove the two built-in ones (Linux
and xterm) as broken terminfo databases are no longer the norm in Unix
and just keep the ansi one as a database of last resort.

This means that the console actually now gets high colors on MacOS,
not just Linux.

This also fixes the issue with consoles with more than 256 colors.  As
reported in bug 18315.

9 years agoMerge pull request #1451 from akoeplinger/fix-winforms-test
Marek Safar [Sat, 13 Dec 2014 09:01:38 +0000 (10:01 +0100)]
Merge pull request #1451 from akoeplinger/fix-winforms-test

[MWF] Fix PropertyGridTest.PropertyGrid_ArrayParentTest by returning the correct value of PropertyCategoryDefault

9 years agoMerge pull request #1452 from esdrubal/xmlnamespace
Marek Safar [Sat, 13 Dec 2014 09:01:11 +0000 (10:01 +0100)]
Merge pull request #1452 from esdrubal/xmlnamespace

[System.Xml.Linq] xmlns prefixes are no longer generated in some cases.

9 years agoDisable sequence points
Marcos Henrich [Fri, 12 Dec 2014 21:23:48 +0000 (21:23 +0000)]
Disable sequence points
Sequence points were disabled until the optimization issues it causes are handled.

9 years agoDo not call seq_point_info_get_write_size with no seq points.
Marcos Henrich [Fri, 12 Dec 2014 21:17:34 +0000 (21:17 +0000)]
Do not call seq_point_info_get_write_size with no seq points.
This change fixes a segfault when sequence points are disabled.

9 years ago[System.Xml.Linq] xmlns prefixes are no longer generated in some cases.
Marcos Henrich [Fri, 12 Dec 2014 19:07:33 +0000 (19:07 +0000)]
[System.Xml.Linq] xmlns prefixes are no longer generated in some cases.
  - XNodeWrite.FillXmlns was adding a prefix to the attribute when no prefix was found (prefix==null)

  - XNodeWrite.LookupPrefix now returns string.Empty prefix when the namespace is the same as the element.
    A string.Empty prefix explicitly states that it has no prefix whereas null states that prefix was not defined.
    When LookupPrefix returns null for a namespace it means that a prefix should be generated first for anything that uses the namespace.
    That is what XmlSerializationWriter.GetQualifiedName does.

Fixes #24300

9 years ago[System.Xml.Linq] Test XmlSerializer with custom namespace.
Marcos Henrich [Fri, 12 Dec 2014 19:01:51 +0000 (19:01 +0000)]
[System.Xml.Linq] Test XmlSerializer with custom namespace.
Covers #24300.

9 years ago[System] Fixed Ping returning invalid results on OSX.
João Matos [Fri, 12 Dec 2014 18:23:22 +0000 (18:23 +0000)]
[System] Fixed Ping returning invalid results on OSX.

Simplify the code by re-using the OSX check from Platform which is more robust and add some tests to make sure we don't regress.

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

9 years ago[mscorlib/Android] CultureInfo.ClearCachedData() clears DateTime.
Jonathan Pryor [Fri, 12 Dec 2014 17:17:53 +0000 (12:17 -0500)]
[mscorlib/Android] CultureInfo.ClearCachedData() clears DateTime.

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

When an Android user changes the timezone, those TimeZone changes
aren't reflected in Xamarin.Android apps. Part of this is a
Xamarin.Android bug, in which it needs to listen for TimeZone change
notifications and in turn let Mono know that the TimeZone changed.

Xamarin.Android can/will call Thread.CurrentCulture.ClearCachedData()
and Thread.CurrentUICulture.ClearCachedData() when the TimeZone has
changed. This will allow Mono to lookup the TimeZone info again.

At which point we hit two problems within Mono:

 1. TimeZoneInfo.AndroidTimeZones.Local is unnecessarily cached.
 2. DateTime itself caches the UTC offset for use by DateTime.Now.

TimeZoneInfo.Local is *already* cached, and TimeZoneInfo.Local is
properly cleared by TimeZoneInfo.ClearCachedData() while
TimeZoneInfo.AndroidTimeZones.Local wasn't. Removing the extra
cache allows the TimeZoneInfo to be looked up again.

Which brings us to DateTime.Now: for my simple test case, after
calling CultureInfo.ClearCachedData() the result of
DateTime.Now.ToString() didn't reflect the newly current TimeZone. The
cause for this was DateTime.to_local_time_span_object and
DateTime.last_now, which DateTime.Now uses as a cache for the
TimeZone's UTC offset.

Since these DateTime fields weren't cleared, subsequent DateTime.Now
invocations reported the *previous* TimeZone instead of the current
timezone.

To fix this, add an `internal` DateTime.ClearCachedData() method, and
call DateTime.ClearCachedData() from CultureInfo.ClearCachedData().

9 years ago[MWF] Fix PropertyGridTest.PropertyGrid_ArrayParentTest by returning the correct...
Alexander Köplinger [Fri, 12 Dec 2014 00:50:43 +0000 (01:50 +0100)]
[MWF] Fix PropertyGridTest.PropertyGrid_ArrayParentTest by returning the correct value of PropertyCategoryDefault

The code in ComponentModel (https://github.com/mono/referencesource/blob/7dc4e513eafd3fb30d34111948ef14c981264463/System/compmod/system/componentmodel/CategoryAttribute.cs#L276) looks up the category name by string concatenation, which means it wasn't captured in our SR.cs.
We also can't add the correct value for PropertyCategoryDefault as a string constant to SR.cs since the value is retrieved via GetObject () and we currently just return the parameter name there.

A short-term workaround is to just special case PropertyCategoryDefault in GetObject ().

9 years ago[amd64] Fix a simple peephole opt broken by the OP_IL_SEQ_POINT changes.
Zoltan Varga [Fri, 12 Dec 2014 00:30:07 +0000 (19:30 -0500)]
[amd64] Fix a simple peephole opt broken by the OP_IL_SEQ_POINT changes.

9 years ago[jit] Mark OP_IL_SEQ_POINT as not having side effects.
Zoltan Varga [Fri, 12 Dec 2014 00:14:18 +0000 (19:14 -0500)]
[jit] Mark OP_IL_SEQ_POINT as not having side effects.

9 years ago[bcl] Fix another test failure caused by the usage of the reference version of System...
Zoltan Varga [Thu, 11 Dec 2014 23:31:53 +0000 (18:31 -0500)]
[bcl] Fix another test failure caused by the usage of the reference version of System.ComponentModel.

9 years ago[sgen] Add an assertion.
Mark Probst [Thu, 11 Dec 2014 23:02:15 +0000 (15:02 -0800)]
[sgen] Add an assertion.

9 years ago[sgen] Use the `SGEN_UPDATE_REFERENCE` macro in optimized copy.
Mark Probst [Thu, 11 Dec 2014 23:01:45 +0000 (15:01 -0800)]
[sgen] Use the `SGEN_UPDATE_REFERENCE` macro in optimized copy.

9 years ago[sgen] Fix evacuation.
Mark Probst [Thu, 11 Dec 2014 22:57:58 +0000 (14:57 -0800)]
[sgen] Fix evacuation.

We can't dereference an object's VTable before we know that it's not
tagged.  In this case, forwarded.  The access would be unaligned and
might even fault.

9 years agoRevert "[jit] Enable tail calls from gshared code. Fixes #25224."
Zoltan Varga [Thu, 11 Dec 2014 22:51:19 +0000 (17:51 -0500)]
Revert "[jit] Enable tail calls from gshared code. Fixes #25224."

This reverts commit ca0dd5c0bb0f600331aac3c6b8d0579e37cdd0c7.

Revert this as it causes a performance regression in f#.

9 years agoFix merge typo
Alexis Christoforides [Thu, 11 Dec 2014 21:00:40 +0000 (16:00 -0500)]
Fix merge typo

9 years ago[System.IO.KeventWatcher] Fixed deadlock when watcher stopped/disposed from its own...
Alexis Christoforides [Thu, 11 Dec 2014 20:30:25 +0000 (15:30 -0500)]
[System.IO.KeventWatcher] Fixed deadlock when watcher stopped/disposed from its own event handler.
This fixes hangs in tests that do that (ie. System.Runtime.Caching).

9 years ago[jit] Enable tail calls from gshared code. Fixes #25224.
Zoltan Varga [Thu, 11 Dec 2014 20:37:29 +0000 (15:37 -0500)]
[jit] Enable tail calls from gshared code. Fixes #25224.

9 years ago[jit] Remove some dead code.
Zoltan Varga [Thu, 11 Dec 2014 18:55:37 +0000 (13:55 -0500)]
[jit] Remove some dead code.

9 years ago[runtime] Fixed shutdown crasher in mono_thread_pool_cleanup.
Joao Matos [Thu, 11 Dec 2014 18:45:44 +0000 (18:45 +0000)]
[runtime] Fixed shutdown crasher in mono_thread_pool_cleanup.

We call `mono_thread_pool_cleanup` twice from `mono_runtime_try_shutdown` and later `mono_domain_finalize`, which meant we tried to destroy the semaphore twice and that caused a crasher.

Fix this by clearing out the semaphore pointer. That way when we try to destroy it again it's already null and execution continues just fine.

9 years ago[sdb] Fix the decoding of the next array when decoding sequence points.
Zoltan Varga [Thu, 11 Dec 2014 18:23:02 +0000 (13:23 -0500)]
[sdb] Fix the decoding of the next array when decoding sequence points.

9 years ago[sgen] Fixed dump_alloc_records() to work on MSVC.
Joao Matos [Thu, 11 Dec 2014 17:46:36 +0000 (17:46 +0000)]
[sgen] Fixed dump_alloc_records() to work on MSVC.

We are getting some crashers in printf when using the 'z' size_t printf specifier.

9 years ago[sgen] Align vtable pointers to 8-bytes for phony vtable used for filling the nursery.
Joao Matos [Thu, 11 Dec 2014 17:40:36 +0000 (17:40 +0000)]
[sgen] Align vtable pointers to 8-bytes for phony vtable used for filling the nursery.

Thanks to Kumpera for providing the fix!

9 years ago[sgen] Disable evacuation temporarily to fix crashes.
Mark Probst [Thu, 11 Dec 2014 17:30:12 +0000 (09:30 -0800)]
[sgen] Disable evacuation temporarily to fix crashes.

9 years ago[sdb] Another try at fixing #25009.
Zoltan Varga [Thu, 11 Dec 2014 16:58:41 +0000 (11:58 -0500)]
[sdb] Another try at fixing #25009.

9 years agoFix DateTimeConverter test
Marek Safar [Thu, 11 Dec 2014 12:40:00 +0000 (13:40 +0100)]
Fix DateTimeConverter test

9 years ago[sdb] Fix another shutdown crash. Fixes #25009.
Zoltan Varga [Thu, 11 Dec 2014 12:34:04 +0000 (07:34 -0500)]
[sdb] Fix another shutdown crash. Fixes #25009.

9 years agoMerge pull request #1403 from schani/fix-roslyn-linux-oom
Rodrigo Kumpera [Wed, 10 Dec 2014 15:53:16 +0000 (10:53 -0500)]
Merge pull request #1403 from schani/fix-roslyn-linux-oom

Fix Roslyn Linux OOM

9 years agobump rx to rx-oss-v2.2 and add branch info on .gitmodules.
Atsushi Eno [Wed, 10 Dec 2014 15:16:35 +0000 (23:16 +0800)]
bump rx to rx-oss-v2.2 and add branch info on .gitmodules.

9 years ago[mcs] Better recovery from failed async return type inference. Fixes #25165
Marek Safar [Wed, 10 Dec 2014 14:07:04 +0000 (15:07 +0100)]
[mcs] Better recovery from failed async return type inference. Fixes #25165

9 years agoDistribute reference assemblies in source tarball. Yuck.
Jo Shields [Wed, 10 Dec 2014 12:56:49 +0000 (12:56 +0000)]
Distribute reference assemblies in source tarball. Yuck.

9 years ago[System.Drawing] Fixes commit 2abd0ed92e1b5aae4c917c9feb7b08949e828424
Marek Safar [Wed, 10 Dec 2014 11:52:23 +0000 (12:52 +0100)]
[System.Drawing] Fixes commit 2abd0ed92e1b5aae4c917c9feb7b08949e828424

9 years ago[mcs] Update static using to match the latest update (still work in progress)
Marek Safar [Wed, 10 Dec 2014 11:30:56 +0000 (12:30 +0100)]
[mcs] Update static using to match the latest update (still work in progress)

9 years agoSpecify referencesource branch in .gitmodules to make updating easier
Marek Habersack [Wed, 10 Dec 2014 10:33:14 +0000 (11:33 +0100)]
Specify referencesource branch in .gitmodules to make updating easier

9 years agoUpdate external/referencesource to fix mobile builds
Marek Habersack [Wed, 10 Dec 2014 10:31:27 +0000 (11:31 +0100)]
Update external/referencesource to fix mobile builds

9 years ago[sgen] Always alloc degraded when nursery allocation fails.
Mark Probst [Fri, 14 Nov 2014 23:13:54 +0000 (15:13 -0800)]
[sgen] Always alloc degraded when nursery allocation fails.

There's an unlikely case that Roslyn triggers quite often on Linux: A
thread tries to allocate from the nursery, but it's full.  It triggers
a nursery collection, then tries allocating again.  Between the
collection and the allocation retry, another thread fills the nursery
so that the retry also fails.

We failed an assertion in this case.  Now we always go to the major
heap if it happens.

9 years ago[arm] Really fix the build.
Zoltan Varga [Tue, 9 Dec 2014 23:34:35 +0000 (18:34 -0500)]
[arm] Really fix the build.

9 years ago[arm] Fix the build.
Zoltan Varga [Tue, 9 Dec 2014 23:19:42 +0000 (18:19 -0500)]
[arm] Fix the build.

9 years ago[runtime] Fix string size calculation in `mono_string_new_size()`.
Mark Probst [Tue, 9 Dec 2014 21:15:55 +0000 (13:15 -0800)]
[runtime] Fix string size calculation in `mono_string_new_size()`.

This bug is not hit when doing managed allocations with SGen because the
managed allocator catches it.  It can be triggered with the embedding API, as
well as when the heavy binary protocol is enabled, in which case `bug-17590`
fails.

9 years ago[runtime] Allow StructLayoutAttribute.Pack values between 16 and 128. Fixes #25059.
Zoltan Varga [Tue, 9 Dec 2014 20:40:11 +0000 (15:40 -0500)]
[runtime] Allow StructLayoutAttribute.Pack values between 16 and 128. Fixes #25059.

9 years ago[System.Drawing] Add support for a null culture argument to the ConvertFrom () method...
Zoltan Varga [Tue, 9 Dec 2014 20:16:49 +0000 (15:16 -0500)]
[System.Drawing] Add support for a null culture argument to the ConvertFrom () method in RectangeConverter/SizeFConverter, the reference sources version of TypeConverter.ConvertFromString () passes null as the culture.