mono.git
11 years ago[Mono.Posix] Fix time_t conversions.
Jonathan Pryor [Fri, 14 Jun 2013 20:11:53 +0000 (16:11 -0400)]
[Mono.Posix] Fix time_t conversions.

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

Mono.Unix.UnixFileSystemInfo.LastWriteTime & co. were hilariously
wrong. Just...hilariously wrong.

$ ls -l bxc12686.exe
-rwxr-xr-x  1 jon  staff  4096 Jun 14 15:43 bxc12686.exe

$ csharp -r:Mono.Posix
csharp> new Mono.Unix.UnixFileInfo("bxc12686.exe").LastWriteTime;
6/14/2013 7:43:12 PM

Note: I'm currently in EDT (US Eastern Daylight Time). LastWriteTime
is supposed to be in the local time; it's 4 hours off (which also
happens to be the EDT UTF offset: -4:00).

The fundamental problem was that NativeConvert.FromTimeT() was written
for pre-.NET 2.0 environments, which precluded use (or knowledge of!)
DateTimeKind. Now that .NET 1.1 is no longer supported, and 2.0 is on
the its deathbead (bring on 4.5!), we can be smarter and let DateTime
sanely handle the conversion logic for us.

After the fix:

$ csharp -r:Mono.Posix
csharp> new Mono.Unix.UnixFileInfo("bxc12686.exe").LastWriteTime;
6/14/2013 3:43:12 PM

11 years agoSmall llvm+gsharedvt changes.
Zoltan Varga [Fri, 14 Jun 2013 18:48:06 +0000 (20:48 +0200)]
Small llvm+gsharedvt changes.

11 years agoAdd TLS offset probing to mach-arm in the same way it's done on x86.
Rodrigo Kumpera [Thu, 13 Jun 2013 22:48:10 +0000 (18:48 -0400)]
Add TLS offset probing to mach-arm in the same way it's done on x86.

11 years agoKill some unused code that is a leftover from when TPL had a managed scheduler.
Rodrigo Kumpera [Thu, 13 Jun 2013 22:37:13 +0000 (18:37 -0400)]
Kill some unused code that is a leftover from when TPL had a managed scheduler.

11 years agoAdd TLS offset probing to mach-amd64 in the same way it's done on x86.
Rodrigo Kumpera [Thu, 13 Jun 2013 21:14:29 +0000 (17:14 -0400)]
Add TLS offset probing to mach-amd64 in the same way it's done on x86.

11 years agoIntroduce mono_runtime_init_tls to centralize all of the late runtime TLS initialization.
Rodrigo Kumpera [Thu, 13 Jun 2013 20:57:11 +0000 (16:57 -0400)]
Introduce mono_runtime_init_tls to centralize all of the late runtime TLS initialization.

TLS initialization must be done as early as possible since runtime initialization
might be intermingled with 3rd party code running that sometimes create additional
slots. Those extra TLS slots do interfere with AOT compilation that might see a
different set of offsets when compiling than when running.

The current piece of problem is AOT image loading. If the AOT image is not found,
the dynamic linker in 10.9 will create a TLS slot to hold error data. AOT image
loading is triggered in between the creation of the runtime TLS slots.

Since AOT image loading never happens during compilation, the dynamic linker
would never create the slot and things would otherwise remain working.

The solution is to move all TLS initialization to before any assembly is loaded
and, transitively, AOT image loading.

11 years agoForce the runtime on OSX to use a 8Mb stack.
Rodrigo Kumpera [Thu, 13 Jun 2013 20:54:00 +0000 (16:54 -0400)]
Force the runtime on OSX to use a 8Mb stack.

This change doesn't affect any of the cats that default to 8Mb.

We need a significantly big main stack because mcs is implemented
in a recursive fashion and, right now, parts of the corlib test suite
require in excess of 1Mb of stack space to compile.

11 years agoMake the MONO_DISABLE_SHARED_AREA env variable actually work. Fixes #12655.
Zoltan Varga [Thu, 13 Jun 2013 15:01:34 +0000 (17:01 +0200)]
Make the MONO_DISABLE_SHARED_AREA env variable actually work. Fixes #12655.

11 years agoFix more warnings/unitialized memory errors.
Zoltan Varga [Wed, 12 Jun 2013 22:33:43 +0000 (00:33 +0200)]
Fix more warnings/unitialized memory errors.

11 years agoslightly change missing monolite error message.
Atsushi Eno [Thu, 13 Jun 2013 08:58:34 +0000 (17:58 +0900)]
slightly change missing monolite error message.

