mono.git
13 years ago2010-10-01 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Mon, 4 Oct 2010 09:57:52 +0000 (15:27 +0530)]
2010-10-01  Veerapuram Varadhan  <vvaradhan@novell.com>

** Fixes #561667
* SqlCommand.cs (Dispose): While Disposing, set connection's
datareader to null so the connection can be reused with another datareader.

13 years ago2010-09-29 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Fri, 1 Oct 2010 13:47:48 +0000 (19:17 +0530)]
2010-09-29  Veerapuram Varadhan  <vvaradhan@novell.com>

** Fixes failed test for smallmoney
* Tds70.cs (WriteParameterInfo): Round money values to 4
decimals, for smallmoney too.

13 years ago2010-09-20 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Wed, 29 Sep 2010 09:09:01 +0000 (14:39 +0530)]
2010-09-20  Veerapuram Varadhan  <vvaradhan@novell.com>

* SqlDataReaderTest.cs: Add test for bug#613087

13 years agotest fixes
vvaradhan [Wed, 29 Sep 2010 09:07:37 +0000 (14:37 +0530)]
test fixes

13 years ago2010-09-16 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Tue, 28 Sep 2010 15:06:55 +0000 (20:36 +0530)]
2010-09-16  Veerapuram Varadhan  <vvaradhan@novell.com>

* SqlCommandTest.cs: Add test for bug#569543

13 years ago2010-09-16 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Tue, 28 Sep 2010 14:58:44 +0000 (20:28 +0530)]
2010-09-16  Veerapuram Varadhan  <vvaradhan@novell.com>

* SqlCommandTest.cs: Add test for bug#584833

13 years agoRework TCP listening model, and fix AcceptTcpClient() to not drop timed out requests...
Atsushi Eno [Tue, 28 Sep 2010 14:05:26 +0000 (23:05 +0900)]
Rework TCP listening model, and fix AcceptTcpClient() to not drop timed out requests that actually steals next requests in the air.

13 years agoWebResponse.Headers is not always available (e.g. moonlight browser stack)
Sebastien Pouliot [Tue, 28 Sep 2010 12:36:21 +0000 (08:36 -0400)]
WebResponse.Headers is not always available (e.g. moonlight browser stack)

* System.ServiceModel.Channels/HttpRequestChannel.cs: For Moonlight use
the WebResponse.SupportsHeaders before accessing the Headers collection.
This is needed because (the default) browser stack does not expose the
headers from its responses. Fix bug #642193

13 years agoTurn Is*LockHeld properties into thread-specific values in ReaderWriterLockSlim....
Jérémie Laval [Tue, 28 Sep 2010 11:13:10 +0000 (12:13 +0100)]
Turn Is*LockHeld properties into thread-specific values in ReaderWriterLockSlim. Add corresponding unit tests.

13 years ago[asp.net] Get rid of a possible (although unlikely) race condition when acquiring...
Marek Habersack [Tue, 28 Sep 2010 11:29:21 +0000 (13:29 +0200)]
[asp.net] Get rid of a possible (although unlikely) race condition when acquiring locks

The patch removes a small race condition where a boolean flag is set after acquiring a lock to
indicate to code executing in the finally {} block that it should release the lock. The boolean
variable is now removed and the lock is released unconditionally. It carries a potential to
throw an exception when the lock is not held, but it's better than to fail to release it and
lead the application to a deadlock.

13 years agoAvoid a culture-specific check for the end of an URI
Sebastien Pouliot [Tue, 28 Sep 2010 01:55:59 +0000 (21:55 -0400)]
Avoid a culture-specific check for the end of an URI

* System/Uri.cs: Avoid the culture-specific String.EndsWith when
reducing an URI

13 years agoUse same socket family as the endpoint when retrieving the policy
Sebastien Pouliot [Tue, 28 Sep 2010 00:20:24 +0000 (20:20 -0400)]
Use same socket family as the endpoint when retrieving the policy

* System.Net.Policy/CrossDomainPolicyManager.cs: Use same socket family
as the endpoint when retrieving the policy. Also do not try to create a
policy out of an empty stream (avoid misleading exceptions in logs)

13 years agoFix Socket.RemoteEndPoint after ConnectAsync on Moonlight
Sebastien Pouliot [Fri, 24 Sep 2010 18:58:35 +0000 (14:58 -0400)]
Fix Socket.RemoteEndPoint after ConnectAsync on Moonlight