context: https://twitter.com/k1iguchi/status/345084575019577345

11 years agoMerge pull request #662 from cdrnet/fix-biginteger-gcd
Marek Safar [Thu, 13 Jun 2013 06:10:31 +0000 (23:10 -0700)]
Merge pull request #662 from cdrnet/fix-biginteger-gcd

[System.Numerics] BigInteger.GCD(0,x) must return abs(x) instead of x

11 years agoFix a memory overwrite in the gsharedvt jit code.
Zoltan Varga [Wed, 12 Jun 2013 22:29:32 +0000 (00:29 +0200)]
Fix a memory overwrite in the gsharedvt jit code.

11 years ago[System.Numerics] BigInteger.GCD(0,x) must return abs(x) instead of x
Christoph Ruegg [Wed, 12 Jun 2013 21:58:42 +0000 (23:58 +0200)]
[System.Numerics] BigInteger.GCD(0,x) must return abs(x) instead of x

According to the docs and matching the behavior in .Net, BigInteger's
GreatestCommonDivisor must return the absolute value of the non-zero
parameter if one of the parameters is zero.

Contains a fix and extended unit tests to cover the case.

11 years agoMake test more robust against conservative stack scanning.
Rodrigo Kumpera [Wed, 12 Jun 2013 20:16:49 +0000 (16:16 -0400)]
Make test more robust against conservative stack scanning.

11 years agoFix an unitialized variable bug.
Rodrigo Kumpera [Wed, 12 Jun 2013 19:55:15 +0000 (15:55 -0400)]
Fix an unitialized variable bug.

11 years agoFix configure.in detection of -Wunused-but-set-variable support under clang.
Rodrigo Kumpera [Wed, 12 Jun 2013 19:42:42 +0000 (15:42 -0400)]
Fix configure.in detection of -Wunused-but-set-variable support under clang.

11 years agoPerform TLS offset detection during startup.
Rodrigo Kumpera [Wed, 12 Jun 2013 19:35:20 +0000 (15:35 -0400)]
Perform TLS offset detection during startup.

* mono-suppport-x86.c (mono_mach_init): Probe TLS slots using an
unlikely canary. Right now only two offsets are known.

* mono-threads.c (mono_threads_init): Initialize mach from here
as remote TLS reads are required for mono-threads to work.

11 years agoMove unload_data to the heap and it can outlive the initiator.
Rodrigo Kumpera [Wed, 12 Jun 2013 19:12:40 +0000 (15:12 -0400)]
Move unload_data to the heap and it can outlive the initiator.

The unload thread stores TRUE to the done field when unloading
ends so the initiator can break out of the wait loop in case its
thread doesn't belong to the domain been unloaded but was still
aborted.

This means that the initiator could be gone when the unload
thread stores into the done field. This is now a random write
to the thread stack, which has a high chance of causing crashes.

The solution is to move the unload_data to the heap and refcount
it so we can release it safely.

11 years agoUse the same code for aot alignment checks in aot-compiler.c and aot-runtime.c.
Zoltan Varga [Wed, 12 Jun 2013 18:28:06 +0000 (20:28 +0200)]
Use the same code for aot alignment checks in aot-compiler.c and aot-runtime.c.

11 years agoMerge pull request #631 from kebby/master
Gonzalo Paniagua Javier [Wed, 12 Jun 2013 18:14:20 +0000 (11:14 -0700)]
Merge pull request #631 from kebby/master

Fix race condition in System.Net.WebConnectionStream

11 years agoReverted whitespace changes
Tammo 'kb' Hinrichs [Wed, 12 Jun 2013 17:52:14 +0000 (19:52 +0200)]
Reverted whitespace changes

11 years agoRevert "Add beginnings of a managed IL disassembler which uses Mono.Cecil. Not yet...
Zoltan Varga [Wed, 12 Jun 2013 16:33:33 +0000 (18:33 +0200)]
Revert "Add beginnings of a managed IL disassembler which uses Mono.Cecil. Not yet part of the build."

This reverts commit 535e76a05898eb0bb62932f12c145ad02c215f64.

Revert this as we will be using something else.

11 years agoAdd support for nullables to box/unbox in gsharedvt code.
Zoltan Varga [Wed, 12 Jun 2013 15:31:30 +0000 (17:31 +0200)]
Add support for nullables to box/unbox in gsharedvt code.