* System.Net.Sockets/SocketAsyncEventArgs.cs: Set the Socket
RemoteEndPoint to our RemoteEndPoint on Connect operation.
* System.Net.Sockets/Socket_2_1.cs: Return the 'candidate' EndPoint
provided by SocketAsyncEventArgs in ConnectAsync (intead of null)
until the connection is completed.

13 years ago[wcf] Make simplified configuration for behaviors work (4.0)
Marek Habersack [Mon, 27 Sep 2010 22:12:45 +0000 (00:12 +0200)]
[wcf] Make simplified configuration for behaviors work (4.0)

* NamedServiceModelExtensionCollectionElement.cs: minimum length of the Name property value is 0 for 4.0
* ServiceBehaviorElementCollection.cs: added an override of BaseAdd which makes sure that the element being
  added has its Name set to String.Empty if the element's name is null
* ServiceHostBase.cs: support for simplified behavior configuration. Refactored behavior addition code to a
  separate method. Check whether behavior is not in the collection before adding it.

13 years agoAdd runtime test for delegates with null target.
Rodrigo Kumpera [Mon, 27 Sep 2010 20:12:37 +0000 (17:12 -0300)]
Add runtime test for delegates with null target.

13 years agoAdd comment on the reason of a non obvious check.
Rodrigo Kumpera [Mon, 27 Sep 2010 20:10:19 +0000 (17:10 -0300)]
Add comment on the reason of a non obvious check.

13 years agoEnable test that has been fixed in the runtime.
Rodrigo Kumpera [Mon, 27 Sep 2010 20:08:31 +0000 (17:08 -0300)]
Enable test that has been fixed in the runtime.

13 years agoRaise ArgumentException for delegate on closed methods.
Rodrigo Kumpera [Mon, 27 Sep 2010 19:50:06 +0000 (16:50 -0300)]
Raise ArgumentException for delegate on closed methods.

* method-to-ir.c (mono_method_to_ir): Check for null
on delegate construction so closed-on-null is not allowed
when using the delegate .ctor.

If the delegate been constructed is open-on-target then
the null check must not be applied as the IL pattern is:

ldnull
ldftn void Bla::Foo(int)
newobj Bar (object, native int) // delegate void Bar(Bla,int)

13 years agoMov the jit map generation code from tramp-x86.c to mini-trampolines.c, add amd64...
Zoltan Varga [Mon, 27 Sep 2010 19:55:02 +0000 (21:55 +0200)]
Mov the jit map generation code from tramp-x86.c to mini-trampolines.c, add amd64 support.

13 years agoIgnore all non static fields.
Rodrigo Kumpera [Mon, 27 Sep 2010 15:05:17 +0000 (12:05 -0300)]
Ignore all non static fields.

* icall.c (ves_icall_get_enum_info): All instance fields
should be ignored here.

Fixes #604218

13 years agoRecord all trampolines to the jitmap.
Rodrigo Kumpera [Mon, 27 Sep 2010 05:39:23 +0000 (02:39 -0300)]
Record all trampolines to the jitmap.

13 years agoFix the net_4_0 build
Jb Evain [Mon, 27 Sep 2010 14:20:40 +0000 (16:20 +0200)]
Fix the net_4_0 build

13 years agoFix the moonlight build
Jb Evain [Mon, 27 Sep 2010 14:10:48 +0000 (16:10 +0200)]
Fix the moonlight build

13 years ago[fix] #631810: Form.DialogResult needs to call its close events *before* closing.
Carlos Alberto Cortez [Mon, 27 Sep 2010 07:31:09 +0000 (09:31 +0200)]
[fix] #631810: Form.DialogResult needs to call its close events *before* closing.

* Form.cs: When setting DialogResult call RaiseCloseEvents
instead of directly setting 'closing', since we need to have our
FormClosing event invoked *before* the form dissapears, so the
user can properly cancel the close operation if desired.
Fixes #631810.

13 years ago[fix] #639939: Manually and properly convert the bytes returned by XLookupString.
Carlos Alberto Cortez [Sun, 26 Sep 2010 08:47:53 +0000 (10:47 +0200)]
[fix] #639939: Manually and properly convert the bytes returned by XLookupString.

* X11Keyboard.cs: Manually handle the conversion of the string
returned by XLookupString, just as we were already doing for XIM
support - using StringBuilder directly was somehow returning a
corrupt buffer from time to time.
Fixes #639939.

13 years ago[wcf] System.ServiceModel.Configuration.CustomBindignCollectionElement.GetDefault...
Marek Habersack [Mon, 27 Sep 2010 11:55:17 +0000 (13:55 +0200)]
[wcf] System.ServiceModel.Configuration.CustomBindignCollectionElement.GetDefault returns an instance of CustomBinding

13 years agoSet LastOperation properly
Gonzalo Paniagua Javier [Mon, 27 Sep 2010 04:27:04 +0000 (00:27 -0400)]
Set LastOperation properly

SocketAsyncEventArgs.LastOperation is set when the operation is
invoked.
Reset the error status before each new *Async() call.

13 years agoCommit some stuff I had implemented in my SVN tree.
Jonathan Pobst [Mon, 27 Sep 2010 00:51:45 +0000 (19:51 -0500)]
Commit some stuff I had implemented in my SVN tree.

13 years agoMerge branch 'master' of github.com:mono/mono
Jonathan Pobst [Mon, 27 Sep 2010 00:44:34 +0000 (19:44 -0500)]
Merge branch 'master' of github.com:mono/mono

13 years ago[bug workaround] Fix the build of System.Web.Mvc by renaming internal StringComparer...
Marek Habersack [Sun, 26 Sep 2010 22:31:31 +0000 (00:31 +0200)]
[bug workaround] Fix the build of System.Web.Mvc by renaming internal StringComparer class to InternalStringComparer

The build fails because of what seems to be a bug in gmcs. The compiler reports that
the StringComparer.OrdinalIgnoreCase property doesn't exist and it does so because
gmcs loads the internal System.Collections.Generic.StringComparer from EqualitComparer.cs instead of the
System.StringComparer one.

13 years agoUpdate the comment explaining why the small_id_table uses conservative
Zoltan Varga [Sun, 26 Sep 2010 21:17:14 +0000 (23:17 +0200)]
Update the comment explaining why the small_id_table uses conservative
GC tracking.

13 years agoBypass BeginInvoke for asynch. operations
Gonzalo Paniagua Javier [Sun, 26 Sep 2010 05:54:22 +0000 (01:54 -0400)]
Bypass BeginInvoke for asynch. operations

The code involved in a delegate BeginInvoke is too heavy and of no use
for socket asynchronous operations. With these changes, we bypass all
that and send the work items directly to the asynchronous IO queue,
improving performance and lowering memory use.

13 years agoFix EqualityComparer for strings.
Miguel de Icaza [Sun, 26 Sep 2010 02:44:41 +0000 (22:44 -0400)]
Fix EqualityComparer for strings.

It turns out that Strings need to explicitly use a version that does
implement EqualityComparer<string> since string is an IEquatable.

Do this, and to avoid the reflection mess, cast to object, then cast
to the real type

13 years agoOptimize EqualityComparer for strings
Miguel de Icaza [Sun, 26 Sep 2010 01:08:53 +0000 (21:08 -0400)]
Optimize EqualityComparer for strings

This shortcut prevents the reflection system to kick into action
for compiler generated string switch statements.

13 years agoConnectAsync() security checks
Gonzalo Paniagua Javier [Sat, 25 Sep 2010 22:27:50 +0000 (18:27 -0400)]
ConnectAsync() security checks

-ConnectAsync() changed to make security checks for all endpoints before
trying to connect for the first time.
-Use the socket Connect() call instead of repeating the same stuff.
Connect should be splitted in 2 pieces (DNS + Connection attempts).

13 years agoAdded support for ArraySegment
Gonzalo Paniagua Javier [Sat, 25 Sep 2010 19:07:34 +0000 (15:07 -0400)]
Added support for ArraySegment

-Removed NET_2_0
-Implemented support for the Receive/Send overloads that take a list of
ArraySegments.

13 years ago[Messaging] Conditionally drop dependency on Wnforms
Marek Habersack [Sat, 25 Sep 2010 22:14:21 +0000 (00:14 +0200)]
[Messaging] Conditionally drop dependency on Wnforms

If you pass the option MESSAGING_NO_WINFORMS=1 to make, System.Messaging will be compiled
without the dependency to System.Windows.Forms. The dependency is needed just by the
System.Messaging.Design.QueuePathDialog class which is both a stub and not used anywhere
by Mono.

13 years agoEnable support for wrapping non Exception subclasses in RuntimeWrappedException objec...
Zoltan Varga [Sat, 25 Sep 2010 18:47:10 +0000 (20:47 +0200)]
Enable support for wrapping non Exception subclasses in RuntimeWrappedException objects, implement support for RuntimeCompatibilityAttribute.