11 years agoBump ikvm to 10b8312c8024111780ee382688cd4c8754b1f1ac.
Martin Baulig [Wed, 12 Jun 2013 02:17:37 +0000 (04:17 +0200)]
Bump ikvm to 10b8312c8024111780ee382688cd4c8754b1f1ac.

11 years agoAdd System.Net to runtime remapping list.
Martin Baulig [Wed, 12 Jun 2013 02:05:35 +0000 (04:05 +0200)]
Add System.Net to runtime remapping list.

11 years agoFix the arm build.
Zoltan Varga [Tue, 11 Jun 2013 21:33:49 +0000 (23:33 +0200)]
Fix the arm build.

11 years agoAllow Nullable.Box/Unbox to be compiled as gsharedvt methods.
Zoltan Varga [Tue, 11 Jun 2013 15:24:53 +0000 (17:24 +0200)]
Allow Nullable.Box/Unbox to be compiled as gsharedvt methods.

11 years agoFix new BigInteger().GetHashCode() to not throw.
Rodrigo Kumpera [Tue, 11 Jun 2013 19:55:48 +0000 (15:55 -0400)]
Fix new BigInteger().GetHashCode() to not throw.

11 years agoFix delegate combine when left side has already been invoked.
Rodrigo Kumpera [Tue, 11 Jun 2013 19:05:28 +0000 (15:05 -0400)]
Fix delegate combine when left side has already been invoked.

11 years agoBetter handle default value BigInteger. Fixes #11945
Rodrigo Kumpera [Tue, 11 Jun 2013 19:01:51 +0000 (15:01 -0400)]
Better handle default value BigInteger. Fixes #11945

11 years ago[PCL]: System.Windows and System.Xml.Serialization are no Facade Assemblies.
Martin Baulig [Tue, 11 Jun 2013 18:45:35 +0000 (20:45 +0200)]
[PCL]: System.Windows and System.Xml.Serialization are no Facade Assemblies.

11 years agoAllow the gsharedvt info/local vars to be register allocated.
Zoltan Varga [Tue, 11 Jun 2013 10:01:47 +0000 (12:01 +0200)]
Allow the gsharedvt info/local vars to be register allocated.

11 years agoOptimize generated gsharedvt code: Load information from the gsharedvt_info variable...
Zoltan Varga [Tue, 11 Jun 2013 09:27:06 +0000 (11:27 +0200)]
Optimize generated gsharedvt code: Load information from the gsharedvt_info variable instead of using an rgctx fetch trampoline, use optimized memcpy/bzero methods.

11 years agoHandle shifts by multiple of 32 correctly. Fixes #10887.
Rodrigo Kumpera [Mon, 10 Jun 2013 22:29:14 +0000 (18:29 -0400)]
Handle shifts by multiple of 32 correctly. Fixes #10887.

11 years agoAdd specialized memcpy/bzero methods to String which are called from gsharedvt code.
Zoltan Varga [Mon, 10 Jun 2013 21:01:32 +0000 (23:01 +0200)]
Add specialized memcpy/bzero methods to String which are called from gsharedvt code.

11 years agoEliminate the use of localloc in gsharedvt methods which have no gsharedvt locals.
Zoltan Varga [Mon, 10 Jun 2013 14:09:31 +0000 (16:09 +0200)]
Eliminate the use of localloc in gsharedvt methods which have no gsharedvt locals.

11 years agoFix a couple of warnings in appdomain.c and threads.c.
Alex Rønne Petersen [Mon, 10 Jun 2013 10:47:40 +0000 (12:47 +0200)]
Fix a couple of warnings in appdomain.c and threads.c.

11 years agoFix a typo in e5c45f1161604733b116a0a83782c08f74fb3127.
Zoltan Varga [Mon, 10 Jun 2013 09:20:22 +0000 (11:20 +0200)]
Fix a typo in e5c45f1161604733b116a0a83782c08f74fb3127.