13 years agoMade the moonlight profile happy.
Gonzalo Paniagua Javier [Sat, 25 Sep 2010 17:57:01 +0000 (13:57 -0400)]
Made the moonlight profile happy.

Disabled operations not allowed under moonlight.

13 years agoMove async IO code to Socket_2_1
Gonzalo Paniagua Javier [Sat, 25 Sep 2010 16:48:55 +0000 (12:48 -0400)]
Move async IO code to Socket_2_1

Moved internal classes to Socket_2_1.

13 years agoRework SocketAsyncEventArgs internals
Gonzalo Paniagua Javier [Sat, 25 Sep 2010 01:26:14 +0000 (21:26 -0400)]
Rework SocketAsyncEventArgs internals

-Removed #if NET_2_0
-All the *Async() calls but ConnectAsync() are routed through the
asynch IO threadpool instead of creating a new short-lived thread for
every operation.
-When reusing a SocketAsyncEventArgs only 1 new object, a delegate, is
created.

13 years agoImplemented more combinations of nullable boolean logical operators
Marek Safar [Sat, 25 Sep 2010 09:45:14 +0000 (10:45 +0100)]
Implemented more combinations of nullable boolean logical operators

13 years agoBetter error message for syntax error in namespace name
Marek Safar [Sat, 25 Sep 2010 09:38:44 +0000 (10:38 +0100)]
Better error message for syntax error in namespace name

13 years agoImprove the Uri parsing speed
Miguel de Icaza [Sat, 25 Sep 2010 04:04:24 +0000 (00:04 -0400)]
Improve the Uri parsing speed

This affects MonoTouch startup as our dictionaries are a little bit
slow to be created now that we use Dictionary<> hashes for switch
statements.

Some timings:

Using a simple block of if's is twice as slow as the compiler generated
switch statement.   But using this tuned code is faster than the
compiler generated code, with a million loops on x86-64:

With "http": .10 vs .51 (first check)
with "https": .16 vs .51 (second check)
with "foo": .22 vs .31 (never found)
with "mailto": .12 vs .51  (last check)

13 years agoFix UriParser.GetComponents for the PathAndQuery case
Andreia Gaita [Fri, 24 Sep 2010 17:06:18 +0000 (18:06 +0100)]
Fix UriParser.GetComponents for the PathAndQuery case

PathAndQuery should always return the path starting with /,
even when it's empty

13 years agoFix AOT support for OP_GC_CARD_TABLE on amd64.
Zoltan Varga [Fri, 24 Sep 2010 15:27:14 +0000 (17:27 +0200)]
Fix AOT support for OP_GC_CARD_TABLE on amd64.

13 years agoFix the setting of pointer type fields using reflection. Fixes #641590.
Zoltan Varga [Fri, 24 Sep 2010 14:31:01 +0000 (16:31 +0200)]
Fix the setting of pointer type fields using reflection. Fixes #641590.

13 years agoImplement amd64 support for OP_CARDTABLE.
Rodrigo Kumpera [Fri, 24 Sep 2010 14:28:46 +0000 (11:28 -0300)]
Implement amd64 support for OP_CARDTABLE.

* amd64-codegen.h (amd64_alu_reg_membase_size): Add support
for RIP based addressing.

* cpu-amd64.md: Add card_table_wbarrier.

* mini-amd64.c (mono_arch_output_basic_block): Emit the
new OP.

* mini-amd64.c (mono_arch_emit_exceptions): Handle another
kind of patch-info - GC_CARD_TABLE_ADDR. This is required
because we can neither have 64bits immediates with amd64
or 2 scratch regiters with current regalloc.

* mini-amd64.h: Define MONO_ARCH_HAVE_CARD_TABLE_WBARRIER.

13 years agoAssign identical operation name for each contract version so that they don't conflict...
Atsushi Eno [Fri, 24 Sep 2010 12:26:53 +0000 (21:26 +0900)]
Assign identical operation name for each contract version so that they don't conflict each other.

13 years agoFix duplex proxy constructor arg names.
Atsushi Eno [Fri, 24 Sep 2010 12:26:27 +0000 (21:26 +0900)]
Fix duplex proxy constructor arg names.

13 years agoJsonSerializationWriter: handle char values
Rolf Bjarne Kvinge [Fri, 24 Sep 2010 10:02:00 +0000 (12:02 +0200)]
JsonSerializationWriter: handle char values

13 years agoFilter requests only by paths, excluding host and port.
Atsushi Eno [Fri, 24 Sep 2010 07:57:38 +0000 (16:57 +0900)]
Filter requests only by paths, excluding host and port.

13 years agoOverride IsContentTypeSupported() in per-encoding-binding-element implementation...
Atsushi Eno [Fri, 24 Sep 2010 07:26:28 +0000 (16:26 +0900)]
Override IsContentTypeSupported() in per-encoding-binding-element implementation to work as expected.

13 years agoAvoid making the small_id table precisely GC tracked, some runtime code can't handle...
Zoltan Varga [Fri, 24 Sep 2010 02:27:01 +0000 (04:27 +0200)]
Avoid making the small_id table precisely GC tracked, some runtime code can't handle MonoInternalThread's being moved.

13 years agoOn 64bit this is turning into a 16 byte struct, this works around the issue.
Jackson Harper [Fri, 24 Sep 2010 02:17:43 +0000 (22:17 -0400)]
On 64bit this is turning into a 16 byte struct, this works around the issue.

13 years agoDisable make_root_descr_all_refs () for now since it seems to cause crashes.
Zoltan Varga [Fri, 24 Sep 2010 01:21:36 +0000 (03:21 +0200)]
Disable make_root_descr_all_refs () for now since it seems to cause crashes.

13 years agoUse g_malloc0 in mono_gc_make_root-descr_all_refs ().
Zoltan Varga [Thu, 23 Sep 2010 23:07:12 +0000 (01:07 +0200)]
Use g_malloc0 in mono_gc_make_root-descr_all_refs ().

13 years agoRemove a debug printf.
Zoltan Varga [Thu, 23 Sep 2010 22:38:50 +0000 (00:38 +0200)]
Remove a debug printf.

13 years agoAdd a few variants of the MONO_GC_REGISTER_ROOT () to make most roots precisely track...
Zoltan Varga [Thu, 23 Sep 2010 22:36:51 +0000 (00:36 +0200)]
Add a few variants of the MONO_GC_REGISTER_ROOT () to make most roots precisely tracked and to avoid registering locations pointing to memory allocated by mono_gc_alloc_fixed () as roots under SGEN.

13 years agoDisable the wrapped exception code for now, it break some of our tests.
Zoltan Varga [Thu, 23 Sep 2010 22:29:24 +0000 (00:29 +0200)]
Disable the wrapped exception code for now, it break some of our tests.

13 years agoHandle verification of types in non canonical forms.
Rodrigo Kumpera [Thu, 23 Sep 2010 21:32:00 +0000 (18:32 -0300)]
Handle verification of types in non canonical forms.

* verify.c (mono_type_is_valid_type_in_context): Handle
types such as VAR and MVAR encoded as CLASS or VALUETYPE.
This encoding is not the canonical one, but works and
must be properly verified.

Fixes #601970

13 years agoRemove unwanted debug spew.
Rodrigo Kumpera [Thu, 23 Sep 2010 21:09:25 +0000 (18:09 -0300)]
Remove unwanted debug spew.

13 years agoFix WebRequest.RegisterPrefix / Create to match SL in some corner cases
Sebastien Pouliot [Thu, 23 Sep 2010 20:05:47 +0000 (16:05 -0400)]
Fix WebRequest.RegisterPrefix / Create to match SL in some corner cases

* System.Net/WebRequest_2_1.cs: (Create) Find the prefix that is the
closest match to the specified Uri and use it's associated creator.
(RegisterPrefix) We cannot register 'http[s]:' even if registering
'http[s]' is possible (but does not work as expected) as are the (fully)
valid 'http[s]:/[/]' values.

13 years agoAdd test case to show a different behavior (from Windows) wrt Socket buffers
Sebastien Pouliot [Thu, 23 Sep 2010 14:57:12 +0000 (10:57 -0400)]
Add test case to show a different behavior (from Windows) wrt Socket buffers

* Test/System.Net.Sockets/SocketTest.cs: Add test case where buffers can
be set to 0 under Windows (but has a 256 bytes minimum on Linux)

13 years ago[moonlight] Fully honor WebResponse.SupportsHeaders
Sebastien Pouliot [Thu, 23 Sep 2010 14:30:03 +0000 (10:30 -0400)]
[moonlight] Fully honor WebResponse.SupportsHeaders