11 years agoDisable gc-altstack.exe on wrench until it is fixed (#12610).
Zoltan Varga [Sun, 9 Jun 2013 21:38:36 +0000 (23:38 +0200)]
Disable gc-altstack.exe on wrench until it is fixed (#12610).

11 years agoRework the gsharedvt code to add support for vtypes with arbitrary size.
Zoltan Varga [Sun, 9 Jun 2013 21:16:51 +0000 (23:16 +0200)]
Rework the gsharedvt code to add support for vtypes with arbitrary size.

11 years agoMerge pull request #658 from cdrnet/fix-bad-formatstring-forwarding
Marek Safar [Sun, 9 Jun 2013 14:28:32 +0000 (07:28 -0700)]
Merge pull request #658 from cdrnet/fix-bad-formatstring-forwarding

Complex.ToString must not pass format string to string.Format

11 years agoComplex.ToString must not pass format string to string.Format
Christoph Ruegg [Sun, 9 Jun 2013 13:08:53 +0000 (15:08 +0200)]
Complex.ToString must not pass format string to string.Format

Type: System.Numerics.Complex

IFormattable format strings and string.Format formats are different
and incompatible. For example, `x.ToString("G")` and `x.ToString(null)`
must be equivalent to `x.ToString()`, but they behave very differently
with string.Format, where the former just returns "G" and the latter
throws an ArgumentNullException.

Changes System.Numerics.Complex.ToString to pass the format string to
double.ToString instead of string.Format.

Adds UnitTests for the changes in new ComplexTest.cs file

11 years agoMerge pull request #657 from jbevain-forks/thread-safe-cs-code-generator
Marek Safar [Fri, 7 Jun 2013 21:58:09 +0000 (14:58 -0700)]
Merge pull request #657 from jbevain-forks/thread-safe-cs-code-generator

Prevent multiple threads to populate the keyword table

11 years agoPrevent multiple threads to populate the keyword table
Jb Evain [Fri, 7 Jun 2013 19:32:11 +0000 (21:32 +0200)]
Prevent multiple threads to populate the keyword table

11 years agoResolve switch cases without look aheah look-up. Fixes #12583
Marek Safar [Fri, 7 Jun 2013 16:39:33 +0000 (18:39 +0200)]
Resolve switch cases without look aheah look-up. Fixes #12583

11 years ago[ios] Remove code path using UseMachineKeyStore since it's not available (and bring...
Sebastien Pouliot [Fri, 7 Jun 2013 15:10:45 +0000 (11:10 -0400)]
[ios] Remove code path using UseMachineKeyStore since it's not available (and bring extra code inside applications)

11 years agoFix the desktop test suite.
Rodrigo Kumpera [Fri, 7 Jun 2013 14:42:28 +0000 (10:42 -0400)]
Fix the desktop test suite.

11 years ago[System.ComponentModel.Composition]: Disable RefEmit classes on MonoTouch.
Martin Baulig [Fri, 7 Jun 2013 01:38:33 +0000 (03:38 +0200)]
[System.ComponentModel.Composition]: Disable RefEmit classes on MonoTouch.

11 years agoAdd regression test for wrench bug where an appdomain unload would race with shutdown...
Rodrigo Kumpera [Thu, 6 Jun 2013 23:04:49 +0000 (19:04 -0400)]
Add regression test for wrench bug where an appdomain unload would race with shutdown and deadlock.

11 years agoFix race condition between a domain unload and a runtime shutdown.
Rodrigo Kumpera [Thu, 6 Jun 2013 22:53:39 +0000 (18:53 -0400)]
Fix race condition between a domain unload and a runtime shutdown.

When a regular runtime shutdown and a domain unload starts mostly in parallel
it might happen that the unload initiator will deadlock waiting on the unload thread
for two reasons:

The unload thread will block when attaching as the runtime believe it's better
to not finish it as it's going down. To fix this we now use mono_thread_attach_full
and force it to be attached.

The unload initiator might deadlock on the wait loop if the shutdown initiator aborts
it instead of the unload thread. This happens if the unload was done from outside of
the domain been teared down.

The fix here is to add a variable that the initiation test on every loop, which is the
right thing to do when using wait loops on handles. This might degrade into a busy
loop when the above race condition happens. It's rare enough that it's not worth
fixing it now.

11 years agoAdd mono_thread_attach_full function that can forces a thread to be attached during...
Rodrigo Kumpera [Thu, 6 Jun 2013 22:50:04 +0000 (18:50 -0400)]
Add mono_thread_attach_full function that can forces a thread to be attached during shutdown.

A thread must be forcibly attached during shutdown if the runtime needs it to run and needs it
to be functional.

11 years agoMake threadpool_clear_queue resistant to concurrent runtime shutdown.
Rodrigo Kumpera [Thu, 6 Jun 2013 22:42:40 +0000 (18:42 -0400)]
Make threadpool_clear_queue resistant to concurrent runtime shutdown.

If threadpool_clear_queue is called while the runtime is been shutdown
it might crash since the queue will have been cleaned.

So now we guard against null queues and bail out from appending
the existing jobs if shutdown was initiated.

11 years agoRun more runtime tests on wrench.
Rodrigo Kumpera [Thu, 6 Jun 2013 18:37:42 +0000 (14:37 -0400)]
Run more runtime tests on wrench.

11 years agoRename the JIT test classes so they can be run on MT too.
Zoltan Varga [Thu, 6 Jun 2013 19:51:26 +0000 (21:51 +0200)]
Rename the JIT test classes so they can be run on MT too.

11 years agoMerge pull request #655 from zgramana/master
Marek Habersack [Thu, 6 Jun 2013 16:32:29 +0000 (09:32 -0700)]
Merge pull request #655 from zgramana/master

Adds MemoryCacheEntryPriorityQueue heap index checks

11 years ago[Caching] Adds some checks for overflow and valid bounds on heap indexes.
Zachary Gramana [Thu, 6 Jun 2013 15:41:04 +0000 (11:41 -0400)]
[Caching] Adds some checks for overflow and valid bounds on heap indexes.

11 years agoFix a regression introduced by 6285a057a248e65301def835dfc5971e6df29a39: Use the...
Zoltan Varga [Thu, 6 Jun 2013 15:23:30 +0000 (17:23 +0200)]
Fix a regression introduced by 6285a057a248e65301def835dfc5971e6df29a39: Use the proper value to calculate whenever to do a near call on amd64. Fixes #12541.

11 years ago[monodoc] Cache assembly loaded with MonoImpInfo. Patch by Aaron Oneal.
Jérémie Laval [Thu, 6 Jun 2013 14:51:37 +0000 (10:51 -0400)]
[monodoc] Cache assembly loaded with MonoImpInfo. Patch by Aaron Oneal.

11 years ago[monodoc] Use CLEAN_FILES rather than overriding clean-local
Jérémie Laval [Thu, 6 Jun 2013 14:51:10 +0000 (10:51 -0400)]
[monodoc] Use CLEAN_FILES rather than overriding clean-local

11 years ago[monodoc] Remove .config file when cleaning
Jérémie Laval [Thu, 6 Jun 2013 14:38:23 +0000 (10:38 -0400)]
[monodoc] Remove .config file when cleaning

11 years agoCheck class level type parameters used in explicit delegate parameters conversion...
Marek Safar [Thu, 6 Jun 2013 12:30:51 +0000 (14:30 +0200)]
Check class level type parameters used in explicit delegate parameters conversion. Fixes #12568

11 years agoCorrect encoding transformation flags for type arguments arrays without dynamic eleme...
Marek Safar [Thu, 6 Jun 2013 09:54:20 +0000 (11:54 +0200)]
Correct encoding transformation flags for type arguments arrays without dynamic element. Fixes #12572

11 years agoKeep hoisted this when lambda parent is async lambda. Fixes #12549
Marek Safar [Thu, 6 Jun 2013 08:50:44 +0000 (10:50 +0200)]
Keep hoisted this when lambda parent is async lambda. Fixes #12549

11 years ago[mdoc] Pass the right HelpSource as a hint to the renderer to avoid generating system...
Jérémie Laval [Wed, 5 Jun 2013 23:53:53 +0000 (19:53 -0400)]
[mdoc] Pass the right HelpSource as a hint to the renderer to avoid generating system-provided doc.

11 years agoRework the shutdown sequence so two initiations don't race each other.
Rodrigo Kumpera [Wed, 5 Jun 2013 23:27:45 +0000 (19:27 -0400)]
Rework the shutdown sequence so two initiations don't race each other.

This fixes a race condition where two threads could perform runtime shutdown
at the same time and either crash or hang. Now each initiation checks if they
won and take the proper action in such case.

A recurring problem was with the debugger, that would hang on shutdown if the
main thread started shutdown earlier. In this case the agent thread would
call into mono_threads_set_shutting_down, which in turn would do an ExitThread
since shutdown was in progress.

The agent thread would exit without signaling that it did complete, causing
the main thread to block waiting for it to do so.

* runtime.c (mono_runtime_shutdown): Rename it to mono_runtime_try_shutdown
and move threadpool cleanup to here. Some cleanup of the rest of the sequence
still left to do.

* icall.c (Environment.Exit): If we fail to start shutdown, just exit
the thread as someone else will finish the job. We can't suspend because if
this is called by regular shutdown we would be resumed and return to user code.

An alternative would be to detach and then suspend. Not sure on the merits.

* threads.c (mono_thread_manage): If we fail to start shutdown, suspend
as this is what the winner initiator wants us to do as it must be for
forced exit.

* debugger-agent.c (vm_commands): If we fail to start shutdown, return
from the function and let the agent thread finish and clean up.

* debugger-agent.c (debugger_thread): VM_EXIT commands now can return
if shutdown was externaly initiated and in such case we should break
the main loop and let the agent thread finish.

11 years agoMove mono_runtime_set_shutting_down and mono_runtime_is_shutting_down to runtime.c
Rodrigo Kumpera [Wed, 5 Jun 2013 21:46:10 +0000 (17:46 -0400)]
Move mono_runtime_set_shutting_down and mono_runtime_is_shutting_down to runtime.c

11 years agoDon't set shutting_down here as it is now done much earlier in the shutdown sequence.
Rodrigo Kumpera [Wed, 5 Jun 2013 21:43:44 +0000 (17:43 -0400)]
Don't set shutting_down here as it is now done much earlier in the shutdown sequence.

11 years agoKill unused func mono_threads_is_shutting_down.
Rodrigo Kumpera [Wed, 5 Jun 2013 21:35:20 +0000 (17:35 -0400)]
Kill unused func mono_threads_is_shutting_down.

11 years agoDetach the current thread as soon as possible when mono_gc_pthread_exit is called.
Rodrigo Kumpera [Wed, 5 Jun 2013 19:07:24 +0000 (15:07 -0400)]
Detach the current thread as soon as possible when mono_gc_pthread_exit is called.

* sgen-gc.c (mono_gc_pthread_exit): Given the current thread is doomed, explicitly
detach before calling pthread_exit and thus reducing the chance of TLS cleanup issues.

11 years ago[monodoc] Ditto for fetching type node parents of subnodes.
Jérémie Laval [Wed, 5 Jun 2013 23:41:07 +0000 (19:41 -0400)]
[monodoc] Ditto for fetching type node parents of subnodes.

11 years ago[monodoc] Fix ecma traversal with unattached tree.
Jérémie Laval [Wed, 5 Jun 2013 23:04:04 +0000 (19:04 -0400)]
[monodoc] Fix ecma traversal with unattached tree.

Previously the code expected to stop at upper level node using the fact that their element starts with `root:/'. This element is attributed by RootNode when loading a complete tree. However tool like mdoc also loads tree unattached which doesn't create a standard `root:/` top-level root node hence causing the issue.

11 years agoBuild System.Net on mobile (type-forwarders for PCL).
Martin Baulig [Wed, 5 Jun 2013 21:08:25 +0000 (23:08 +0200)]
Build System.Net on mobile (type-forwarders for PCL).

11 years agoExclude the new System.IO.Directory unit test for iOS (no Mono.Unix)
Sebastien Pouliot [Wed, 5 Jun 2013 19:00:33 +0000 (15:00 -0400)]
Exclude the new System.IO.Directory unit test for iOS (no Mono.Unix)

11 years agoAdd monotouch_corlib.dll.sources (to simply include corlib.dll.sources) since library...
Sebastien Pouliot [Wed, 5 Jun 2013 17:44:33 +0000 (13:44 -0400)]
Add monotouch_corlib.dll.sources (to simply include corlib.dll.sources) since library.make change it's processing with its presence

11 years agoFix 2.0 build.
Rodrigo Kumpera [Wed, 5 Jun 2013 16:44:25 +0000 (12:44 -0400)]
Fix 2.0 build.

11 years ago[System.Core] Add AesCryptoServiceProvider to the MONODROID profile.
Jonathan Pryor [Tue, 4 Jun 2013 23:38:23 +0000 (19:38 -0400)]
[System.Core] Add AesCryptoServiceProvider to the MONODROID profile.

Context: System.Security.Cryptography/AesCryptoServiceProvider.cs

Add System.Security.Cryptography.AesCryptoServiceProvider to the
MONODROID profile.

This is needed so that Aes.Create() can work.

11 years agoMake sure the behavior between GetFiles and EnumerateFiles are the same regarding...
Rodrigo Kumpera [Tue, 4 Jun 2013 22:49:34 +0000 (18:49 -0400)]
Make sure the behavior between GetFiles and EnumerateFiles are the same regarding symlinks. Fixes BXC #12461

* Directory.cs: Only ignore symlinks when traversing subdirectories. This is the only case that it can result
in loops.

11 years agoFix a loader leak in mono_class_create_from_typedef.
Rodrigo Kumpera [Tue, 4 Jun 2013 21:41:03 +0000 (17:41 -0400)]
Fix a loader leak in mono_class_create_from_typedef.

11 years ago[ios] Remove the need to use reflection to call the StartWWAN method (by moving it...
Sebastien Pouliot [Tue, 4 Jun 2013 18:42:34 +0000 (14:42 -0400)]
[ios] Remove the need to use reflection to call the StartWWAN method (by moving it into libmonotouch)

11 years ago[PCL]: Set Facade Assemblies' version number to "4.0.0.0".
Martin Baulig [Tue, 4 Jun 2013 16:14:53 +0000 (18:14 +0200)]
[PCL]: Set Facade Assemblies' version number to "4.0.0.0".

11 years agoRe-enable a test for the MOBILE profile (by ensuring the required method is not remov...
Sebastien Pouliot [Tue, 4 Jun 2013 14:58:40 +0000 (10:58 -0400)]
Re-enable a test for the MOBILE profile (by ensuring the required method is not removed by the linker)

11 years agoImplement MethodMirror.MakeGenericMethod ().
Zoltan Varga [Tue, 4 Jun 2013 06:01:22 +0000 (08:01 +0200)]
Implement MethodMirror.MakeGenericMethod ().

11 years ago[corlib] Don't throw UnauthorizedAccessException from Path.GetTempFileName
Jonathan Pryor [Mon, 3 Jun 2013 20:54:11 +0000 (16:54 -0400)]
[corlib] Don't throw UnauthorizedAccessException from Path.GetTempFileName

The problem is sporadic mdoc test failures on Wrench/OS X:

Updating: Mono.DocTest.Widget/NestedClass/Double/Triple/Quadruple
mdoc: System.UnauthorizedAccessException: Access to the path '/var/folders/_g/y9v720_90l914yylrk7m903c0000gn/T/tmp20f71445.tmp' is denied.
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool,System.IO.FileOptions)
  at System.IO.Path.GetTempFileName () [0x00000] in <filename unknown>:0
  at Mono.Documentation.MdocFile.UpdateFile (System.String file, System.Action`1 creator) [0x00000] in <filename unknown>:0
  at Mono.Documentation.MDocUpdater.WriteFile (System.String filename, FileMode mode, System.Action`1 action) [0x00000] in <filename unknown>:0
  at Mono.Documentation.MDocUpdater.DoUpdateType2 (System.String message, System.Xml.XmlDocument basefile, Mono.Cecil.TypeDefinition type, System.String output, Boolean insertSince) [0x00000] in <filename unknown>:0
  at Mono.Documentation.MDocUpdater.DoUpdateType (Mono.Cecil.TypeDefinition type, System.String basepath, System.String dest) [0x00000] in <filename unknown>:0
  at Mono.Documentation.MDocUpdater.DoUpdateAssembly (Mono.Cecil.AssemblyDefinition assembly, System.Xml.XmlElement index_types, System.String source, System.String dest, System.Collections.Generic.HashSet`1 goodfiles) [0x00000] in <filename unknown>:0
  at Mono.Documentation.MDocUpdater.DoUpdateAssemblies (System.String source, System.String dest) [0x00000] in <filename unknown>:0
  at Mono.Documentation.MDocUpdater.Run (IEnumerable`1 args) [0x00000] in <filename unknown>:0
  at Mono.Documentation.MDoc.Run (System.String[] args) [0x00000] in <filename unknown>:0
  at Mono.Documentation.MDoc.Main (System.String[] args) [0x00000] in <filename unknown>:0

I'm not sure why we're getting UnauthorizedAccessException exceptions,
nor do I particularly care; Path.GetTempFileName() should not be
throwing UnauthorizedAccessException; only IOException is documented:

http://msdn.microsoft.com/en-us/library/system.io.path.gettempfilename.aspx

Update behavior to skip files that generate
UnauthorizedAccessException, and if we swallow short.MaxValue
exceptions wrap the UnauthorizedAccessException in an IOException so
that we conform to documented exceptional behavior.

11 years agoMerge pull request #653 from LogosBible/TimeSpan-TryParseExact
Marek Safar [Mon, 3 Jun 2013 16:12:47 +0000 (09:12 -0700)]
Merge pull request #653 from LogosBible/TimeSpan-TryParseExact

TimeSpan.TryParseExact should not try to parse null input.

11 years agoTimeSpan.TryParseExact should not try to parse null input.
Martin Potter [Mon, 3 Jun 2013 14:32:10 +0000 (07:32 -0700)]
TimeSpan.TryParseExact should not try to parse null input.

TimeSpan.TryParseExact would previously throw a NullReferenceException constructing the Parser when it accesses the Length property of the input string. Microsoft's implementation returns false when null is passed as the input string to parse.

11 years agoDisable partial sharing for now, it breaks some tests on mt.
Zoltan Varga [Mon, 3 Jun 2013 13:56:28 +0000 (15:56 +0200)]
Disable partial sharing for now, it breaks some tests on mt.

11 years agoa few more nunit test modernization.
Atsushi Eno [Mon, 3 Jun 2013 08:00:21 +0000 (17:00 +0900)]
a few more nunit test modernization.

11 years agoconvert some unit tests to modern style. (not really modern, just killing Assertion!)
Atsushi Eno [Mon, 3 Jun 2013 07:51:22 +0000 (16:51 +0900)]
convert some unit tests to modern style. (not really modern, just killing Assertion!)

11 years agoUse /proc/self/auxv for ARM feature detection when possible.
Alex Rønne Petersen [Sun, 2 Jun 2013 05:33:37 +0000 (07:33 +0200)]
Use /proc/self/auxv for ARM feature detection when possible.

This is generally preferable because it works in QEMU chroots and
the information is significantly easier to process.

We still need to keep the /proc/cpuinfo code around, however, as
Android does not always allow access to /proc/self/auxv...

This patch also enhances the MONO_CPU_ARCH environment variable
to support the various new features we support.

11 years agoUse MonoBoolean instead of gboolean as an icall return type.
Zoltan Varga [Mon, 3 Jun 2013 05:32:38 +0000 (07:32 +0200)]
Use MonoBoolean instead of gboolean as an icall return type.

11 years agoIgnore all cpu-*.h files in mono/mini.
Alex Rønne Petersen [Sun, 2 Jun 2013 17:05:50 +0000 (19:05 +0200)]
Ignore all cpu-*.h files in mono/mini.

11 years agoMerge pull request #651 from JoostK/patch-1
Marek Safar [Sun, 2 Jun 2013 16:53:20 +0000 (09:53 -0700)]
Merge pull request #651 from JoostK/patch-1

Shortcut open paren recognition for switch statements

11 years agoFix constrained gsharedvt calls on enums.
Zoltan Varga [Sun, 2 Jun 2013 09:49:59 +0000 (11:49 +0200)]
Fix constrained gsharedvt calls on enums.

11 years ago[sdb] Clear ss_invoke_addr when stopping single stepping so runtime invokes don't...
Zoltan Varga [Sun, 2 Jun 2013 04:36:29 +0000 (06:36 +0200)]
[sdb] Clear ss_invoke_addr when stopping single stepping so runtime invokes don't stop single stepping. Fixes #12509.

11 years agoGet rid of the NESTED_LIBGC_FLAGS configure variable, use the already existing CPPFLA...
Zoltan Varga [Sat, 1 Jun 2013 07:18:51 +0000 (09:18 +0200)]
Get rid of the NESTED_LIBGC_FLAGS configure variable, use the already existing CPPFLAGS_FOR_LIBGC instead.

11 years agoPass some defines in config.h instead of on the command line.
Zoltan Varga [Sat, 1 Jun 2013 07:14:29 +0000 (09:14 +0200)]
Pass some defines in config.h instead of on the command line.

11 years ago[sdb] Keep the exception object alive during debugger suspensions. Fixes #12494.
Zoltan Varga [Sat, 1 Jun 2013 05:04:46 +0000 (07:04 +0200)]
[sdb] Keep the exception object alive during debugger suspensions. Fixes #12494.

11 years agoShortcut open parent recognition for switch
Joost Koehoorn [Sat, 1 Jun 2013 01:48:15 +0000 (03:48 +0200)]
Shortcut open parent recognition for switch

11 years agoFix random unit test failures on the bots [#12493]
Sebastien Pouliot [Fri, 31 May 2013 19:44:29 +0000 (15:44 -0400)]
Fix random unit test failures on the bots [#12493]

11 years ago[Mono.Debugger.Soft] Updated closed/disconnected state when connection is force-closed
Jeffrey Stedfast [Fri, 31 May 2013 18:27:30 +0000 (14:27 -0400)]
[Mono.Debugger.Soft] Updated closed/disconnected state when connection is force-closed