* System.Net.Policy/CrossDomainPolicyManager.cs: Use InternalHeaders,
instead of Headers, since we always use the browser stack to download
the security policies.

* System.Net/WebClient_2_1.cs: Throw a NotImplementedException from
ResponseHeaders if the response does not support them.
* System.Net/WebResponse_2_1.cs: Make Headers property smart to throw a
NotImplementedException if SupportsHeaders return false. Add a new
InternalHeaders property since the response headers are needed,
internally (e.g. policies), even if not exposed to the outside world.

13 years agomove DynamicData to mvc because it depends on Extensions
Andrew Jorgensen [Thu, 23 Sep 2010 20:15:01 +0000 (14:15 -0600)]
move DynamicData to mvc because it depends on Extensions

13 years agoFix the default exception message of RuntimeWrapperException.
Zoltan Varga [Thu, 23 Sep 2010 19:14:54 +0000 (21:14 +0200)]
Fix the default exception message of RuntimeWrapperException.

13 years agoWrap thrown objects which do not derive from Exception into a RuntimeWrappedException...
Zoltan Varga [Thu, 23 Sep 2010 19:13:36 +0000 (21:13 +0200)]
Wrap thrown objects which do not derive from Exception into a RuntimeWrappedException. Fixes #640687.

13 years agoepoll_ctl takes an int, not IntPtr
Gonzalo Paniagua Javier [Thu, 23 Sep 2010 19:02:05 +0000 (15:02 -0400)]
epoll_ctl takes an int, not IntPtr

Ditto.

13 years ago[641146] Implemented IStructuralComparable.CompareTo
Marek Safar [Thu, 23 Sep 2010 15:19:09 +0000 (16:19 +0100)]
[641146] Implemented IStructuralComparable.CompareTo

13 years ago[WCF] System.Data.Services.Client must be signed with the ECMA public key
Marek Habersack [Thu, 23 Sep 2010 12:34:01 +0000 (14:34 +0200)]
[WCF] System.Data.Services.Client must be signed with the ECMA public key

13 years ago[WCF] Changes to System.Data.Services.Client to compile it for 4.0
Marek Habersack [Thu, 23 Sep 2010 08:50:35 +0000 (10:50 +0200)]
[WCF] Changes to System.Data.Services.Client to compile it for 4.0

It appears Microsoft didn't make any changes to the assembly in .NET 4.0 - they simply
changed its version number to 4.0.0.0 and added few assembly attributes.

13 years agoFix exceptions wrt IPAddress.ScopeId
Sebastien Pouliot [Thu, 23 Sep 2010 01:22:18 +0000 (21:22 -0400)]
Fix exceptions wrt IPAddress.ScopeId

* System.Net/IPAddress.cs: ScopeId can only be set on IPv6 or it throws
a SocketException (not an Exception). ScopeId is also limited from 0 to
2^32.

13 years agoAdd some missing validations to Socket
Sebastien Pouliot [Wed, 22 Sep 2010 20:28:45 +0000 (16:28 -0400)]
Add some missing validations to Socket

* System.Net.Sockets/Socket_2_1.cs: Add checks for invalid AddressFamily,
SocketType and ProtocolType (to throw ArgumentException). Add negative
check for Ttl property. Add AddressFamily mismatch checks to ConnectAsync
methods

13 years agoAdd missing SocketOptionName_HopLimit definition for IPv6
Sebastien Pouliot [Wed, 22 Sep 2010 20:25:42 +0000 (16:25 -0400)]
Add missing SocketOptionName_HopLimit definition for IPv6

* socket-io.c|h: Add definition/case for SocketOptionName_HopLimit.
Note that this is already being used by managed code (to set the TTL
value on IPv6 sockets)

13 years agoFix support of non-ASCII host names in System.Uri
Sebastien Pouliot [Wed, 22 Sep 2010 13:45:17 +0000 (09:45 -0400)]
Fix support of non-ASCII host names in System.Uri

* System/Uri.cs: Fix escaping non-ascii host names. Avoid memory
allocations (UTF8.GetBytes) when it is not necessary while escaping.

* Test/System/UriTest2.cs: Add test case where host name is β (beta)

13 years agoDon't allow EventType.Breakpoint in vm.EnableEvents ().
Zoltan Varga [Thu, 23 Sep 2010 00:52:25 +0000 (02:52 +0200)]
Don't allow EventType.Breakpoint in vm.EnableEvents ().

13 years agoAvoid extracting tar.gz files in the get-cygwin-deps.sh script, we download only...
Zoltan Varga [Wed, 22 Sep 2010 22:23:53 +0000 (00:23 +0200)]
Avoid extracting tar.gz files in the get-cygwin-deps.sh script, we download only zip files now.

13 years agoConvert ERROR_PATH_NOT_FOUND to ENOENT too.
Zoltan Varga [Wed, 22 Sep 2010 22:23:25 +0000 (00:23 +0200)]
Convert ERROR_PATH_NOT_FOUND to ENOENT too.

13 years agoDon't link against missing libiconv on windows.
Hib Eris [Wed, 22 Sep 2010 22:18:08 +0000 (00:18 +0200)]
Don't link against missing libiconv on windows.

    * configure.ac: iconv check creates variable ICONV_LIBS
    * src/Makefile.am: only link eglib to iconv when iconv is found

13 years agoSet errno correctly when loading an image fails on windows. Fixes #362607.
Zoltan Varga [Wed, 22 Sep 2010 21:55:25 +0000 (23:55 +0200)]
Set errno correctly when loading an image fails on windows. Fixes #362607.

13 years agoEpollEvent size adjustment
Gonzalo Paniagua Javier [Wed, 22 Sep 2010 22:14:34 +0000 (18:14 -0400)]
EpollEvent size adjustment

EpollEvent has to be one uint32 plus one int64, i.e. 12 bytes long.
Manos libres now.

13 years agoDo not build mcs/docs if the 4.0 build is disabled.
Jonathan Pryor [Wed, 22 Sep 2010 20:15:19 +0000 (16:15 -0400)]
Do not build mcs/docs if the 4.0 build is disabled.

13 years agoRevert "mdoc 2.0-only profile build support, take 3!"
Jonathan Pryor [Wed, 22 Sep 2010 20:06:16 +0000 (16:06 -0400)]
Revert "mdoc 2.0-only profile build support, take 3!"

We'll instead just disable the docs build entirely if --with-profile4=no
is specified [future commit, not this one].

13 years agomdoc 2.0-only profile build support, take 3!
Jonathan Pryor [Wed, 22 Sep 2010 17:46:40 +0000 (13:46 -0400)]
mdoc 2.0-only profile build support, take 3!

Further discussion suggested that, even if mdoc 2.0 works, it hasn't gotten
widespread testing (as it's been a 4.0 app for months), so it would be
preferable to keep it as a 4.0 app.

However, it still needs to be built under 2.0 so that a --with-profile4=no
build can...build...without errors.

Thus, the compromise: build mdoc twice, once for each profile.  This will
ensure that *some* version of mdoc is around when mcs/docs is built.

Unfortunately we can't place mdoc into $(per_profile_dirs), as these are
built before $(net_2_0_dirs) (and thus before monodoc, which needs to be
built before mdoc).  Thus the compromise of listing mdoc in *both*
$(net_2_0_dirs) and $(net_4_0_dirs), allowing build dependencies to be met.

13 years agoLocalEndPoint works now for non-blocking connects
Gonzalo Paniagua Javier [Wed, 22 Sep 2010 16:39:07 +0000 (12:39 -0400)]
LocalEndPoint works now for non-blocking connects

We didn't keep the endpoint around for non-blocking connects and later,
when Poll() was called, we didn't have the information. Also 'isbound'
wasn't being set in a few places and UDP sockets needed to be marked as
not connected after a call to Connect() with an Any address.

Removed an old test for Connect(Any) with UDP sockets, since this is
used to disconnect them now.

Fixes bug #640749.

13 years agoThe Hashtable is back
Gonzalo Paniagua Javier [Wed, 22 Sep 2010 15:42:35 +0000 (11:42 -0400)]
The Hashtable is back

But this time it is using a hash code provider and a comparer that
don't invoke the object's methods.
Thanks to Paolo for pointing this out.

13 years agoCall the thread cleanup at the end as it was done before, call it even if handle_remo...
Zoltan Varga [Wed, 22 Sep 2010 15:01:36 +0000 (17:01 +0200)]
Call the thread cleanup at the end as it was done before, call it even if handle_remove () fails.

13 years agoAdd tidbits of documentation to ReaderWriterLockSlim.
Jérémie Laval [Wed, 22 Sep 2010 10:33:55 +0000 (11:33 +0100)]
Add tidbits of documentation to ReaderWriterLockSlim.

13 years agoAlso set readerDoneEvent when exiting an upgradeable lock and reader condition is...
Jérémie Laval [Wed, 22 Sep 2010 10:01:10 +0000 (11:01 +0100)]
Also set readerDoneEvent when exiting an upgradeable lock and reader condition is correct.

It could cause a deadlock when a writer tested the rwlock value before RwRead was removed and another Upgradeable operation happened at the same time.

13 years agoRevert "mdoc 2.0-only profile build support, take 2!"
Marek Habersack [Wed, 22 Sep 2010 09:14:26 +0000 (11:14 +0200)]
Revert "mdoc 2.0-only profile build support, take 2!"

This reverts commit 313633fc67cf1479514019a56143e5ad1643d28f because it breaks the build.

13 years agomdoc 2.0-only profile build support, take 2!
Jonathan Pryor [Wed, 22 Sep 2010 01:38:09 +0000 (21:38 -0400)]
mdoc 2.0-only profile build support, take 2!

Further discussion suggested that, even if mdoc 2.0 works, it hasn't gotten
widespread testing (as it's been a 4.0 app for months), so it would be
preferable to keep it as a 4.0 app.

However, it still needs to be built under 2.0 so that a --with-profile4=no
build can...build...without errors.

Thus, the compromise: build mdoc twice, once for each profile.  This will
ensure that *some* version of mdoc is around when mcs/docs is built.

13 years agoNET_4_0 fixes for System.Uri also apply to Moonlight (SL4)
Sebastien Pouliot [Wed, 22 Sep 2010 01:18:45 +0000 (21:18 -0400)]
NET_4_0 fixes for System.Uri also apply to Moonlight (SL4)

* System/Uri.cs: Update some NET_4_0 to include MOONLIGHT too

13 years agoDo not allow + sign when specifying the port of an URI
Sebastien Pouliot [Tue, 21 Sep 2010 19:51:00 +0000 (15:51 -0400)]
Do not allow + sign when specifying the port of an URI

* System/Uri.cs: A bit more strict when parsing the port number

* Test/System/UriTest2.cs: Add test cases with different, mostly
invalid, ports (e.g. negative, float, too big...)

13 years agoFix some host name checks, delay port check and fix some exceptions messages
Sebastien Pouliot [Tue, 21 Sep 2010 18:50:29 +0000 (14:50 -0400)]
Fix some host name checks, delay port check and fix some exceptions messages

* System/Uri.cs: Fix host name checks. Delay port check until the host
name is checked (compatibility). Fix exception messages to match the
expected values from the NCL tests.

* Test/System/UriTest2.cs: Add some test cases for host names

13 years agoDon't store objects in a Hashtable.
Gonzalo Paniagua Javier [Tue, 21 Sep 2010 21:26:28 +0000 (17:26 -0400)]
Don't store objects in a Hashtable.

Storing the objects in Hashtable causes the GetHashCode() and may be
Equals() methods to be called on the object, which MS does not do.
I'm using a list holding WeakReferences. Not sure if hard references
would be ok.

Fixes bug #640688.

13 years ago[corlib] Prevent BinaryFormatter to throw on missing fields
Andrés G. Aragoneses [Tue, 21 Sep 2010 15:20:34 +0000 (23:20 +0800)]
[corlib] Prevent BinaryFormatter to throw on missing fields

This commit includes unit tests that were run in MS.NET > 2.0.
The old behaviour of MS.NET 1.1 is still included in the patch
as an ONLY_1_1 define, to be backport-friendly to other branches
(but can be removed from now on in next commits, as mono master
doesn't include this profile anymore). Fixes BNC#324144.

13 years agoEnable cardtable for parallel mark-sweep.
Rodrigo Kumpera [Tue, 21 Sep 2010 13:58:35 +0000 (10:58 -0300)]
Enable cardtable for parallel mark-sweep.

* sgen-marksweep.c (mono_sgen_marksweep_init): Enable
cardtable for the parallel collector.

This closes by 50% the gap in binary-tree against the
serial collector.

13 years agoAdd support for break on unverifiable for verifier failure.
Rodrigo Kumpera [Tue, 21 Sep 2010 13:57:30 +0000 (10:57 -0300)]
Add support for break on unverifiable for verifier failure.

* mini.c (mini_method_compile): Break on verification
failure.

13 years agoNew tests.
Marek Safar [Tue, 21 Sep 2010 09:49:31 +0000 (10:49 +0100)]
New tests.