Compare commits

...
4271 Commits
Author SHA1 Message Date
Rodrigo Kumpera 4d9ada68b5 Make sure we don't corrupt the heap when serializing a unix domain socketaddr.
* socket-io.c (create_object_from_sockaddr): The resulting array size must
	be two bytes larger than the sockaddr one since we always serialize the family
	kind at the beginning.

	This fixes a crash on MD-linux-amd64-mono-sgen-3.0 running unit tests.
2012-11-28 18:23:13 -05:00
Rolf Bjarne Kvinge 2209daad1c Make WaitHandle.Wait* behave the same wrt WAIT_IO_COMPLETION. Fixes #8566.
Make the all check for exceptions if interrupted, and wait again
with a re-calculated timeout if no exceptions were to be thrown.

This fixes a deadlock in WaitAny, because WaitAny wasn't checking
for exceptions, just re-calculating the timeout. It also makes
the methods behave the same wrt other APC reasons.
2012-11-28 01:23:20 +01:00
Rodrigo Kumpera 21fad6dbbd Add test-wrench target to bring runtime tests back to life. 2012-11-27 14:10:24 -05:00
Zoltan Varga 91d176cf85 Disable test_0_stack_unwind () test which fails on x86+llvm (#5432). 2012-11-26 23:17:59 +01:00
Rodrigo Kumpera 5f6941c396 Remove SRE.UnmanagedMarshal dependency from System.Reflection.
* FieldInfo.cs:
	* MonoMethod.cs:
	* ParameterInfo.cs: Remove silly dep on UnmanagedMarshal to use
	MarshalAsAttribute which is what we need in the end.

	* icall.c:
	* reflection.c: Use the custom attribute type instead of the SRE
	one. This allows FULL_AOT_RUNTIME to work with stuff that uses
	MarshalAs.
2012-11-26 16:12:42 -05:00
Rodrigo Kumpera b00aa90454 Remove FieldInfo::UMarshal, which is dead code. 2012-11-26 16:12:42 -05:00
Rodrigo Kumpera da410e5b6e Expose MarshalAsAttribute to the runtime. 2012-11-26 16:12:41 -05:00
Jeremie Laval eefe6041ba [corlib] Pass the right scheduler for worker number calculation. Fix #8559. 2012-11-26 12:13:44 +00:00
Sebastien Pouliot e821bb63f3 Do not send IP address as server_name entries and skip non-fatal (warning) alerts when negotiating. Fix bug #8553 2012-11-22 16:37:34 -05:00
Zoltan Varga e71f58ce14 Fix a buffer overflow in the LLVM backend. Fixes #8502. 2012-11-22 15:07:46 +01:00
Martin Baulig f852f8bc94 [System.Configuration]: Imlement ConfigurationElement.EvaluationContext. 2012-11-21 02:25:53 +01:00
Martin Baulig 2560a7c903 [System.Configuration]: Fix filenames in ExeConfigurationFileMap. 2012-11-21 02:25:29 +01:00
Martin Baulig 2f45a48a30 Fix NTLM related test failures.
* Provide a more descriptive [Obsolete] message for the legacy API.

* Refuse to send the LM response unless explicitly enabled with
  Type3Message.DefaultAuthLevel.  The LM response is only actually
  checked by old, pre-historic servers and sending it exposes the
  user's password to very weak encryption.

* Fix some problems when encoding / decoding problems in Type2Message.

* Type3Message now encodes host and domain name in a case-sensitive
  way, fixes the tests.
2012-11-21 02:24:06 +01:00
Lluis Sanchez 99c7c9db36 Add tests for bug #8468
Conflicts:

	mcs/class/System.XML/Test/System.Xml.Serialization/DeserializeTests.cs
2012-11-20 14:46:12 +01:00
Lluis Sanchez e31afd05fe Fix XML serialization bug
When reflecting a class which inherits serializable members from a
base class, the members of the base class must be serialized using the
namespace set in the subclass unless a namespace has been explicitly
set in the base class. Before the fix, the members were always
serialized using the namespace of the base class, even when not set
(in which case it was using the default empty namespace).

Fixes bug 8468 - XML serialization problem.
2012-11-20 14:43:50 +01:00
Dean Ellis ddaa82c2b7 [Mono] TimeZoneInfo.FindSystemTimeZoneById returns null
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=7966

If we cannot find the requiested time zone we should throw a
TimeZoneNotFoundException rather than returning null.
2012-11-19 21:41:01 +00:00
Zoltan Varga 408a3390e0 Check for nullref exceptions in ves_icall_System_Buffer_BlockCopyInternal () since it is called directly without going through the managed wrapper. Optimize the MONO_CHECK_ARG() macros a bit. 2012-11-18 03:11:58 +01:00
Jeremie Laval d2a82c2743 [corlib] Fix unobserved exception being mistakenly propagated to finalizer thread when using ContinueWhenAll.
The problem was that we internally use Task.WhenAll inside TaskFactory.ContinueWhenAll to merge the given tasks into one that we can Continue on to run the passed arguments.

However, the behavior of WhenAll is to collect the exceptions that happened on its parent tasks and to set the aggregate on itself which was not catched by our continuation internally, leading to the exception remaining unobserved and escalating to the finalizer thread.
2012-11-15 15:02:17 +00:00
Sebastien Pouliot a214478534 Add test case from bug #8366 (it was fixed in master, not in 2-10) 2012-11-14 11:26:08 -05:00
Gonzalo Paniagua Javier cdd5f81df6 Hook ProopertyNotified event on data sources
Patch by Rasmus Toftahl Olesen that fixes bug #585577.
2012-11-14 09:27:32 -05:00
Martin Baulig d9732ffa79 Support [OnSerializing] in System.Runtime.Serialization.Json.
This fixes a problem that has been reported on stackoverflow:
http://stackoverflow.com/questions/13362906/onserializing-method-not-called-in-mono-3-0-1
2012-11-13 23:22:21 +01:00
Paolo Molaro 309f5d989c Confirmed fix from Marek for #xambug 8320.
The memberref table is not a valid option for computing the
MemberRefParent tag size.
2012-11-13 17:22:05 +01:00
Sebastien Pouliot 9550a304a6 Only send server_name extension for TLS (not SSLv3). Fix for #8312 2012-11-13 09:31:43 -05:00
Martin Baulig 8a2a992c48 Implement NTLMv2 Session and NTLMv2 Authentication.
By default, we use NTLMv2 Session if the server supports it
and fall back to LM and NTLM.

The default behavior can be configured with the static
Mono.Security.Protocol.Ntlm.Type3Message.DefaultAuthLevel
property.

To use NTLMv2, you must explicitly set this to
NtlmAuthLevel.NTLMv2_only.

This is similar to the LAN Manager Authentication Level on
Windows (http://msdn.microsoft.com/en-us/library/ms814176.aspx).
2012-11-09 17:15:47 +01:00
Rodrigo Kumpera a0f2930ea5 When inflating a (M)VAR make sure we're not using a broken type.
*class.c (inflate_generic_type): When inflating (M)VAR we must
	check if the replaced type is not void or typedbyref as both can
	later lead to all sorts of nasty crashes or memory corruption.
2012-11-01 18:05:48 -04:00
Alan McGovern 117caa26b6 [corlib] Remove the DebuggerDisplay attribute from KeyValuePair and DictionaryEntry
This attribute gives us a horrible debugging experience when the
'Value' of the KeyValuePair is null. By using this attribute, the
user is told that the KeyValuePair itself is null when they inspect
something like 'new KeyValuePair<string, string> (null, null)'.
This is very confusing.

We should just let the ToString method be invoked, which returns a
nicely formatted string. This is also the behaviour observed when
debugging using Visual Studio.
2012-11-01 17:14:23 +01:00
Zoltan Varga 139d505ed5 Avoid throwing exceptions from WeakReference.IsAlive after finalization when the underlying GCHandle is already finalized. Fixes #8072. 2012-11-01 16:16:00 +01:00
Zoltan Varga 7dda372ef0 Properly inflate arrays of generic parameters in resolve_object (). Fixes #7964. 2012-11-01 15:51:58 +01:00
Martin Baulig 4025e280a3 [#7637][Web]: This is supposed to fail prior to .NET 4.0.
Fixes my previous commit 1ccb01e.
2012-10-29 15:51:38 +01:00
Martin Baulig 63506fa47c [#7637][Web]: Support empty write streams. 2012-10-27 01:17:34 +02:00
Martin Baulig a32f625ee5 [6329][Web]: Fixed abort race condition in WebConnection.ReadDone().
ReadDone() now passes the 'WebConnectionData' instance to GetResponse()
and 'readState' has been moved into 'WebConnectionData'.

Abort() can now reset 'Data' while ReadDone() still uses the old
instance, but learns about the abort request from 'data.ReadState'.
2012-10-27 00:59:31 +02:00
Martin Baulig 1d9b4ba977 Emit WebAsyncResult's callback on same thread on sync completion.
This fixes System.Net.Http.HttpClientTest.Send_Content_Put ().
2012-10-27 00:59:10 +02:00
Zoltan Varga c8376af1a0 Clear sb->cached_str in mono_string_utf8_to_builder () so if the same stringbuilder is passed to two pinvoke calls, the modifications made by the second are visible in the result of sb.ToString (). Fixes #7980. 2012-10-26 04:14:53 +02:00
Atsushi Eno ca949036f8 fix bug #7957: empty dictionary should not be read siblings as content. 2012-10-24 12:00:56 +09:00
Martin Baulig 96cd4cf98b [#7258][Web]: Fix proxy authentication for non-ssl sessions
Thanks a lot to Christian Gan for this patch :-)
2012-10-24 01:25:48 +02:00
Martin Baulig ebdd362914 Fix CookieParserTest.TestExpires().
DateTime.MinValue.ToUniversalTime() != DateTime.MinValue
if you're living east of Greenwich.
2012-10-23 07:31:20 +02:00
Martin Baulig 3f06859a91 Test; fixed the mono-mac-2.10 buildbot. 2012-10-23 06:00:42 +02:00
Martin Baulig 0d1297095c Test; trigger buildbot run. 2012-10-23 03:56:51 +02:00
Martin Baulig 771b5f6e3e Test; testing buildbot. 2012-10-23 00:52:20 +02:00
Jeffrey Stedfast 67c3717890 [xbuild] PCL targets needs to load MonoAndroid targets file from MSBuildExtensionsPath
Fixes bug #7905
2012-10-22 12:32:14 -04:00
Martin Baulig 5e29582df8 [#7258][Web]: Check 'Connection: close' header.
When receiving a 407 in CreateTunnel(), check whether the server
asks to close the connection.

Thanks again to Christian Gan for this patch.
2012-10-21 21:31:32 +02:00
Martin Baulig d470f01a0b [#7599][Web]: Use original uri to compute service point hash.
Use the original request Uri, not the proxy address, to compute
the service point hash.
2012-10-21 21:31:22 +02:00
Zoltan Varga 3aa1d61880 Make comparison of array types in mono_metadata_class_equal () go through do_mono_metadata_type_equal (), so arrays of generic parameters are handled correctly. Fixes #7848. 2012-10-19 17:15:34 +02:00
Martin Baulig c3743734be [#7258][Web]: Support multiple proxy auth methods.
* AuthenticationManager.EnsureModules(): Swap the order of the
  modules, putting the strongest ones first.

* WebConnection.CreateTunnel(): Pass the proxy's address to
  AuthenticationManager to support CredentialsCache.  Only attempt
  one single authentication method.

I've done some extensive testing with different squid configurations
(digest only, ntlm only, digest and ntlm, ntlm and digest) and the
.NET runtime only attempts one single authentication method.

If you provide credentials like this:

	var proxy = new WebProxy (proxyUrl, false);
	proxy.Credentials = new NetworkCredential ("user", "pass", "domain");

then these must match the server's first authentication method.

You can also use a CredentialsCache like this:

	var ntlm_cred = new NetworkCredential ("u1", "p1", "d1");
	var digest_cred = new NetworkCredential ("u2", "u3", "d2");

	var cc = new CredentialCache ();
	cc.Add (proxy_uri, "NTLM", ntlm_cred);
	cc.Add (proxy_uri, "Digest", digest_cred);

	var proxy = new WebProxy (proxy_uri, false);
	proxy.Credentials = cc;
2012-10-19 04:21:21 +02:00
Christian Gan 62e090c406 [#7258][Web]: Implement NTLM proxy authentication.
This is mostly Christian Gan's patch for the bug report, I only
did a few minor tweaks to it.  Thanks a lot for helping me out
with this.  Martin.
2012-10-19 04:20:57 +02:00
Martin Baulig 9101c02a74 [#7258][Web]: Fix proxy authentication for secure connections.
In WebConnection.CreateTunnel():

* Support multi "Proxy-Authentication" headers from the server.

* Pass a fake HttpWebRequest with method "CONNECT" to
  AuthenticationManager.Authenticate(); the HTTP method is part
  of the digest response.

* Add "Proxy-Connection: Keep-Alive".
2012-10-18 05:53:09 +02:00
Bojan Rajkovic 045289564b Revert "Bug 2663: Regular Expression Bug Fixes"
This reverts commit dc6efdab29. This
patch completely regressed performance for regexes in the same class
as the regexes it fixed. Xamarin bug #6198 details the regressions,
and I've confirmed that reverting this commit fixes the 2 order of
magnitude performance drop (with the patch, the test takes almost 7
seconds, without it, it takes .07 seconds). The bug still needs to be
fixed, but this is not the right fix.
2012-10-17 13:21:18 -04:00
Sebastien Pouliot 892654f252 Add support for 'server_name' extension in the TLS client hello message. Fix for #7664 2012-10-17 11:27:14 -04:00
Martin Baulig 96f958e38c mono_lookup_pinvoke_call: Correctly handle full path names.
* Fix the prefix matching code: if the dllmap path is "/path/foo",
  we want to look for "/path/libfoo", not "lib/path/foo".

* Check for @executable_path, @loader_path and @rpath on OS X.
  (see http://stackoverflow.com/questions/12834141/setting-path-of-the-native-library-for-dllimport-on-mono-for-mac/).
2012-10-13 02:10:55 +02:00
Martin Baulig 787fc121d6 [WCF,Serialization] Improve and fully implement support for collection types.
* System.Runtime.Serialization/XsdDataContractImporter:
      Check ImportOptions.ReferencedCollectionTypes to determine the proxy type.

* System.ServiceModel.Description/MetadataImporter.cs:
      Very simply implementation of the 'State' property.

* System.ServiceModel.Description/DataContractSerializerMessageContractImporter.cs:
      Use it here.

* Test/Resources/WSDL: Added some sample .wsdl files for the new tests; adding
      these as resources to the test dll.

* Test/System.Runtime.Serialization: Added WsdlHelper.cs,
      XsdDataContractImporterTest2.cs and XsdDataContractExportTest2.cs
2012-10-11 14:13:49 +02:00
Martin Baulig cbec3d742a [WCF]: Fix WSDL import of methods with complex return types.
There is no bug report, the problem has been reported here:
http://stackoverflow.com/questions/12551090/monotouch-wcf-service-reference-cs-errors/12669880

DataContractSerializerMessageContractImporter.IsOperationImported()
did not check the method's return value, so it failed to recognize
methods such as

	[OperationContract]
	DateTime GetDate ();

as already being imported.  This caused the method to be imported with
both the DataContractMessageContractImporterInternal and the
XmlSerializerMessageContractImporterInternal, but the latter does not
resolve type references, see the FIXME in that class.

I also added a new test case for this.
2012-10-11 14:13:25 +02:00
Sebastien Pouliot 838b66aafa [OSX][iOS] Ensure 'sectrust' is released even if we deny the request 2012-10-09 19:46:37 -04:00
Sebastien Pouliot 23692ff63d Provide a non-null X509Chain in the callback for MonoTouch (useful for custom validations) but we are not fully building it (since we do not use the output) and this can be done if customization is required 2012-10-09 19:46:21 -04:00
Rodrigo Kumpera 4a5a65cbe9 Make sure that the unsafe array store intrinsics emit a write barrier.
* method-to-ir.c: Array.UnsafeStore and Array.SetGenericValueImpl must
	emit a write barrier for reference types.
2012-10-03 12:28:38 -04:00
Rodrigo Kumpera acc97565c9 Disable the type check on reference type array stores.
* method-to-ir.c (emit_array_store): We can avoid the type check
	on stores to reference arrays as it turns out List<T> is not
	covariant to its element type as I previously thought so.
2012-10-02 16:14:44 -04:00
Rodrigo Kumpera 167af9a1b9 List<T> accessors now use Array.Unsafe(Load|Store). 2012-10-01 15:16:54 -04:00
Rodrigo Kumpera 5ee66e1983 Implement Array.UnsafeLoad and Array.UnsafeStore. Both functions ignores bounds check when possible.
* Array.cs: Add UnsafeLoad and UnsafeStore functions that don't perform bounds check.
	The JIT will generate, when possible, direct a load/store. Right now the only case we can't
	handle are stores to reference arrays.

	Reference arrays are covariant on their element type which means that we must perform a runtime
	type check on stores to preserve type safety. Since the type check is usually must more expensive
	than the bounds check we simply ignore this for now.

	The reasoning behind this decision was that given our initial target are corlib's collections and
	they are too covariant to their element types they do need too a runtime type check on stores to ensure
	correctness.
2012-10-01 15:15:24 -04:00
Rodrigo Kumpera c8200121e5 Extract the array store code to separare function. 2012-10-01 15:03:37 -04:00
Zoltan Varga 117a60e03d Fix some sign extension issues in the 2 dimensional array access implementation on 64 bit platforms. Fixes #7438. 2012-09-29 02:22:07 +02:00
Martin Baulig 8182c8c908 [#7424]: Fix regression in same-origin-check for Cookies.
Disable same-origin checks when the cookie does not have a domain
and we default to the Uri's hostname.
2012-09-27 04:08:47 +02:00
Sebastien Pouliot 98e4842eb1 Fix CFB mode for Rijndael when data is not a multiple of block size 2012-09-26 20:37:56 -04:00
Martin Baulig 0fa7cd1607 [#7200]: WebRequest returns result in another thread.
This is a partial revertion of master commit #9069d07, which was
backported into mono-2-10 in commit #bfa23f8.

I only reverted the change in line 716, keeping the rest of the
commit in place.
2012-09-27 02:21:33 +02:00
Martin Baulig d775e2b2c4 Fix my 512fc194, which broke the build. 2012-09-27 00:16:11 +02:00
Martin Baulig 512fc1943e Fix #5899: WebClient.*Async() now correctly builds the query string.
I also added 'async_thread.IsBackground = true'.

These methods could also use some more love; I filed a new bug #6904
about that.

Conflicts:

	mcs/class/System/System.Net/WebClient.cs
2012-09-26 16:08:59 -04:00
Martin Baulig e0d162c5f3 [#7299][Serialization]: Fixed and improved collection serialization.
* Implement "Interchangeable Collections" and Collection Interface Types.
  (see http://msdn.microsoft.com/en-us/library/aa347850.aspx)

* Add element type check for arrays.

* Identify custom collection types (must have a public parameterless
  constructor and an "Add" method with the correct argument type) and
  distinguish them from types which implement one or more of the
  collection interfaces without being a custom collection type.

* Add some checks for [CollectionDataContract].

* Added some NUnit tests for that.
2012-09-26 15:39:43 -04:00
Martin Baulig d9ba2c3f81 Fix #275: "net.tcp://localhost:<port>/<path>" should listen on IPAddress.Any. 2012-09-26 15:27:56 -04:00
Martin Baulig ee5cb70e09 Fix #5655: Always send HTTP headers for WebDAV methods. 2012-09-26 15:27:46 -04:00
Zoltan Varga 6cd6738b10 Fix the computation of TLS reference bitmaps (#6755) properly by using a 'numbits' variable instead of the confusing 'max_bits' variable. 2012-09-26 17:21:16 +02:00
Duncan Mak 1c1e95ef26 Fix typo 2012-09-24 13:21:00 -04:00
Jonathan Pryor 5e16340a14 [mdoc, .xsd] Allow the <returns/> element to contain <c/> elements.
It's frequently useful (and accidentally used) to have <c/> within
<returns/> blocks:

	<returns>
		<c>-1</c> at end of stream; otherwise the number of bytes read.
	</returns>

Allow this to validate.
2012-09-24 12:47:33 -04:00
Martin Baulig e79dc9ab02 Only set Cookie.Port if Cookie.Version == 1.
Background:

* Cookie.Port's property setter sets Version to 1, thus forcing strict
  RFC 2109 compliance.  This is also what the .NET runtime does when
  assigning this property.

* When parsing the result of a web request, .NET 4.5 only sets Cookie.Port
  when the Set-Cookie: header contains "Version=1".

* Google Chrome does not check cookie ports at all.
2012-09-22 02:27:38 +02:00
Martin Baulig 04914757fc [#6041][WebServices]: Don't crash if an operation doesn't have <wsdl:output>. 2012-09-22 02:25:22 +02:00
Martin Baulig 47f41c2dcb [#4511][WCF]: Fix DuplexClientBase channel initialization.
For duplex channels, the ClientRealProxy needs to support both
IClientChannel and IDuplexContextChannel.
2012-09-22 02:25:15 +02:00
Rolf Bjarne Kvinge 9e961425a3 Marshal sockaddrdl manually, since it contains a variable-length byte array. Fixes #7329. 2012-09-21 02:06:56 +02:00
Martin Baulig eb689f02ef [WCF] Fix relative endpoint addresses that start with a '/'.
For instance:

	ServiceHost host = new ServiceHost (typeof (Foo), new Uri ("http://localhost/echo"));
	var b = host.AddServiceEndpoint (typeof (Foo), new BasicHttpBinding (), "/b");

should resolve into 'http://localhost/echo/b'.
2012-09-19 07:17:53 +02:00
Martin Baulig 7fb4041c2f [#1340][WCF]: Fix null reference when using invalid HTTP methods. 2012-09-19 07:17:45 +02:00
Martin Baulig c16c0b31d2 [#7177][WCF]: Correctly handle derived FaultExceptions. 2012-09-19 07:17:14 +02:00
Martin Baulig 68117e0098 [#5935][BinaryFormatter]: Fix serialization of generic arrays. 2012-09-19 07:17:05 +02:00
Martin Baulig 9983d67f87 [#6187][WCF]: Fix contract interface inheritance. 2012-09-18 05:21:50 +02:00
Martin Baulig 9d52a8ce00 [#6489][SoapFormatter]: Reset culture before raising events. 2012-09-18 02:59:39 +02:00
Martin Baulig 8a921615b2 [#6515][WCF]: Enable custom headers for NET_2_1.
This allows

	HttpRequestMessageProperty request = new HttpRequestMessageProperty ();
	request.Headers.Add ("Foo", "Bar");

	OperationContext.Current.OutgoingMessageProperties.Add (HttpRequestMessageProperty.Name, request);

The code was already there, but disabled for the NET_2_1 profile.
2012-09-17 17:34:02 +02:00
Rolf Bjarne Kvinge 3651d5c250 TimeZoneInfo.Local must be cached, otherwise reference comparisons fail later on.
This fixes an issue reported here: http://lists.ximian.com/pipermail/monotouch/2012-September/011784.html
2012-09-17 12:06:06 +02:00
Martin Baulig 9c5a1b6ffa [#6201][WCF]: Don't crash if we don't have a client certificate. 2012-09-15 21:16:16 +02:00
Duncan Mak b6441229fa Revert "Use the full path to MonoPosixHelper in mono's config file."
This reverts commit 406140257b.
2012-09-14 16:40:04 -04:00
Sebastien Pouliot 9b545aaabf [OSX] Reset errors to 0 if the OS tells us that (1) the chain is ok, (2) the certificate usage is for SSL server and (3) the server identity is confirmed (2+3 were part of an earlier fix). Without this reset we depended on the mono certificate store as an extra condition (which would requires mozroots to be executed and we want to avoid this 'duplicated' requirement and trust OSX). This does not affect iOS where no mono stores exists. 2012-09-13 20:49:15 -04:00
Jonathan Pryor 329c0ffe11 [M4A] Clear RemoteCertificateChainErrors if Android validates the chain.
The problem: Mono for Android 4.2.5 horribly broke SSL support:

	http://lists.ximian.com/pipermail/monodroid/2012-September/012213.html

Why? Because of ad89f72f (kinda): As Mono for Android doesn't provide
or use its own set of SSL root certificates (opting instead to just
let Android worry about it), the `chain.Build()` method will ALWAYS
result in SslPolicyErrors.RemoteCertificateChainErrors being returned
from GetErrorsFromChain().

The world before ad89f72f "masked" this because errors & status11 were
always cleared if Android accepted the chain; however, clearing these
out masked other bugs, such as #5706 (in which https://74.125.224.134
is accepted as valid when it can't be valid, by definition).

The fix is to clear out SslPolicyErrors.RemoteCertificateChainErrors
if Android accepts the certificate chain. Any other errors are left
unchanged, thus keeping #5706 fixed.
2012-09-13 14:56:29 -04:00
Rolf Bjarne Kvinge f58f8b8a14 Add support for armv7s. 2012-09-13 13:17:21 +02:00
Martin Baulig c2b8bc30cb Fixed and improved Mono's Cookie implementation.
* Updated the tests to reflect .NET 4.5's new improved behavior.
* Fixed subdomain matching rules.
* Added some very simple sanity checks, such as same origin and
  public suffixes.

This is far from perfect, but the tests now pass with .NET 4.5
and this also fixes a Monotouch bug from one of our customers.

TODO:

* Using 'Cookie.Version = 1' (RFC 2109 compliance) apparently got
  broken in .NET 4.5; I disabled the corresponding tests / made
  them use the default 'Version = 0' where possible.

* Same origin has not been tested for security (it previously
  didn't exist at all) and we should probably use the list at
  publicsuffix.org; but .NET 4.5 also allows you to set a cookie
  .co.uk (haven't tested their web stack, thoug - it's possible
  that they have additional checks there).
2012-09-13 02:20:06 +02:00
Duncan Mak 313118e1d7 Include gdiplus in mono/config. 2012-09-12 16:20:27 -04:00
Duncan Mak 406140257b Use the full path to MonoPosixHelper in mono's config file. 2012-09-12 16:20:26 -04:00
Jérémie Laval d9a1d9e930 [System.Core] Check for canceled operation when invoking inner call 2012-09-12 15:49:43 +02:00
Mark Probst 13371cd7a2 [sgen] Provide a function to wait for bridge processing to finish. 2012-09-11 21:31:15 +02:00
Atsushi Eno e53fc0c952 in MONODROID profile, TimeZoneInfo should not return null entry. 2012-09-11 21:54:57 +09:00
Rolf Bjarne Kvinge 246a0a2fa4 Add an unhandled exception hook embedders can use to report unhandled exceptions as they wish. 2012-09-10 23:27:51 +02:00
Sebastien Pouliot 18a260bc95 Add two-keys triple-des test case (works with Mono but not with CommonCrypto, see #6968) 2012-09-07 09:17:36 -04:00
Atsushi Eno 099d197b21 add Android-specific ping path. 2012-09-07 17:35:11 +09:00
Jérémie Laval 356de4b625 [System.Core] Fix compare bug in PLinq's Contains implementation 2012-09-06 13:24:05 +01:00
Jérémie Laval 75d8f4b63c [System.Core] Remove Max/Min generic indirection 2012-09-06 10:26:46 +01:00
Jérémie Laval 28b9e04fd9 [System.Core] Remove generic indirection for Count/LongCount 2012-09-05 16:40:41 +01:00
Jérémie Laval 3d71903120 [System.Core] Fix issue in Join where some data might have been dismissed by accident
Conflicts:
	mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs
2012-09-05 15:39:44 +01:00
Jérémie Laval f656531304 [System.Core] Fix ICE for older library lacking contravariance
Conflicts:
	mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
2012-09-05 14:40:51 +01:00
Jérémie Laval 3176523609 [System.Core] Remove a source of generic indirection for GroupBy 2012-09-05 14:39:31 +01:00
Jérémie Laval f8f1d60790 [System.Core] Fix possible state corruption in ReaderWriterLockSlim. Fix #6635.
The problem was triggered in a situation where threads were competing for the write-lock and were using timeout:
   - thread t1 takes the lock (state = RwWrite)
   - thread t2 tries to take the lock but fails because of t1, it registers it interest (state = RwWrite | RwWait) and goes to sleep
   - thread t3 tries to take the lock but failes because of t1 and don't register any interest because t2 did it already (state = RwWrite | RwWait)
   - t1 releases the lock, waking up t2 and t3 which race for it with t3 winning the race (state = RwWrite)
   - t2 tries to go back to sleep but has overrun its timeout so it exits.
   - with t2 exiting, it tries to remove previously registered interest (state = RwWrite - RwWait -> corruption).
2012-09-04 18:54:04 +01:00
Jérémie Laval 89e884094a [System.Core] Returns false in SequenceEqual when the two sequences size are different 2012-09-04 16:36:47 +01:00
Jérémie Laval 63c200e3d3 [System.Core] Remove generic indirection 2012-09-04 16:06:13 +01:00
Jérémie Laval 85f30d851a [System] Fix timeout in BlockingCollection. Fix #6732. 2012-09-04 14:45:05 +01:00
Jérémie Laval db95d188fb [System.Core] Remove generic indirection in ParallelExecuter.Process 2012-09-04 13:56:20 +01:00
Jérémie Laval f510c462ea [System.Core] Remove generic indirection for ToDictionary 2012-09-04 12:15:08 +01:00
Jérémie Laval 5f536b5b42 [System.Core] Remove generic indirection for ToArray 2012-09-04 12:15:05 +01:00
Jérémie Laval 942199fc89 [System.Core] Remove generic indirection for ToList 2012-09-04 12:15:00 +01:00
Jérémie Laval f21ee49072 [System.Core] Remove a source of generic indirection 2012-09-03 19:34:32 +01:00
Zoltan Varga 9757685b36 Fix an off-by-one in the computation of the TLS reference bitmaps. Fixes #6755. 2012-08-30 22:00:05 +02:00
Alan McGovern e30f1ec9c0 [Microsoft.Build.Tasks] Don't throw if duplicate dependencies are found
We should use the dictionary setter instead of the Add method so that
we do not get an exception if the same Nth order dependency is found
multiple times
2012-08-30 01:24:02 +01:00
Alan McGovern c6be26d5ea [Microsoft.Build.Tasks] Fix several bugs in ResolveAssemblyReference
XBuild was adding both the primary references and nth-order references
to the ResolvedFiles output variable. This meant that dependent assemblies
were being added to the commandline passed to the compiler which caused
all sorts of issues.

Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=6708 and adds
tests to cover the changes to ensure they are correct.
2012-08-29 14:48:54 +01:00
Andreia Gaita e0871deeba [MSBuild] Fix wildcard parsing such as Include="dir\**"
The directory scanner was failing if the wildcard was the last item
on the path. Fix it, and also fix the excluded items detection to
make sure it checks the full path as well (paths may or may not be
rooted). Add a test for this.
2012-08-29 14:48:48 +01:00
Alan McGovern a51d8788e3 [Microsoft.Build.Tasks] Fix some simple caching to improve build times
Large projects now have significantly less overhead when calculating
assembly references and referencing gac assemblies.
2012-08-29 14:48:42 +01:00
Alan McGovern 14ae191489 [Xbuild] Use OrdinalIgnoreCase not InvariantCultureIgnoreCase
It's chewing up a fair bit of CPU time and buys us nothing. We only care
about ordinal ignore case for these scenarios.
2012-08-29 14:48:37 +01:00
Alex Earl 8edc967a26 Fix unit test for OverwriteReadonlyFiles 2012-08-29 14:48:32 +01:00
Slide d8d87e6613 [xbuild] Add 'OverrideReadOnlyFiles' property to Copy task.
Also, fixed Bugzilla 2239 where the copy task does not
behave the same as msbuild when a file being copied is
ReadOnly. msbuild resets the attributes of the file to
Normal in this case.
2012-08-29 14:48:26 +01:00
Zoltan Varga 0a3afd84a5 Avoid returning a 0 exit code from xbuild if one of the projects in an .sln file fails to build 2012-08-29 14:48:20 +01:00
Ankit Jain b57b90e3b9 [xbuild] Pick the correct base path for target frameworks.
Don't depend on Environment.GacPath to figure out the framework
base path ("..../xbuild-frameworks"). This broke on fedora, where
it mapped to $prefix/lib/mono instead of $prefix/lib64/mono .
Which caused framework assemblies to be picked from "lib" instead
of "lib64".
2012-08-29 14:48:14 +01:00
Rolf Bjarne Kvinge bede03d5fd Microsoft.Build.Tasks: vbnc2 must be used for the 2.0 profile 2012-08-29 14:48:09 +01:00
Zoltan Varga ba69969a33 Emit line number table in the sdb debug log. 2012-08-28 19:59:16 +02:00
Zoltan Varga 8153b50ff3 Add a MONO_SDB_ENV_OPTIONS env variable to allow passing extra options like loglevel to sdb. 2012-08-28 19:53:01 +02:00
Paolo Molaro 87b321f611 Avoid direct access to /dev/shm on some platforms. 2012-08-27 10:16:21 +02:00
Sebastien Pouliot b24e740510 [M4A] Do not reset 'errors' and 'status11' when a certificate is trusted. Fix last part of #5706 2012-08-23 16:41:28 -04:00
Sebastien Pouliot 4b9e7cafc6 [OSX|iOS] Do not reset 'errors' and 'status11' when a certificate is trusted. Use the OS to validate the certificate (as valid for SSL server usage) and for the host name checks. Fix parts of #5706 2012-08-23 16:41:19 -04:00
Sebastien Pouliot 78320b9187 Fix binding (type) and value error (true) that could lead to error #5 (kSecTrustResultRecoverableTrustFailure) for valid certificates. Fix bug #4001 2012-08-23 10:48:28 -04:00
Jeffrey Stedfast ef7e7ce38d [xbuild] Fixed Microsoft.Portable.CSharp.targets to use smcs
Fixes bug #6649
2012-08-22 13:45:01 -04:00
Petr Onderka e8a6fe06ca new CancellationTokenRegistration().Dispose() shouldn't throw
Conflicts:

	mcs/class/corlib/Test/System.Threading/CancellationTokenTests.cs
2012-08-20 01:30:01 +01:00
Petr Onderka d7dcebde97 Check key for null in ConcurrentDictionary 2012-08-20 01:30:01 +01:00
Alan McGovern b98640fe96 [System.Xml.Linq] Add error checking to the XElement constructors
Added matching tests.
2012-08-16 15:25:36 +01:00
Zoltan Varga f3d493d315 Free the newly added assembly->remapped_tokens hashtable. 2012-08-16 02:47:46 +02:00
Zoltan Varga d9e782e1f0 Handle ConstructorBuilders in fixup_cattrs () correctly. Fixes #689533 (nemerle build). 2012-08-16 02:41:00 +02:00
Miguel de Icaza 207b46dca9 Revert 4e5e52a298, which was pull request 242, which was novell bugzilla #689533
This patch miscompiled attributes like this:

                [EditorBrowsable (EditorBrowsableState.Advanced)]
                [Export ("init")]
                public  CAKeyFrameAnimation () : base (NSObjectFlag.Empty)
                {
                        if (IsDirectBinding) {
                                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, Selector.Init);
                        } else {
                                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, Selector.Init);
                        }
                }

In particular the [Export ("init")] method to be compiled like this:

    // method line 6274
    .method public hidebysig specialname rtspecialname
           instance default void '.ctor' ()  cil managed
    {
        .custom instance void class [System]System.ComponentModel.EditorBrowsableAttribute::'.ctor'(valuetype [System]System.ComponentModel.EditorBrowsableState) =  (01 00 02 00 00 00 00 00 ) // ........

        .custom instance void class MonoMac.CoreGraphics.CGImage::'.ctor'(int32, int32, int32, int32, int32, class MonoMac.CoreGraphics.CGColorSpace, valuetype MonoMac.CoreGraphics.CGImageAlphaInfo, class MonoMac.CoreGraphics.CGDataProvider, float32[], bool, valuetype MonoMac.CoreGraphics.CGColorRenderingIntent) =  (01 00 04 69 6E 69 74 00 00 ) // ...init..

Notice the "CGImage" attribtue instead of the ExportAttribute
2012-08-14 17:00:31 -04:00
Sebastien Pouliot 59f8ccff70 Add MD4, SHA384 and SHA512 signature verification to X.509 certificates
* X509Certificate.cs: Add MD4 (if available), SHA384 and SHA512
RSA signature verification
2012-08-14 13:27:02 -04:00
Sebastien Pouliot c41f66b93f Avoid throwing (just return false) when verifying an RSA certificate with dsaSHA1
* X509Certificate.cs: Do not throw a CryptographicException for "unknown
hash algorithm" when asked to verify a RSA certificate with dsaSHA1 since
this can happen when a bad/incomplete chain is being tested.
2012-08-14 13:27:02 -04:00
Sebastien Pouliot 5ff0bf12d2 Add support for validating RSA-based X.509 certifcates using SHA256
* X509Certificate.cs: Add mappings for 1.2.840.113549.1.1.11
2012-08-14 13:27:01 -04:00
Sebastien Pouliot c672257edb Do not throw in IsSelfSigned on non-RSA based certificates
* X509Certificate.cs: Handle DSA or DSA paramaters-only certificates
in IsSeldSigned
2012-08-14 13:27:01 -04:00
James Bellinger aa99529c2d Fixed Type.GetEnumNames sort order (it's specified on MSDN). Previously this method was returning in GetFields (declaration) order. It now returns sorted by the unsigned value of the enum as is correct.
Ran into this while calling Type.GetEnumNames and Type.GetEnumValues.
To my surprise the pairs didn't match up. Anyway, here's a fix.
2012-08-14 17:17:07 +01:00
Zoltan Varga 67f377f0b7 Fix debugger invokes which return pointer types. Fixes #4214. 2012-08-14 01:32:08 +02:00
Juho Vähä-Herttua ecb05bdde0 Fix HMACSHA384 and HMACSHA512 for key length of [65, 128] bytes. 2012-08-13 14:10:19 -04:00
Sebastien Pouliot 7d4183e828 Add test cases from #6510 2012-08-13 14:10:18 -04:00
Jonathan Pryor 0bb4db9401 Pass SSL certificate chain, not just collection, to Mono.Android.dll
Fixes BCL half of: https://bugzilla.xamarin.com/show_bug.cgi?id=6501

Today I learned that the SSL certificate collection (as held in
X509CertificateCollection) is a potentially unordered sequence of SSL
certificates, which not all versions of Android will validate.

The fix is to use the properly ordered SSL certificate chain (as held
in X509Chain), and have Android validate that.
2012-08-13 13:50:53 -04:00
Sebastien Pouliot 879adcdfab Wrap potential exceptions (like #6425 NRE) inside an (expected) WebException 2012-08-10 16:54:24 -04:00
Rolf Bjarne Kvinge c1288989c9 [Sqlite] Rework type mapping between sqllite and .net using sqlite's substring matching. Hopefully this will fix #5577 for good. 2012-08-09 15:06:59 +02:00
Jonathan Pryor 77f1b3fe63 Add note that UnixDirectoryInfo.Create() follows umask. 2012-08-07 15:42:06 -04:00
Alan McGovern 777753a5c5 Bump mono-2-10 to have a version number of 2.10.10 2012-08-02 15:00:22 -04:00
Paolo Molaro b0e367c025 Fixes xambug#2965: enqueue the correct worker instance (change from Tammo Hinrichs). 2012-08-02 20:03:55 +02:00
Rodrigo Kumpera ef23d8545e Disable native trace collection and spew on desktop. 2012-08-02 13:44:02 -04:00
Jonathan Pryor 6671c332e6 Enable IPv6 support under Android.
Android now supports IPv6.

Reverts: 55a3c344
2012-07-31 07:38:01 -04:00
Jeremie Laval e9c2847e83 [System] Check for Abort state when poping so that we can retry 2012-07-25 17:38:32 +01:00
Jeremie Laval 98835184b2 [corlib] Dont use blocking wait call in CancellationTokenSource test 2012-07-25 16:10:28 +01:00
Jérémie Laval 39109fbb04 [corlib] Remove now unneeded line 2012-07-25 16:10:00 +01:00
Jérémie Laval 1e221161b7 [corlib] Also unregister linked tokens when the proxy CancellationTokenSource becomes cancelled. 2012-07-25 15:49:55 +01:00
Jérémie Laval fd30c84ca4 [corlib] Linked token callback to the proxy CancellationTokenSource shouldn't throw ODE in concurrent situations.
Conflicts:

	mcs/class/corlib/System.Threading/CancellationTokenSource.cs
2012-07-25 15:47:53 +01:00
Jérémie Laval 9e1c3635ff [corlib] Dispose linked tokens connections when disposing the resulting CancellationTokenSource
Based on baulig's patch: https://github.com/baulig/mono/commit/3ee4f7600b8efe61f7a701a93fffed8373b7b4b3

Conflicts:

	mcs/class/corlib/System.Threading/CancellationTokenSource.cs
2012-07-25 15:45:24 +01:00
Jeremie Laval 9c30bb3bbc [System] Optimize ConcurrentBag, implement TryPeek and add unit tests
Initially reported by linquize

Conflicts:

	mcs/class/System/Test/System.Collections.Concurrent/CollectionStressTestHelper.cs
2012-07-25 14:41:09 +01:00
Marek Habersack 412fb275d3 Fix the build 2012-07-25 08:44:12 -04:00
Marek Habersack 049bb49f1c Update to fix for Novell bug #739119 2012-07-25 08:43:55 -04:00
Marek Habersack 04245de5c4 Fix for Novell bug #739119 2012-07-24 19:06:19 -04:00
Alex Rønne Petersen 7770151c3d Merge pull request #405 from linquize/patch-2
Fix typo in OldValue/NewValue for mono-2-10
2012-07-23 21:00:04 -07:00
linquize a54a85a407 Fix typo in OldValue/NewValue in System.ComponentModel.Design/ComponentChangedEventArgs.cs 2012-07-24 11:57:07 +08:00
Miguel de Icaza 1a303bc70c Render obsolete attributes on members 2012-07-23 21:36:37 -04:00
Rodrigo Kumpera 6954c0c4ac Switch the unhandled exception spew to use the new native backtrace when available. 2012-07-20 14:48:23 -03:00
Rodrigo Kumpera 7e8a4d5ef0 Add Mono.Runtime::GetNativeStackTrace method to make the new backtracing facility available to managed land. 2012-07-20 14:48:23 -03:00
Rodrigo Kumpera 24ec24deb7 Add new mono_exception_get_native_backtrace function that stringify the native backstace with managed and native frames. 2012-07-20 14:48:22 -03:00
Rodrigo Kumpera bcbc8bbfcc Fill Exception::native_trace_ips when doing exception handling. 2012-07-20 14:48:22 -03:00
Rodrigo Kumpera d0f5ade677 Add field to Exception to hold the unmanaged backtrace. 2012-07-20 14:48:21 -03:00
Alan McGovern 04495073c1 Update the tests to do actual verification
Ensure the elements really are added twice.
2012-07-20 17:37:00 +01:00
Alan McGovern 2cd3d8204c Use the result of XUtil.ToNode when emitting events
Sometimes the value the user passes in is converted to an XNode. In
these cases we need to use that XNode when emitting the change events.
Added a test covering this change.
2012-07-20 17:36:52 +01:00
Alan McGovern 5d636d18d6 Emit change events for modifying XElement.Name
Added additional tests for this too.
2012-07-20 17:36:44 +01:00
Alan McGovern 31bbdabec6 Add some tests to verify behaviour of Annotations 2012-07-20 17:36:36 +01:00
Alan McGovern 35b5d4b419 Implement XObjectChange.Value for XAttribute
We now emit the correct Changing/Changed events when modifying the
value of an XAttribute. Added tests covering the changes.
2012-07-20 17:36:14 +01:00
Alan McGovern 94cd06fc6a Begin fixing the XObject.Changing and XObject.Changed events
Add tests to ensure the event is correctly emitted and correctly propagated
up the tree for the basic Add and Remove operations. Fixed the implementation
accordingly.
2012-07-20 17:36:08 +01:00
Alan McGovern 8a82e90853 [System.Xml.Linq] Fix some bugs in the tests
Ensure we normalize both the expected and actual output
so they have the same line endings.
2012-07-20 17:35:57 +01:00
Marek Safar 873a572022 Use correct iterator return type for XPathEvaluate. Fixes #5902 2012-07-20 17:35:49 +01:00
Marek Safar 65a50bb3c1 Add new test 2012-07-20 17:35:40 +01:00
Marek Safar d950656d72 Add missing CreateReader method 2012-07-20 17:35:30 +01:00
Marek Safar 51cc05438e Fix some parameters names 2012-07-20 17:35:06 +01:00
Atsushi Eno b68627cdb8 Do not call WriteString() for whitespace XText. 2012-07-20 17:33:45 +01:00
Atsushi Eno 58b45ea45c Fix bug #2146 - create snapshot copy of nodes before removal in Remove<T>(). 2012-07-20 17:33:26 +01:00
Atsushi Eno 7d514aaf91 Fix bug #2383 patch by Weeble - in XPathExtensions.Evaluate(), return IEnumerable of the underlying object, not XPathNavigator, for node-set values. 2012-07-20 17:33:08 +01:00
Atsushi Eno 27767b384f XDocument could also be filled IXmlLineInfo. 2012-07-20 17:32:11 +01:00
Miguel de Icaza 3dd75ec4a9 Add solution files 2012-07-20 17:30:31 +01:00
Miguel de Icaza 72a62a0e17 mono_lookup_pinvoke_call: prevent leak by keeping a global MonoDl handle for the internal module.
From now on, we will keep a global handle for lookups performed against the "__Internal"
library name.   This will prevent multiple P/Invoke calls from calling mono_dl_open with
filename == NULL for each call.

Since Mono never calls mono_dl_close on P/Invoke lookups, this should not pose a problem.
2012-07-18 22:33:23 -04:00
Rodrigo Kumpera 5f32625301 When calculating allowance, don't blindly cast from double to uint as it might not saturate the result.
* sgen-gc.c (try_calculate_minor_collection_allowance): For workloads with very high
	survival rates the calculated allowance_target can overflow a mword on 32bits systems.
	Given this behavior is unspecified and we've been bitten by it, let's take the safe
	side and manually saturate it.
2012-07-17 14:06:27 -03:00
Marek Habersack 8f5b1a0454 Merge pull request #385 from symform/mono-2-10
Mono 2 10
2012-07-17 03:14:03 -07:00
Gonzalo Paniagua Javier 70d63aa739 GetResponse() returns 0 when it need more data, not -1
GetResponse() returns 0 to signal that it needs more data to complete
	while -1 signals an error processing the data.
2012-07-16 13:53:21 -04:00
Gonzalo Paniagua Javier bfa23f8cd0 Backport from master 2012-07-13 19:34:36 -04:00
Rodrigo Kumpera 249ff94c35 Fix the layout of InternalThread and make sure we won't bump into it. Fix a linux crash.
* appdomain.c: Bump corlib version and add a canary to make sure
	we don't backport layout changes blindly.
2012-07-12 17:10:05 -03:00
Rodrigo Kumpera 0b95cbb8d9 Disable mdb by default as it breaks sgen builds. This has gone unoticed for close to two years now. 2012-07-10 15:33:17 -03:00
Michael Goff 65f7b4a137 Fix for bug #4896: Incorrect routing of catchall parameter
https://bugzilla.xamarin.com/show_bug.cgi?id=4896
2012-07-09 15:41:08 -07:00
Gonzalo Paniagua Javier 5c610044b0 HtmlEncode the path
Fixes Novell bug #769799.
2012-07-06 13:43:45 -04:00
Rolf Bjarne Kvinge 618657c3a5 Rework RectangleF.Contains to not do equality comparison on floating point values. Fixes #5985. 2012-07-05 14:55:09 +02:00
Alan McGovern 5c612297d4 [Microsoft.Build.Tasks] Remove an overly verbose informational message
This warning really pollutes the monodevelop build, so lets nuke it
for now.
2012-07-04 15:45:33 +01:00
Rodrigo Kumpera a47e41749e Use isfinite instead of finite as newer xcode removed it. 2012-07-02 11:22:57 -03:00
Rodrigo Kumpera a2634730e3 Add test for pinned gc handle. 2012-07-02 11:22:56 -03:00
Rodrigo Kumpera 9fba74a47b Fix a pair of bugs in the gchandle code.
* gc.c: Make sure pinned handles actually pin on sgen.
	* gc.c: Use gc_memmove and gc_bzero when dealing with memory
	that has managed references.
2012-07-02 11:22:56 -03:00
Rolf Bjarne Kvinge a1e30ace6f Make mkbundle bundle assemblies a lot faster.
Preallocate the 256 different lines we might write to the assembly file
instead of allocating several strings for every line.

With compression mkbundle is about twice as fast now (since compression
speed hasn't changed), without compression it's 5-10x faster, depending
on the number of assemblies to embed.
2012-07-02 15:46:17 +02:00
Zoltan Varga 2c7ff47245 Remove some assembly from mkbundle which doesn't work on osx 64 bit. 2012-06-30 00:46:33 +02:00
Rodrigo Kumpera 8ac076956b Make the thread abort code multi-thread safe. 2012-06-29 15:32:27 -03:00
Rodrigo Kumpera e4afc97bdd With Socket:Dispose from using Thread.Abort to less agressive alternative.
* Socket_2_1.cs: When closing a socket we need to abort any
	pending syscalls to that socket. For most syscalls the kernel
	does it for us. But accept/connect on linux requires extra
	love.

	We previously used Thread.Abort to implement that, but this
	is a pretty radical solution with very complicated ramifications.
	So instead now we use a new icall cancel_blocking_socket_operation
	that makes sure we only abort the syscall and do nothing else.

	This reduces the trouble surface a lot given how tricky
	Thread.Abort is.
2012-06-29 15:32:24 -03:00
Rodrigo Kumpera 33bec03932 Async close on mac raises ECONNABORTED for connect(). 2012-06-29 15:29:37 -03:00
Rodrigo Kumpera 4bffb9fe56 Add new cancel_blocking_socket_operation icall to Socket.
* socket-io.c: Add cancel_blocking_socket_operation icall
	to Socket so we can abort socket syscalls on other threads
	when we decide to close a socket.
2012-06-29 15:29:13 -03:00
Rodrigo Kumpera f3c60e7b0c New field InternalThread::ignore_next_signal. Bump corlib version due to layout change. 2012-06-29 15:10:37 -03:00
Rodrigo Kumpera 3e78c22f48 Fix race condition in static's inialization of mono_message_init.
* object.c (mono_message_init): Make sure the static field
	we test fo check for initialization is the last to init or
	we risk an abort due to others been null.
2012-06-29 12:52:55 -03:00
Gonzalo Paniagua Javier 02dd6e7f7b Attempt to fix #1553
This should prevent a popular exception to happen again.
2012-06-28 22:20:10 -04:00
Martin Baulig 371d7369a7 Include quotation marks in cookie value. 2012-06-26 15:27:40 -04:00
Martin Baulig 6feffe1373 Correctly parse cookies.
* System.Net/CookieParser.cs: Replace GetNameValue() with Parse(),
  support multiple cookies, errors and "expires=Day, ...".

* Test/System.Net/CookieParserTest.cs: New nunit test suite for that.
2012-06-26 15:27:12 -04:00
Martin Baulig b3d9be482e Fix DateTime.ToFileTimeUtf (bug #5697). 2012-06-26 15:22:53 -04:00
Rolf Bjarne Kvinge 60a2e2d0b5 Sqlite: Map BOOLEAN to System.Boolean. Fixes #5768. 2012-06-25 11:56:16 +02:00
Zoltan Varga 73cc5917ee Disable LLVM for methods with very long basic blocks. Fixes #5714. 2012-06-24 21:26:25 +02:00
Zoltan Varga de3f5e1538 More fixes for passing/receiving nullables in sdb. Fixes #4659. 2012-06-19 22:50:24 +02:00
Zoltan Varga 5dc6c75b62 Allow setting nullable values in sdb. Fixes #4385. 2012-06-19 22:50:24 +02:00
Marek Safar 4fa036cf0f Fixes a warning 2012-06-19 13:01:17 -04:00
Rob Wilkens dc6efdab29 Bug 2663: Regular Expression Bug Fixes
What this fixes:
IF you were checking a regex which contained something like "(A|AB)C" and then you
checked something like "ABC" against it, it would fail previously, because its
first trip thru the regex it would match "A" first and short circuit out of the
"or" (|)  then next try to match "C" but find "B" and fail.  In this case, it should
be obvious that it needs to, after it fails, go back and try "AB" rather than "A"
and that's where this patch comes in.

Brief summary of each change in order that "git diff --staged" is giving them to
me:

This first one summarizes the background of goal of project:
New Function: EmitJumpTest
For when we are evaluating Alternatives (or's) we now want to be able to go back
and try or paths we haven't already tried if and only if we fail.  This alternate to
EmitJump instead of jumping to target if we have a match immediately, will
on first attempt do the jump, but later if we have already tried this jump
combination, it will jump to ElseTarget, which is the equivalent of this test
failing on subsequent attempts with the same combination of 'or's passing.

RxCompiler:
EmitJumpTest isn't implemented for RxCompiler because i didn't have sample
code to test it on, so it falls back to a regular jump, nothing changes in
RxCompiler in other words other than having this required fucntion front.

arch.cs:
New OpCode added for JumpTest (see EmitJumpTest above)

compiler.cs:
EmitJumpTest added here for regular compiler, it now takes two arguments (two
items on stack) first was the standard where to jump to address, the second
argument is where to jump to in case where we have already tried this
combination)

interpreter.cs:

JumpTestEntry - What we keep track of to know if we've been here before, for
now i presumed just 'pc' (program counter') and 'ptr' (pointer - where we are)
were enough to tell us if we've been to this particular spot before.

Eval has been moved into Eval_Real

Eval if it gets called with parameters indicating we've already been here
(i.e we're being called recursively) just passes the call directly to eval_real
as-was.

Otherwise eval will loop on eval_real while we fail and haven't tried every
possible path through all the or's. (Note: The special case of where we're
running a 'test' (i.e. checking !(a|b|c) rather than just matching (a|b|c)),
and if we're running a test, we turn off JumpTestTracking while it's in its
recursive section.  The reason for this is because while we can rightly check
all the options of (a|ab|abc)  first for a then try again with ab then try again
with abc, we cannot do the same for a not (i.e. !(something or something else)
is really (not something AND not somtehing else), and it is not (not something
or not something else))

JumpTestList tracks our current run's JumpTest calls...
TriedCombo's tracks all the combos (all the JumpTestList results) that we've
already tried.

All calls to anything which calls Eval were modified to call eval passing
the optional new parameters that we now need, and remember if we call
eval with those parameters having a value, it will just forward the call
to Eval_Real.

This included modifying TryMatch because it calls Eval.

OpCode.JumpTest handler was added, what it does is first check if we need
to ByPass to jump to 'else' right away, which again happens when we're in
a test recursive call (Checking not, for example).
Next, it will create and populate a new JumpTestEntry with the current values.
It then calls CheckComboMatch() which sees if we match a combo already on file.
If we don't have a Match we jump to the first label (at pc+1) which is the
regular jump call.  If we have a match, though, it will jump to the else label
which is now at (pc+2).

CheckComboMatch had to be broken up into two functions because it was going
too deep in terms of nesting.  What it does by now should be somewhat understood
it will see if we have a match between our current run and previous runs, and
if we have a match, it returns true.  If we don't have a match, it returns
false.  I have some doubts about whether this function is 100% correct, there
may remain a bug or two, but it does pass all the "System" unit tests which
includes all the regular expression tests, plus it works for all the tests
in the bug report, so i have little reason to mess with it.

syntax.cs:
Here's where i modified so that when evaluating alternatives ("or"s or "|"s)
we instead call EmitJumpTest rather than just a regular EmitJump.

RegExBugs.cs:
This is the unit test (a bunch in one) which fails on mono without this patch
but succeeds with it
commit 48027ac2bdd9b60d18985ec2537eb188607f8164 1 parent 91c4180d55

This patch was originally submitted under another branch which had a bunch of
unrelated commits in it.  I'm hoping if i did this right, these changes stand
alone.
2012-06-19 13:01:08 -04:00
Rolf Bjarne Kvinge 32f743c2e0 Sqlite: Map GUIDBLOB to System.Guid. Fixes #5577. 2012-06-19 16:13:10 +02:00
Gonzalo Paniagua Javier 5c5be866e2 Aborting a pending request closes the socket now
Aborting an HttpWebRequest whose request stream is not closed yet will
	now close the underlying socket properly.
	Fixes bug #5710.
2012-06-18 22:52:36 -04:00
Rodrigo Kumpera 3d3fe6afab Improve Delegate::Combine error message. 2012-06-18 12:14:01 -03:00
Atsushi Eno 2f90a22a0b doh, miscopied file names. 2012-06-12 19:03:25 +09:00
Atsushi Eno 2908d55286 Those new hacky RabbitMQ sources files need to be included in dist. 2012-06-12 18:58:44 +09:00
Atsushi Eno 4ab341d0a5 attempt to fix parallel build in RabbitMQ dir.
Its' nasty, but who cares? (if whoever does, fix it.)

Conflicts:

	mcs/class/RabbitMQ.Client/docs/specs/Makefile
2012-06-12 17:56:00 +09:00
Atsushi Eno 1f7f0ad019 bring back code contracts to mobile profiles. 2012-06-12 15:59:52 +09:00
Miguel de Icaza bb04c29fd0 Merge pull request #317 from viniciusjarina/fix_4794_mono-2-10
Fix 4794 mono 2 10
2012-06-07 17:59:13 -07:00
Zoltan Varga bca3e7d60a Fix sorting of ulong[] arrays among others when using the non-generic Sort() overloads. 2012-06-07 15:45:52 -04:00
Marek Safar 1d09e181e0 Merge pull request #254 from viniciusjarina/fix_build
Fix broken test
2012-06-07 01:24:05 -03:00
Dave Ferguson 22b4ec0f7a - Fix bug 4794 by searching the SerializationMap with both type and
qname in all but several cases (see bug report comments)
- Add separate list for known types to mimic behavior of the .NET
  runtime

- Make previous test fixtures public so that the unit tests will be run

- Remove unused private method

- Add unit test for bug 4794
2012-06-07 01:23:38 -03:00
Atsushi Eno 14b6329657 Use non-prefixed namespace output for element when applicable. Fixed bug #5519. 2012-06-07 13:05:23 +09:00
Sebastien Pouliot 30d72c0558 Propagate all errors to the (old) ICertificatePolicy or (newer) callback. Fix bug #5546 for iOS 2012-06-06 21:12:23 -04:00
Lluis Sanchez 07ce8e4dd2 Improve date serialization compatibility with third party web services
Make XmlCustomFormatter.cs more liberal about the date formats it accepts.
Many third party web services do not format date exactly at 'yyyy-mm-dd'.
The Microsoft implementation is more liberal about accepting other formats
and so the current Mono implementation breaks projects that consume third
party web services when they are ported to Mono.
Based on a patch by Aaron Roydhouse.
2012-06-05 12:31:20 +02:00
Jonathan Pryor 0253a59dff [corlib] Allow SynchronizationContext.Current to work on MfA
For the main (UI) thread, make SynchronizationContext.Current return
the Android.App.Application.SynchronizationContext property.
2012-06-01 12:52:20 -04:00
Rodrigo Kumpera 28cc5ba1ec Implement better pointer spew for the new heap verifier. 2012-06-01 12:06:29 -03:00
Zoltan Varga c895ea21a5 Add an aot option to override the value of readonly static fields.
If the static constructor of a type has been run, the JIT can perform
some optimizations based on the actual value of static readonly fields.
This isn't possible in AOT mode, since the code won't be ran before compile
time: this option allows to set any number of static readonly fields to
a constant value so that the compiler can perform the same kind of
optimizations.
2012-06-01 12:48:09 +02:00
Zoltan Varga b8d1e49bb7 Revert "Add an aot option to override the value of readonly static fields."
This reverts commit 0127f24037.

Revert this as an experiment to see if it fixes #5429.
2012-06-01 10:55:07 +02:00
Zoltan Varga ba75d15c99 Merge pull request #311 from symform/mono-2-10
Mono 2 10
2012-05-31 17:50:12 -07:00
Michael Goff 0cd9bea4a6 Incorrect comment syntax was breaking compile time configure check for large file support 2012-05-31 15:11:00 -07:00
Jeffrey Stedfast c70e6210b9 Fixed regressions in Microsoft.Build.BuildEngine 2012-05-31 14:04:46 -04:00
Vinicius Jarina 3d6c70d28e Fix issue #242 DataContractSerializer fails to deserialize List<T> properties 2012-05-30 23:36:46 -04:00
Zoltan Varga 656b00c8ca Fix a race in mono_aot_find_jit_info (). 2012-05-30 23:38:21 +02:00
Zoltan Varga 736efd75e0 Resurrect the remote csharp repl on 2.10. 2012-05-30 02:19:18 +02:00
Rodrigo Kumpera 27943b1dda Fix major whole-heap verification if the nursery end up partially cleaned. 2012-05-29 18:14:44 -03:00
Sebastien Pouliot 86e85ff5d4 Remove dependency on System.ServiceModel.Web (and it's own dependency) when using System.Json is enough 2012-05-29 14:54:28 -04:00
Rodrigo Kumpera 5fd37f3212 Add new whole heap verifier that can catch a whole lot more problems than previous tools did.
* sgen-gc.c Add verify-before-allocs and verify-before-collections experimental
	options to perform heap verification at the many different points in the app.

	This does check all pointers in the heap, so it's much much slower than
	the previous option.
2012-05-28 17:31:13 -03:00
Jeremie Laval 9ec0bb7319 [corlib] Fix ConcurrentStack.TryPopRange and add tests. Fix #5304 2012-05-28 11:31:09 +01:00
Jeremie Laval 18c6ae3023 [corlib] A CancellationTokenRegistration instance should always have a working GetHashCode method
Reported by knittl
2012-05-28 11:08:46 +01:00
Zoltan Varga 0127f24037 Add an aot option to override the value of readonly static fields.
If the static constructor of a type has been run, the JIT can perform
some optimizations based on the actual value of static readonly fields.
This isn't possible in AOT mode, since the code won't be ran before compile
time: this option allows to set any number of static readonly fields to
a constant value so that the compiler can perform the same kind of
optimizations.
2012-05-27 04:05:05 +02:00
Marek Safar 225b611bd1 Fix Guid::CompareTo. Fixes #4721 2012-05-26 08:40:41 +01:00
Sebastien Pouliot 799028878b Add newer (SL5) types to mobile profile. Fix bug #5337 2012-05-25 19:55:56 -04:00
Marek Safar 4f44c7b885 Remove System.Threading.LockRecursionException from mobile System.Core. Fixes #5192 2012-05-25 19:55:56 -04:00
Rodrigo Kumpera 04440004f5 Small improvements to the concurrent queue.
* mono-cq.c (mono_cq_add_node): Add a store store fence
	between the two stores as they can be observed OOO.

	* mono-cq.c (mono_cq_create): Use precise roots for head
	and tail.
2012-05-25 10:54:03 -03:00
Sebastien Pouliot eeabf86973 Avoid having LockRecursionException in both mscorlib and System.Core for the MOBILE profile. Fix bug #5311 2012-05-24 22:12:56 -04:00
Miguel de Icaza 36b479bdd9 Merge pull request #280 from symform/mono-2-10
Modified the large file support check to do a compile-time check instead of a run-time check
2012-05-24 13:53:04 -07:00
Rodrigo Kumpera 236b31961b Use new mono_gc_(memmove|bzero) in places messing with managed memory. 2012-05-23 16:08:28 -03:00
Rodrigo Kumpera 90355d32d3 Fix a bunch of data races. 2012-05-23 16:08:28 -03:00
Rodrigo Kumpera 9d59f5b1d9 Fix mono-cq under sgen.
* mono-cq.c: Don't store to managed fields directly, use
	MONO_OBJECT_SETREF. Don't memset a block of memory with
	roots, use mono_gc_bzero.

	This fixes random crashes in my sgen_par_tlab branch.
	Hopefully all of them.
2012-05-23 16:08:28 -03:00
Rodrigo Kumpera b1ba3a716d Backport gc_memmove and gc_bzero with all fixes together. 2012-05-23 16:08:27 -03:00
alexrp a0139172d7 mono/metadata/gc.c: Fix warning due to declaration after statement. 2012-05-23 15:28:26 +02:00
Sebastien Pouliot 3cbbaecc07 Fix IsolatedStorageFile directory creation/deletion with rooted paths. Fix bug #5011 2012-05-22 14:37:39 -04:00
Rodrigo Kumpera 215f7744f6 Replace some g_assert with g_error. 2012-05-22 13:20:17 -03:00
Gonzalo Paniagua Javier f537b39bfa .NET 4.0+ flushes the request stream when content length is not set
Fixes bug #4640
2012-05-22 05:41:35 -04:00
Rodrigo Kumpera 2f739140ce Fix a very rare hang on sgen.
* sgen-gc.c (restart_threads_until_none_in_managed_allocator):
	When suspending threads, if a given thread was suspended on
	a gc unsafe point we restart it until it land on a safe zone.

	Since we restart the thread, it might die before we get the chance
	to suspend it again, we take this into account except when waiting
	for acks. We mistakenly waited for the same number of acks of the
	restart step. It could have been reduced if a thread died.

	This bug is very very hard to hit as it only happens on linux,
	requires that a thread on an unsafe point dies right after been
	restarted and it must not be a managed thread as those must take
	the GC lock while cleaning up.

	This sums up to a mostly theoretical bug that someone might
	have observed once in the wild. We're better fixing it now
	since further optimization work might make it easier to hit.
2012-05-21 12:39:46 -03:00
Rolf Bjarne Kvinge d819ff3031 Fix typo 2012-05-21 13:25:07 +02:00
Rodrigo Kumpera 698a0b1b7f Avoid a deadlock when waiting for pending finalizers.
* gc.c: If the finalizer thread is delay started
	we must ensure that we don't block waiting for finalizers
	until it is live.

	This is required as the delayed start could happen in
	the blocked thread - and deadlock us.
2012-05-18 17:34:18 -03:00
Rodrigo Kumpera 5e727c96e6 Make asserts more usefull. 2012-05-18 17:34:01 -03:00
Rolf Bjarne Kvinge 1631b25a22 Sqlite: Map DATETIME to System.DateTime. Fixes #5078. 2012-05-18 14:31:11 +02:00
Marek Safar 8ef4c5b84b Fix datetime miliseconds parsing. Fixes #992 2012-05-18 13:45:47 +02:00
Sebastien Pouliot ed4e6b9b35 Add fix and test case from bnc #650402 2012-05-16 16:53:22 -04:00
Rolf Bjarne Kvinge f1ba0b3467 Sqlite: Close the command before the connection when CommandBehavior.CloseConnection is specified. Fixes #5058. 2012-05-16 22:20:06 +02:00
Jeremie Laval 98b272411e [corlib] Fix NullRef when using dispose a CancellationTokenRegistration when the initial source has been disposed
Conflicts:

	mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs
2012-05-16 11:54:57 +01:00
Sebastien Pouliot 666e804ca5 newer nunit does not require a [TestFixture] attribute and made those fixture fail. Making them abstract fix this 2012-05-14 09:17:14 -04:00
Atsushi Eno 47df5f6a86 Make use of GetPrefixOfNamespace() in XElement.ToString(). Fixed bug #3972. 2012-05-14 18:32:13 +09:00
Atsushi Eno 2baf26aaf0 Fix bug #2564 - give .NET compatible namespace prefixes for XElement with namespace that XAttribute provides.
This makes XElement.WriteTo() pretty much slower.
2012-05-14 18:31:48 +09:00
Atsushi Eno fcc5484999 Add Xml declaration even for such document that lacks XDeclaration.
Fixed bug #4850.
2012-05-14 17:28:52 +09:00
Atsushi Eno b67f32d308 XNodeNavigator could be used for a node tree without XDocument, so make it work for such case.
Fixed bug #4690, patch by eb1 sil.org.
2012-05-14 16:32:19 +09:00
Atsushi Eno f327e874af In XNodeNavigator, do not start text node skip from current node.
Fixed bug #4739, patch by eb1 sil.org.
2012-05-14 16:25:08 +09:00
Zoltan Varga 964997a025 Fix byref stringbuilder marshalling. Fixes #5007. 2012-05-14 02:42:14 +02:00
Zoltan Varga 9d104c58f8 Implement out support in byref string marshalling. Fixes part of #5007. 2012-05-14 02:41:36 +02:00
Vinicius Jarina 867ff15e3d Added new test 2012-05-11 10:56:56 -04:00
Vinicius Jarina 663a84c6e1 Fix XML serialization of DateTimeOffset?. Fixes #3258
The nullable DateTimeOffset was not properly handled when serialized.
The deserialization changed to work with DateTimeOffset?.
Avoided "i:type" attribute when serializing Nullable type.
2012-05-11 10:55:14 -04:00
Vinicius Jarina c38ef96f9f Removed code commented 2012-05-11 10:55:10 -04:00
Rolf Bjarne Kvinge c57521f7fb If the dllname for a dllimport is a full path, try that exact path before anything else. Fixes #4678. 2012-05-11 01:06:52 +02:00
Sebastien Pouliot 2a9bec8482 Add System.Windows.Input.ICommand which is part of 4.5 and the portable class libraries
Conflicts:

	mcs/class/System/System.dll.sources
2012-05-10 08:53:25 -04:00
Sebastien Pouliot 9ff4fe6fa1 Add some stubs for methods required by the portable class library profiles 2012-05-10 08:46:19 -04:00
Rodrigo Kumpera e60e2c11ba Make INodeVisitor methods nonvirtual by augmenting nodes with interfaces. 2012-05-10 10:55:51 +01:00
Jérémie Laval 2c29ba21d2 Fix overflow checking in PLinq Range operator 2012-05-10 10:55:51 +01:00
Jeremie Laval d030330913 Bring in CountdownEvent optimizations/fixes from master 2012-05-10 10:55:51 +01:00
Konrad M. Kruczynski 22d4fae2e0 Another fix and unit test added.
Now all three possible cases are tested (and working).
2012-05-10 10:55:51 +01:00
Konrad M. Kruczynski 00cd968f98 Fixes as per the Rodrigo's comment.
Wait now throws an exception in case of cancellation token was
cancelled.
2012-05-10 10:55:50 +01:00
Konrad M. Kruczynski 9ce01415e1 Fix for bug in ManualResetEventSlim.
The problem occured when one waited for an event with the
cancellation token and the wait was successful but not
immediate. In that case Wait returned false instead of true,
because of wait handle number mismatch. Also the unit test was
added.

Conflicts:

	mcs/class/corlib/Test/System.Threading/ManualResetEventSlimTests.cs
2012-05-10 10:55:50 +01:00
Jeremie Laval 27c014e63c Update Cancellation plumbery to bring back fixes from master 2012-05-10 10:55:50 +01:00
Jérémie Laval d73722f5d7 Fix wrong CAS check in SplitOrderedList 2012-05-10 10:55:50 +01:00
Jeremie Laval 4d439e7a6b Sanitize Task plumbery from master.
Some fix/enhancements were disseminated in master and had never been brough back to 2-10
2012-05-10 10:55:49 +01:00
Jeffrey Stedfast ca4d43ff20 Added call to GC.SupressFinalize() in CFObject.Dispose() 2012-05-09 14:48:14 -04:00
Sebastien Pouliot 1a9f426523 Add a few bits that the Portable profiles includes (already in master) 2012-05-09 14:07:53 -04:00
Sebastien Pouliot b950fd3bff Small adjustments needed for Profile[1-4] of the Portable Class Libraries.
Conflicts:

	mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
2012-05-09 14:01:04 -04:00
Sebastien Pouliot e637067028 Thread.Finalize is needed in Profile3 of the Portable Class Libraries. 2012-05-09 14:00:01 -04:00
Sebastien Pouliot c89dc66024 BinaryWriter.Dispose is needed in Profile[1-4] of the Portable Class Libraries. Fix bug #4871
Conflicts:

	mcs/class/corlib/System.IO/BinaryWriter.cs
2012-05-09 13:59:22 -04:00
Jeffrey Stedfast 94a56041f4 [MacProxy] Fixed refcounting and got rid of unneeded attribute flags 2012-05-09 10:46:34 -04:00
Jeffrey Stedfast 8227961a41 WebRequest.GetDefaultWebProxy() must not assume the type of the system proxy. 2012-05-08 19:07:20 -04:00
Jeffrey Stedfast 7c89a8fe75 [System.Net.WebRequest] Implemented new and improved proxy support on Mac/iOS 2012-05-08 18:40:36 -04:00
Rodrigo Kumpera b02f9ac6bb When cleaning up the finalizers of a domain, do it in a way that reduces the chance of leftover objects.
* gc.c (finalize_domain_objects): When cleaning up a domain, we run two kinds of finalizers,
	those that have already been queued and those for objects that remain alive.

	A common problem we need to deal is that some finalizers allocate other finalizable objects
	when doing seeminly trivial operations such as String.IndexOf - which might require the Thread
	object of the finalizer thread to be instantiated.

	We handle those new objects by draining the registered finalizers set until none shows up. This fails
	if we run the queued finalizers after that.

	The order onto which finalizers are run on domain unload is unspecified and the new behavior can
	be argued to be more natural.
2012-05-07 13:52:43 -03:00
Rodrigo Kumpera 528213d413 Fix a warning. 2012-05-07 12:19:53 -03:00
Rodrigo Kumpera 969f4f3c19 Fiz a domain unload race regarding finalizable objects.
* sgen-gc.c (mono_gc_clear_domain): It's possible to have a finalizable object
	survive mono_domain_finalize and leak into mono_domain_free, so we make sure this
	won't crash by removing from the fin hashtable all objects that belong to the
	doomed domain.
2012-05-07 12:19:39 -03:00
Gonzalo Paniagua Javier 80801f6d22 Do not raise the client cert callback twice.
Reverts my own patch from 2009.
2012-05-01 15:16:38 -04:00
Gonzalo Paniagua Javier 906ca96d65 Add support for client certificates to HttpListener
Fixes bug #3969.
2012-05-01 15:15:46 -04:00
Gonzalo Paniagua Javier 5da868cbe5 Do not attempt to write 0 bytes.
Fixes bug #4669.
2012-04-27 15:45:48 -04:00
Gonzalo Paniagua Javier fd8b0c3f82 Do not send all the DNs on the server upon establishing a connection. 2012-04-27 15:45:40 -04:00
Jeffrey Stedfast 532aecf0ce [xbuild] We still need to throw if we fail to import something. 2012-04-26 13:53:19 -04:00
Michael Goff 1de3e266c1 Modified the large file support check to do a compile-time check instead of a run-time check so that cross compile does the right thing. 2012-04-26 09:49:41 -07:00
Jérémie Laval 361c5c49f3 Fix constructor call in QueryConcatNode 2012-04-25 19:31:08 +01:00
Rodrigo Kumpera ab93d7d14f Make sure no live object is left unscanned before we process disappearing links & finalizable objects. 2012-04-25 00:18:18 -03:00
Rodrigo Kumpera 8e0dc5abc9 Add regression test for #3903. 2012-04-24 16:42:35 -03:00
Rodrigo Kumpera 27f313cfd9 Use MonoClass::element_class for non array types when computing array interfaces. Fixes #3903.
* class.c (get_implicit_generic_array_interfaces): When computing the interfaces
	of Array::InternalEnumerator<T> don't use element_class for array types as we
	only want to do that to drop from enum to base type and uint->int.

	Fixes #3903.
2012-04-24 16:42:28 -03:00
Gonzalo Paniagua Javier bf3a705d0d Avoid deadlocking when getting the ServicePoint
SSL connections were deadlocking when getting the service point for the
	connection in the last few releases of 2.10.x and in master.

	Fixes bug #4599.
2012-04-24 04:55:20 -04:00
Sebastien Pouliot 8ba548ded1 Fix leak when an error message is returned from sqlite3_exec 2012-04-23 13:42:30 -04:00
Sebastien Pouliot 5abd53db85 Fix leak by releasing the certificate elements from the CFArray since it was created with a null CFArrayCallBacks 2012-04-23 13:42:28 -04:00
Zoltan Varga 6a99950558 Avoid setting thread->abort_exc in mono_raise_exception (), it was already done. Fixes #4413.# 2012-04-23 15:18:46 +02:00
Duncan Mak 606afdf3ed Fix SetElementValue, fixes #4211. 2012-04-20 17:31:45 -04:00
Gonzalo Paniagua Javier 4b51c2dd29 Avoid key duplication error from bogus ContentType
Fixes bug #4542.
2012-04-20 13:58:38 -04:00
Rolf Bjarne Kvinge 69abed92c0 Fix XmlAttributes to ignore all XmlAttributes if XmlIgnore is present 2012-04-19 23:06:25 +02:00
Rolf Bjarne Kvinge c6fef95efb Ignore XmlIgnore attributes when importing members in XmlReflectionImporter. Fixes #4367. 2012-04-19 23:06:23 +02:00
Jeffrey Stedfast 10980e09d6 [Mono.CompilerServices.SymbolWriter] Fixed Cecil ctor in MonoSymbolFile.cs 2012-04-18 17:40:17 -04:00
William Holmes 48dd92e4d7 Fixing some problems with my previous commit.
threadpool.c (async_invoke_thread) :
	1) Decrease the thread pool waiting count if the dequeue was successful.
	2) Do not call dequeue_or_steal while gc skip thread is true.
2012-04-18 17:14:37 -03:00
Gonzalo Paniagua Javier 4b7ab75409 Merge pull request #275 from bholmes/wsq-deadlock-12-04
Work Stealing Queue Deadlock fix.
2012-04-18 14:01:38 -04:00
Jeffrey Stedfast acb2b75103 [xbuild] Add a Microsoft.Portable.CSharp.targets file
Conflicts:

	mcs/tools/xbuild/Makefile
2012-04-17 17:02:51 -04:00
Jeremie Laval c657ebe342 Improve ManualResetEventSlim consistency with new algorithm
Conflicts:

	mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
2012-04-16 17:16:35 +01:00
Zoltan Varga 02e06a619a Fix setting of byref variables in sdb. Fixes #4362. 2012-04-16 17:36:52 +02:00
Jeremie Laval c61bbdc80e Remove NET_4_5 parts that were introduced by cherry-pick 2012-04-16 16:00:31 +01:00
Jeremie Laval 004c18a1fc Don't overwrite the current variable without first saving its value in case a Task is executed inline inside another task
Conflicts:

	mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
2012-04-16 15:58:16 +01:00
Jeremie Laval ea3791d7f7 Fix Task child waiting for RunSynchronously
Conflicts:

	mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
2012-04-16 15:42:34 +01:00
Jeremie Laval 2d833c991d Change how parent is selected during Task creation and do not force continuation's parent as they are not necessarily the same as their ancestor
Conflicts:

	mcs/class/corlib/System.Threading.Tasks/Task.cs
2012-04-16 15:40:44 +01:00
Jeremie Laval 82785d6e98 Correctly propagate faulted status and exception from child to parent in attached case
Conflicts:

	mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
2012-04-16 15:06:29 +01:00
Jeremie Laval 110087a8e5 Use .NET 4.5 implementation of Task's WhenAll/WhenAny for TaskFactory's ContinueWhenAll/ContinueWhenAny
The diff noise in Task.cs is just moving WhenAllCore and WhenAnyCore outside of their NET_4_5 region

Conflicts:

	mcs/class/corlib/System.Threading.Tasks/Task.cs
	mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs
2012-04-16 14:54:08 +01:00
Jeremie Laval ad4ae8a0a0 Better argument checking in TaskFactory's ContinueWhen* methods 2012-04-16 14:33:51 +01:00
Jeremie Laval 0c03eca2a5 Add unit test for bug #2007 2012-04-16 14:33:09 +01:00
Gonzalo Paniagua Javier a73443e3c9 Remove HasCacheControl from here too (fixes the build) 2012-04-14 22:29:07 -04:00
Gonzalo Paniagua Javier 348c273c5f Fix issues with caching
When the 't' parameter was specified, we returned a 304 if the
	timestamp matched the assembly timestamp, even if the client
	needed the entire body. We were also setting the 304 response
	cachebility as public to further mess things up.

	Fixes the treeview in the class status pages.
2012-04-14 15:27:11 -04:00
Sebastien Pouliot f1b6f91b8e Parse floating point values with negative exponent correctly. Fix bug #4415 2012-04-13 09:01:57 -04:00
Jeffrey Stedfast 727ada784e [xbuild] Don't evaluate an import unless the file actually exists
Fix for bug #4365.
2012-04-10 15:24:53 -04:00
Zoltan Varga 6b1609e62b Allow setting the name of threadpool threads. Fixes #4269. 2012-04-09 08:36:42 +02:00
Zoltan Varga 551ae5de33 Fix the domains of the objects returned by AssemblyMirror.GetAssemblyObject ()/TypeMirror.GetTypeObject (). Avoid caching empty strings in AppDomainMirror.FriendlyName. Fixes #4223. 2012-04-07 06:06:02 +02:00
Jonathan Pryor 9a8c51583e [System] Fix MacOsNetworkInterface.ImplGetAllNetworkInterfaces()
On my (cursed?) MacBook Pro, calling
System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
results in an exception:

	System.ArgumentException: length
		at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) [0x00000] in <filename unknown>:0
		at System.Net.NetworkInformation.MacOsNetworkInterface.ImplGetAllNetworkInterfaces () [0x00000] in <filename unknown>:0
		at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces () [0x00000] in <filename unknown>:0

Some printfs later, and we see why:

	Array.Copy(array.Length=12, 3, array.Length=0, 0, 0)
	Array.Copy(array.Length=12, 4, array.Length=0, 0, 0)
	Array.Copy(array.Length=12, 4, array.Length=0, 0, 0)
	Array.Copy(array.Length=12, 3, array.Length=6, 0, 6)
	Array.Copy(array.Length=12, 3, array.Length=6, 0, 6)
	Array.Copy(array.Length=12, 3, array.Length=8, 0, 4)
	Array.Copy(array.Length=12, 4, array.Length=6, 0, 6)
	Array.Copy(array.Length=12, 8, array.Length=6, 0, 6)
	# BOOM!

(Apparently I have 8 interfaces: lo0, gif0, stf0, en0, en1, fw0, p2p0,
and vboxnet0.)

The problem is readily obvious: we're trying to read 6 bytes of data
when only 4 are available, and Array.Copy() complains appropriately.

The fix -- which looks to almost contradict a02076ba -- is to use
`sockaddrdl.sdl_data.Length - sockaddrdl.sdl_nlen` instead of
`sockaddrdl.sdl_data.Length - macAddress.Length` (or sdl_alen).
sdl_nlen is the offset into the source sockaddrdl.sdl_data array, and
in this case sockaddrdl.sdl_alen (the length of the destination
macAddress) isn't the same as sockaddrdl.sdl_nlen, hence the breakage.
2012-04-05 16:17:28 -04:00
Jonathan Chambers f5fe12c2f1 Merge pull request #251 from TalAloni/mono-2-10
Mono-2-10: VS2010 Compilation fix
2012-04-05 11:45:56 -07:00
Rolf Bjarne Kvinge 6a9a0cdf4a Ensure we get the correct StartWWAN overload. 2012-04-04 16:03:03 +02:00
Sebastien Pouliot 58daced21c Ensure a default key is available, if none is set, when using ARC4Managed 2012-04-03 10:00:10 -04:00
Sebastien Pouliot 331ead550d Apply SHA256 optimizations (single buffer allocation, inlining and better locality) to SHA224 so their performance match 2012-04-03 09:59:56 -04:00
Rolf Bjarne Kvinge a4c85814d8 Fix mono_path_canonicalize to not canonicalize the root directory to an empty string 2012-03-31 00:13:53 +02:00
Rolf Bjarne Kvinge e5428b29c0 Fix g_strreverse to handle empty strings 2012-03-30 13:43:28 +02:00
Rolf Bjarne Kvinge 13f5dc80f4 Log profiler: don't ignore return values from select, in particular not EINTR. 2012-03-29 19:14:48 +02:00
Rolf Bjarne Kvinge 9d103ff7c1 Add most of the Debug class (with related tracing types) to the mobile build. Fixes #3754. 2012-03-29 17:53:23 +02:00
Atsushi Eno 0f4561c272 (monodroid) Do not crash with LogcatTextWriter.Write(null). 2012-03-29 18:22:16 +09:00
Zoltan Varga 42da58a46e Fix the 2.10 build. 2012-03-29 09:04:17 +02:00
Zoltan Varga 4f546f89c4 Register vtables in runtime data structures after they have been completely initialized, since other threads can access them without locking. Fixes #3676. 2012-03-29 08:52:30 +02:00
Gonzalo Paniagua Javier 946353acc4 Welcome to the future 2012-03-28 22:51:35 -04:00
Sebastien Pouliot 6c1b6a9c69 Adjust unit tests wrt Gonzalo fix for NTLM - commit 214741630f 2012-03-28 13:22:40 -04:00
Sebastien Pouliot 2c869a025b Fix tests where a DSA CA certificate expired at the end of 2011 2012-03-28 13:21:58 -04:00
Rodrigo Kumpera bb664acf16 Use g_error instead of fpritnf so target like android see it. 2012-03-27 15:51:26 -03:00
Sebastien Pouliot 90fd4771cb Fix bug #4101 when using a deep hierarchy of directories in isolated storage.
Conflicts:

	mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
2012-03-27 08:40:14 -04:00
Sebastien Pouliot d2d85aa4b0 Move RijndaelTransform code from RijndaelManaged.cs to RijndaelManagedTransform.cs to ease code reuse 2012-03-26 15:05:44 -04:00
Gonzalo Paniagua Javier 890722aa51 Merge pull request #256 from flow3r/patch-1
Binding socket with specified IP address if possible.
2012-03-24 12:17:07 -04:00
Rodrigo Kumpera 9885438b4b It turns out the bridge code needs to distinguish bridges on a per-object basis.
* sgen-bridge.c: In additin to the per-class bridge check, restore the
	per object one. The per-class one still a major win as it allows clients
	to do the more expensive checks upfront.
2012-03-23 16:58:36 -03:00
Rodrigo Kumpera 913882f280 Improve Missing Field error message. 2012-03-23 16:02:35 -03:00
Sebastien Pouliot 28f09f89a2 Fix FindBySubjectName to find anything in the subject name (except the oid acronyms). Fix bug #3897 2012-03-23 11:52:20 -04:00
Sebastien Pouliot 88cb0bab07 Ignore two more tests with [Category(NotWorking)] for NET_2_1/nunitlite 2012-03-23 10:14:17 -04:00
Sebastien Pouliot 8f1b2d3cde Fix ArgumentOutOfRangeException in PKCS1MaskGenerationMethod + unit tests. Fix bug #3777 2012-03-23 09:56:43 -04:00
Sebastien Pouliot 6e7c741e82 Match IDisposable with 4.0 changes in System.Security.Cryptography
* AsymmetricAlgorithm.cs:
* CryptoAPITransform.cs:
* DeriveBytes.cs:
* FromBase64Transform.cs:
* HashAlgorithm.cs:
* PasswordDeriveBytes.cs:
* Rfc2898DeriveBytes.cs:
* RijndaelManagedTransform.cs:
* SymmetricAlgorithm.cs:
* ToBase64Transform.cs:
	Adjust changes to IDisposable wrt 4.0

Conflicts:

	mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs
2012-03-22 20:56:28 -04:00
Sebastien Pouliot 2a0885838d Fix finalizer where a NRE can occur if the ctor fails to complete
Conflicts:

	mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs
2012-03-22 20:40:58 -04:00
Sebastien Pouliot d3fdf77682 Fix old test cases so it's easier to reuse for the mobile profile / nunitlite
Conflicts:

	mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs
2012-03-22 20:39:57 -04:00
Gonzalo Paniagua Javier 6b3c55549a Trigger the UploadProgressChanged event wen uploading a file.
Fixes bug #3100.
2012-03-22 00:25:18 -04:00
Rodrigo Kumpera fa176583f4 Improve io-layer error logging. 2012-03-20 13:47:00 -03:00
TalAloni b4c9977966 x64 compilation fix: by default, compile only the necessary projects (and avoid trying to compile additional projects that can't be successfully built ATM) 2012-03-20 13:00:10 +02:00
TalAloni dc4fd8cc77 Fix compilation: Add target platform preprocessor-definition to x64 Release 2012-03-20 12:53:36 +02:00
TalAloni 515def4985 Fix VS2010 compilation 2012-03-20 12:50:03 +02:00
TalAloni 16fc03984c Add target platform preprocessor-definition to x64 Release 2012-03-20 12:43:43 +02:00
TalAloni 1e91630811 Disable treating compiler warnings as errors 2012-03-20 12:40:25 +02:00
Rodrigo Kumpera 1b88db4c3f Merge pull request #165 from TalAloni/mono-2-10
Mono-2-10 Bugfixes
2012-03-19 16:10:05 -07:00
Miguel de Icaza cae83d6486 Update email address for licensing Mono in LICENSE file 2012-03-19 15:46:34 -04:00
Miguel de Icaza 2a371aa90a (write_serial): fix the variable holding the return value of write(2) which is a ssize_t, not a size_t. This fixed a problem where we would not exit the loop, as negative values would never be set, fix from GitHub.com's konrad-kruczynski 2012-03-19 11:39:02 -04:00
Gonzalo Paniagua Javier 6c037f1efd Redirect right after NTLM authentication works now
Fixes bug #3894.
2012-03-18 17:45:37 -04:00
Gonzalo Paniagua Javier 0d604357b5 Last commit was not entirely correct... 2012-03-16 00:32:03 -04:00
Zoltan Varga dea6c80669 Fix the previous change again. 2012-03-15 22:25:01 +01:00
Zoltan Varga 24590e07e3 Fix build on platforms without MONO_ARCH_HAVE_TLS_GET defined. 2012-03-15 22:24:44 +01:00
Gonzalo Paniagua Javier fe7aede2b9 Merge pull request #241 from viniciusjarina/fix2843
Fix bug 2843 (Deserialization Nullable user-type) + Unit tests
2012-03-14 18:22:17 -04:00
Gonzalo Paniagua Javier bad8aa46b6 If we read an entire chunk, return it in the next read operation
When waiting for the chunk trailer, we can return the data read
	so far.
2012-03-13 12:00:16 -04:00
Rolf Bjarne Kvinge 982ba3238d Include System.Collections.Generics.SortedSet in the mobile profile. Fixes #3827. 2012-03-13 12:38:04 +01:00
Rolf Bjarne Kvinge 537fdd06c2 Mono.Data.Sqlite: Add support for TIMESTAMP / UnixEpoch column. Fixes #638. 2012-03-13 12:38:03 +01:00
Rolf Bjarne Kvinge 765a04a438 Mono.Data.Sqlite: Fix type name comparison to compare the entire name, not just a substring. 2012-03-13 12:38:03 +01:00
Rodrigo Kumpera 120ef23972 Properly handle ASLR randomization of the main thread stack on darwin. 2012-03-12 19:51:05 -03:00
Rodrigo Kumpera e1a19266d4 Merge pull request #210 from symform/mono-2-10
Fixed a race condition in WebConnection that was causing it to throw NullReferenceException on Close/Dispose
2012-03-12 08:04:44 -07:00
NN 4e5e52a298 Make code behaving like .Net.
The original discussion is here:
https://bugzilla.novell.com/show_bug.cgi?id=689533
And this is the proposed patch:
https://bugzillafiles.novell.org/attachment.cgi?id=426501
2012-03-11 21:40:33 +01:00
Zoltan Varga d9d2965c29 Fix the previous patch. 2012-03-11 18:30:41 +01:00
Zoltan Varga e92c10fa70 Move the thread attach code for native-to-managed wrappers to method_to_ir (), instead of emitting it by hand for each architecture. Also make it save/restore the current domain. Fixes #3623. 2012-03-11 18:30:18 +01:00
Rodrigo Kumpera fb8e168214 Add new mono byte code for memory barriers 2012-03-11 18:21:31 +01:00
Marek Safar 3adb9e170d Fix sbyte/short parse of hexadecimal values. Fixes #981 2012-03-10 12:15:29 -05:00
Sebastien Pouliot daafc06b54 Tests from bug #3677 (works on master, fails in MonoTouch) 2012-03-10 11:21:08 -05:00
Zoltan Varga 721d15749a Add basic quoting support to MONO_ENV_OPTIONS. Fixes #792. 2012-03-10 16:44:54 +01:00
Gonzalo Paniagua Javier f1ffa65963 Add another default format
Patch by Tom Hindle.
	Fixes bug #3392.
2012-03-09 23:45:31 -05:00
Zoltan Varga 520065c164 Fix LLVM type mapping so classes and generic instances are mapped to the same type. 2012-03-09 00:09:13 +01:00
Rodrigo Kumpera fae1eca260 Under full-aot process the types of method arguments that are called from other methods. Fixes #3735.
* aot-compiler.c: If we call a sharable generic method that takes a parameter that
	isn't shareable we must include that type or we risk failing at runtime.

	Fixes #3735.
2012-03-08 19:43:08 -03:00
Gonzalo Paniagua Javier e040f44cb1 Initialize struct 2012-03-08 14:36:48 -05:00
Gonzalo Paniagua Javier 30399887c6 Just in case... 2012-03-08 14:36:47 -05:00
Gonzalo Paniagua Javier 1e3c3b8e01 Remove warning 2012-03-08 14:36:47 -05:00
Gonzalo Paniagua Javier 5e64449222 ReadTimeout and WriteTimeout
They were returning a 0 timeout when it should be Infinite.
2012-03-08 14:36:47 -05:00
Gonzalo Paniagua Javier bb82257c88 Fix multiple async accepts
Running multiple BeginAccepts or AcceptAsync at the same time on the
	same socket requires serialization.
	Fixes bug #3805.
2012-03-08 14:36:47 -05:00
Atsushi Eno 5843173415 Fix XLinq decimal value formatting to become invariant. Fixed bug #3634. 2012-03-08 09:21:38 -05:00
Miguel de Icaza 1653431720 Add iOS FileProtection attributes to the Connection String 2012-03-08 09:21:26 -05:00
Gonzalo Paniagua Javier b1994d8062 Fix rethrow of the interrupted exception
Fixes bug #2483.
2012-03-06 20:58:09 -05:00
Jonathan Pryor 3d2dd9849a [MonoPosixHelper] Allow MmapFlags.MAP_ANON use on OS X.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=3419

The problem is that OS X defines MAP_ANON but not MAP_ANONYMOUS, AND
MAP_ANON and MAP_ANONYMOUS have the same value. Furthermore,
create-native-map doesn't have any special support for constants with
the same value, so it emits the validation independently.

The result is that the following fails on OS X:

	$ csharp -r:Mono.Posix.dll
	csharp> int r;
	csharp> using Mono.Unix.Native;
	csharp> NativeConvert.TryFromMmapFlags(MmapFlags.MAP_ANONYMOUS, out r);
	false
	csharp> r;

The (hackish) fix is to provide MAP_ANONYMOUS on OS X, thus allowing
the existing validation logic to work as expected.
2012-03-06 11:39:40 -05:00
Jeremie Laval fb903e8283 Correct CancellationTokenSource locking. Fix #3756.
Conflicts:

	mcs/class/corlib/System.Threading/CancellationTokenSource.cs
2012-03-06 10:23:43 +00:00
Miguel de Icaza ebc7339be1 Revert the change to syslog message formatting, as JonP's code already does escaping in managed code, see: https://github.com/mono/mono/commit/f49164bf7658855390b2c19574b170f8728a99ff#commitcomment-1044747 2012-03-05 16:44:10 -05:00
Miguel de Icaza 3f3fb33fab Fix the previous patch 2012-03-05 16:42:56 -05:00
Miguel de Icaza 68af170e2e [registry] fix for #3632 2012-03-05 16:42:56 -05:00
Eberhard Beilharz 4c6c0e20d4 Xamarin-2938: Fix Screen.FromControl
We have to convert the location of the control to screen coordinates
so that we end up with the correct screen in a multi-monitor setup.
This patch fixes Screen.FromControl, Screen.FromHandle, and
Screen.GetWorkingArea.

Change-Id: I6c4fd65833d012e832d97d610c79abc792e57adf
2012-03-05 16:42:55 -05:00
Miguel de Icaza c084f978ff Backport fix for 2893 2012-03-05 16:42:55 -05:00
Gonzalo Paniagua Javier a4a87c8cab [HttpWebRequest] Support 4.0 Date property. 2012-03-04 23:07:10 -05:00
Gonzalo Paniagua Javier 0d1abfb610 2 fixes for NTLM authentication
-Set the correct flags when the domain is not set. This fixes
	authentication with an empty or null domain name.
	-Allow domain\user and domain/user as the user name and set domain and
	user accordingly.
2012-03-03 16:46:43 -05:00
Rodrigo Kumpera 02a2af110f Fix a mach race condition between a thread triggering a NRE and another aborting the former. 2012-03-02 15:09:01 -03:00
Jeremie Laval b33e723d66 Fix #3639
The search code was taking care of hash collision for different objects inside the collection but it didn't handle properly the case where the supplied search key has the same hash than a different object inside the collection.
2012-03-01 13:06:11 +01:00
Zoltan Varga a267f24095 Wrap exceptions thrown by property getters into TargetInvocationExceptions even when using the optimized getter delegates in PropertyInfo.GetValue (). Fixes #3690. 2012-02-29 23:52:54 +01:00
Marek Safar 2f94e74f3d Merge pull request #230 from linquize/branch_3c098eb0
Include all TDS collation mappings generated from CultureInfo
2012-02-29 00:28:49 -08:00
Gonzalo Paniagua Javier c8517d7fa5 Add MinimumLength when formatting 2012-02-29 01:39:28 -05:00
Jonathan Pryor e8c7245f02 [System.Data.Services.Client] Compile in string resources.
System.Data.Services.Client uses System.Resources for localization
purposes (even though only one language is provided...). Consequently,
to get _useful_ strings (read: error messages) out of
System.Data.Services.Client, System.Resources needs to be able to find
them, such that the following works:

	$ csharp -r:System.Data.Services.Client;
	Mono C# Shell, type "help;" for help

	Enter statements below.
	csharp> using System.Resources;
	csharp> using System.Data.Services.Client;
	csharp> var a = typeof(SendingRequestEventArgs).Assembly;
	csharp> var r = new ResourceManager("System.Data.Services.Client", a);
	csharp> r.GetString("AtomMaterializer_PropertyNotExpectedEntry");

If `r.GetString()` fails, it'll throw an exception instead of
returning a useful string, which is bad. Unfortunately, it failed.

To fix this, we use `resgen` to compile
Client/System.Data.Services.Client.txt into a .resources file and
compile the .resources file into the assembly with `gmcs -resource:`,
which allows the above `csharp` fragment to work w/o throwing (and
thus allows OData users to get useful, meaningful error messages).
2012-02-28 20:25:51 -05:00
Zoltan Varga aeddfd7be1 Increase generic trampoline sizes on amd64 to avoid an assertion introduced by 948f06a03f. 2012-02-28 18:54:31 +01:00
Linquize e8c16f5c2a Add all collations generated from CultureInfo.GetCultures(CultureTypes.AllCultures) 2012-02-28 23:38:24 +08:00
Zoltan Varga 3c098eb04f Add stack alignment checking to the amd64 trampolines and align the stack properly in the handler block trampoline. Fixes #2642. 2012-02-27 17:23:50 +01:00
Gonzalo Paniagua Javier 74ec9d9f0e DELETE can have a request stream
Fixes bug #3276.
2012-02-27 10:54:38 -05:00
Peter Johanson 68725d92b2 Fix Bug #658, allowing uri templates with no text preceding a wildcard. 2012-02-19 12:47:23 -05:00
Sebastien Pouliot 71625b8c65 merge 2012-02-17 13:27:21 -05:00
Sebastien Pouliot c4f072207f Add warning and unit tests about RegionInfo fields ordering. Fix for #3476 2012-02-16 20:46:51 -05:00
Sebastien Pouliot 0b709ededd Ensure match between native/managed fields representation so we retrieve the right values 2012-02-15 16:55:52 -05:00
Atsushi Eno fd5b65341b It seems I rather needed to edit Makefile, not Mono.CSharp.dll.sources. 2012-02-15 17:41:26 +09:00
Atsushi Eno dd52f53e14 Add Microsoft.CSharp.dll to monodroid build. 2012-02-15 14:51:43 +09:00
Atsushi Eno 33d298c365 add dlr part to monodroid build. 2012-02-14 12:47:20 +09:00
Gonzalo Paniagua Javier bb45dcf362 Fix race condition
Our synchronized Hashtable "set" method is not really locking...
2012-02-13 11:00:01 -05:00
Sebastien Pouliot 277d9a5498 Just like Flush catch more than IOException on Write overloads, e.g. UnauthorizedAccessException can occur too (ref: assistly #7431) 2012-02-13 10:48:56 -05:00
Jeffrey Stedfast a0888a74e9 Fixed System.Text.Encoding.GetEncoding (string name) to work for UTF-16LE. 2012-02-11 21:02:17 -05:00
Jérémie Laval 26d2e2b38e Fix AggregateException.GetBaseException behavior 2012-02-11 22:15:25 +01:00
Gonzalo Paniagua Javier f6c1bdaf1c Chunked read error reporting improvement
Reset the chunked read variables before reading the chunk size and
	provide a better error in case of a protocol problem.
2012-02-10 02:16:39 -05:00
Rolf Bjarne Kvinge 70a5c958bf Add an explicit ctor reference to a ctor used by reflection for MonoTouch. 2012-02-08 01:01:56 +01:00
Martin 98756a4400 Commit 6a9937d216 is not correct. WebClient.Proxy should return WebRequest.DefaultProxy if WebClient.Proxy has NOT been set before. 2012-02-05 11:57:29 -05:00
Martin f2f52e643a Fixes some naming conventions. 2012-02-05 11:57:14 -05:00
Martin 1e233bb9c1 Behaviour of using proxies in WebClient is different compared to .NET
(1) Consider the following example code:

	WebClient client=new WebClient();

If you examine the client.Proxy property when running this code in .NET you will see, that the Proxy property reflects the current system proxy settings. However, Mono initializes the Proxy property in OpenRead()

(2) Mono's implementation of the WebClient.Proxy property described in (1) has a disadvantage. To understand that, consider der following example code:

	WebClient client=new WebClient();

	client.Proxy=null;

Explicitely setting the Proxy property to null ensures that .NET does not use any proxies when calling further methods of the client object. My patch provides exactly this functionality for Mono's WebClient when using the http or ftp protocol. This functionality can be very interesting for a lot of scenarios.
2012-02-05 11:56:35 -05:00
Sebastien Pouliot c41a25b8eb Add WebClient.Proxy unit test 2012-02-05 11:56:17 -05:00
Jérémie Laval 00f3d0cc6e Rework Parallel.Invoke and add tests 2012-02-05 16:27:16 +01:00
Zoltan Varga 753b1e7e31 Fix Parallel.Invoke () with only one action. Fixes #3225. 2012-02-04 23:21:03 +01:00
Michal Srb 41b13429a4 Avoid NullReferenceException in Mono.Unix.UnixDriveInfo.GetDrives () when fs_file is null. Fixes #3219. 2012-02-04 15:09:36 +01:00
Rolf Bjarne Kvinge 16fca92c58 System.ServiceModel: Make FaultContractInfos available (and therefore deserialized correctly) in mobile profiles. Fixes #1437 and 2859. 2012-02-04 03:04:36 +01:00
Jérémie Laval 27d1f326ef Fix Task AttachedToParent behavior. Fix bug #2777 part1.
The problem was two folds. First, a parent task wasn't correctly waiting on the inner task continuations that were setup. Second, the way the Task parent field was re-used with a continuation collided with the parenting behavior of AttachedToParent (if the continuation was also created that way), the fix is to have two Task fields to differentiate between the two cases.
2012-02-03 15:42:26 +01:00
Jérémie Laval c285077b5e Fix RunSynchronously behavior with children Task. Fix bug #2777 part 2. 2012-02-03 15:40:01 +01:00
Rodrigo Kumpera 1dc4b77819 Use the bridge callback to speedup bridge object detection. 2012-02-02 18:32:18 -02:00
Rodrigo Kumpera ccfe8bdfdb The bridge callback now is per-class and not per-object. Introduce versioning to reduce the chance of breakage. 2012-02-02 18:30:04 -02:00
Rodrigo Kumpera 78f855037a Make more bits in the vtable available to the GC.
* class-internals.h (MonoVTable): There's a spare nimble after
	those one bits flag fields. We reserve those leftovers to our
	GCs to use.
2012-02-02 18:07:53 -02:00
Mark Probst feb8a124aa [sgen] Option for an allowance limit.
The metric for deciding when to trigger a major collection assumes
that there's unlimited memory, so it does, especially since it's
probably buggy and certainly not very smart, sometimes allow too much
allocation to happen.  This new option is a way to tell SGen where to
draw the line.  Note that memory will still be allocated, it's just
that once the limit is overstepped, major collections happen more
frequently to keep memory usage down.
2012-02-01 20:00:02 -02:00
Sebastien Pouliot 2af9b70055 Floating point numbers needs to be encoded using the invariant culture. Fix bug #3137 2012-01-30 18:44:41 -05:00
Rolf Bjarne Kvinge f178794cdd AOT: add support for calling pinvoke methods directly, instead of going through dlsym. 2012-01-30 14:46:54 +01:00
Rodrigo Kumpera c903915555 Guard against lazy initialization of idepth. 2012-01-29 13:02:04 -02:00
Rodrigo Kumpera e9493ca335 Last round of fullaot fixes for lazy init'ng supertypes. 2012-01-29 13:02:04 -02:00
Zoltan Varga ea60aab12f Disable some TLS fallback code on ppc as it does not work. Fixes #2717. 2012-01-28 18:00:28 +01:00
Zoltan Varga 096fce594c Fix infinite loop in TestDriver.cs when using the -v option. 2012-01-27 15:54:58 +01:00
Rodrigo Kumpera 52af8b7d5f Fix aot miscompilation due to the lazy supertypes initialization. 2012-01-26 17:27:35 -02:00
Zoltan Varga 770b7b9c4c Fix support for synchronized methods + ldftn. Fixes #3088. 2012-01-26 20:14:24 +01:00
Rodrigo Kumpera 3f97001899 Fix consumers of supertypes information to account for lazyness.
* class-internals.h (mono_class_has_parent): Convert this macro into
	an inline function that guards against non initialized supertypes info.

	Fix random breakage all over the place.
2012-01-25 14:14:03 -02:00
Zoltan Varga 3e7cd1f126 Fix the previous commit. 2012-01-24 06:52:17 +01:00
Zoltan Varga c1330622d6 Add a nunit-console4 script. Fixes #2156. 2012-01-24 06:49:38 +01:00
Zoltan Varga ea14d7909a Allow assemblies without AOT images in full-aot mode if they don't have any methods. 2012-01-24 03:06:24 +01:00
Rodrigo Kumpera 8a724d071c A regression test for bxc #795. 2012-01-23 23:44:26 -02:00
Rodrigo Kumpera f36e8fb25b Be lazy'er when setting up supertype information. Fixes bxc #795
* class.c (mono_class_setup_parent): We can't setup supertypes here
	since we might be initializing our parent as well, which will cause
	the current type to have broken values.

	Since we're lazier, we need to check for it in more places.

	Fixes bxc #795.
2012-01-23 23:34:35 -02:00
Rodrigo Kumpera 962f399b66 Lazily nit mono_class_setup_supertypes correctly. 2012-01-23 23:11:58 -02:00
Zoltan Varga eb37e977e3 Fix the setting of sp in mono_monoctx_to_sigctx () on arm. Fixes #2775. 2012-01-22 21:48:37 +01:00
Zoltan Varga 80bba25a4c Fix the build. 2012-01-22 12:01:10 +01:00
Zoltan Varga e4cf743462 Implement GetFolderPath(Environment.SpecialFolder.UserProfile) on unix. Fixes #2873. 2012-01-22 10:38:21 +01:00
Gonzalo Paniagua Javier 650bb6d628 Avoid warnigs.
This appears to fix #1885 on osx.
2012-01-21 03:49:54 +01:00
Zoltan Varga 66d1911dd9 Fix a crash if a BeginInvoke is not found by the AOT compiler. Fixes #2996. 2012-01-21 01:09:48 +01:00
Zoltan Varga c22a66450a Fix an out-of-bounds write in the llvm backend initialization code. 2012-01-20 18:05:31 +01:00
Kevin Houlihan 597bbeb80e Change to ensure that correct BufferHeight and BufferWidth are returned after terminal resize.
Console.BufferHeight and Console.BufferWidth were returning incorrect values after a terminal window resize on Linux (bug 874). I added CheckWindowDimensions calls to the getters of these properties to ensure that the values are up to date.
2012-01-20 06:37:12 +01:00
Zoltan Varga bded18f3d3 Fix Type.GetType () when an assembly resolver is used without a type resolver. Fixes #644. 2012-01-20 06:33:08 +01:00
Jonathan Pryor 51e38b504b [System.ServiceModel] Don't try to deserialize void messages.
Fixes: http://bugzilla.xamarin.com/show_bug.cgi?id=1164

The breakage reported in #1164 was caused by commit 106fdeb4, which
fixed bxc206. The problem is that in fixing bxc206, response messages
of a type having a MessageContractAttribute custom attribute were
changed to have a `void` return type, according to the
MessageDescription's Body.ReturnValue.Type property.

This fix is correct, in that it's what .NET does, but it broke XML
deserialization which expected the "actual" return type to exist, not
`void`.

Case in point: the added IService1.EndJSMGetDatabases() method will
have a MessageDescription with a Body.ReturnValue.Type=typeof(void).
The problem is that deserializing this message will fail:

	System.Runtime.Serialization.SerializationException: Deserializing
	type 'System.Void'. Expecting state 'EndElement'. Encountered state
	'Text' with name '' with namespace ''.

Obviously this is not good. ;-)

The fix is simple: don't use the MessageDescription's ReturnValue if
it's `typeof(void)`.

There are two added wrinkles:

 1. Writing a test case for the above.

 2. The test case broke with another error: a NRE within
    BaseMessagesFormatter.MessageObjectToParts(). This is because
    when ContractDescriptionGenerator.GetMessage() sets the
    ReturnValue for a response message, it doesn't set
    MessagePartDescription.MemberInfo.
    BaseMessagesFormatter.MessageObjectToParts(), meanwhile, was
    checking the ReturnValue's MemberInfo...which was null.

    Add a null check here so that the actual bug can be tested.
2012-01-20 00:20:13 -05:00
Jonathan Pryor e35c4d694b [System.ServiceModel] Speed up Bug652331_2Test test execution.
For reasons I currently can't explain, the Service1Client test type
appears to support having only one async operation "in flight" at a
time. As a result of this, calling multiple Async methods on the
Service1Client instance, as was done previously, would result in not
all of the event handlers being invoked, and the test timing out
after 60s instead of exiting quickly because all event handlers had
been raised.

I don't understand enough of WCF & this code to say why Service1Client
can have only one async operation in progress at once, but making this
change so that each async operation operates on a separate instance
speeds up the Bug652331_2Test execution from 60s to 5s.
2012-01-20 00:20:05 -05:00
Zoltan Varga 19e67c0dc6 Avoid passing a Module to the GetSigHelper methods (), which can happen if an ILBuilder is used from a dynamic method. Fixes #1900. 2012-01-20 05:57:09 +01:00
Zoltan Varga 37db673795 Fix -O=shared support in mono_delegate_ctor (). 2012-01-20 02:35:49 +01:00
Gonzalo Paniagua Javier 363d32c7dc UploadFile+PUT does not wrap the file in a multipart envelope
When using PUT as the method to upload a file using WebClient, the file
	is uploaded as-is, without the multipart boundaries, headers,...
	Fixes bug #2970.
2012-01-19 12:34:52 -05:00
Miguel de Icaza 33ce03c03b Fix my last commit 2012-01-19 00:09:54 -05:00
Miguel de Icaza 58ab8f2f10 Prevent race conditions for this cached variable, by using a temporary variable, fixes #2952 2012-01-18 11:19:25 -05:00
Rolf Bjarne Kvinge f6252f4659 DateTime.FromFileTimeUtc should return a DateTime with DateTimeKind.Utc. Fixes #2936. 2012-01-18 00:45:34 +01:00
Rolf Bjarne Kvinge bd747ae200 System.Data: DataTable.ImportRow should be able to handle columns with different types. Fixes #2926. 2012-01-17 22:16:18 +01:00
Rolf Bjarne Kvinge 5092bb1023 threadpool: Disable the gc for threadpool threads while waiting for work. Fixes #2619 2012-01-17 17:22:39 +01:00
Rolf Bjarne Kvinge b371946d24 sgen: Add support for disabling the gc for a thread 2012-01-17 17:22:35 +01:00
Zoltan Varga 719aac656e Avoid passing methodspec tokens to mono_aot_get_method_from_token (). 2012-01-16 23:16:57 +01:00
Zoltan Varga 21c1183934 Fix delegate invokes in shared mode. 2012-01-16 23:16:11 +01:00
Miguel de Icaza 9bca0865a2 Implements TimeZoneInfo.Local for Windows
Fixes #2791, contributed by Jonathan Shore <[email protected]>
2012-01-15 15:10:55 -05:00
Tristan Caulfield 019ede8079 * fix tasklets crash on x86 2012-01-14 19:04:51 +01:00
Zoltan Varga b6c6e42ba3 Respect the SizeConst parameter to UnmanagedType.ByValTStr. Fixes #2567. 2012-01-14 18:58:46 +01:00
Miguel de Icaza e6b0567e92 Apply fix for 2839 from Michael Mudge 2012-01-13 18:59:10 -05:00
Miguel de Icaza 6ffbd41bf3 Remove the limit on the buffer size, the spec actually calls for supporting messages of up to 0xffffffff bytes in size 2012-01-13 16:49:48 -05:00
Rolf Bjarne Kvinge 3610139238 sgen: report LOS objects pinned by interior pointers as roots to the profiler 2012-01-13 14:54:11 +01:00
Sebastien Pouliot 50268828dd Bring TaskExtensions to the mobile profile. Fix bug #2769 2012-01-12 16:35:57 -05:00
Sebastien Pouliot f49c83779d Do not build a managed X509Chain in MonoTouch and simply ask iOS about the chain. Other SSL related checks about the leaf certificate are still required/done. Avoid many internal exceptions since Mono's machine store does not exists inside iOS devices (note: already part of MonoTouch since 4.3) 2012-01-12 15:48:11 -05:00
Gonzalo Paniagua Javier d7465a722f Heavy IO load might cause obj to be NULL
Fixes novell bug #704264.
2012-01-12 12:05:52 -05:00
Zoltan Varga d3a95fa616 Implement mono_gc_set_stack_end () for Boehm/null GC to remove the #ifdef HAVE_SGEN_GC dependency from driver.c. 2012-01-12 00:09:04 +01:00
Rolf Bjarne Kvinge 575a460fc3 Set the end of the stack for the main thread
This helps the GC by minimizing the stack area to scan, while at the
same time reducing the chance of false positives when scanning the stack
for managed objects since we know no managed object can live on the
stack above the main function. This improves memory usage for the test
case in #2619 quite much (but that particular bug isn't fixed by this).
2012-01-12 00:08:59 +01:00
Miguel de Icaza ce3fc24bc2 Fix x #2191
From Federico Di Gregorio <[email protected]>, allow leading sign
2012-01-11 16:08:55 -05:00
Zoltan Varga ecd2f2d1b8 Disable shared mode for non-corlib and inflated methods since appdomain unloads can invalidate them. 2012-01-11 21:40:32 +01:00
Rodrigo Kumpera 8e8b2f3392 Fix enter/exit critical region visibility. 2012-01-11 13:03:39 -02:00
Rodrigo Kumpera 7c8bf76693 Aleviate fencing on critical regions and allocation.
* sgen-gc.c: Critical regions only requires proper visibility
	on the enter side. On the exit side all we need to make sure is
	ordering.

	* sgen-gc.c: Allocation don't need to have all stores imediatelly
	visible, only properly ordered when it happens.
2012-01-11 13:03:39 -02:00
Rodrigo Kumpera d4956e2f14 Storing the vtable pointer on the object header requires release semantics 2012-01-11 13:03:38 -02:00
Rodrigo Kumpera acc499e32d Replace an explicit memory barrier with mono_atomic_store_release. Thanks from x86-land. 2012-01-11 13:03:38 -02:00
Rodrigo Kumpera ce8a66c3f3 Complete acquire/release ops. Make acquire/release have ECMA sematics. 2012-01-11 13:03:37 -02:00
Rodrigo Kumpera c13b7ea6c1 Fix release semantics to make sure it flushes the store buffer on ia32/amd64.
* mono-memory-model.h: Release semantics must cause the store buffer
	to be flushed on x86. Add variants of atomic_store that only provides
	sequencing with previous stores.
2012-01-11 13:03:36 -02:00
Rodrigo Kumpera a57bf2d262 Extract the code to emit a memory barrier. Add a memory_barrier_kind field to MonoInst::backend. 2012-01-11 13:03:35 -02:00
Rodrigo Kumpera 8d8b6c57e2 Add the basics for memory model aware fencing.
* mono-memory-model.h: New header that exports the basics
	to will enable us to apply fencing only on archs that need it.
2012-01-11 13:03:35 -02:00
Zoltan Varga 28a571c022 Don't compile dynamic methods in shared mode. 2012-01-10 22:54:26 +01:00
Gonzalo Paniagua Javier 81061e629a Use the right socket for the data stream
This fixes bug active data connections.
	Fixes xamarin bug #1294.
2012-01-10 16:35:12 -05:00
Rodrigo Kumpera 6acec36426 Fix the iteraction between bridge and major evacuation on a minor overflow major collection.
* sgen-gc.c: The bridge code is split into 3 steps, one done when we collect finalizable objects,
	one done before we restart the world and the last right after.

	The first step can be executed twice if an overflow major collection happens. We handled this
	situation by avoiding duplicates in the registration code.

	This works fine except if a registered bridge object is moved by the second collection, which can
	happen when defragmentation kicks in.

	Instead of fixing those pointers, which is quite tricky, we move hash building to happen in the second
	step and discard all elements on the registered bridge array before each collection.  Since all bridges
	collected by the first collection will be collected again on the second, we can do it.
2012-01-10 19:17:25 -02:00
Zoltan Varga fd984e3fe6 Fix an IndexOutOfBounds exception in the sdb packet writer. 2012-01-10 22:16:39 +01:00
Gonzalo Paniagua Javier 5b344f2b89 Don't send the buffered request until GetResponse is called
Allows changing some header values after writing the request until the
	call to (Begin)GetResponse()
2012-01-10 15:59:57 -05:00
Zoltan Varga 66c3f85e2c Add memory barriers to interlocked operations on ARM, since the runtime code depends on it. 2012-01-10 17:43:19 +01:00
Zoltan Varga 997cff0cd7 Allow enum->basetype argument conversion in CreateDelegate(). Fixes #794. 2012-01-07 00:41:37 +01:00
Zoltan Varga b487294279 Call mono_create_jit_trampoline_in_domain () in mono_resolve_patch_target () so shared methods don't end up calling trampolines in another domain. 2012-01-06 22:36:01 +01:00
Zoltan Varga 2f985da336 Fix stack alignment calculation in mono_arch_setup_async_callback () on amd64. 2012-01-06 03:59:47 +01:00
Rodrigo Kumpera a987217a4e Avoid doing IL lookup in the native crash handler. 2012-01-05 21:32:46 -02:00
Rodrigo Kumpera eb601dd083 Add regression test for bxc #1147. 2012-01-05 09:50:54 -02:00
Rodrigo Kumpera 0a7a137703 Properly initialize a rgctx template. Fixes bxc #1147.
* mini-generic-sharing.c (mono_class_get_runtime_generic_context_template):
	When initializing a new rgctx template, we fill it with its parent
	slots.

	When the parent is a non generic class extending a generic class,
	has multiple templates and, finally, the first template has more
	slots that the rest, we would fill more entries than we should
	and later cause an assertion when trying to use those extra slots.

	To fix that we handle it just like a generic parent class and
	count the number of slots each template has.

Fixes bxc #1147.
2012-01-05 09:50:53 -02:00
Jonathan Pryor 84b4051951 [System.ServiceModel.Web] Fix JSON array deserialization for NET_2_1
Fixes DataContractJsonSerializerTest.DeserializeArray() in the NET_2_1
profile, which is also the MonoTouch and Mono for Android base.

The problem is JsonSerializationReader.DeserializeGenericCollection:

	Type listType = collectionType.IsArray ? typeof (List<>).MakeGenericType (elementType) : null;
	var c = (IEnumerable) TypeMap.CreateInstance (listType ??  collectionType);
	// `c` is a List<T>
	...
	ret = collectionType.IsArray ? ((ArrayList) c).ToArray (elementType) : c;
	// yet we cast `c` to an ArrayList?!

This dies with an InvalidCastException on Mono for Android/MonoTouch,
as List<elementType> is not an ArrayList. The solution is to further
separate out the code paths, ensuring that NET_2_1 avoides the cast.
2012-01-04 22:33:35 -05:00
Jonathan Pryor 69eb3f4713 [System.ServiceModel.Web] Support null as value for DateTime? field.
Fixes assistly #5863.
2012-01-04 16:35:42 -05:00
Sebastien Pouliot 2e069b5e19 backport CryptoConfig changes/fixes from master 2012-01-04 11:30:50 -05:00
Rodrigo Kumpera 79a17fef30 Checking if a type is a reference must be gsharing aware.
*  mini-generic-sharing.c: Add mini_type_is_reference
	that returns true for VAR and MVAR if compiling under
	gsharing.

	* method-to-ir.c: Replace usage of mono_type_is_reference
	with mini_type_is_reference.

	* mini-gc.c: Ditto.

	* mini.c: Ditto.

	With the old behavior, the JIT could interpret a (M)VAR
	variable and not been a reference type. This is an issue
	for sgen as we could forgot to emit some write barriers
	or generate the proper stack map.
2012-01-04 05:45:07 -02:00
Jonathan Pryor a7c3740f5f Merge commit a04edc9d from mono/master
Clone input collection for ObservableCollection<T>. Fixes #2169

The commit has been modified from a04edc9d to remove the added unit
tests, as these cause merge conflicts with the mono-2-10 branch (as
the mcs/class/System/Test/... tests don't exist in mono-2-10).
2012-01-03 22:06:30 -05:00
symform 2ddb080ec5 Fixed a race in System.Net.WebConnection that was causing it to throw NullReferenceException on Close/Dispose 2012-01-03 17:15:06 -08:00
Miguel de Icaza 6799a27a6b XmlSerializer: Add support to serialize nullable types when the XmlElement has explicity set the DataType
The existing code had a special code path for handling nullables that
ignored the DataType component.

This patch splits the nullable test away, allows the specified XmlDataType
to be probed and then performs the standard type lookup mechanism.

This allows this:

        [XmlElement ("MyNullableTime", DataType="time", IsNullable=true)]
        DateTime? myTime;

To be serialized as a "time" instead of a "datetime".

Fixes bug #329
2012-01-03 19:38:45 -05:00
Miguel de Icaza ac4d41c3ee Allow trailing commas on Json objects 2012-01-03 19:38:31 -05:00
Zoltan Varga 8701ca9df5 Initialize the out arguments at the beginning of mono_lookup_pinvoke_call (). 2012-01-03 20:41:31 +01:00
Rodrigo Kumpera 26877fb8d4 Properly align calls to mono_jit_thread_attach from wrappers. Fix pinvoke3 OSX with -O2. 2012-01-03 18:00:40 +01:00
Miguel de Icaza 65a7f84678 Fix history navigation 2011-12-26 08:25:52 -05:00
Zoltan Varga 4be815a64b Allow the placement of breakpoints in wrappers using --break. 2011-12-25 15:09:27 +01:00
Zoltan Varga 550c5a630e Fix localloc on MIPS. 2011-12-24 14:35:01 +01:00
Miguel de Icaza e0c41f35c2 Fix move-forward-word by also considering symbols as punctuations (before we could not move-forward 'a>b') 2011-12-22 19:35:37 -05:00
Sebastien Pouliot 0bf1517c97 Do not add the Create flag when ReadOnly is used. Fix http://stackoverflow.com/q/8602726/220643 2011-12-22 10:16:56 -05:00
Jeffrey Stedfast aed10e3f8d [MSBuild.Tasks] Backport other fixes for RemoveDir from master. 2011-12-20 17:37:06 -05:00
Jeffrey Stedfast 9f32d73ebc [MSBuild.Tasks] Fixed RemoveDir to be recursive.
Fix for bug #2576.
2011-12-20 17:31:43 -05:00
Rolf Bjarne Kvinge d30b7de6ca Fix gdb backtraces on OSX.
We can't redirect output from gdb: since gdb will suspend us we won't
be able to read from the pipe we've redirected output to, and we'll
end up deadlocking if gdb outputs a lot of data (see bug #2548).
2011-12-20 11:21:44 +01:00
Rolf Bjarne Kvinge fed99b7ac7 sgen: Don't report all pinned roots as stack roots. 2011-12-20 02:29:37 +01:00
Sebastien Pouliot 083c82f1cc Provide total, not the number of bytes read, in DownloadData. Fix bug #2482 2011-12-19 14:12:18 -05:00
Rolf Bjarne Kvinge 6922ed8629 Disable gdb backtracing until #2548 has been fixed. 2011-12-19 18:52:35 +01:00
Zoltan Varga cd3c79413a Fix List.LastIndexOf () on empty lists. Fixes #2558. 2011-12-19 12:21:58 +01:00
Duncan Mak bc36fbe193 Bump version number to 2.10.8.1. 2011-12-16 11:48:30 -05:00
Rodrigo Kumpera 53d8062782 Fix sgen 2011-12-16 12:03:18 -02:00
Duncan Mak 44983be8f2 Fix typo from commit b4c110c. 2011-12-14 15:51:15 -05:00
Duncan Mak 015444e23d Bump version number to 2.10.8 2011-12-14 14:07:23 -05:00
Rolf Bjarne Kvinge f4433694ac [System.Web.Services] Make sure we don't keep results forever when doing async requests. Fixes #2473. 2011-12-13 23:12:32 +01:00
Gonzalo Paniagua Javier a02076baf6 Fix MAC address for Mac/iOS
The position of the first byte to copy was wrong.
	Fixes bug #2012.
2011-12-13 10:27:57 -05:00
Marek Safar 0a3a379ee0 Fixes NRE when checking most specific type of default parameters. Fixes #2465 2011-12-13 10:10:18 +00:00
Jeffrey Stedfast fbbe941b69 [GetTimeZoneData icall] Fixed logic for zones where there is only a start date
Thanks to Kirill for this patch.

Bug #2223.
2011-12-09 11:57:10 -05:00
Rodrigo Kumpera 61963ca6b1 Fix another case where bridge would not be triggered. 2011-12-08 16:16:33 -02:00
Paolo Molaro 50cc972397 Do the multiplication/division with floating point numbers in time calculations on win32. 2011-12-08 10:01:10 +01:00
Rodrigo Kumpera 340361ff91 Fix severe breakage of sgen bridge code. 2nd and 3rd step where not been called anymore. 2011-12-07 21:12:01 -02:00
Rodrigo Kumpera de6a0113fb Avoid an assert in bridge code when doing a major collection due to minor overflow. Fixes bxc #2349 and bxc #2091.
* sgen-bridge.c:
	* sgen-gc.c: After we split bridge processing in two, one step with world stopped and
	another with world running, we introduced the following regression:

	A minor collection starts and find an young bridge object ready to be processed.
	Major heap overflows and a major GC is triggered. The object mentioned above will
	remain collectible and will be queued for processing again.
	Since we do the first step in finish_gray_stack, it will be done twice in the above
	scenario. This will cause an assertion due to duplicate entries in the hashtable.

	The solution is to split the step that is performed with world stopped into another two.
	One that happens during collections, that can be done multiple times per duty cycle and
	another one that is done only once before we restart the world.

	This split has the minor advantage of reducing duplicated work for the dfs1 step. Nothing big
	as this is one of the fastest steps.
2011-12-07 15:25:12 -02:00
Rodrigo Kumpera 636f9ec0b9 Remove some dead code 2011-12-07 15:22:52 -02:00
Paolo Molaro e5e8c141c5 Fix overflow in the win32 monotonic time (xambug #183). 2011-12-07 15:05:00 +01:00
Rodrigo Kumpera 764f9cbd32 Use mono-tls for the current domain.
* domain.c: Use mono-tls for the current domain variable.
	Sgen depends on this so it has to be lock free and the
	io-layer version is not.

	Fixes bxc #2326
2011-12-06 09:12:48 -02:00
Rodrigo Kumpera a96b9dd614 Move current thread to use mono-tls. 2011-12-06 01:57:52 -02:00
Rodrigo Kumpera b4c110c021 Backport utils/mono-tls.h. 2011-12-06 01:57:51 -02:00
Duncan Mak 1f505f2ebb Add TimeZoneInfo.MonoTouch.cs so that it's included in dist 2011-12-05 20:28:03 -05:00
Zoltan Varga 3e62b6e207 Fix infinite recursion introduced by the previous patch. 2011-12-05 06:01:06 +01:00
Zoltan Varga 83e5c48472 AOT the cctor of generic classes which are referenced by SFLDA patches and superclasses of generic instances. Fixes #2155 2011-12-05 05:53:10 +01:00
Duncan Mak abc05b767c Bump to 2.10.7 2011-12-02 15:26:04 -05:00
Jb Evain 7019e2b39f Test for assignability of arrays to generic interfaces. Fixes #2304. 2011-12-02 16:46:09 +01:00
Paolo Molaro 137efe9736 Fixed complex value type scan (xmarin bug#228). 2011-12-01 17:53:52 +01:00
Marek Safar 4752df3669 Fix Array::Contains for null items via ICollection<T>. Fixes #2260
Conflicts:

	mcs/class/corlib/System/Array.cs
2011-11-30 13:52:58 +00:00
Sebastien Pouliot a2d3a480e9 Ensure that [Parameterized]ThreadStart code is always wrapped in a NSAutoreleasePool for MonoTouch. Fix bug #1999 2011-11-29 19:56:00 -05:00
Jeffrey Stedfast e79c9e9135 [monodoc] Removed debug spew 2011-11-29 16:14:06 -05:00
Miguel de Icaza bd511fa11e Fix the build, add declaration for SeqPoint 2011-11-28 04:38:37 -05:00
Zoltan Varga f8539f3cf6 Add a heuristic to insert_breakpoint () to avoid 'Unable to insert breakpoint' errors in some cases, since the set of IL offsets in the debug info doesn't completely match what the JIT generates. Fixes #407. 2011-11-26 18:09:17 +01:00
Zoltan Varga 614da57287 Save the stack space used by arguments into MonoJitInfo to avoid calling mono_arch_get_arg_info () during stack walking, since it is not signal safe. Fixes #2190. 2011-11-24 20:06:33 +01:00
Miguel de Icaza c8778b1133 Extend JsonSerializerReader to support nullables and parse a wider range of Date formats, fixes x#163 2011-11-24 01:32:05 -05:00
Zoltan Varga f3692b8819 Always free _WapiFileShare entries using _wapi_free_share_info (), otherwise zeroed out entries remain in the hash table when shared handles are disabled. Fixes #2170. 2011-11-24 02:38:49 +01:00
Rodrigo Kumpera ae25c90d61 Correctly calculate the number of cards to be marked.
* sgen-cardtable.c (sgen_card_table_mark_range): The number of
	pages to be marked must be correctly calculated to avoid the case
	when the in-card offset of the start address is bigger than
	of the end address and cause the last card to be skipped.

	Fixes #1917
2011-11-23 20:56:59 -02:00
Zoltan Varga ff47ddc6db Fix a crash introduced by 64d35e3940. Fixes #2150. 2011-11-22 23:00:21 +01:00
Rodrigo Kumpera 88ac3e5d4d Scan all ephemeron arrays during nursery collections.
* sgen-gc.c (mark_ephemerons_in_range): All ephemeron arrays
	must be scanned during a nursery collection since we ignore
	them during remset processing for a good reason.

	In the future we should use cardtable information to avoid
	scanning the whole thing.

	Fixes bxc #1175.
2011-11-22 17:25:43 -02:00
Neale Ferguson 9746e8d9f8 Implement serialization 2011-11-22 10:12:41 -05:00
Jonathan Pryor 10bcc0d354 [MonoDroid] Only alias stdout/stderr on Android devices.
Mono for Android uses Mono 2.10 + smcs to build code, which thus uses
an smcs built against the Mono for Android profile assemblies, which
would thus be built with MONODROID defined. Thus (understandably) dies
at runtime with a DllNotFoundException, as liblog.so can't be found.

Fix smcs.
2011-11-21 18:46:13 -05:00
Jonathan Pryor cf3562d2c8 [MonoDroid] Fix the libmono build.
7e49d08a nee 2763aae9c doesn't build because <fcntl.h> is missing:

	mono/utils/mono-proclib.c:517: error: 'O_RDONLY' undeclared (first use in this function

Fix the build.
2011-11-21 12:53:46 -05:00
Jonathan Pryor 2388926d50 [corlib] On Android, alias stdout/stderr to logcat.
In Mono for Android, stdout and stderr (file descriptors 1 and 2) are
only visible when debugging within MonoDevelop and/or Visual Studio,
which is rather annoying.

This was changed in Mono for Android 1.9.2, by using Console.SetOut()
and Console.SetError() to send stdout/stderr message to both
stdout/stderr and to the Android Debug Log (`adb logcat`), allowing
e.g. Console.WriteLine() output to be viewed outside of a debugger.

Problem: in order to capture user-generated messages at their earliest
point, Console.SetOut()/etc. must be called at the earliest point in
Mono for Android initialization, even if Console.WriteLine() is never
used. Worse, this adds ~180ms of startup overhead on a Nexus One.

The fix here is to move the std*/logcat duplication logic into
mscorlib.dll, so that we can configure things within the
System.Console static constructor. This moves the initialization
penalty onto users of System.Console (instead of all users).
2011-11-21 09:30:59 -05:00
Zoltan Varga d6be15f97b Don't allow compiling with stock LLVM versions, only the Mono LLVM repo at https://github.com/mono/llvm is supported. 2011-11-20 20:17:03 +01:00
Zoltan Varga ad8e7c929f Free debug info for dynamic methods by storing it in malloc-ed memory instead of the normal debugger tables. Fixes #731579. 2011-11-20 14:10:20 +01:00
Rolf Bjarne Kvinge 1638105782 [System.Data] Fix sorting in DataView when changing sort value/default sort several times. 2011-11-16 16:01:38 -05:00
Jérémie Laval ad939942b5 Fix previous commit 2011-11-16 13:21:46 -05:00
Jérémie Laval e2110645f1 [MonoDroid] Query hardware CPU count for Environment.ProcessorCount 2011-11-16 11:18:38 -05:00
Rodrigo Kumpera 55f3721a38 Add JIT counters to the local set of counters we support. 2011-11-15 21:41:25 -02:00
Alan McGovern 82d9fb288c [io-layer] Use lstat as a fallback for stat in SetFileAttributes
Make SetFileAttributes consistent with GetFileAttributes - if
stat fails and ENOENT try to use lstat in case it's a dangling
symlink.
2011-11-11 16:55:41 +00:00
Neale Ferguson 9196c64c2a Fixes bug 1916 - incorrect appending of string to buffer when remaining buffer size is less than string size. 2011-11-10 18:42:33 -05:00
Jérémie Laval 3dfc36e4ac Add missing Task_T_Test file 2011-11-10 23:37:38 +01:00
Miguel de Icaza 044461a63b Add locking around the ServiceModel.Logger, fixes a race reported on the mono-devel list 2011-11-09 23:14:49 -05:00
Rolf Bjarne Kvinge fd05675b35 Log profiler: fix comment typo 2011-11-09 00:15:48 +01:00
Sebastien Pouliot 2e9eca05b9 fix typo in monotouch build 2011-11-08 15:57:34 -05:00
Zoltan Varga eefdcf1d3a Fix profiler build if boehm is disabled. 2011-11-08 17:47:16 +01:00
Sebastien Pouliot 8546da29ca Workaround AOT limitation for bug #1443. Patch by Rodrigo Kumpera 2011-11-08 07:58:04 -05:00
Sebastien Pouliot 793bbb9a87 MonoTouch specific initialization for TimeZone (devices). Fix bug #1790 2011-11-08 07:58:04 -05:00
Jérémie Laval 5ff0b3b636 Import TPL unit test from master 2011-11-07 19:05:14 +01:00
Jérémie Laval 51eb841a56 Import TPL changes from master 2011-11-07 18:20:33 +01:00
Rodrigo Kumpera c3026122e9 Fix marshaling of Win32_IN6_ADDR. 2011-11-05 14:15:59 -02:00
Robert Jordan 6bf88caf77 [Web] Fix obvious typo in DELETE FROM WHERE statement. 2011-11-05 14:47:33 +01:00
Zoltan Varga 8b336154f7 Avoid adding a ref in OpenProcess (), it is already added in _wapi_search_handle (). Fixes #1682. 2011-11-04 18:15:40 +01:00
Zoltan Varga 9ecf360a2b Fix a crash if a profiler is not found. Fixes #1855. 2011-11-04 16:53:56 +01:00
Sebastien Pouliot 9c72742bf8 OSX and iOS does not support CLOCK_MONOTONIC so we use mach_timebase_info instead. Fix bug #1366 2011-11-04 11:14:15 -04:00
Jeremie Laval 5faf9e26c8 Add RwWrite flag to status check when already owning upgradeable lock. Fix #802. 2011-11-04 01:17:37 +01:00
Rodrigo Kumpera 6bc4446f02 Implement the icalls needed by the new mobile mmap code. 2011-11-03 17:39:59 -02:00
Rodrigo Kumpera 32942d4014 Implement a mobile ready version of memory mapped files. 2011-11-03 17:39:58 -02:00
Rodrigo Kumpera 66c0b04951 Move all Mono.Unix deps into a single place and put a skeleton of MOBILE support for mmap'd files. 2011-11-03 17:39:58 -02:00
alexrp 7cbff8d169 Fix call to mono_sgen_gc_unlock () in mono_gc_toggleref_add (). 2011-11-03 14:39:45 +01:00
Zoltan Varga a58017ca8e Fix a crash which happens when an inlined method ends with a throw inside a branch, i.e. the return value is not on one branch, and not on the other. Fixes #1835. 2011-11-02 22:54:33 +01:00
Rolf Bjarne Kvinge 6efa57b2c2 [Mono.Data.Sqlite] Use a prebuilt resources file like Managed.Windows.Forms does.
This makes it possible to build the monotouch profile, since generating the resources
file requires a System.Windows.Forms.dll, which monotouch doesn't have.
2011-11-02 12:13:38 +01:00
Zoltan Varga 6373d04e93 Delete unused link.h include 2011-11-01 20:57:26 +01:00
Jeremie Laval b8cd87e608 Set success boolean in all cases and avoid state masking. Fix #124 2011-11-01 16:30:37 +01:00
Rodrigo Kumpera 9fa7633b1f publish the same events as pthread_stop_world 2011-11-01 10:20:59 -02:00
Rodrigo Kumpera 8ea6fd8ac5 Implement new toggleref machinery for sgen.
* sgen-toggleref.c: GC backed toggleref machinery. This enables
	embedders to support toggleref style of external memory management
	without hooking up to the host retain/release machinery.

	The API export two entry points. The first let the caller register
	a callback with sgen that decides the state of a given object, by
	probably inspecting its native state. The second allows registration
	of objects with the toggleref machinery.

	The idea of toggleref is that we keep an external reference to an object
	and it can be  either a strong or weak reference. We use a weak reference
	when the external peer has no interest into the object and a strong otherwise.
2011-10-26 15:16:29 -02:00
Rodrigo Kumpera 29bc8d9b9c Export a bunch of sgen functions for internal usage. 2011-10-26 14:25:41 -02:00
Rolf Bjarne Kvinge d1df969755 Log profiler: ensure the size we pass to getsockname is initalized correctly. 2011-10-26 15:24:11 +02:00
Rolf Bjarne Kvinge 33e0667472 Log profiler: flush file after writing to it. 2011-10-26 15:22:36 +02:00
Rolf Bjarne Kvinge 2ee0c254a4 Log profiler: add support for writing to an existing file descriptor. 2011-10-26 15:02:49 +02:00
Rolf Bjarne Kvinge 5ddf92f33c Profiler: add support embedded profilers whose entry point ends with _<profiler name>. 2011-10-26 14:20:44 +02:00
Lluis Sanchez 4960cd6133 [System.Xml] Fix handling of XmlSchemaForm when importing elements
When the schema for is not explicitly set for an element, get the default form specified in the schema, and use 'unqualified' if there is no other default. This fixes bug #41.
2011-10-26 11:29:32 +02:00
Atsushi Eno dd1a9c331a Fix NET_2_1 builds. 2011-10-26 00:36:30 +09:00
Rolf Bjarne Kvinge 352bb2461b When providing stack trace for a crash make sure we attach to the crashed process, not the forked process that will become gdb. 2011-10-24 22:38:22 +02:00
Miguel de Icaza 4ef6555a3a Remove the exit code so that we can get a little bit further on MacOS X 2011-10-24 12:53:34 -04:00
Atsushi Eno 1e25dd1757 Give prefix "i" for xsi:nil. Patch by Alexander Riman, fixes pt.2 of #1198. 2011-10-24 23:53:59 +09:00
Miguel de Icaza 995a774521 Patch from Mario Kosmiskas for Bug 1460: add support for Path.GetFileName to work with MONO_IOMAP 2011-10-22 21:09:30 -04:00
Miguel de Icaza 4aeb0b7347 Fix from github.com/sehe for passing the command line arguments to the OnStart method 2011-10-22 09:58:57 -04:00
Miguel de Icaza 0e2108e5e0 Make this build on the MOBILE profile 2011-10-21 11:49:49 -04:00
Marek Safar 3f246aa0b2 Fix VolatileRead(uint&), VolatileWrite(uint&,uint) to use correct word size 2011-10-19 15:38:13 +01:00
Sebastien Pouliot 0222d30eab Ensure private key flow from the mono store into the X509Certificate2 instance. Patch from bug #1201 2011-10-18 15:50:34 -04:00
Alan McGovern 35c0bb794e [WindowsBase] Add better support for Default/Override content_types
System.IO.Packaging already had full support for parsing [Content_Types].xml
if it contained both <Override> and <Default> nodes when specifying content
types for files. However we had taken a shortcut before by explicitly writing
the content type of each file using an <Override> attribute for every file. We
now properly write a <Default> element and only use <Override> attributes when
required.
2011-10-18 11:43:14 +01:00
Jérémie Laval d12e49a9b3 [WindowsBase] Don't treat special file [Content-Types].xml as a part, ends up as a duplicate when writing back a package 2011-10-18 00:50:49 +01:00
Alan McGovern 97426e608b [System.IO.Packaging] Fix some dispose related issues
Ensure we can call dispose multiple times without blowing up. Also
ensure that we do not close streams which are passed in by the user.
We should only close streams which are implicitly created by the API.
This is a modification of the patch proposed for bug #1464, which is
now fixed by this commit.
2011-10-18 00:48:28 +01:00
Miguel de Icaza daa4a4f0f5 Fix for 1461: Microsoft's generated deserializer call CollapseWhitespace extensively 2011-10-17 17:06:29 -04:00
Rolf Bjarne Kvinge b3cc72b9a7 Add System.Numerics to the mobile profile. 2011-10-17 12:32:45 +02:00
Gonzalo Paniagua Javier 32029f1171 Return the correct length for input streams 2011-10-17 00:46:14 -04:00
Marek Safar 44882b1925 Fix System.Data.Services.Client public key 2011-10-16 12:03:08 -04:00
Miguel de Icaza b7ad6a07a8 Apply patch from Mario Kosmiskaso fix bug 1210: Correctly propagate the Operation Context on async calls
The OperationContext is a [ThreadStatic] variable therefore when a REST call is
made asynchronously the worker thread will not see a context set and will not
expose any data through the context.

A possible solution (which I implemented in the attached patch) is for
ClientRealProxy to set the context in the channel prior to executing the call
(either sync or async). The ClientRuntimeChannel needs to then properly set and
reset the context in the worker thread.

Because WCF operations marked [OperationContract(AsyncPattern = true)] using
IAsyncResult only generate an outgoing call on End<OperationName> the
ClientRuntimeChannel.EndProcess must not reset the context as it's currently
doing. The context can only be reset after calling EndInvoke because the
request will be only generated at this point.
2011-10-16 11:44:36 -04:00
Miguel de Icaza 2bb4353929 Apply patch from Mario Kosmiskaso fix bug 1209: Patch to correctly expose WebOperationContext.IncomingResponse
There was apparently no point in the call flow when the reponse message was set
in the context, resulting in WebOperationContext.IncomingResponse always being
null.

After patching WebMessageFormatter to set the response in the context (if
available) the value of WebOperationContext.IncomingResponse was still null. A
bit more investigation showed that IncomingWebResponseContext would construct a
HttpResponseMessageProperty encapsulating the OperationContext at the time the
request was made but before the response was received and cache that object.
That caused the HttpResponseMessageProperty to always have a null value for the
response. The second part of the patch changes this behavior and always creates
a new HttpResponseMessageProperty on GET.
2011-10-16 11:41:36 -04:00
Miguel de Icaza 88df658060 Apply patch from Mario Kosmiskaso fix bug 1207: Throw the correct exception when a REST request returns a 404
.NET throws a EndpointNotFoundException encapsulating a WebException when a
REST request returns a 404.

The attached patch tests for a 404 and throws the same exception chain thrown
by .NET.
2011-10-16 11:37:43 -04:00
Miguel de Icaza 6ca75c627b Apply patch from Mario Kosmiskaso fix bug 1207: Check reference before copying values from Headers
OutgoingWebRequestContext throws a NullReferenceException when making a REST
call. The exception is thrown because there are no Headers in the context.

Attached patch simply tests for null before copying values from Headers.
2011-10-16 11:37:06 -04:00
Miguel de Icaza 393f7c7f3e Apply patch from Mario Kosmiskaso fix bug 1205: Check reference before copying values from Headers
OutgoingWebRequestContext throws a NullReferenceException when making a REST
call. The exception is thrown because there are no Headers in the context.

Attached patch simply tests for null before copying values from Headers.
2011-10-16 11:33:37 -04:00
Miguel de Icaza 07268b7ab8 Apply patch from Mario Kosmiskaso fix bug 1204: Add certificate to the HttpWebRequest if configured
System.ServiceModel.Channels.HttpRequestChannel never added the configured
certificate to the HttpWebRequest which prevented client side authentication.

The attached patch does exactly that if a certificate has been configured.
2011-10-16 11:32:07 -04:00
Miguel de Icaza 241a34d604 Fix bug 1203, relaxes the test for the protocol to allow https endpoints 2011-10-16 11:29:09 -04:00
Gonzalo Paniagua Javier da1bdf6b34 Don't 404 when any of the hashes has a / in it
This fixes "random" problems getting resources served by
	WebResource.axd.
2011-10-16 00:14:22 -04:00
Rolf Bjarne Kvinge f0737b398c Log profiler: Don't include major collections in ondemand mode. 2011-10-13 14:39:15 +02:00
David Evans f373840a8a Fix regression to System.Diagnostics.Process.PrivateMemorySize64 (). Fixes #1459 2011-10-13 08:01:06 +02:00
QuickJack 2d1dba2a8f Edited mcs/class/System/System.Net/WebRequest.cs via GitHub 2011-10-12 23:42:33 -04:00
QuickJack a8cee6b88e Edited mcs/class/System/System.Net/WebRequest.cs via GitHub 2011-10-12 23:42:29 -04:00
QuickJack 76debbe013 Edited mcs/class/System/System.Net.Configuration/BypassElement.cs via GitHub 2011-10-12 23:42:25 -04:00
QuickJack 92bb5751a7 Edited mcs/class/System/System.Net.Configuration/ProxyElement.cs via GitHub 2011-10-12 23:42:20 -04:00
Rolf Bjarne Kvinge 39a7dcb400 [System] Added NetworkCredential.SecurePassword. 2011-10-11 15:12:39 +02:00
Rolf Bjarne Kvinge 276ca3613f [Microsoft.Build] Stub out a lot of classes to make NuGet build with mono. 2011-10-11 15:12:39 +02:00
Rolf Bjarne Kvinge 7e9785dc4e [Microsoft.Build.Framework] Add a couple of 4.0 interfaces. 2011-10-11 15:12:38 +02:00
Rolf Bjarne Kvinge 968a511c89 [WindowsBase] Relationship ids must be valid XML identifiers. 2011-10-11 15:12:38 +02:00
Rolf Bjarne Kvinge 7cce646657 [Microsoft.Build] Stub out a few types to make nuget run. 2011-10-11 15:12:38 +02:00
Leszek 'skolima' Ciesielski b033bff618 [MSBuild] Fixed issues found by Paul Selormey.
Unset attributes should return String.Empty, null is only for invalid.
2011-10-11 15:12:38 +02:00
Leszek 'skolima' Ciesielski 9c94be9d30 [MSBuild] LinkedList used for storing children
ProjectElementContainer should now handle modifications faster.
2011-10-11 15:12:38 +02:00
Leszek 'skolima' Ciesielski 0e4b34fdd7 [MSBuild] Preserve comments in build files
Contribution by Paul Selormey
2011-10-11 15:12:37 +02:00
Leszek 'skolima' Ciesielski f784b407c4 [MSBuild] Finishing Microsoft.Build.Construction
No more NotImplementedException.
2011-10-11 15:12:37 +02:00
Leszek 'skolima' Ciesielski a246a51c0f [MSBuild] Microsoft.Build.Construction loading project files 2011-10-11 15:12:37 +02:00
Leszek 'skolima' Ciesielski 21a92702c3 fixing the build 2011-10-11 15:12:37 +02:00
Leszek 'skolima' Ciesielski dffda4000e [MSBuild] Add Microsoft.Build for 4.0 profile
Namespace Microsoft.Build.Construction partiallly implemented,
enought to construct and save a valid project file. Some
tests present (work on .Net).
2011-10-11 15:12:37 +02:00
Miguel de Icaza 736891c361 Add the fallback to MonoDoc 2011-10-07 16:36:28 -04:00
Miguel de Icaza 62e371b81b Avoid loading the same documentation file twice 2011-10-07 16:22:41 -04:00
Sebastien Pouliot 4f64a73a44 Ensure consistency when 'emitContext == true' is used in MONOTOUCH profile (since it won't work when the linker is enabled). Fix bug #1144 2011-10-05 17:44:00 -04:00
Sebastien Pouliot a147386bc4 Internalize [ComImport] in MONOTOUCH profile since it can make the (unlinked) application code crash (and we better spot this at compile time). Fix assistly #2357 2011-10-05 17:43:48 -04:00
Rolf Bjarne Kvinge d87a79de52 [System.ServiceModel] Write EndPointAddress properly in the 2.1 profile. Fixes #1244 2011-10-05 22:57:02 +02:00
Alan McGovern 14a9dbdd34 [System.IO.Path] Fix potential infinite loop in Path.GetTempFileName
Refactor this method so that it only attempts alternative filenames if
the filename just attempted already exists. This way we will never end
up looping forever being unable to create the required file. Previously
if we opened the maximum allowed files and then called GetTempFileName
we'd loop forever throwing an IOException in the FileStream constructor
every time.
2011-09-30 13:25:41 +01:00
Gonzalo Paniagua Javier fc7ffed3ac Plug an unmanaged memory leak
If Flush() was called with final_flush set to true, we were leaking the
	unmanaged memory in the output stream (if allocated).

	It was "only" an AS leak.

	Thanks to Kumpera for the help debugging this.
2011-09-30 01:23:03 -04:00
Gonzalo Paniagua Javier 7cf63b69e6 Merge pull request #167 from konrad-kruczynski/send_async_fix
Fix for Xamarin bug #531.
2011-09-29 11:47:55 -04:00
Jeffrey Stedfast 3bb319b61d [TimeZone] Fixed race condition with renewing the CurrentTimeZone object.
Fixes bug #1055.
2011-09-29 10:57:40 -04:00
Rodrigo Kumpera 6148e4b997 Request ObjectMirror type and domain in a single request. 2011-09-29 03:23:05 +02:00
Rodrigo Kumpera 39c0feba1c Cache thread id. 2011-09-29 03:18:19 +02:00
Rodrigo Kumpera 89881c9b4d Cache source files. 2011-09-29 03:17:41 +02:00
Rodrigo Kumpera 47c388364d Cache ObjectMirror type and domain. 2011-09-29 03:17:17 +02:00
Rodrigo Kumpera 8ad829ac4e Avoid looking up the ctor mirror twice. 2011-09-29 03:16:55 +02:00
Zoltan Varga 93e489abf2 Avoid a crash if mono_debug_open_image_from_memory is called without --debug. Fixes #1093. 2011-09-29 02:01:29 +02:00
Zoltan Varga 742ff74e50 Save/restore argument registers when instrumenting tail calls. Fixes #971 2011-09-27 20:58:39 +02:00
Rodrigo Kumpera abff177b4b Split bridge processing in two steps.
* sgen-bridge.c: Bridge processing must be split in
	two steps because the object scanning step must be done
	with world stop and before we copy the finalizable objects
	and the ones pointed by them.
2011-09-26 20:07:10 -03:00
Rodrigo Kumpera 5524ab9825 Fix the interation of non tracking weak refs and ephemerons.
* sgen-gc.c (finish_gray_stack): We must process ephemerons
	before we check for non track weak refs to make sure we mark
	those values whose only root are their keys.
2011-09-26 19:35:52 -03:00
Mark Probst d51f05c88b [sgen] Do the bridge callback after the world has been restarted.
Conflicts:

	mono/metadata/sgen-gc.c
2011-09-26 19:32:59 -03:00
Gonzalo Paniagua Javier 35f3c96490 Create the first tp thread right away.
Avoid 500ms delay.  Fixes Xamarin bug #1036.
2011-09-25 02:21:40 -04:00
Jérémie Laval c1d9d1a6b6 Fix double adding in ConcurrentDictionary ctor with IEnumerable seed. 2011-09-25 11:27:47 +02:00
Sebastien Pouliot 8bb319b1e6 Provide binding for sqlite3_config to allow setting the threading model. Fix bug #652 2011-09-24 09:36:19 -04:00
Gonzalo Paniagua Javier 37ac996882 Return the right empty collection in ParseQueryString.
Fixes Xamarin bug #970.
2011-09-21 07:39:58 -04:00
Miguel de Icaza 0afd473342 Fix my profiler loader.
This is what happens when you test on a pre-configured environment that
already worked fine.    This depended on a function that was never called
so we ended up probing for paths on NULL (repeating the same process twice)
instead of loading the profiler from the installation directory.
2011-09-19 22:53:17 -04:00
Jérémie Laval 4b750612a8 Fix for #892 2011-09-19 18:38:47 +02:00
Jérémie Laval 5d17d13bee Fix more argument checking for Task<T> 2011-09-19 18:38:46 +02:00
Jérémie Laval 475c172dae Check that supplied function argument in a Task<T> ctor isn't null 2011-09-19 18:38:46 +02:00
Sebastien Pouliot 323ff14b65 fix previous fix (wrt #808) 2011-09-19 11:23:14 -04:00
Sebastien Pouliot 4a6df0b082 Fix typo (bug #808) 2011-09-18 11:35:58 -04:00
Sebastien Pouliot 8141307e4b Expose Dispose under the NET_2_1 based profiles. Fix bug #154 2011-09-18 11:35:38 -04:00
Gonzalo Paniagua Javier 27b145e24f Avoid warning 2011-09-16 20:37:02 -04:00
Sebastien Pouliot bdaf7bb33c Allow commit/rollback/update events to work under MonoTouch. Fix bug #233 2011-09-15 22:21:48 -04:00
Alex Corrado 378032bf64 Fix prepending $(CURDIR) to paths failing under cygwin 2011-09-15 13:07:57 -04:00
Alex Corrado a19eb0760b 2.10.6 2011-09-13 23:37:20 -04:00
Gonzalo Paniagua Javier 5cfc62f415 Stop lying in the comments 2011-09-13 20:24:11 -04:00
Gonzalo Paniagua Javier 1ed1c4bed1 Report compilation errors when the type named in 'class' can't be loaded. 2011-09-13 20:24:01 -04:00
Rodrigo Kumpera 616f648f0d Avoid duplicates in the SSC xrefs.
* sgen-brige.c (scc_add_xref): Make sure that the xref
	array is kept sorted by doing sorted insertion for single elements
	and merging for a pair of lists.

	This avoids degenerated cases where performance of the dfs2 step
	goes unbound and slows us down significantly.

	Fixes bxc #496
2011-09-13 15:35:31 -03:00
Rodrigo Kumpera 4fccd4d599 Add logging to sgen-bridge. Log times and sizes. 2011-09-13 15:35:30 -03:00
Rolf Bjarne Kvinge bd4f80e803 [System.Data] Delay column expression evaluation after all the columns have been cloned when cloning a table. Fixes #666.
When cloning a table we loop over all the columns and clone them, but if a column
contains an expression with a reference to a later column, we'll throw an exception
unless we delay the expression compilation until all the columns have been added
to the new table clone.

So I've split out the expression compilation logic from the Expression property setter,
and now the column Clone method only sets the field. The Clone caller is responsible
for calling CompileExpression on the cloned column after adding all the cloned columns to
the cloned table.
2011-09-13 14:15:11 +02:00
Rolf Bjarne Kvinge 9e9b3f913d [System.Data] Properly clone a column's extended properties when cloning a table. Fixes #668. 2011-09-13 13:01:57 +02:00
Jérémie Laval a2a168e5f3 Add missing files. 2011-09-13 12:20:07 +02:00
Jérémie Laval 5f982b1908 Backport System.Threading.Tasks from master to mono-2-10 2011-09-13 12:18:39 +02:00
Gonzalo Paniagua Javier f00202d3e3 Delay initialization of the stream until first read
This way uri-based resources are not fetched before they are supposed
	to.

	Fixes Xamarin bug #762.
2011-09-13 01:24:14 -04:00
Gonzalo Paniagua Javier b4d4033040 Internal worker is kept while there is an ongoing operation
When there is an ongoing operation we can't dispose the internal
	worker because it might be used by the IO threadpool.

	Fixes Novell bug #691076 and Xamarin bug #766.
2011-09-13 00:06:12 -04:00
Sebastien Pouliot 68deb6335e More fixes for running unit tests under NET_2_1 profile 2011-09-12 12:53:17 -04:00
Miguel de Icaza cb965a9d3a Various fixes to the Expression parser, the fixes include:
* Fixes to the SUBSTRING and TRIM function to allow
	  a wider range of functions to be passed as
	  parameters.   This fixes xamarin #665

	* Fix to the Parser.jay grammar to eliminate the
	  reduce/reduce conflicts.

	* Dropping the string concatenation code and instead
	  use the existing arithmetic addition operator which
	  also fixes the concatenation operation in the presence
	  of null values

	* Adds the null literal

With the associated test cases.
2011-09-09 22:04:18 -04:00
Marek Habersack 86262ef424 Support colors on 256-color terminals 2011-09-09 22:04:02 -04:00
Sebastien Pouliot acfa4856b9 Adjust corlib unit tests to reduce failures when executed on the NET_2_1 profile 2011-09-09 13:48:15 -04:00
Sebastien Pouliot be8711a7e6 fix FileStream test failures under Mac OSX 2011-09-09 13:48:01 -04:00
Sebastien Pouliot 7e6a0ff51e Throwing IsolatedStorageException is a Moonlight-behavior and should not have been exposed to other 2.1 profiles 2011-09-09 13:47:48 -04:00
Sebastien Pouliot c989e10293 Ensure we can roundtrip 'Local' (special case) timezone. Fix bug #326 2011-09-09 13:29:40 -04:00
Sebastien Pouliot b04d809478 Return null instead of catching Activator exception (and return null). What was a corner case before is now very common when the linker is used (e.g. monotouch, m4a). Reported in assistly #1741 2011-09-09 13:29:26 -04:00
Miguel de Icaza 219276c182 Fallback: load profiler from the Mono default path. This in particular allows users to run mono --profiler=log foo.exe without having to set anuy environment variables 2011-09-07 18:44:22 -04:00
Sebastien Pouliot 64ff652330 Add null-check on 'partDesc'. Fix bug #612 (WCF regression) 2011-09-07 11:17:55 -04:00
Rodrigo Kumpera 75e3ca80bc Let the system figure our permissions instead of doing a poor job at it.
io.c (DeleteFile): We can't forbit a file to be deleted just before
	it's mask is not u+w. We should just call unlink and let the kernel
	figure out permissions.

	We are not SAMBA.

	We're not in the job of trying to mingle windows and unix permissions
	models so we just let the kernel figure it out and translate the appropriate
	errno value to UnauthorizedAccessException.
2011-09-06 19:36:00 -03:00
Jérémie Laval aa48b6f714 Use a TaskCompletionSource in non-generic ContinueWhenAny case. Fix #647. 2011-09-06 23:55:01 +02:00
Rodrigo Kumpera 2603a2e4fd Improve exception message. 2011-09-06 14:53:00 -03:00
Rodrigo Kumpera 05550e7c66 Add collection logging to sgen. 2011-09-06 14:52:59 -03:00
Gonzalo Paniagua Javier 99349445b1 Display more debugging info when epoll fails 2011-09-05 21:13:07 -04:00
Gonzalo Paniagua Javier d768dd0125 Fallback to poll() if epoll_create() fails
From a patch by Zoltan in bug #705190.
2011-09-05 20:51:10 -04:00
Zoltan Varga e376d9156b Handle threads which die without detaching. 2011-09-06 04:24:21 +02:00
Zoltan Varga 85349b801f Implement AppDomain.ResourceResolve. Fixes #579. 2011-09-04 03:20:22 +02:00
Mark Probst 41d1be9f34 [sgen] Break tracking weak references as early as possible.
Our tracking references code aimed to transform tracking references
into normal weak references the first time their targets became
unreachable.  It was implemented incorrectly though, and is not the
right thing to do in the first place anyway, because tracking
references have to keep tracking if the target is re-registered for
finalization.  The incorrect implementation inadvertently handled
re-registration correctly, but it kept the reference intact for one
garbage collection cycle too many.
2011-09-02 11:14:27 -03:00
Rodrigo Kumpera ac19d5bfaf Handle finalizable objects pointed by bridge objects. (cont...)
* sgen-fin-weak-hash.c:
	* sgen-gc.c: Bridge objects are used to represent objects
	that have references outside of sgen's control. They are
	kept around until the embedder figures out it's ok to
	collect them.
	Until those bridge objects turn externally unreachable,
	they must be kept around. Up to now, the expected pattern
	was to resurrect them during finalization.
	The problem with this approach is that if they hold references
	to other finalizable, non-bridge objects those will be finalized
	and we will resurrect objects that point to dead ones.

	Think of this:

	class BridgeObject {
 		FileStream stream;
	}

	The bridge object is resurrected on the finalizer and so will
	stream, disposing its native handle and been permanently unusable.

	The solution is to process brige objects before we do ordinary
	finalization. We record all dead bridges and copy/mark them.
	We drain the gray queue on the end, which makes sure all other
	finalizable objects that transitively reachable are too.

	Finally, we introduce a breaking change to the bridge API.
	The bridge must set to NULL the first object of all SCC
	entries that remain alive. Other entries will be considered
	dead and will be subject to regular finalization.

	This way, sgen knows when a given bridge object is completely
	unreachable and provides adequate finalization semantics to
	them and referenced objects.

	This fixes bxc #375
2011-09-01 20:13:06 -03:00
Atsushi Eno ae7d005dfc DiffLoader didn't handle encoded name and caused mismatch between .NET. 2011-08-31 17:53:04 -07:00
Atsushi Eno 04427d962d Fix invalid path check for Windows regarding ':'. 2011-08-31 14:12:51 -07:00
Atsushi Eno 57bc2f6ffb Add test for bug #545. 2011-08-31 14:12:42 -07:00
Atsushi Eno 059a6a685b EncoderReplacementFallbackBuffer.Reset() did not really reset its internals. 2011-08-31 14:03:10 -07:00
Chris Toshok 4ac77ca819 prepend $(CURDIR) to jay input files so that the debugging info references the right .jay 2011-08-30 17:06:50 -07:00
Jonathan Pryor d703e86b4b Don't use vasprintf on PLATFORM_ANDROID.
This allows sanely using g_log() within signal handlers.
2011-08-30 15:44:17 -04:00
Atsushi Eno 6870a59952 Implement IXmlLineInfo on XLinq node reader. 2011-08-30 23:13:36 +09:00
Atsushi Eno 721dadd34b LineInfo on namespace nodes were missing. 2011-08-30 20:22:01 +09:00
Sebastien Pouliot b7061d3e57 Fix build. Adding #if MOBILE is just not enough ;-) 2011-08-29 09:53:23 -04:00
Sebastien Pouliot 2f4099863e Fix bug #380. Patch from bnc#605795 were not committed to master but part of MonoTouch 3.x (ended up missing in MT4) 2011-08-29 08:57:30 -04:00
Hin-Tak Leung 96e0c59371 Fix mingw32 cross-build on a git no-branch checkout. Fixes #698446. 2011-08-29 01:25:19 +02:00
Zoltan Varga 1e910229a8 Allow pointers to structures to be passed in pinvoke, MS seems to allow this at least in some cases. Fixes bxc #158.
This partially reverts c4d9097c57.
2011-08-28 17:52:05 +02:00
Jérémie Laval c74031105a Check that CancellationToken coming from OperationCanceledException isn't None. Fix #472. 2011-08-28 14:50:12 +02:00
Atsushi Eno 279678d726 Revert GET switch for serializing requests. BodyWriter handles it better. 2011-08-24 18:13:04 -07:00
TalAloni da306d6e83 Bug Fix: OpenSubKey will open key as writable when RegistryKeyPermissionCheck is set to ReadWriteSubTree 2011-08-25 02:52:30 +03:00
Atsushi Eno 46db32524d for GET request, just skip the member. It does not contain xml for null. 2011-08-24 16:48:46 -07:00
TalAloni 1a6f160c21 Make sure a proper 'Not Implemented' exception is thrown instead of an 'Out of Range' exception. 2011-08-25 02:46:00 +03:00
TalAloni f1d4ca44e2 Fixed an ANSI to managed string conversion bug on native to managed callback functions. 2011-08-25 02:03:15 +03:00
Atsushi Eno 0563034987 Skip serialization when the return type is void.
This batch should fix bug #206.
2011-08-24 12:20:23 -07:00
Atsushi Eno 0baf32151f Do not try to output empty message body to logs. 2011-08-24 12:20:13 -07:00
Atsushi Eno 8bd9eebf1f When there is void return, the common message formatter should ignore it.
This case occurs when MessageContract is used and there is no member for
the return value.
2011-08-24 12:20:02 -07:00
Atsushi Eno b9a5b85c16 ReturnValue in MessageDescription was missing when there was MessageContract. 2011-08-24 12:19:52 -07:00
Atsushi Eno c98be1ad12 Differentiate GET query parameter binding from another request binding.
This is one core of the bugfix for #206.
2011-08-24 12:19:42 -07:00
Atsushi Eno 67b1fcec06 When there was no path parameter, it ignored the whole path part. 2011-08-24 12:19:31 -07:00
Atsushi Eno 4643f66d1a This filter should ignore port, and should not filter out anonymous URIs. 2011-08-24 12:19:21 -07:00
Atsushi Eno e3aa857b74 UriTemplate should not be mandatory, make it optional. Fix unit test. 2011-08-23 11:43:56 -07:00
Alex Corrado 350fcbd003 2.10.5 2011-08-22 19:58:07 -04:00
Jérémie Laval c6799b1f41 Throw when a non-finished task is started 2011-08-20 15:00:24 +02:00
Jérémie Laval f260ff4299 Make TaskCompletionSource methods thread-safe
Conflicts:

	mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs
2011-08-20 14:54:28 +02:00
Rodrigo Kumpera 7122b78d60 Fix sgen-arm-mach. It requires some #define juggling.
.
2011-08-19 20:36:39 -03:00
Rodrigo Kumpera 52971cce4c Fix variance test involving nullable types.
* class.c (mono_class_is_variant_compatible): Reject valuetypes
	if not the same straight away. This fixes testing IEnumerable<int?>
	with IEnumerable<int>.

	Fixes bxc #185
2011-08-19 19:32:48 -03:00
Rodrigo Kumpera 5dc77749e7 Correctly calculate the size of the freed array buffer.
* sgen-bridge.c (dyn_array_ensure_capacity): We must correctly
	calculate the size as our allocator asserts when we do it with
	very large allocs.
2011-08-19 02:06:24 -03:00
Rodrigo Kumpera 472b3e6fca Fix android's broken pthread_kill under sgen. 2011-08-18 14:02:26 -03:00
Alan McGovern 59b4c5bc3d [LinkedList] Optimise Clear slightly. 2011-08-18 16:06:27 +01:00
Alan McGovern f105c6d4e7 Merge pull request #161 from LogosBible/master
Fix bug #311: On LinkedList.Clear, detach each node instead of dropping them en masse.
2011-08-18 16:06:10 +01:00
Zoltan Varga 2e637c4cba Disable some failing LLVM passes. Should fix bxc #280. 2011-08-18 17:00:34 +02:00
Jérémie Laval 8d44e61042 Fix coding style 2011-08-17 20:02:02 +02:00
Sebastien Pouliot eac9866b2c Provide an error message if an instance method is decorated with [MonoPInvokeCallback]. Ease finding issues like bug #296 2011-08-17 10:49:30 -04:00
Alan McGovern 7ada4aec7b [System.IO.Packaging] Fix calling convention related issues
The P/Invokes should be Cdecl as the library is compiled with that
calling convention. The delegates passed to native code must also
be marshalled as Cdecl. Fixes BXC #223.
2011-08-17 12:50:23 +01:00
Miguel de Icaza dacb11a24c updated copyrights 2011-08-17 01:26:05 -04:00
Miguel de Icaza 5c44041365 More updates 2011-08-17 01:21:40 -04:00
Rodrigo Kumpera 56b901df8f Fix g_log redirection under android. 2011-08-16 16:30:06 -03:00
Jérémie Laval 582bd35450 Backport TaskCreationOptions check from master 2011-08-16 19:06:45 +02:00
Jeffrey Stedfast 6057352d91 Merge pull request #158 from nickers/mono-2-10
remove debug CWL's
2011-08-16 04:35:11 -07:00
Tomasz Wsuł 3b450189bb Remove writing statement on standard output 2011-08-16 12:56:08 +02:00
Jeffrey Stedfast 7878c22bbf Fixed a typo in zoltan's last commit 2011-08-15 18:05:13 -04:00
Jeffrey Stedfast 674372dd15 Fix for bug #445855
In this day and age of mobile personal computing devices,
we need to periodically check the underlying system
timezone because the device may have crossed a timezone
boundary.
2011-08-15 15:19:20 -04:00
Zoltan Varga af804a9305 Escape characters in LLVM symbol names 2011-08-15 17:47:56 +01:00
Zoltan Varga 7e2eff0be7 Don't pass MONO_UNWIND_ACTUAL_METHOD to the stack walker in a signal handler, its not signal safe. Fixes bxc #263. 2011-08-14 22:35:55 +02:00
Gonzalo Paniagua Javier 7de999655d [threadpool] Exit on unhandled exceptions only
Unhandled exceptions will only set the exitcode if there is no
	AppDomain unhandled exception handler. When the exitcode is set,
	the TP will exit for unhandled exceptions.

	Fixes bug #227.
2011-08-13 00:34:13 -04:00
Gonzalo Paniagua Javier 1b84abfcab [threadpool] Work around for a race-condition
Under some circumstances new_job was not signaled and the threadpool
	threads didn't realized there was a workitem in the queue.

	Fixes Xamarin bug #12 and Novell bug #690357.
2011-08-12 23:17:05 -04:00
Sebastien Pouliot 8286cbf198 Use 'as' for casting certificate extensions since we already deal with null and malformed extensions will throw, hard to debug, ICE when we just want to ignore them 2011-08-12 14:59:12 -04:00
Gonzalo Paniagua Javier db7d7c47cb Fix the range for rnd.Next() 2011-08-11 14:17:23 -04:00
Rodrigo Kumpera 9445d6e22c Add IObserver/IObservable to MOBILE profile. 2011-08-11 13:19:47 -03:00
Marek Habersack 209c253e3f Compilation fix for e449d41158 2011-08-11 02:29:07 +02:00
Marek Habersack e449d41158 [runtime] Fix for Xamarin bug #99. Don't fail to parse assembly names with spaces surrounding = in key=value pairs 2011-08-11 02:20:11 +02:00
Zoltan Varga 9b4a07a69e Fix the newly added test_0_llvm_regress_171 (). 2011-08-10 18:10:58 +02:00
Jérémie Laval 28766cfe96 Avoid creating a delegate instance in general case when setting up continuations
Conflicts:

	mcs/class/corlib/System.Threading.Tasks/Task.cs
2011-08-10 17:16:23 +02:00
Jonathan Pryor a95adaf53d [System,MOBILE] Add System.Text.RegularExpressions.RegexOptions.Compiled.
Add the RegexOptions.Compiled enumeration value to the MOBILE profile.

Fixes: http://bugzilla.xamarin.com/show_bug.cgi?id=149

MonoTouch and Mono for Android still use `PatternCompiler`, which is
interpreted. Thus RegexOptions.Compiled is ignored, and is present only for
compatibility with Windows Phone 7, which states [0]:

	Present only in Silverlight for Windows Phone, but not supported.

[0] http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regexoptions(VS.96).aspx
2011-08-09 21:33:56 -04:00
Zoltan Varga 7ae2112edc LLVM requires two PHI entries if a previous bblock branches to the current bblock using a conditional branch whose two targets are the same. Fixes #171. 2011-08-09 21:41:54 +02:00
Zoltan Varga 79b99d358b Add support for reference instances of Interlocked.Exchange<T> to full-aot, similarly to Interlocked.CompareExchange<T>. 2011-08-09 19:16:15 +02:00
Zoltan Varga 12fedc8ee6 Merge pull request #154 from mdsol/fix-mono-tarball-tests
Fix mono tarball tests
2011-08-09 10:03:00 -07:00
Jeffrey Stedfast 27589a4031 If #CONFIGURATION_DEP isn't defined, we still want to get a default proxy 2011-08-09 12:30:32 -04:00
Alex Corrado f12adef20c 2.10.4 2011-08-08 21:00:25 -04:00
Harry Wilkinson 049efb2da8 Include mono/tests/delegate2.exe.config to the source tarball so that the tests pass 2011-08-08 18:16:03 +01:00
Gonzalo Paniagua Javier d41b9d61c2 Merge pull request #150 from bassamtabbara/mono-2-10
Some fixes to mono-2-10
2011-08-08 06:26:42 -07:00
Bassam Tabbara 71b1f58d41 Fixed regression in System.Web.Routing caused by 62b047ae5b. Value and constraint where switched when evaluating regex route constraints. 2011-08-07 23:09:08 -07:00
Bassam Tabbara f983186526 Remove Console.WriteLine from DriveInfo.GetDrives() 2011-08-07 11:51:08 -07:00
Bassam Tabbara c726c88f32 Networkstream now throws IOException('connection closed') if the socket was closed/disposed 2011-08-07 11:17:27 -07:00
Jérémie Laval 3cb9ce92bc Fix for #162 2011-08-05 22:35:13 +02:00
Miguel de Icaza 2504797e50 Merge pull request #129 from grumpydev/CryptoFixo
Fix for out of bounds exception in Rfc2898DeriveBytes
2011-08-05 10:05:56 -04:00
Mark Probst 67ebb6a498 [sgen] Enqueue finalizers after update the pointer.
If the object was forwarded we read a bogus vtable and hence a bogus
klass.
2011-08-04 12:04:50 +02:00
Atsushi Eno d9e839c91b Merge pull request #146 from flutos/207ce0bccceec3ff7860ea986086fedb5a92d822
fix for bug 708178 that would fail if the type wasnt IEnumerable, should check if it implement IEnumerable rather than is IEnumerable
2011-08-04 09:08:12 +09:00
Rodrigo Kumpera fd65ec9388 Fix padding of call instructions. 2011-08-03 19:47:34 -03:00
Chris Toshok 7a0052ae2f don't redefine ABS 2011-08-03 10:42:01 -07:00
Marek Habersack ec0e9d7771 [runtime, globalization] Fix for Xamarin bug #161. Fix culture info data for certain locale short date formats
Modified locales which don't use '/' as the short date separator.
2011-08-03 16:00:46 +02:00
Rolf Bjarne Kvinge 4325b8151a [aot-compiler] Replace assert with descriptive error message. 2011-08-03 15:07:41 +02:00
Atsushi Eno 482e406319 Fix NET_2_1 builds (regression from the previous SecurityBindingElement fixes). 2011-08-03 13:54:08 +09:00
Rodrigo Kumpera e421b10a3d Implement fail tramp support on arm for full-aot imt thunks.
* aot-compiler.c (arch_emit_imt_thunk): Implement fail tramp
	support on arm. This enables variance to work under full-aot.
	The code blowout is not really significant as even on non linked
	apps the imt thunk overhead is 0.5%.
2011-08-03 00:47:20 -03:00
Geoff Norton 55c4b01d95 [gc] Darwin/AMD64 can have 64-bit thread id's, so we need to ensure
we cast properly to make sure the modulus has a valid result.
Additionally add support for x86_THREAD_STATE64.
2011-08-02 23:36:05 -04:00
Atsushi Eno a5610cbed1 Merge pull request #145 from ngraziano/99b87f07af0beed3a887
Fix Service Model Xml Serialization and XMLAttributes
2011-08-02 13:51:35 -07:00
Atsushi Eno fc9e1be0b3 Fix build, merge some missing changes to MessagePartDescription. 2011-08-03 05:46:53 +09:00
Atsushi Eno 9b9fef57d9 Fix bug #707434, check order only when applicable.
Based on the input by Scott Fluto.
2011-08-03 05:36:30 +09:00
Nicolas GRAZIANO 99b87f07af TypedMessageConverter do not take into account the xml attribute which modify the serialization.
Correction and Unit Test.
2011-08-02 22:15:58 +02:00
Atsushi Eno 9a69207087 Merge pull request #143 from mistoll/master
Fixes for WCF BasicHttpBinding with message security
2011-08-02 22:53:01 +09:00
Alex 4cfb3889f8 Define MONO_ARCH_NOMAP32BIT for DragonFly BSD. 2011-08-02 00:07:59 +02:00
Atsushi Eno 0a7f80fb0a Fill/reflect ReturnValue to and from corresponding message part.
This may have fixed bug #41.
2011-08-02 10:00:49 -07:00
Atsushi Eno df66c40aaa part of fix bug #41. MessageParameterAttribute is considered for return value.
Conflicts:

	mcs/class/System.ServiceModel/System.ServiceModel.Description/MessagePartDescription.cs
2011-08-02 07:52:03 -07:00
Jeffrey Stedfast 9b3e4f9034 Oops, fixed a typo 2011-08-01 16:59:52 -04:00
Alex 89dad63b0f Add support for DragonFly and NetBSD to sigcontext. 2011-08-01 10:29:43 +02:00
Jeffrey Stedfast 9636231dda Fix a mkbundle compiler warning by #including mono-config.h 2011-07-29 16:59:27 -04:00
Miguel de Icaza a2d896ec4e Update copyrights 2011-07-29 15:22:11 -04:00
Rodrigo Kumpera 66187b25b6 Use wrappers for accessing socket errors. Cygwin does not have some errors in errno.h. Fixes Windows build. 2011-07-29 13:42:25 -03:00
Rodrigo Kumpera f3deab1057 OSX won't expose IPV6_PKTINFO unless __APPLE_USE_RFC_3542 is defined. 2011-07-28 15:23:36 -03:00
Rodrigo Kumpera 5a9f5defc3 Handle a race on thread cleanup.
* mini.c (mini_thread_cleanup): Under some rare cases it's
	possible to have a NULL lmf.
2011-07-28 15:23:33 -03:00
Alex Corrado e43a74ae3f 2.10.3 2011-07-27 19:07:46 -04:00
Jérémie Laval 06cd95ea65 Same test for TaskCompletionSource 2011-07-27 19:52:01 -04:00
Jérémie Laval 7d088a3f17 Ensure that Task is in a correct initial state before starting it for real 2011-07-27 19:36:40 -04:00
Jérémie Laval 0ddabfc4ab Test that futures throw Exception through Result property when they are Faulted 2011-07-27 19:35:50 -04:00
Jérémie Laval 8078626d49 Add test for various AggregateException ctor exception situations 2011-07-27 18:32:05 -04:00
Jérémie Laval ffad7f7365 Move innerExceptions internal null check at the right place. 2011-07-27 18:21:36 -04:00
Jérémie Laval da2f5156b2 Add testcase to ensure unobserved exception on Task are correctly propagated 2011-07-27 18:12:23 -04:00
Jérémie Laval e3578fe451 Makes AggregateException ToString output closer to .NET one 2011-07-27 18:03:28 -04:00
Jérémie Laval 036c395d3c Fix AggregateException behavior 2011-07-27 18:03:24 -04:00
Jérémie Laval 474417efb7 Allow using a worker number that is greater than Environment.ProcessorCount for parallel loops. 2011-07-27 16:24:08 -04:00
Atsushi Eno 23263e537f Fix wsdl import wrt element qname (!= type name). 2011-07-27 21:05:56 -07:00
Jeffrey Stedfast c98cedfc91 Don't invoke libc uname() on non-Unix systems 2011-07-26 18:41:49 -04:00
Mark Probst 2228af8148 [sgen] Use the proper object size when scanning arrays from a card table.
Using the block object size is incorrect since we might scan beyond
the end of the array.
2011-07-26 18:28:23 +02:00
Mark Probst c6bbff5b5e [sgen] Make the card table on AMD64 correct for 64 bit nursery addresses. 2011-07-26 18:25:46 +02:00
Mark Probst 1b58ec73aa [sgen] Make mono_sgen_safe_object_get_size() handle forwarded objects.
This is sometimes called on forwarded objects from the major collector
during finalization.  Now it doesn't crash anymore.
2011-07-26 18:24:09 +02:00
Miguel de Icaza f49164bf76 Fix invocation to syslog 2011-07-25 19:10:07 -04:00
Atsushi Eno 1ae6c346f6 Fix bug #16: use Owner node instead of Parent. Patch by Martin Potter. 2011-07-26 04:25:00 +09:00
Sebastien Pouliot 45064beb94 Fixed decoding of PKCS/CMS message with detached ContentInfo. Pull request from Pablo Ruiz Garcia <[email protected]> 2011-07-25 10:32:46 -04:00
Duane Wandless 8bd7d107a8 Fix crash on Lion when exiting 2011-07-24 15:59:41 -03:00
Geoff Norton d465c35811 Fix configure check for darwin to support all variants 2011-07-24 15:59:40 -03:00
Zoltan Varga fcff387c6a Fix a crash in the soft-float decompose code when a branch following an fcompare is optimized away. Fixes #705186. 2011-07-24 20:45:24 +02:00
Atsushi Eno 513122c74e Avoid possible duplicate xmlns output. Fixes xsp-based hosting somehow. 2011-07-22 14:04:08 +09:00
Atsushi Eno d68521e673 Fix bug #703910 - implement Order support in XmlSerializer. 2011-07-21 04:58:51 +09:00
Marek Safar c5302ba6b6 Merge pull request #135 from eue/mono-2-10
-checked command-line option
2011-07-20 01:10:43 -07:00
Martinho Fernandes 70352e16a9 Test for bug #706877 2011-07-20 09:02:23 +01:00
Martinho Fernandes 150ea5489d [Fix] Command-line option -checked now works (bug #706877)
The -checked option was not being considered in the BuilderContext.
Now it is set on construction of BuilderContext to the value from RootContext.
2011-07-20 09:01:24 +01:00
Atsushi Eno dd4afcfa02 fix build regarding ContentType. 2011-07-19 10:03:37 +09:00
Atsushi Eno a15e2d0bec support action parameter in SOAP 1.2 content type. Close pull request #133. 2011-07-19 02:30:11 +09:00
Rodrigo Kumpera 1e7567b332 Merge pull request #132 from ngraziano/fb497cbb6503c2a0913fddba700079608bcd8892
"make dist" do not work in branch mono-2-10
2011-07-18 07:19:38 -07:00
Atsushi Eno 1dba37de1c Fix bug 704813: just ignore members of type IEnumerable`1 without Add(). 2011-07-16 06:51:45 -07:00
Rodrigo Kumpera bfdd13a52c If a thread abort is fatal, print the exception before dying. 2011-07-15 18:16:36 -03:00
Rodrigo Kumpera a26b65f6b3 Improve stacktraces when facing a runtime invoke wrapper.
* mini-exceptions.c (mono_handle_exception_internal_first_pass):
	Don't trim the trace list if we find a filter clause from a wrapper.
	This makes stacktraces across MRI's work.
	Extract trace trimming into a macro to reduce code duplication.
2011-07-15 18:10:40 -03:00
Rodrigo Kumpera 36f12fc250 Avoid a .cctor on the initialization path. 2011-07-12 19:50:46 -03:00
Rodrigo Kumpera 8c253ee6c3 Add shared_perfcounters option to enable minimal. 2011-07-12 19:50:44 -03:00
Nicolas Graziano fb497cbb65 Correct the include files Platform is not in test. 2011-07-12 16:01:05 +02:00
Rodrigo Kumpera 11bacf8e1b Do DISABLE_PORTABILITY more agressively. 2011-07-12 01:35:35 -03:00
Zoltan Varga 2599353bc0 Add a test for 7cb704d9a9. 2011-07-12 03:19:10 +02:00
Zoltan Varga 9f92b788d8 Avoid register allocation problems when a try clause is nested inside a handler block. 2011-07-12 02:09:27 +02:00
Zoltan Varga c584c82e0d Fix the length of r4const on arm. 2011-07-11 17:11:00 +02:00
Zoltan Varga aa4803c5a4 Fix caching in mono_marshal_get_array_address (). 2011-07-11 00:25:52 +02:00
Zoltan Varga 816556dbb8 Use TARGET_ANDROID instead of PLATFORM_ANDROID in one place. 2011-07-11 00:25:50 +02:00
Zoltan Varga d9ecc66fb6 Really fix the -Wno-unused-but-set-variable check. 2011-07-11 00:25:49 +02:00
Zoltan Varga f333e91d0a Clean up the cross-compile configure.in code. Add a TARGET_ANDROID define. 2011-07-11 00:25:49 +02:00
Rodrigo Kumpera f87620d145 Fix signal chaining to handle a stupid previous handler. 2011-07-09 13:40:43 -03:00
Rodrigo Kumpera 8bd567de14 Arm has MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX. This gives us nice stacktraces on unhandles exceptions. 2011-07-09 13:40:36 -03:00
Rodrigo Kumpera 28a61a5d55 Disable the exception thread under iOS since it's neither needed nor working. 2011-07-09 13:40:29 -03:00
Atsushi Eno d25c23dc46 Full equivalence comparison is unnecessary for MessageEncoder ContentType.
based on https://github.com/mono/mono/pull/130
2011-07-09 06:52:43 +09:00
Jeffrey Stedfast 481881bdf7 Reverted previous commit, struct sizes vary way too much between platforms 2011-07-06 18:20:20 -04:00
Jeffrey Stedfast 44ab43948a Use a struct utsname when calling uname() instead of an 8K buffer 2011-07-06 18:07:34 -04:00
Jeffrey Stedfast 643c0f0cba Add System/Platform.cs to *System*.dll.sources 2011-07-06 13:30:06 -04:00
Jeffrey Stedfast da0d698fce Make internal Platform class static 2011-07-06 12:43:49 -04:00
Jeffrey Stedfast 6f1458dea4 Load the correct type on MacOSX (as opposed to iOS) 2011-07-06 12:04:34 -04:00
Jeffrey Stedfast 72e554c612 Implemented a shared way to detect MacOSX for System.dll 2011-07-05 17:50:21 -04:00
Jeffrey Stedfast e54a124e71 Doh, do proper OSX detection 2011-07-05 17:00:16 -04:00
Jeffrey Stedfast 62e6bd03f6 Use runtime checks to decide to use CoreFoundation.CFNetwork.GetDefaultProxy() 2011-07-05 16:30:50 -04:00
Jeffrey Stedfast be2e765af8 On MonoTouch, call CoreFoundation.CFNetwork.GetDefaultProxy() to get the default proxy 2011-07-05 13:56:51 -04:00
Marek Habersack c5b95f4bbb [asp.net] Added FormsAuthentication.Timeout 4.0 property 2011-07-01 00:01:19 +02:00
Jb Evain b8e85ce171 Fix handling of null in the non generic implementation of EqualityComparer. Fixes 703027. 2011-06-30 01:25:34 +02:00
Jackson Harper a2b093a9a1 We can accidently swallow out of FD errors here since this function is called from a threadpool thread. 2011-06-28 23:25:15 -04:00
Atsushi Eno 8481eefe9f Implement support for Stream param with WebHttpBinding raw content format. 2011-06-28 20:45:37 +09:00
Atsushi Eno 9f612740f7 Implement support for generic data contract type name with "{x}". 2011-06-28 18:03:49 +09:00
Jb Evain cb4b62c04b Fix queryable enumerable expression transformation 2011-06-23 00:33:09 +02:00
Jb Evain c51e257674 Don't emit null queryable constants when rewriting linq queries, fix #701187 2011-06-23 00:20:13 +02:00
Sebastien Pouliot 40ca71a120 Merge pull request #119 from konrad-kruczynski/SslStreamNoTimeout
Removed hard coded timeout for SslStreamBase.
2011-06-22 06:25:06 -04:00
Michael Hutchinson cc81b58a0e Fix the cairo dllmap on OS X 2011-06-20 14:48:19 +01:00
XTZGZoReX 70640f232b Socket: Fixed a security issue when default-initialized ArraySegment structs are passed in.
This is the same security issue that was recently addressed in MS.NET.
2011-06-19 19:02:34 -04:00
Gonzalo Paniagua Javier 949e910102 Fix crash when there's a \' in the arguments.
Fixes crash when calling Process.Start on a file with a ' in the path
	when UseShellExecute is set to false.

	Patch by Tom Philpot.
2011-06-15 15:36:23 -04:00
Sebastien Pouliot 395aae632d Fix remaining moon-unit failures wrt Sockets changes
* System.Net.Sockets/Socket_2_1.cs: Ensure RemoteEndPoint is always
available after ConnectAsync (connected or not, allowed or not).
Ensure the Connect event is fired even if denied by policy.
2011-06-15 15:36:09 -04:00
Sebastien Pouliot ce9ff91f78 Fix copy-paste error in git 17085447
* System.Net.Sockets/Socket_2_1.cs: Fix some moved code (from
SocketAsyncEventArgs.cs) so should the references to RemoteEndPoint
still point to the SocketAsyncEventArgs instance. Fix some moon-unit
test failures
2011-06-15 15:36:09 -04:00
Zoltan Varga f1861e5cbe Apply a workaround for a gcc 4.6 problem on arm. 2011-06-15 17:31:35 +02:00
Atsushi Eno 79bca55588 Set "Encoder" property when Message was read from MessageEncoder. 2011-06-14 19:19:06 +09:00
Atsushi Eno 3e48da364b finally implement Message.ToString() as in expected form.
Regressions on this method has caused several unpredictable errors,
so I avoided this for somewhat long time...
2011-06-14 18:46:12 +09:00
Atsushi Eno 8b88042311 Flush some ongoing changes for XmlSerializer support in svcutil. 2011-06-14 18:01:07 +09:00
Rodrigo Kumpera 352e7d076d Allow AssemblyRef flags to have at least ECMA's values. Fixes #684613. 2011-06-13 16:38:59 -03:00
Atsushi Eno d4a6887c31 Fix 2.0 build. 2011-06-13 21:36:47 +09:00
Atsushi Eno 6813d3f09b Implement OnWriteBodyContents() and add message buffer support for RawMessage. 2011-06-13 20:07:53 +09:00
Marek Habersack 81d20479d4 [asp.net] Construct properly rooted paths when assigning values from resources 2011-06-13 12:39:23 +02:00
Zoltan Varga 1ff53bb1ba Add an assert to detect TLS mismatches between the aot compilation and runtime environment. 2011-06-12 18:47:17 +02:00
Sebastien Pouliot 927a76eb30 Fix namespace and avoid looping once ctor is found 2011-06-12 12:25:23 -04:00
Sebastien Pouliot 050abd469f Refactor MonoMac's MarkNSObjects substep so it can be reused in other products 2011-06-12 12:25:04 -04:00
Jb Evain 127c3bf6e0 update tuner 2011-06-12 12:24:41 -04:00
Jb Evain cbd9da1acf update tuner 2011-06-12 12:24:14 -04:00
Zoltan Varga 71b1425fd5 Fix the check for the -Wno-unused-but-set-variable gcc option. 2011-06-11 15:35:06 +02:00
Zoltan Varga 89424f5b25 Disable the -Wunused-by-set-variable warning supported by newer gcc versions. 2011-06-11 15:35:06 +02:00
Rodrigo Kumpera 86d31a6e3f Fix darwin-arm build. 2011-06-09 13:55:23 -03:00
Zoltan Varga 84265522ed Fix a corner case where an inlined bblock which had its next_bb set was the last bblock in a method. Fixes #693905. 2011-06-04 15:24:38 +02:00
Jonathan Pryor 662a9ac8f7 Allow Android'd support_boehm=no to work.
The AC_ARG_ENABLE(boehm, ..., ..., support_boehm=yes) resulted in
support_boehm always being 'yes', even for `--host=arm-linux-androidabi`,
which was not the intention. Using `support_boehm=${support_boehm:-yes}`
generates correct behavior.
2011-06-03 17:19:43 -04:00
Jonathan Pryor 33068b3d07 Simplify building with the Android NDK.
Check --host against *-*-linux-android* for Android-specific configure fixes,
and improve **/Makefile.am to simplify Android support:

	./configure \
		--build=`./config.guess` \
		--host=armv5-linux-androideabi \
		--target=armv5-linux-androideabi \
		--enable-nls=no --with-mcs-docs=no --enable-mcs-build=no \
		CC="/path/to/ndk/arm-linux-androideabi-gcc --sysroot=/path/to/sysroot" \
		AR="..." AS="..." CPP="..." CXX="..." LD="..." RANLIB="..." STRIP="..."
		CFLAGS="-DARM_FPU_NONE=1" CXXFLAGS="-DARM_FPU_NONE=1"

See also Android NDK docs/STANDALONE-TOOLCHAIN.html.

The Android NDK/bionic is "interesting", in that it's lacking header files and
macros normally present on Linux which otherwise break the build (e.g. no
<link.h> which breaks Boehm support).  Using --host with an android target
works around the known issues, simplifying the building of libmonosgen-2.0.so
with the Android NDK toolchain.
2011-06-03 16:58:08 -04:00
Atsushi Eno db9f31cbd1 Support RemoteEndpointMessageProperty. 2011-06-03 19:47:40 +09:00
Zoltan Varga 5b3336a997 Fix the previous change. 2011-06-03 12:29:17 +02:00
Zoltan Varga 6920d7ce86 Fix NOMAP32BIT support in specific trampolines. 2011-06-02 23:42:46 +02:00
Rodrigo Kumpera 1da10df16c Handle a vtable layout corner case.
class.c (mono_class_inflate_generic_method_full_checked): Don't
	inflate a method if the provided context won't change it.
	This change, in particular, avoid inflating a generic method
	of a non-generic class if the context has class only vars.

	This fixes #696593 as the above was causing the vtable of
	Class3 ending up with an inflated Class1::Method<> that
	comes from inflated Class2<object> parent.
	Then the parent override pass would collect a non-inflated
	Class1::Method<> overide that would then not match the one
	on the vtable causing Class3 to have an abstract method on
	its vtable and thus failing to load.

	Big explanation means tricky change, might break tons of stuff.
2011-06-01 15:04:34 -03:00
Atsushi Eno 7f2cf89aeb Support WebHttpBinding configuration. 2011-05-31 20:58:05 +09:00
Atsushi Eno 3e629f2ac7 Ref parameter was not covered by ParameterInfo.IsOut. Fixed bug #696784. 2011-05-31 18:55:09 +09:00
Rodrigo Kumpera 3c5a13fa39 Properly handle field RVA under moving collector.
* reflection.c (typebuilder_setup_fields): Alloc RVA data
	on the image mempool so it works with a moving collector.

	Fixes #696817
2011-05-30 18:34:03 -03:00
Rodrigo Kumpera 46c26749eb Fix sgen under xen 2011-05-30 12:23:35 -03:00
Atsushi Eno a2d8112081 Add test for XmlMembersMapping.TypeName and .Namespace (not very useful yet...) 2011-05-27 17:30:12 +09:00
Atsushi Eno bb331ddde1 Fill type info in MessagePartDescription from XmlSerializer-based wsdl importer.
It still needs some fixes to import message elements.
2011-05-27 17:27:01 +09:00
Rodrigo Kumpera 300bc2d4b0 Fix mul_imm under amd64 2011-05-25 15:09:28 -03:00
Marek Habersack f88fba3cbd [asp.net] Don't throw an exception if a session item being released does not have a lock.
It can happen when the item is being released after its associated session has ended.
2011-05-24 11:14:33 +02:00
Atsushi Eno 7b58e280a5 Support named wildcard in UriTemplate matching. Fixed bug #693996. 2011-05-23 20:32:11 +09:00
Atsushi Eno 8dd637646f Look for KnownTypeAttributes on known types (recursively). Fixed bug #695203. 2011-05-23 19:29:28 +09:00
Atsushi Eno 77625cbc89 Allow DocumentType in ImportNode().
http://lists.ximian.com/pipermail/mono-devel-list/2011-May/037575.html
2011-05-19 13:18:20 +09:00
Marek Habersack b122da385a [asp.net] Ignore JavaScript blocks enclosed in HTML comments 2011-05-19 03:37:44 +02:00
Marek Habersack eac15568e2 [runtime] When shadow-copying assemblies, use the io portability function to find the file.
This is necessary in situations when managed code pases case-insenstive file name and the
file on disk uses different case. stat(2) would return an error in such situation and, in effect,
the stat structure would get invalid/random values in its fields.
2011-05-18 22:05:40 +02:00
Atsushi Eno fb67d391a3 Check invalid recursion of xs:group use. Fixed bug #650117. 2011-05-18 01:11:34 +09:00
Marek Habersack 7129d57c22 [asp.net] Fix for bug #650847. Output both tagged and untagged UpdatePanel names in AJAX responses.
Also, update panels which rendered empty string are included in the output.
2011-05-16 16:15:03 +02:00
Atsushi Eno 9e88fe782a Do not import xs:any member as XmlElement[]. Create a wrapper class instead.
Part of bugfix #670945.
2011-05-16 18:47:11 +09:00
Atsushi Eno 91de42214b (manually) Merge pull request #101 from occ/master
Decimal support to XmlBinaryDictionaryReader
2011-05-16 16:41:27 +09:00
Zoltan Varga 02b82fb567 Avoid a crash in Field:GetRawConstantValue () if the field type couldn't be loaded. Fixes #693894. 2011-05-15 13:05:14 +02:00
Atsushi Eno 9fc2d82c3b Implement XmlSerializerMessageContractImporter, round 2.
This time it is XmlSerializer-based, got it somewhat working.
2011-05-14 01:30:21 +09:00
Atsushi Eno 1aebe941ef Do not take host part into consideration on comparing URLs.
It blocks access by different host name (e.g. localhost vs. IP).
This was part of bugfix #687580 (forgot to commit).
2011-05-13 21:55:30 +09:00
Atsushi Eno 9c1b923e99 Implement WsdlContractConversionContext, and ignore message importer for now. 2011-05-13 21:48:41 +09:00
Atsushi Eno 6adda4d4c0 Revert previous XmlSerializerMessageContractImporter implementation.
XsdDataContractImporter is not XmlSerializer-based, while this class is.
2011-05-11 18:42:45 +09:00
Atsushi Eno 5a8f29cbcc Add PipeException. fixed bug #692987 by Eberhard Beilharz. 2011-05-11 16:56:58 +09:00
Atsushi Eno aa2208afee Fixed orders in XmlSchemaObjectTable and got some S.R.Serialization tests working. 2011-05-11 16:37:04 +09:00
Atsushi Eno a1e3732cef CanImport() just returns false, without throwing error. 2011-05-10 22:04:10 +09:00
Atsushi Eno 8bb3b4db45 support import of xs:anyType, as well as make couple of minor fixes. 2011-05-10 21:47:58 +09:00
Atsushi Eno 240c0124a6 Fix common issue in MetadataSet - call MoveToContent() while iterating nodes. 2011-05-10 20:00:38 +09:00
Atsushi Eno 52965a2b9d Add new MetadataSetTest and fix couple of minor issues. 2011-05-10 19:36:26 +09:00
Atsushi Eno bed33dd66b Revive this test by implementing mock web server. 2011-05-10 19:36:16 +09:00
Atsushi Eno c0f3997eaf Add (not-working) callback instance context mode test and FIXME comment. 2011-05-10 19:36:05 +09:00
Atsushi Eno 29adf41cc2 Update XsdDataContractImporter.CanImport and implement ImportXmlType. 2011-05-10 17:42:03 +09:00
Atsushi Eno 0f6b274a8e ongoing XmlSerializerMessageContractImporter work.
It is part of bugfix #670945.
2011-05-09 23:00:39 +09:00
Atsushi Eno 34b7d3a84d Multiple schemas in wsdl could share same SourceUri, so check more identity.
Part of bugfix #670945.
2011-05-09 19:12:09 +09:00
Atsushi Eno 3afbf58c92 Allow xsi:nil for void. Fixed client side of bug #687580. 2011-05-09 13:52:09 +09:00
Atsushi Eno 9193bf8f3f Now our HttpListener can listen to wildcard prefix safely.
Fixed server part of bug #687580.
2011-05-09 13:43:12 +09:00
Rodrigo Kumpera 2b487789c8 Workaround io-layer crashing when the runtime exit without cleaning up everything.
* handles.c (handle_cleanup): When the runtime exit(), not
	everything is shutdown and the main thread might be waiting
	on other threads to finish. On this case, io-layer cleanup
	with assert as a mutex will be in use.
	The work-around is to be lenient to busy resources during
	shutdown.
2011-05-07 00:13:11 +02:00
Lluis Sanchez 6b6ce9bd43 [Web Services] Fix regression caused by previous commit
Fixes a regression caused by the implementation of support
for optional parameters. GlobalIndex was not being set
when using SOAP RPC protocol.
2011-05-06 18:45:30 +02:00
Veerapuram Varadhan fbe4e20182 [ado.net]bugfix:688773 - Assign default value to columns that does not
exist in the row that is being imported.
2011-05-06 00:06:23 +05:30
Veerapuram Varadhan d753eb1861 [ado.net]bugfix:681916 - Based on patch by Scott <[email protected]>
- Handle null values for parameter types varbinary(max) and/or image
2011-05-06 00:05:31 +05:30
Veerapuram Varadhan aac2016aa9 [mono]bugfix:663287 - Validate the type of value against underlyingtype
instead of nullableType.
2011-05-06 00:03:42 +05:30
Veerapuram Varadhan 2ec26f2e77 [ado.net][OracleClient] - Fixes calling size_t native parameters by
passing UIntPtr reference types and hence, solves 32/64 bit and
little/big-endian issues.
2011-05-05 23:51:14 +05:30
Veerapuram Varadhan 9e48c8a2b0 [bugfix][ado.net]Fixes 663914 - Restore original column data for
unchanged columns during deserialization.
2011-05-05 23:41:39 +05:30
Marek Habersack f1ab82a7e8 [corlib] Do not cache disposed resource sets. 2011-05-04 23:33:11 +02:00
Marek Habersack c4a3ecad74 [asp.net] Do not retrieve script's URL in RegisterScriptReference if script.Path is set. 2011-05-04 23:33:04 +02:00
Martin Baulig 844d678cba Add socket timeouts to the soft debugger.
SDB now support setting a send/receive timeout on the client's side
of the communication socket.  To make this work, the server sends
a special 'keepalive' event when using receive timeouts.

There's a new method VirtualMachine.SetSocketTimeouts() to enable
this feature.
2011-05-03 13:53:37 +02:00
Rodrigo Kumpera d3c5cc1fe5 Add regression test for #691057 2011-05-03 02:58:48 -03:00
Rodrigo Kumpera 01cf5ded25 Fix a couple of issues on Mono.Simd.
* local-propagation.c (mono_local_deadce): Don't perform
	reverse copyprop on simd insert ops. The backend requires
	dreg and sreg1 to match.

	* mini-x86.c (mono_arch_output_basic_block): Fix insert_r8_slow
	for the X element.

	Fixes a few bugs due to #691057
2011-05-03 01:23:20 -03:00
Zoltan Varga 399a6c779e Implement BSTR icalls even when COM is disabled. Fixes #690255. 2011-05-03 01:03:43 +02:00
Gonzalo Paniagua Javier 516cbf29c4 Don't set NoDelay twice. 2011-05-02 12:12:09 +02:00
Jb Evain 63fc3530b9 Fix non net_4_0 profiles build 2011-05-02 11:58:52 +02:00
Jb Evain 0ae09ac40d Properly check the maxstacksize asked for the Thread 2011-05-02 11:46:09 +02:00
Zoltan Varga c9cb0a918b Fix support for parameters with generic constraints in Type.IsAssignableFrom (). Fixes #691119. 2011-05-02 09:41:18 +02:00
Geoff Norton c538edd457 Avoid doubly declaring some types in the 2.1 profile for mobile 2011-04-30 11:48:59 -04:00
Gonzalo Paniagua Javier 718f02e0d3 Fix prefix selection
We were picking the wrong prefix when the URL matched the path.
	Fixes bug #688860.
2011-04-30 11:34:54 +02:00
Gonzalo Paniagua Javier f3560b3f22 Support FTP + RETR + proxy
Fixes bug #690887.
2011-04-30 11:08:55 +02:00
Gonzalo Paniagua Javier 8b18364cfb Missed this in the backport 2011-04-30 06:59:20 +02:00
Geoff Norton e7ff9bcf14 Remove debug spew 2011-04-29 17:52:33 -04:00
Geoff Norton 546a888f91 [boehm] Avoid a ENOMEM when allocating across an unallocated page
A very rare allocation pattern could cause the boehm free list to call
the GC_unmap_gap function, which actually calls down into munmap().
Darwins virtual memory manager will return a KERN_INVALID_ADDRESS
which is translated into a ENOMEM, if mprotect attempts to change
the protection of a range which includes an unallocated page.
We address this by just mmap() back to ANON, instead of actually
unallocating the page.
2011-04-29 16:23:15 -04:00
Gonzalo Paniagua Javier b0c3795ac4 [webclient] Process uri.UserInfo when present
If there are no crendetials, the Uri might have them.
	Based on a patch by QuickJack.
	Fixes bug #688007.
2011-04-29 11:55:17 +02:00
Geoff Norton 19f4433ef2 Avoid a needless buffer copy that is susceptible to overflow 2011-04-28 23:05:15 -04:00
Zoltan Varga b09e63d792 Fix loading from volatile base addresses in the LLVM backend. Fixes #690020. 2011-04-28 23:46:42 +02:00
Zoltan Varga 5e04bc52bb Revert "Modify fixup_cattrs () to handle a corner case where a cattr is created using a MonoCMethod instead of a ConstructorBuilder. Fixes #689533."
This reverts commit 046ff98055.

This seems to break smcs.exe.
2011-04-28 22:28:00 +02:00
Lluis Sanchez 2773f9f10a [Web.Services] Add support for optional parameters
Non-nullable web service parameters can be made optional by
adding an additional parameter with the same name and a
'Specified' suffix. This was supported when serializing
classes, but not when serializing web service parameters.
This might fix bug 688496.
2011-04-28 18:34:16 +02:00
Atsushi Eno cf183438ee Looks like xs:any is allowed under certain condition in XsdDataContractImporter.
But I don't understand why :(
2011-04-28 23:41:43 +09:00
Atsushi Eno c18ad33d44 moonlight does not like XmlSchemaType but nasty code in KnownTypeCollection :( 2011-04-28 22:10:06 +09:00
Atsushi Eno 9956130fa2 ...and do return Type for all known xs:* types in XsdDataContractImporter. 2011-04-28 20:33:47 +09:00
Atsushi Eno 50ad936a80 Do not reject xsd:* types that are not listed in KnownTypeCollection.
e.g. xs:token.
2011-04-28 20:09:05 +09:00
Atsushi Eno acb4203da5 support <service>-less wsdls in svcutil. Look for portTypes instead. 2011-04-28 19:54:48 +09:00
Atsushi Eno a6e6fbbeb3 Extend supported XmlDateTimeSerialization formats. Fixed bug #690475. 2011-04-28 17:37:33 +09:00
Atsushi Eno 02e0ab3df8 XmlSerializer code generator was generating wrong char literal.
Fixed bug #673019.
2011-04-28 15:44:18 +09:00
Gonzalo Paniagua Javier a66df5bf91 [socket] More BeginConnect (IPAddress []) work
When trying multiple addresses, the second and sucessive calls to
	BeginConnect(IPAddress) will cause an error which we would have to
	ignore and then retry. Since this behavior is not documented, we just
	close the socket and open a new one for retries is there is already a
	pending connect attempt.
2011-04-28 00:18:35 -04:00
Gonzalo Paniagua Javier ef49022f97 [Socket] Improved ConnectAsync
ConnectAsync() now uses the improved BeginConnect.
2011-04-28 00:18:35 -04:00
Atsushi Eno 4d2ff35b88 Remove non-existent test source (it is only in master). 2011-04-28 12:45:13 +09:00
Atsushi Eno 1e08457302 Handle fault messages in duplex callback channel. 2011-04-27 20:59:18 +09:00
Atsushi Eno 59dd3fcfe8 Use FindCritera/ResolveCriteria Duration properties for DiscoveryEndpoint timeout. 2011-04-27 15:43:46 +09:00
Atsushi Eno 35a659b435 Log UDP messages (using System.ServiceModel internals via IVT). 2011-04-27 15:43:39 +09:00
Gonzalo Paniagua Javier 01fff28591 If there's a delayed exception, clear 'ares' 2011-04-26 23:44:12 -04:00
Gonzalo Paniagua Javier acad9c91d0 Worked on linux, failed on OSX 2011-04-26 22:05:49 -04:00
Marek Habersack ea73a5a1e4 [asp.net] CreateChildControls is internal only when compiling system.web tests 2011-04-26 21:14:35 +02:00
Jérémie Laval 6c5f273c3f Fail gracefully when CancellationToken has been created uninitialized by user.
Also add corresponding unit test.
2011-04-26 17:03:26 +02:00
Jérémie Laval 512ca45eb9 Add CancellationToken unit tests 2011-04-26 17:03:26 +02:00
Jérémie Laval 67c3b641c2 Honors correctly canceled ctor parameter of CancellationToken 2011-04-26 17:03:26 +02:00
Gonzalo Paniagua Javier bb61f41996 Reset the blocking flag as soon as possible. 2011-04-26 11:03:00 -04:00
Gonzalo Paniagua Javier 8dfa7d2c7e [socket] Fixed other BeginConnect overloads
The BeginConnect overload taking an IPAddress[] was not really
	asynchronous.
2011-04-26 11:03:00 -04:00
Zoltan Varga 046ff98055 Modify fixup_cattrs () to handle a corner case where a cattr is created using a MonoCMethod instead of a ConstructorBuilder. Fixes #689533. 2011-04-26 13:26:54 +02:00
Atsushi Eno cde89bb093 Fix monodroid/monotouch build. 2011-04-26 19:39:10 +09:00
Gonzalo Paniagua Javier 9eb77b093b [Socket] Fix BeginConnect
Windows/Linux flagged the socket as writable even when connect() has
	not been called. On *BSD and OSX, this was not the case and we waited
	forever.

	Now, for blocking sockets, we make them blocking and call connect()
	before adding the socket to the wait pool.
2011-04-26 00:05:26 -04:00
Gonzalo Paniagua Javier 5e40958c3b In *AllLines use WriteLine instead of Write.
This fixes bug #689670.
2011-04-25 16:23:17 -04:00
Atsushi Eno 82b1e211f8 Log net.tcp transport messages too. 2011-04-25 18:31:01 +09:00
Atsushi Eno 3fd521bd7d Make our own simple log format actually diagnostics-compatible.
So MS ServiceTraceViewer.exe can open our log now.
2011-04-25 18:30:50 +09:00
Atsushi Eno cdc0fc4d45 Document MONO_WCF_TRACE environment variable. 2011-04-25 16:25:39 +09:00
Atsushi Eno 43c40b6f3d minor diagnostic log format brush up. 2011-04-25 16:15:08 +09:00
Atsushi Eno 2e5417f5bd Actual source directory changes after changing namespaces. 2011-04-25 15:57:59 +09:00
Atsushi Eno 247cef557f More nettcp namespace changes. 2011-04-25 15:57:49 +09:00
Atsushi Eno 0f328b26c0 Move NetTcp namespace to internal one. 2011-04-25 15:57:38 +09:00
Atsushi Eno 415027eedd Enable environment-controled output on non-moon profile too. Add error logging. 2011-04-25 15:38:39 +09:00
Miguel de Icaza 1223efd9ce Do not go beyond our string boundaries 2011-04-23 12:54:57 -04:00
Atsushi Eno 27e1844bb9 Log HTTP reply Message too. Make logging customizible on under the moon.
Logging is done only when requested by MOON_WCF_TRACE=[stdout|stderr]
environment variable.
2011-04-23 02:09:11 +09:00
Marek Habersack 054738b20f Fix compilation 2011-04-22 14:02:39 +02:00
Marek Habersack 58a60f9e5e [asp.net] Do nothing if null SessionStateStoreData is passed to SessionStateServerHandler.SetAndReleaseItemExclusive 2011-04-22 12:36:11 +02:00
Marek Habersack df413084ff [asp.net] Inform user about all exceptions thrown during HttpRuntime static initialization 2011-04-22 11:55:35 +02:00
Marek Habersack b029f4e97e [asp.net] Implemented composite scripts support in System.Web.Extensions 2011-04-22 11:55:15 +02:00
Zoltan Varga 4b98bcb536 Fix AOT support for isinst_with_cache wrappers. Fixes #687865. 2011-04-22 03:40:58 +02:00
Geoff Norton c597bb43ac We support hard breakpoints on arm, not sure why this is here at all 2011-04-21 15:00:42 -04:00
Atsushi Eno f66017dd16 Use XPathNavigator output in WCF diagnostics. Got sorta-valid message trace. 2011-04-21 21:12:48 +09:00
Atsushi Eno 0990c54b02 Fix wrapper elements. It should be <TraceData><DataItem>... 2011-04-21 21:09:48 +09:00
Atsushi Eno 1cf432ed50 XmlWriterTraceListener supports XPathNavigator as non-escaped xml output. 2011-04-21 20:56:09 +09:00
Marek Safar eb9c5951e6 [688891] Keep same TypeParameter ctor syntax 2011-04-21 10:11:11 +01:00
Marek Safar 6a1de942e0 [688891] Copy type parameters for base proxy method 2011-04-21 10:08:42 +01:00
Atsushi Eno b62fb2816f Use xmlns-ignoring XmlDocument derivation for config files. Fixed bug #641935. 2011-04-21 17:47:49 +09:00
Atsushi Eno d3a50832b1 RooArray types were rejected as unknown when it is at root. Fixed bug #688414. 2011-04-21 16:22:09 +09:00
Atsushi Eno d911500226 Get real fix for bug #687902. Revert request processor IDisposable.
and handle session shutdown when creating InstanceContext.
Also add note on DisposeInstance(), which got me stuck.
2011-04-20 19:15:15 +09:00
Atsushi Eno 657c31a31b Ongoing service channel closing fix and session management in ChannelDispatcher.
It is part of bugfix 687902.

To get the bug fixed, the new "using" sections in ChannelDispatcher.cs to
explicitly dispose channels. But this causes regression in PerSession-based
tests. So some new session management code is (likely) required as well.

It will also alter "mixed" MaxConcurrentCalls and MaxConcurrentSessions with
correct management code.
2011-04-20 16:57:58 +09:00
Miguel de Icaza 851c79f6e6 Prevent crash on scripts that do not contain the #! line 2011-04-19 22:52:39 -04:00
Zoltan Varga 3fedcf496b Allow storing managed pointers into 'native int' in the JIT, fsharp generates code without a conv.i. Fixes #688008. 2011-04-19 22:45:29 +02:00
Gonzalo Paniagua Javier 1562106ccd [HttpListener] Fix matching directories
/foo was not properly matched.
	Fixes bug #688353.
2011-04-19 13:56:39 -04:00
Marek Safar 90922a746d [687282] Fixes cross references of nested anonymous methods which don't start at parameters level block 2011-04-19 13:06:12 +01:00
Lluis Sanchez e54906aaf2 Fix ICollection.CopyTo in the Stack class 2011-04-19 13:51:55 +02:00
Gonzalo Paniagua Javier 6f9f05df58 [HttpWebRequest] Fix half-baked commit
Fixes bug #688100.
2011-04-18 10:57:21 -04:00
Marek Habersack ce3b0b7564 [asp.net] ScriptResourceHandler must correctly encode script literals. 2011-04-18 13:23:28 +02:00
Atsushi Eno a9777b31fc Empty XmlReader message caused failure on buffereed copy. 2011-04-18 17:22:21 +09:00
Zoltan Varga 7dcacbb5bf Fix Object.MemberwiseClone () on arrays. Fixes #688033. 2011-04-17 23:49:33 +02:00
Gonzalo Paniagua Javier 5f8f48145d [webclient] Only set the credentials when they are not null.
Setting the credentials to null makes FtpWebRequest throw.
	Fixes bug #688007.
2011-04-17 13:58:59 -04:00
Sebastien Pouliot b8052728ea backport pull request for 2.10.2 2011-04-17 10:07:12 -04:00
Marek Habersack 3f823404fc [asp.net] MinimizableAttributeTypeConverter only converts from strings.
It returns a boolean 'false' when the passed string matches (case-insensitively) 'false' or
is empty, returns 'true' otherwise.
All the other types (and a null value) cause it to throw the NotSupportedException.
2011-04-16 02:12:48 +02:00
Rolf Bjarne Kvinge e3658fe73e [corlib] Ensure Thread.ManagedThreadId is unique per thread.
This fixes bug #667329.

The problem was that ManagedThreadId was created from a per-appdomain
counter, but stored in a per-thread storage, so if two threads could
end up with the same ManagedThreadId if a second appdomain executed
on the second thread first.
2011-04-15 22:11:09 +02:00
Marek Habersack 3f43883b30 [asp.net] Fix for bug #685116. AJAX post-back which redirects the browser does not need a Page or ScriptManager instance 2011-04-15 21:57:20 +02:00
Atsushi Eno c9f2555f4a Prepare for HostNameComparisonMode support (i.e. incomplete).
This is for bugfix #687580.
2011-04-16 01:07:19 +09:00
Atsushi Eno 8fa55bb406 Return null for empty message in WebMessageFormatter. Useful eror messages. 2011-04-15 23:52:15 +09:00
Atsushi Eno ea78b00406 Some argument check in TextMessageEncoder. 2011-04-15 23:52:04 +09:00
Atsushi Eno fb2c69e852 Use correct MessageVersion instead of Default for empty response.
Part of bugfix #687580.
2011-04-15 21:32:05 +09:00
Atsushi Eno 26536ad29f Prefer immutable string return for ease of debugging in UriTemplate. 2011-04-15 20:04:30 +09:00
Atsushi Eno 24702d5e64 Fix regression for counter case to 6005f0a7.
http://localhost/x + X should not result in http://localhost/xX.
2011-04-15 16:45:34 +09:00
Atsushi Eno 79bf69008d Implement support for KnownTypeAttribute.MethodName. 2011-04-15 15:42:52 +09:00
Atsushi Eno 0d20226656 Flush XmlWriter and TextWriter so that incomplete changes are not lost. 2011-04-15 14:57:56 +09:00
Atsushi Eno e4f59e1fa0 One more step to enable WCF diagnostics in Logger, and add HttpReplyChannel log. 2011-04-15 14:48:11 +09:00
Gonzalo Paniagua Javier bf77046abc Clearing the queue messed up with the per-domain job count
Fixes bug #687399.
2011-04-14 15:25:59 -07:00
Marek Habersack 985f57d2b4 [asp.net] Fix for bug #685267. ClientScriptManager generates correct post-back event reference for cross-page post-backs. 2011-04-14 22:42:09 +02:00
Marek Habersack aca8c70648 [asp.net] Shorten code in WebConfigurationHost 2011-04-14 20:51:07 +02:00
Marek Habersack be8a6afd4a [asp.net] Fixed a thinko in one of the previous commits 2011-04-14 20:50:59 +02:00
Atsushi Eno b313b63718 Add ServiceKnownTypeAttributeTest. 2011-04-14 15:23:09 +09:00
Atsushi Eno 80238cef2f ServiceKnownTypeAttribute.MethodName was used way different to lookup method. 2011-04-14 14:58:03 +09:00
Martin Baulig 776a4cb2b5 Oooops, it's supposed to be 'if (!strcmp (...))' ! 2011-04-13 20:18:43 +02:00
Marek Habersack a96c5dd131 [asp.net] Make web.config path check test case-insensitive 2011-04-13 16:57:53 +02:00
Marek Habersack c79e051d35 [asp.net] A more effective way of looking for web.config 2011-04-13 16:57:46 +02:00
Marek Habersack 0adb5a6dbf [runtime,IO] Filesystem entries can only be sought for in directories, not files. 2011-04-13 16:57:40 +02:00
Atsushi Eno 64ba822460 Fix wrong TraceEventType values passed. 2011-04-13 02:23:18 +09:00
Martin Baulig db59c744af Ooops, also enable explicit nulls. 2011-04-12 07:02:07 +02:00
Zoltan Varga d0ecf17cec Avoid putting a seq point at the beginning of finally clauses, they already have one. Fixes #686269. 2011-04-11 23:18:31 +02:00
Zoltan Varga 86b0b2afed Revert "Add checks to ParameterBuilder.SetConstant () to avoid an assert in the runtime. Fixes #684438."
This reverts commit c5c488ec9d.

This seems to break IronRuby.
2011-04-11 19:38:52 +02:00
Martin Baulig db9d1fffba Add "soft breakpoint" support for ARM.
There is some broken hardware like the HTC Desire HD where we can't
use any signals for single-stepping and breakpoints.

See http://baulig.blogspot.com/2011/04/limiting-page-faults-on-htc-desire-hd.html
for details.

To work around this, we read from a variable instead us using trigger
pages.
2011-04-11 17:48:47 +02:00
Zoltan Varga c5c488ec9d Add checks to ParameterBuilder.SetConstant () to avoid an assert in the runtime. Fixes #684438. 2011-04-10 20:46:23 +02:00
Gonzalo Paniagua Javier 11cee69b5f [HttpWebRequest] Ignore Transfer-Encoding when there's no content.
If the transfer encoding was set to chunked, we tried to read even when
	the response might known to have no content. This led to timeouts.

	Fixes bug #686371.
2011-04-09 15:18:18 -04:00
Atsushi Eno 0dd62ba176 Implement 4.0 WebOperationContext.Create[Atom10|Json]Response() methods. 2011-04-08 21:40:01 +09:00
Atsushi Eno 40f9aba00f Add XmlSerializerFormatAttribute support in mobile profiles.
Unlike moonlight, XmlSerializer is in the framework lib (sys.xml), so we don't
have to split them out to Sys.Xml.Serialization.dll.
2011-04-08 16:01:11 +09:00
Atsushi Eno 643148f131 Temporarily disable InternalsVisibleTo(Sys.Xml.Serialization). 2011-04-08 13:46:47 +09:00
Gonzalo Paniagua Javier 099d0f0e34 Remove printf 2011-04-07 21:32:44 -04:00
Miguel de Icaza 9187dbc0d9 Revert broken patch 34f18b68 that caused random bugs in assembly loading, but could crash the runtime as well 2011-04-07 21:15:53 -04:00
Miguel de Icaza a9c68584df Add test to prevent future problems, this fixes the random MacOSX crashes with assembly loading, but likely everywhere else as well 2011-04-07 21:15:53 -04:00
Zoltan Varga 50dadb263b Revert "Disable SMP on arm until #683409 is fixed."
This reverts commit 29550902ee.

This is now longer needed as #683409 is fixed.
2011-04-07 22:20:24 +02:00
Zoltan Varga 1106b9be5f Pass HAVE_ARMV6 to libgc on darwin too. 2011-04-07 22:19:32 +02:00
Zoltan Varga ec6e3150f8 Add a membar to libgc's UNLOCK () on arm. Fixes #683409. 2011-04-07 22:16:29 +02:00
Atsushi Eno 824336a958 Split XmlMessagesFormatter out. It is for use in Sys.Xml.Serialization.dll.
XmlMessagesFormatter will be used in Sys.Xml.Serialization.dll and this
type should not be excluded by !NET_2_1 or !MOONLIGHT. It is not doable
if this class is in BaseMessagesFormatter.cs.
2011-04-08 00:22:38 +09:00
Atsushi Eno 5a414980ea Add InternalsVisibleTo(Sys.Xml.Serialization.dll) to Sys.ServiceModel in 2.1. 2011-04-08 00:13:03 +09:00
Atsushi Eno 7215e2b879 Fix moonlight_raw build in Sys.Xml.Serialization.dll (NIE!) 2011-04-07 23:29:28 +09:00
Atsushi Eno 12d359a6c4 DataContractSerializerOperationBehavior is done too. Fix moonlight_raw build. 2011-04-07 22:02:42 +09:00
Atsushi Eno 182883c4ba Some XmlSerializerFormatAttribute and XmlSerializerOperationBehavior refactoring. 2011-04-07 19:20:59 +09:00
Atsushi Eno 1ed5a802a9 HttpRequestChannel should also return CookieContainer in NET_2_1 profile.
Fixed bug #683642.
2011-04-07 12:34:54 +09:00
Gonzalo Paniagua Javier b0a314db2c [HttpWebResponse] Close and Dispose are different beasts.
After calling Close () on response you are still allowed to access its
	properties. Calling Dispose() causes the usual exception to be thrown
	when accessing the properties.

	Fixes bug #685368.
2011-04-06 23:02:03 -04:00
Zoltan Varga 4234f30930 Disable SMP on arm until #683409 is fixed. 2011-04-07 01:30:37 +02:00
MrUnleaded 12de169c29 Fix that corrects a mishandling of UInt64's. 2011-04-06 18:45:36 -04:00
Atsushi Eno cafcafe8d7 Looks like .NET accepts non-integer numbers as int. Smells bogus though. 2011-04-06 22:03:58 +09:00
Atsushi Eno 9dd0c9aaa0 auto-detect UTF16-LE too. 2011-04-06 20:22:11 +09:00
Marek Habersack 8e5e7a293e [DynamicData] Use different web.config for 2.0 and 4.0 tests 2011-04-06 11:07:17 +02:00
Gonzalo Paniagua Javier e430abe428 [eglib] The last argument can be empty and quoted.
Fixes bug #669303.
2011-04-06 02:04:59 -04:00
Atsushi Eno 8ed33a951d Fix build, looks like ArrayList is internally available in moon. 2011-04-05 23:07:34 +09:00
Jérémie Laval ef74fcb6bb Protect entering ReaderWriterLockSlim upgradable mode against async exceptions. 2011-04-05 15:25:34 +02:00
Marek Habersack 98cf1c90d4 [asp.net] Fix for bug #684803. XmlSiteMapProvider must take its root node into account when matching an URL. 2011-04-05 14:36:46 +02:00
Atsushi Eno aacbe2f237 Collection support in JSON serializer was actually for any IEnumerable. 2011-04-05 20:57:06 +09:00
Atsushi Eno 7ac57f726f Revert PushbackReader changes (was unnecessary and actually bogus). 2011-04-05 20:27:28 +09:00
Atsushi Eno 89fee7d373 null value also outputs "type='null' in WCF JSON writer. 2011-04-05 19:49:18 +09:00
Atsushi Eno 3d56703e92 Auto-detect text encoding from input stream for JsonReader. Fix DBCS pushback. 2011-04-05 18:24:02 +09:00
Atsushi Eno 53523879e8 IDictionary`2 serialization support was missing in DataContractJsonSerializer.
Fixed bug #685042.
2011-04-05 13:21:44 +09:00
Marek Safar 7290370f37 [666033] Fixes Mono.WebBrowser versioning
[backported by shana]
2011-04-04 18:46:08 +01:00
Jb Evain 5923bba0bf Fix net_2_0 build 2011-04-04 16:02:27 +02:00
Atsushi Eno c8a824af78 unlike told by docs.mono-android.net Trace does not exist in mobile profile. 2011-04-04 22:56:47 +09:00
Atsushi Eno bb3e8d2323 Add WCF diagnostics implementation (not working yet). 2011-04-04 20:58:44 +09:00
Kenneth Skovhede 2c74b21642 Fix the handling of the '%f' descriptor in DataConverter.Unpack (). Fixes #683712. 2011-04-03 06:33:52 +02:00
Marek Habersack 3e7bd993d8 [asp.net] 2.0 standalone tests must have the MONO_TESTS_IN_PROGRESS variable exported in the environment 2011-04-03 00:04:33 +02:00
Tomasz Kubacki ffbdeac062 [asp.net] HttpApplication.InitOnce must ensure that HttpApplication.Context does not return null.
HttpApplication.Context != null is assumed by System.Web.WebPages.WebPagesHttpModule Init method
2011-04-03 00:04:27 +02:00
Atsushi Eno e72666919a fix wrong attempt to add restricted headers in HttpRequestChannel. 2011-04-02 11:30:09 +09:00
Marek Habersack e57e16fee4 [asp.net] Store new heap size when shrinking it. Thanks to Rodrigo Kumpera for noticing it!
This should fix the IndexOutOfRangeError which occur after heap exceeds 8192 elements and is then
shrunk below that value.
2011-04-02 02:38:36 +02:00
Rodrigo Kumpera af23f3ee26 Fix thread restart under mach.
* sgen-gc.c (restart_threads_until_none_in_managed_allocator):
	On mach we used to simply call thread_suspend/thread_resume
	without updating the thread context, which would result in
	sgen getting hang.
2011-04-01 19:10:08 -03:00
Rodrigo Kumpera 1e137b7fcb Extract suspend code from mono_sgen_thread_handshake.
sgen-os-mach.c (mono_sgen_thread_handshake): Extract
	suspend code into new function mono_sgen_suspend_thread.
2011-04-01 19:01:58 -03:00
Rodrigo Kumpera 5340b41cd1 Use constant stack space for STW under darwin.
* sgen-gc.h: Since darwin doesn't use signals to
	stop the target threads, we must reserve space for
	register in SgenThreadInfo.

	* sgen-os-mach.c (mono_sgen_thread_handshake): Don't
	alloca inside the loop. Make sure each thread registers
	are copied to the right place.
2011-04-01 18:38:17 -03:00
Rodrigo Kumpera 11c5664fb4 Leverage SgenThreadInfo::mach_port.
* mach-support-*.c (mono_mach_arch_get_tls_value_from_thread):
	This function now receives pthread_t instead of mach_port
	as argument, so avoiding an expensive call to
	pthread_from_mach_thread_np.

	* sgen-os-mach.c (mono_sgen_thread_handshake): Loop over
	the registered threads insted of asking the kernel to enumerate
	them. Avoid calling pthread_from_mach_thread_np which takes
	a lock and is O(n) on the number of threads.
2011-04-01 18:18:02 -03:00
Rodrigo Kumpera 59d034e8a7 Store the mach port on SgenThreadInfo 2011-04-01 17:24:09 -03:00
Rodrigo Kumpera b178109c1e Fix win32 file name canonicalization.
* mono-path.c (mono_path_canonicalize): Properly canonicalize
	non UNC paths with an extra backslash. Eg:
	c:\foo\\bar was been canonicalized to c:\\foo\bar.

	This was breaking assembly loading in some rare cases.
2011-04-01 17:00:05 -03:00
Atsushi Eno a2a78ecc5d A bit less !NET_2_1 and !MOONLIGHT in Sys.ServiceModel.Web. 2011-04-02 04:11:09 +09:00
Atsushi Eno c540e335c3 Less !NET_2_1/!MOONLIGHT to improve SL4 WCF compatibility. 2011-04-01 20:45:47 +09:00
Marek Habersack b7aaf47762 [asp.net,routing] Fix for bug #682869. RouteCollection.MapPageRoute is a 4.0 thing 2011-04-01 13:41:04 +02:00
Marek Habersack b80dca6c9b [wcf] Unbreak the build (Assembly.IsDynamic is a 4.0 thing) 2011-04-01 13:34:51 +02:00
Marek Habersack 3dd79d0752 [mvc3] Part of fix for bug #683339. Override more NameValueCollection methods.
Without those overrides, merging collections in System.Web.HttpParamsCollection fails.
2011-04-01 11:55:34 +02:00
Marek Habersack a8cb34edbf [system] Part of fix for bug #683339. NameValueCollection.Add (NameValueCollection) must call the Get* overloads instead of BaseGet*
Otherwise classes wrapping NameValueCollection will not be able to intercept the Add call which leads to errors in MVC3's
FormCollection.
2011-04-01 11:55:28 +02:00
Alan McGovern 812ee3308e [log profiler] Keep correct stats about gchandles
We were not keeping track of allocated/destroyed/alive gchandles in the
log profiler. It only ever reported the number of handles alive at the
end of the profiling run and that was misreported as the output claimed
this was the number of gchandles created.
2011-04-01 10:34:12 +01:00
Atsushi Eno 53c2bea069 Implement ConfigurationName support for ChannelFactory.
It is required for MoonlightDrtViewer bugfixing.
2011-04-01 18:25:10 +09:00
Peter Gerbrandt e56d2c760b Fix contract description for contracts with deep inheritance hierarchy. 2011-04-01 14:21:00 +09:00
Louis Salin 3e9df709c8 TraceData and TraceEvent methods must pass a new instance of TraceEventCache 2011-03-31 09:09:41 -04:00
Louis Salin 1bd073b713 implement getter and setter for HostContext property 2011-03-31 09:09:40 -04:00
Gonzalo Paniagua Javier e60acb3ab0 Remove printf's 2011-03-30 22:27:25 -04:00
Gonzalo Paniagua Javier 6c94fea797 Revert "Fix a typo in Directory.GetFiles ()"
This reverts commit 5bbd6c23f8.
2011-03-30 21:04:35 -04:00
Zoltan Varga a4ae5ad77a Add some checks to the ActivationServices:AllocateUninitializedClassInstance () icall to avoid instantiating interfaces/abstract types. 2011-03-30 16:05:32 +02:00
Martin a8ef691b71 [asp.net] Fix for bug #658184. AuthorizationRule restores its Action when unmerging. 2011-03-30 12:21:54 +02:00
Marek Habersack 047b8446d4 [DataAnnotations] Implemented the Validator and CustomValidationAttribute 4.0 classes 2011-03-30 10:19:44 +02:00
Rodrigo Kumpera 66b152ffe0 Cast p to char* since the offset is in byte units. 2011-03-30 00:44:32 -03:00
Zoltan Varga 7f3f7f3d28 Fix the previous change. 2011-03-30 05:26:42 +02:00
Zoltan Varga fcd76072e0 Call SleepEx in a loop in the Thread.Sleep () icall, to avoid a race when the sleep is interrupted. Fixes #683519. 2011-03-30 05:07:47 +02:00
Vincent Povirk b4e8b39a6e System.Windows.Forms.Mime: Use freedesktop.org only on Unix platforms. 2011-03-29 21:10:51 -04:00
Gonzalo Paniagua Javier e22f04bbdc Reset BytesTransferred on every reuse. 2011-03-29 13:46:38 -04:00
Ankit Jain ebab6e9fad [xbuild] Allow skipping target framework moniker lookup.
* tools/xbuild/xbuild/4.0/Microsoft.Common.targets
(GetReferenceAssemblyPaths): Don't look up framework directories
for $(TargetFrameworkMoniker) is $(_TargetFrameworkDirectories) is
already defined. This can be used to override moniker lookups.
2011-03-29 18:48:35 +05:30
Gonzalo Paniagua Javier fe220bb14f Fix vasprintf() for empty strings.
James Bellinger entered bug #682963 and he ended up debugging it and
	providing the solution.
2011-03-28 23:25:18 -04:00
Andrew Jorgensen 2af17e6d19 mono-sgen-gdb.py should be installed conditionally 2011-03-28 16:37:38 -06:00
Gonzalo Paniagua Javier 5bbd6c23f8 Fix a typo in Directory.GetFiles ()
The mask never matched the attributes and all files were discarded.
	This fixes bug #683203.
2011-03-28 17:48:41 -04:00
Andrew Jorgensen 320abe5356 Bump to 2.10.2 2011-03-28 12:27:26 -06:00
Zoltan Varga cee9574eec Remove some unused fields from MonoDynamicGenericClass. 2011-03-28 15:01:24 +02:00
Atsushi Eno 6cc6d1f172 Cosmetic corcompare-based updates in Sys.SM.Web. 2011-03-28 21:18:17 +09:00
Atsushi Eno fd0bfb7e2e Looks like WCF serializer supports XmlNode, so we do as well.
for details: http://msdn.microsoft.com/en-us/library/aa347876.aspx

Fixed bug #682957.
2011-03-28 17:11:30 +09:00
Zoltan Varga 8f8e0a9b6e Fix a case where class->instance_size was not set for dynamic classes. 2011-03-28 08:25:01 +02:00
Atsushi Eno 71f131be40 null JSON type must be handled in JsonWriter. 2011-03-26 21:28:06 +09:00
Atsushi Eno c96c5db231 Do not always assume ascii == 1 byte in JsonWriter. Fix utf-16 usage. 2011-03-26 21:01:37 +09:00
Atsushi Eno 4e0819daab XStreamingElement should be covered in WriteTo(). It's not derived from XNode. 2011-03-26 19:27:14 +09:00
Atsushi Eno 07ddd5f698 Nowadays, XmlDeclaratoin.WriteTo() writes PI instead of raw.
This resulted in invalid output to JsonWriter (via JsonReaderWriterFactory).
2011-03-26 19:15:42 +09:00
Marek Habersack 9ec474d427 [asp.net] HtmlForum.Name rendering updates + test updates 2011-03-25 22:49:51 +01:00
Marek Habersack 0810ccda41 [asp.net] Fix for bug #681553. Look for direct child controls before calling up on the NamingContainer 2011-03-25 14:22:52 +01:00
Rodrigo Kumpera f7a4dbc112 Avoid an infinite loop on broken utf16.
* gutf8.c (g_utf16_to_utf8): Increase the input counter
	when encountering broken surrogates head or tails to
	make sure we don't end in an infinite loop.
2011-03-24 23:21:46 -04:00
Gonzalo Paniagua Javier a247e53faa Avoid 'comparison always true...' 2011-03-24 23:21:10 -04:00
Gonzalo Paniagua Javier c86ebb4da5 Merge branch 'threadpool-2-10' into mono-2-10 2011-03-24 23:00:15 -04:00
Marek Habersack b225c4736c [asp.net] Fix for bug #681164. Page.InitOutputCache ignores calls with duration <= 0
It is ok to ignore such calls for two reasons - the cache with duration <= 0 will not
be effective anyway and the @OutputCache directive throws an exception for duration <= 0
2011-03-24 23:35:18 +01:00
Atsushi Eno 992872bb5d Fix serialization test build that depended on compiler contravariance bug. 2011-03-24 18:05:16 +09:00
Gonzalo Paniagua Javier a4d5c71207 .gitignore 2011-03-23 17:09:08 -04:00
Gonzalo Paniagua Javier 958ce2ba14 [windows] Avoid creating a thread in init 2011-03-23 17:08:52 -04:00
Gonzalo Paniagua Javier 82e0de5779 [windows] Make the connect hack work again. 2011-03-23 17:08:43 -04:00
Gonzalo Paniagua Javier 6e20527322 Revert "Replace old connect hack with _pipe on windows."
This reverts commit 1691837400.
2011-03-23 17:08:36 -04:00
Gonzalo Paniagua Javier 9c4c7d85e0 Revert "Remove unneeded function and use same code for win/lin"
This reverts commit 59c30ca79c.
2011-03-23 17:08:27 -04:00
Gonzalo Paniagua Javier c52ce4b572 Remove unneeded function and use same code for win/lin 2011-03-23 17:08:04 -04:00
Gonzalo Paniagua Javier 5b9892f071 Replace old connect hack with _pipe on windows. 2011-03-23 17:05:38 -04:00
Gonzalo Paniagua Javier 60f34bbaed --version shows kqueue now. 2011-03-23 16:57:15 -04:00
Gonzalo Paniagua Javier ff39c58bac [threadpool] Don't start all the IO threads on first request.
The IO threadpool behaves as the regular one now: threads are created
	on demand up to the default and then they are throttled based on load
	unless Set(Min|Max)Threads is used.

	Fix the stack size for threadpool threads when Set(Min|Max)threads is
	used.
2011-03-23 16:57:15 -04:00
Gonzalo Paniagua Javier 249e6665eb Some changes to the threadpool
-Reduce stack size for IO threads.
	-Create threads on demand up to min_threads, then throttle.
2011-03-23 16:57:15 -04:00
Gonzalo Paniagua Javier 3cd7aaf9c8 [threadpool] Add support for kqueue asynch. IO. 2011-03-23 16:57:15 -04:00
Gonzalo Paniagua Javier 40d02e9a1d [threadpool] Split the socket code in separate files. 2011-03-23 16:57:14 -04:00
Miguel de Icaza 725ac8d811 Make this OSX specific instead 2011-03-23 10:12:20 -04:00
Marek Habersack b34102015d [runtime] Fix compilation 2011-03-23 10:12:16 -04:00
Miguel de Icaza b311360048 OSX, Win32: Implements support for DriveInfo
This implements support for DriveInfo for OSX and Windows.

On OSX we use statfs system call that provides the filesystem
type information that we need.   On Linux, we continue to fallback
to mtab parsing
2011-03-23 01:56:58 -04:00
Miguel de Icaza 20808baa2c Add OSX support to the io-layer: supports getting a list of mounted file systems, and OSX-specific file system types 2011-03-23 01:56:47 -04:00
Miguel de Icaza b78ad6ad48 Add Environment.IsMacOS for handling OSX specific bits in corlib 2011-03-23 01:56:39 -04:00
Marek Habersack b93091c617 [asp.net] Fix for bug #681421. Use VirtualPathProvider.CombineVirtualPaths
The method is used by the parsers to look up dependencies, sources, controls
and master pages.
2011-03-22 21:29:17 +01:00
Marek Habersack d6b8fed5be [asp.net] Use List <string> instead of ArrayList to keep assembly locations in TemplateParser 2011-03-22 21:29:11 +01:00
Marek Habersack f12d23c5cc [asp.net] Use List <string> instead of ArrayList to keep file dependencies 2011-03-22 21:29:04 +01:00
Jb Evain f7bbde7bb5 Fix output of local variable names in debugging symbols 2011-03-22 16:00:29 -04:00
Geoff Norton 0e15d77a17 Set SO_REUSEADDR on listening sockets 2011-03-22 15:52:08 -04:00
Gonzalo Paniagua Javier 4e01dad1f8 [HttpListener] request.Url.Original string matches MS now.
Fixes bug #681548.
2011-03-22 12:57:12 -04:00
Gonzalo Paniagua Javier 406d680f31 [HttpListener] Match exceptions from MS on cleanup.
When the listener is aborted or closed, we get different exceptions
	depending on whether there's a GetContext() call in progress or not.
2011-03-22 12:56:51 -04:00
Zoltan Varga 7bde20118b Implement OperatingSystem.ServicePack. Fixes #681552. 2011-03-22 17:16:28 +01:00
Gonzalo Paniagua Javier 3a7370aefc [threadpool] Avoid the infame assert in mono-wsq.
Fixes bug #677746.
2011-03-22 11:52:18 -04:00
Gonzalo Paniagua Javier 2087d7c1a1 [msvc] New mono.def 2011-03-22 11:22:21 -04:00
Gonzalo Paniagua Javier ed57d90570 [HttpListener] Fix keep-alive connections
We were removing the connection in the wrong place.
	Also unbind the context in other error situations like a read failure
	after the headers are in.
2011-03-22 11:22:21 -04:00
Gonzalo Paniagua Javier fc3f496d1b [windows] Update create-defs.pl
Library is now mono-2.0, exclude mono_gc_pthread_* from the output.
2011-03-22 11:22:21 -04:00
Atsushi Eno 39ece5f8c7 Remove unexpected CWL. 2011-03-22 15:35:36 +09:00
Gonzalo Paniagua Javier b5b8d4a42e [windows] Wrong LoadLibrary being called.
We were calling LoadLibraryA instead of the W version.
2011-03-21 23:27:48 -04:00
Gonzalo Paniagua Javier 792bd0b4e3 [windows] Get rid of a lot of warnings 2011-03-21 23:27:47 -04:00
Gonzalo Paniagua Javier e8e244f839 [windows] Avoid creating a thread in init. 2011-03-21 18:16:59 -04:00
Veerapuram Varadhan bb58f668b3 [bugfix][ado.net odbc]Fixes #676368 - make it thread safe to release
underlying statement handles and check for the validity of the same
before attempting to release them.  Fixes random crashes.
2011-03-22 01:08:22 +05:30
Zoltan Varga ecdf344983 Fix the length of 'break' on ppc. 2011-03-21 20:07:57 +01:00
Jérémie Laval 6623fc543d Revert fcbb5717c1 and implement it differently.
The commit had the good idea but since some values of the enumeration overlap it broke the correct behavior. Instead we now turn off the extra options and use the previous way to check.
2011-03-21 13:30:52 +01:00
Geoff Norton 1e38c9d065 Add some missing types to the mobile profile 2011-03-20 21:53:26 -04:00
Jb Evain 30719eac23 [linker] always preserve System.MonoCQItem 2011-03-20 20:27:29 +01:00
Miguel de Icaza be791133e9 Merged compile fix from master 2011-03-18 22:22:14 -04:00
Rafael Munitic ba41a4afc3 Must pass null to overloaded constructor instead of wrapper lambda (TaskCompletionSource can use overloaded constructors and it will pass null in function argument) 2011-03-18 18:22:24 -04:00
Rafael Munitic 7001015c8a Continuation options should be checked as flags 2011-03-18 18:20:12 -04:00
Rafael Munitic cb86a2cae2 If the function is null Wait will not get called and will not check if Future is in faulted state/raise the exception 2011-03-18 18:19:42 -04:00
Koushik Dutta 2023fd51cf Fix bug where if a task is Start-ed with a specific scheduler,
that scheduler is ignored if it is in a thread owned by another
scheduler. Tasks should not be locked to the scheduler that
owns the calling thread.

Fix bug where TryExecuteTask does not actually try to execute
the task. Instead, TryExecuteTaskInline is called, which is
abstract. The TpScheduler implementation, the default, then
calls the internal method Task.Execute which then actually
executes the task. The problem with this is that only 3rd
party schedulers, can't actually execute a task, thus making
extending TaskScheduler impossible. (Unless they use some
serious Mono specific reflection hacks as I am now.)
2011-03-18 17:59:52 -04:00
Mark Sciabica ee0c82f938 Fix exception handling on windows x64. 2011-03-18 18:00:34 +01:00
Atsushi Eno f66c15fa4c XamlType lookup from xml name failed when [XmlnsDefinition] is involved. 2011-03-18 15:59:30 +09:00
Gonzalo Paniagua Javier 870a168078 Fix the host name returned in GetHostEntry.
GetHostEntry() was setting the HostName to the last IP address returned
	for the requested host name.
2011-03-18 01:27:12 -04:00
Zoltan Varga f1e5ff5830 Switch to the domain of the assembly in question while executing CMD_ASSEMBLY_GET_TYPE, so referenced assemblies are found. Fixes #679586. 2011-03-17 20:08:04 +01:00
Rodrigo Kumpera ec56b2399e Revert "[io-layer] Handle process waits when SHM is disabled."
This reverts commit 2bb69090d7.
2011-03-17 18:05:30 +01:00
Rodrigo Kumpera 98567347b0 Revert "[io-layer] Make my previous patch signal safe."
This reverts commit c183437b77.
2011-03-17 18:05:16 +01:00
Gonzalo Paniagua Javier d1ef9e9bc0 [asp.net] Return the correct Mime type for 304. 2011-03-17 12:50:08 -04:00
Marek Habersack 1d15cb6eab [asp.net] Test for bug #655474 2011-03-17 16:37:49 +01:00
Marek Habersack 2f6c884c39 [asp.net] Fix for bug #655474. Don't assume an Uri being serialized is an absolute one 2011-03-17 16:20:23 +01:00
Marek Habersack 3007742461 [asp.net] Test compilation fix for System.Web.Extensions 2011-03-17 16:20:06 +01:00
Marek Habersack dd02160e29 Removed debug noise 2011-03-17 15:41:33 +01:00
Marek Habersack 04ceb5cec2 [asp.net] Fix for bug #678473. Do not map paths of absolute file paths when passed to HttpRequest.WriteFile 2011-03-17 15:36:46 +01:00
Marek Habersack 4c251cb528 [asp.net] Fix for bug #670714. Menu is rendered correctly in 4.0 now (highlighting works) 2011-03-17 15:12:46 +01:00
Atsushi Eno f29c6b4014 Fix build; remove extra !NET_2_1. 2011-03-17 21:15:50 +09:00
Atsushi Eno 5d3bd4296d net.tcp Sized message with non-binarysession encoding should work now.
(Untested checkin.)
2011-03-17 20:05:43 +09:00
Atsushi Eno 7b4e9fe3b3 Support encoding record other than binary session in TCP channel frame reader. 2011-03-17 19:29:56 +09:00
Gonzalo Paniagua Javier e127fbdbc8 [Threadpool] Handle multiple calls to cleanup
Don't fail if mono_thread_pool_cleanup() is called more than once.
	Fixes bug #678662.
2011-03-17 02:00:10 -04:00
Marek Habersack da38ea1a3c [asp.net] Fix for bug #670874. Match request URLs against precompiled dictionary using absolute paths. 2011-03-17 01:53:37 +01:00
Zoltan Varga 80b18e5e78 Fix the title of the Mono.Debugger.Soft assembly monodoc. 2011-03-17 01:28:04 +01:00
Marek Habersack b08fcbf349 [asp.net] Fixes bug #676008. HtmlForm 'name' attribute rendering fixes.
The 'name' attribute is rendered using the static ID of 'aspnetForm' if
the form is in a naming container other than the Page control. Inside Page,
the form's ID is rendered. The attribute is output in .NET 4.0 only if control
rendering compatibility is less than 4.0
2011-03-17 00:56:34 +01:00
Gonzalo Paniagua Javier 4448207b46 [io-layer] Don't use Get/SetLastError after wapi shutdown.
handle_cleanup() is called at exit and might try to clean things up
	twice, causes a WSANOTUNITIALISED and then a segmentation fault trying
	to use a pthread key that has already been freed.
2011-03-16 16:12:01 -04:00
Gonzalo Paniagua Javier c183437b77 [io-layer] Make my previous patch signal safe. 2011-03-16 13:45:16 -04:00
Marek Habersack 0bc62c64f2 [asp.net] Fix for bug #668696. Handle recursive locks gracefully. 2011-03-16 16:19:05 +01:00
Zoltan Varga f9f20656d9 Fix support for generic virtual thunks in full-aot. 2011-03-16 14:44:38 +01:00
Zoltan Varga 1cf96c874c Add a cache for virtual generic thunks to avoid freeing those created by AOT. 2011-03-16 14:40:41 +01:00
Atsushi Eno 2e938cedc3 Enable behaviors in mobile profiles for WebHttpBinding. 2011-03-16 20:54:57 +09:00
Atsushi Eno 8aae8a860c Enable more behavior interface member in NET_2_1. 2011-03-16 20:52:50 +09:00
Atsushi Eno 72c9964603 Enable more behaviors use in NET_2_1 land, toward WebHttpBinding. 2011-03-16 20:43:24 +09:00
Atsushi Eno 045c255762 Implement more encodings than binary frame with dictionary, in TCP manager.
(not known to not regress in nunit tests..)
2011-03-16 20:34:05 +09:00
Atsushi Eno 441e34087e Fix MessageID element name in discovery contracts. 2011-03-16 20:31:37 +09:00
Jérémie Laval b754115f2b Don't throw an exception when task array is empty in WaitAll and throw in case a null element is encountered in it.
Fix for #679183
2011-03-16 09:34:38 +01:00
Jérémie Laval 94398a1154 Correctly implement enumerating CyclicDequeue.
Fix #679174
2011-03-16 09:33:29 +01:00
Atsushi Eno cf3968f176 Add endpoint behavior support in NET_2_1, which involved not a few additions. 2011-03-16 17:22:25 +09:00
Gonzalo Paniagua Javier 6101dfa1e7 Fix g_get_charset for windows.
Patch by Horst Kakuschke that fixes bug #660412.
2011-03-16 02:00:39 -04:00
Gonzalo Paniagua Javier 2bb69090d7 [io-layer] Handle process waits when SHM is disabled.
When SHM is disabled, handle SIGCHLD and either fill the info for the
	process handle or just wait for the process to avoid zombies.
	Fixes bug #668867.
2011-03-16 01:51:55 -04:00
Jason Cohen 32c89f8e51 [asp.net] Fix for bug #678705. Menu list rendered properly closes the list now. 2011-03-16 02:31:34 +01:00
Bassam Tabbara 733baa249e [asp.net] Fix for bug #667513. Implement support for PathInfo in Route.GetRouteData 2011-03-16 01:11:58 +01:00
Jb Evain 1fc9d8bd0b Handle conversion to System.Enum 2011-03-15 22:20:00 +01:00
Gonzalo Paniagua Javier c596b87264 [Semaphore] Remove warnings 2011-03-15 16:29:02 -04:00
Veerapuram Varadhan 51ede8ef25 [bugfix]672113 - Make a copy of constraint columns array 2011-03-15 20:24:10 +05:30
Atsushi Eno 92d8d69c21 avoid NRE on non-binary encoding use in TcpTransport. 2011-03-15 21:07:25 +09:00
Gonzalo Paniagua Javier 7ccc860767 Appdomain refs can be NULL in pop_refs
This fixes a bunch of test I broke with my previoius commit.
2011-03-14 22:51:21 -04:00
Kornél Pál a19eee8543 [asp.net] Fix for bug #650695. Implements the System.Web.{HttpNotFoundHandler,HttpNotImplementedHandler} classes. 2011-03-14 23:47:18 +01:00
Zoltan Varga f00f059724 Avoid calling class cctors during JITting when the same class needs initialization more than once during a method. Fixes #679467. 2011-03-14 23:09:33 +01:00
Gonzalo Paniagua Javier db74186f65 [HttpListener] Avoid contention
-Lock-free reads from registered listeners.
	-Don't register the context until *all* the setup steps are done.
2011-03-14 18:00:11 -04:00
Lucas Meijer d6b8f09a9b Implmement a private BinaryFormatter.DefaultSurrogateSelector, which enables embedders who want to make a sandbox, to specify a default surrogate selector, which is required to get System.Serialization be able to operate within a CoreCLR environment. 2011-03-14 17:34:20 -04:00
Geoff Norton be077e583a Fix the mobile build 2011-03-14 16:11:24 -04:00
Geoff Norton 0a8951258f Fix the mobile build 2011-03-14 15:43:29 -04:00
Mark Probst adaeb6075b Merge branch 'sgen-disable-gc' into mono-2-10 2011-03-14 19:25:31 +01:00
Mark Probst be796b9980 [sgen] Debug options for disabling minor and/or major collection. 2011-03-14 19:21:17 +01:00
Gonzalo Paniagua Javier 6c25b86257 Add new ignore file. 2011-03-14 14:09:17 -04:00
Gonzalo Paniagua Javier 1d602e9364 [threads] appdomain_refs push/pop speedup
Replace the GSList with an array to avoid malloc/free on every push/pop
	call.
2011-03-14 14:03:22 -04:00
Gonzalo Paniagua Javier a8985dc3ec Cache NewLine per AppDomain. 2011-03-14 14:02:00 -04:00
Gonzalo Paniagua Javier 1756d9ea31 [threadpool] Added dynamic concurrent queue implementation
Replace the big lock around the list+array used to queue work items
	with a dynamic concurrent queue to reduce contention.
2011-03-14 14:02:00 -04:00
Atsushi Eno 63e2c4a403 Enable DTD attdecl processing in mobile profile. 2011-03-15 00:46:23 +09:00
Peter Gerbrandt 35c7e0b062 Apply DataContractSerializerOperationBehavior. 2011-03-14 12:18:46 +09:00
Ankit Jain e49c454e06 [xbuild] Microsoft.Common.targets - import Before/After targets files.
With this, Microsoft.Common.targets will import
$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore\*
at the beginning of the file and
$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter\*
at the end of the file.

So, this would import all files from (eg.):
$prefix/lib/mono/xbuild/4.0/Microsoft.Common.targets/ImportBefore/

This can be disabled by setting the bool properties -
$(ImportByWildcardBeforeMicrosoftCommonTargets) and
$(ImportByWildcardAfterMicrosoftCommonTargets).
2011-03-12 02:14:20 +05:30
Ankit Jain 1b676d2766 [xbuild] Throw ArgumentNullException if target name is null 2011-03-12 02:14:18 +05:30
Ankit Jain a0e8d07f2b [xbuild] Emit list of projects in the .sln.proj
Emit list of projects in the solution as @(ProjectReference) items
in the generated .sln.proj file. This would be useful for extending
solution builds.
2011-03-12 02:14:17 +05:30
Ankit Jain 9aee6ad25d [xbuild] Don't report Imports ignored because of false conditions. 2011-03-12 02:14:15 +05:30
Ankit Jain f00c5a545b [xbuild] xbuild/Main.cs - remove unnecessary catch/throw. 2011-03-12 02:14:13 +05:30
Ankit Jain 7d67acee8b [xbuild] Set ProjectFile and TargetName metadata on target outputs.
Set "MSBuildProjectFile" and "MSBuildTargetName" metadata on target outputs.
2011-03-12 02:14:12 +05:30
Ankit Jain 30cf8768c4 [xbuild] Handle unknown exceptions.
Re-throw any unknown exceptions.
* Project.cs: Log the exception, doing it here also, so that direct
project.Build(..) call failures also get logged.
* Engine.cs: Log the unknown exception only if the build is running.
This allows for the case when Project.Build caught it and ended the
build.
2011-03-12 02:14:10 +05:30
Ankit Jain 64c827f318 [xbuild] Function names are case insensitive. 2011-03-12 02:14:08 +05:30
Ankit Jain f13dcb35bf [xbuild] Evaluate Import with MSBuildThisFile* properties set. 2011-03-12 02:14:07 +05:30
Ankit Jain 85f294ee2f [xbuild] Fix test on windows.
AssignTargetPathTest.TestLink : Fix test on windows
2011-03-12 02:14:05 +05:30
Ankit Jain 0e091a62fa [xbuild] Clean up test logs.
Remove unnecessary debug spew for tests that pass.
2011-03-12 02:14:03 +05:30
Gonzalo Paniagua Javier 42e4086945 Add to .gitignore 2011-03-11 02:03:46 -05:00
Gonzalo Paniagua Javier 7590b8bb30 [HttpListener] Paranoid cleanup 2011-03-11 02:00:33 -05:00
Gonzalo Paniagua Javier 455746a0ce Test for both Set-Cookie and Set-Cookie2 2011-03-11 01:59:28 -05:00
Gonzalo Paniagua Javier 371bc51b1c [HttpWebRequest] Only uppercase known methods 2011-03-11 01:59:20 -05:00
Gonzalo Paniagua Javier badc22bbae [Socket] Remove more auto-delegates 2011-03-11 01:59:11 -05:00
Gonzalo Paniagua Javier 2d7a5669d2 [Timer] Use static CB for invoking timer callbacks. 2011-03-11 01:59:05 -05:00
Gonzalo Paniagua Javier 89209acd58 [Socket] Minimize allocations of delegates 2011-03-11 01:58:55 -05:00
Gonzalo Paniagua Javier 9a4bd9308e [HttpListener] Avoid blocking in FlushInput 2011-03-11 01:58:40 -05:00
Gonzalo Paniagua Javier 3527ec8621 [HttpListener] Plug leak. 2011-03-11 01:47:00 -05:00
Gonzalo Paniagua Javier e812234121 Support NLS when opening assemblies on windows.
Patch by Horst Kakuschke that fixes bug #673793.
2011-03-10 22:16:25 -05:00
Geoff Norton b8397a6eeb Fix ARCH_STORE_REGS on arm 2011-03-10 16:28:22 -05:00
Gonzalo Paniagua Javier be0b6c8933 [HttpListener] Close idle connections on Stop()
Idle connections that never received any data or had ever been
	associated to a listener are properly closed now when the endpoint is
	closed or the last listener they used is closed.
	Fixes a bunch of tests in System.ServiceModel.
2011-03-10 13:02:58 -05:00
Duane Wandless cbd4fef05a GetApplicableRule returns NULL in TimeZoneInfo.cs yet the code does not always handle a NULL return value.
This change fixes this issue and allows timezones like China Standard Time to work.
2011-03-10 22:12:39 +08:00
Rodrigo Kumpera 4f2774fa80 mono_gc_alloc_mature must check if the object needs to be registered for finalization 2011-03-10 13:13:14 +01:00
Lucas Meijer cf967de406 backport of ee5a8cf9d09d525741e94b380bba411c6915026a, still under the mit x11 license. 2011-03-10 12:15:24 +01:00
Gonzalo Paniagua Javier 5167cc3dae [HttpListener] Memory use reductions 2011-03-10 00:45:22 -05:00
Atsushi Eno 12ce3d1370 In some collection case, xsi:type is explicitly written. Try to copy that behavior. 2011-03-10 14:35:23 +09:00
Gonzalo Paniagua Javier fa5e96cdf7 [HttpWebRequest] Support 4.0 Host property. 2011-03-09 22:34:23 -05:00
Zoltan Varga 18eb35983b Use mono_field_get_type () in one place to fix a crash. Fixes #678269. 2011-03-10 01:11:10 +01:00
Zoltan Varga b80343fd5b Mark threads created when calling from native code into the runtime as background threads. Fixes #678164. 2011-03-10 01:02:10 +01:00
Levi Bard 34f18b6876 [Fix] Make path building on windows behave the same as stock mono+glib.
* src/gpath.c: Make path building on windows behave the same as stock mono+glib.

License: MIT/X11
2011-03-09 16:38:34 -05:00
Gonzalo Paniagua Javier c690aa95bc IO threads have their own name 2011-03-09 16:11:54 -05:00
Gonzalo Paniagua Javier 9f33f58799 Some changes to the threadpool
-Reduce stack size for IO threads.
	-Create threads on demand up to min_threads, then throttle.
2011-03-09 16:08:46 -05:00
Andrew Jorgensen e30eeacd70 Fix up devel packages in spec file 2011-03-09 11:19:55 -07:00
Atsushi Eno 3e9fccb813 Some attempts to make KnownTypeCollection parallel access safe. 2011-03-09 22:51:18 +09:00
Atsushi Eno e25503422b Remove old windows threading workaround. 2011-03-09 21:20:38 +09:00
Marek Safar 69e64f8d72 [677550] Fixes fixed buffer regressions 2011-03-09 08:30:21 +00:00
Atsushi Eno 1585b98d92 Auto detect BOM-less utf-16 and utf-32. Fixed bug #674580. 2011-03-09 15:57:21 +09:00
Peter Gerbrandt c60c84c55d Implement support for QNameIndex (0xBC) in attribute nodes. 2011-03-09 14:00:22 +09:00
Atsushi Eno 1eae886946 Temporarily disable InternalsVisibleTo(System.ServiceModel).
until mcs (in 2-10 or later release) fixes the issue.
2011-03-09 10:21:39 +09:00
Gonzalo Paniagua Javier 4b7ca990ad Avoid null refs when capacity set to 0
This fixes bug #676060.
2011-03-08 18:06:11 -05:00
Miguel de Icaza aabd50d5ad [System.Json] Fix loader.
The current loader failed with some Json strings due to the implementation
of the BufferedStreamReader.   Removed that implementation completely,
and instead depend on the StreamReader to do the actual BOM detection.

This removes the JavaScriptObjectDeserializer.cs file
2011-03-08 18:00:27 -05:00
Miguel de Icaza f56f2a679c Make print take an object 2011-03-08 18:00:20 -05:00
Gonzalo Paniagua Javier e3ec5dcffb Turn the method to upper case.
Fixes bug #675731.
2011-03-08 17:35:52 -05:00
Gonzalo Paniagua Javier b428261ea6 No need to create an extra instance of Worker. 2011-03-08 12:35:05 -05:00
Atsushi Eno 7711cbf01a In XNodeWriter, extra xmlns was written and often rejected for duplicate decls.
Fixed bug #675620.
2011-03-08 23:54:23 +09:00
Atsushi Eno ce550ab14b Merge branch 'mono-2-10' of github.com:mono/mono into mono-2-10 2011-03-08 22:08:59 +09:00
Atsushi Eno 6d67acf0d0 More xml output fixes in XmlSyndicationContent and SydicationElementExtension.
They have couple of complicated xml outputs in both GetReader(AtContent)
and Write(Contents)To methods... check new tests for details.
2011-03-08 22:06:49 +09:00
Ankit Jain 82f415e01a [xbuild] Implement FileLogger . Fix #676650 .
* FileLogger.cs: Implement

Add corresponding command line args for file loggers.
Update man page.
2011-03-08 18:29:34 +05:30
Ankit Jain 4b9f33b4d5 [xbuild] ConsoleLogger - parse params only on Initialize. 2011-03-08 18:29:34 +05:30
Ankit Jain bf997c57b6 [xbuild] LogExtensions.LogError - disambiguate.
* LogExtensions.cs(LogError): Rename the 'filename' overload to ..
(LogErrorWithFilename): .. this.
* Engine.cs: Track api changes.
2011-03-08 18:29:33 +05:30
Ankit Jain 4395aab675 [xbuild] Set @(CollectedBuildOutput) for projects build from .sln . 2011-03-08 18:29:33 +05:30
Ankit Jain aad5ac41fa [xbuild] Add missing api for Target.
* Target.cs (Outputs): Add new public property by this name. And rename
old one to ..
(OutputsAsITaskItems): .. this.
2011-03-08 18:29:32 +05:30
Ankit Jain 9a743feb99 [xbuild] Fix bug #676671. Raise AnyEvent . 2011-03-08 18:29:32 +05:30
Ankit Jain 353b636e4a [xbuild] Add hooks for extending .sln builds.
Add hooks in the .sln.proj generated from .sln files.

1. It imports
   "$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportBefore\*"
   and
   "$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\SolutionFile\ImportAfter\*"
   This is done only in case of 4.0 projects, as imports with wildcard
   is a 4.0 feature.

2. And it imports before.Foo.sln.targets and after.Foo.sln.targets from
   the same dir as the .sln file.
2011-03-08 18:29:31 +05:30
Ankit Jain 50f46f1fac [xbuild] Update man page with info about FrameworkList.xml 2011-03-08 18:29:31 +05:30
Ankit Jain 6e597dfd63 [xbuild] Add support for wildcards in Import.
With 4.0 profile, <Import ..> can have wildcards. This works correctly
with our multiple MSBuildExtensionsPath also.

If the import references $(MSBuildExtensionsPath) property, then the
each extension path is used to resolve the import, and the search
stop as soon as an import is found.

If such an import uses wildcard, then the search stops at the
extension path in which *atleast one* file got imported.
And the import fails if any invalid project file is encountered.

This commit also heavily refactors the Import code to simplify
in the face of the new features, and improves error detection
and reporting.

ImportTest.cs: Add test for wildcards.
2011-03-08 18:29:30 +05:30
Ankit Jain 1a357d9f4e [xbuild] ImportedProject - remove unnecessary catch/throw
Remove the catch { throw; }, this truncated the stack also.
2011-03-08 18:29:30 +05:30
Ankit Jain 12692327a1 [xbuild] ImportCollections.TryGetImport and other fixes 2011-03-08 18:29:29 +05:30
Ankit Jain e166179eb8 [xbuild] Expression.ParseAs<T> - new method 2011-03-08 18:29:29 +05:30
Ankit Jain 294900133a [xbuild] DirectoryScanner.HasWildcard - new method 2011-03-08 18:29:28 +05:30
Ankit Jain df939989d8 [xbuild] Log build errors and raise events even if a build fails. 2011-03-08 18:29:28 +05:30
Ankit Jain a1c49cd4e9 [xbuild] Add support for Before/AfterTargets.
A target 'foo' can have BeforeTargets or AfterTargets attributes,
which list the targets before or after, 'foo' should be run.
This is a 4.0 feature.

* Project.cs (ProcessBeforeAndAfterTargets): New.
* Target.cs: Run the before/after targets in the correct order.

* TargetTest.cs (TestBeforeAndAfterTargets): New.
2011-03-08 18:29:27 +05:30
Ankit Jain b374152512 [xbuild] Fix warnings. 2011-03-08 18:29:27 +05:30
Ankit Jain bbc79f7b41 [xbuild] Fix assembly name comparison when resolving references.
AssemblyResolver.cs (AssemblyNamesCompatible): If either of the
references don't have a public key token, then ignore that.
2011-03-08 18:29:26 +05:30
Ankit Jain 841b593bd9 [xbuild] Vbc task - make error column check a little non-specific. 2011-03-08 18:29:26 +05:30
Ankit Jain 49805cb00d [xbuild] Exec task - add support for custom error/warning regex.
Add 4.0 api, CustomErrorRegularExpression and
CustomWarningRegularExpression.
2011-03-08 18:29:25 +05:30
Atsushi Eno 0256398770 Couple of fixes around XmlSyndicationContent.GetReaderAtContent().
- The returned XmlReader is positioned at the beginning of the element.
- XmlSyndicationContent.GetReaderAtContent() returns XmlReader that begins
  with the "wrapper" which is dummy Atom 1.0 content element.
2011-03-08 18:58:40 +09:00
Atsushi Eno 38855bc712 Remove wrong buffer size check in XmlTextReader.ReadChrs(). 2011-03-08 15:28:08 +09:00
Atsushi Eno 017b4ed819 Make sure to call MoveToContent() to correctly determine node type.
Fix "Dictionary deserialization from xml with indent" issue.
2011-03-08 14:54:11 +09:00
Geoff Norton d47c02350c Add 2 missing 4.0 APIs to the MOBILE profile 2011-03-07 21:27:51 -05:00
Atsushi Eno 4b4f74955d DateTimeOffset child elements have fixed namespace. 2011-03-08 11:03:47 +09:00
Gonzalo Paniagua Javier 211be59492 Host name is the same when querying localhost
The host name is set to the queried host name when it is the local
	machine name. Fixes bug #676260.
2011-03-07 18:51:30 -05:00
Zoltan Varga 55a91737da Fix the previous change. 2011-03-07 18:04:02 +01:00
Zoltan Varga 568b8cf74d Fix out-of-tree builds. 2011-03-07 18:01:15 +01:00
Atsushi Eno bee257b69b Empty element is valid here in silverlight secrity element. 2011-03-08 01:51:39 +09:00
Atsushi Eno 36353034c9 XmlReader.ReadToNextSibling() saved wrong Depth and failed to proceed.
Fixed bug #676020.
2011-03-08 00:49:27 +09:00
Atsushi Eno b4b3b7b978 Forgot to add the actual new client proxy. 2011-03-08 00:43:23 +09:00
Zoltan Varga 550ca25837 Avoid an assert when returning nullable null's from sdb invokes. Fixes #676587. 2011-03-07 12:02:16 +01:00
Atsushi Eno 5cb757c95b Set ProhibitDtd = false on uri-based Load(). Fixed bug #676009. 2011-03-07 17:09:44 +09:00
Atsushi Eno c6fb9f9494 Couple of fixed to support new DateTimeOffset serialization in .NET WCF. 2011-03-07 16:46:56 +09:00
Atsushi Eno 1c664cbb1e Forgot to add test xml files. 2011-03-07 14:00:52 +09:00
Atsushi Eno dcc8112e68 Fixed xsd derived simpleType cast failures on uint. Fixed bug #676993. 2011-03-07 13:58:15 +09:00
Peter Gerbrandt 7f8aafbe7d Support for the same interface as service contract and as callback contract. 2011-03-07 12:53:19 +09:00
Atsushi Eno 837bf42ce7 Replace SRE-based client proxy generator with RealProxy.
Now PE verified workaround should be unnecessary.
2011-03-07 12:32:21 +09:00
Zoltan Varga 084a76ecea Install a mono-sgen-gdb.py as well. 2011-03-04 17:33:45 +01:00
Zoltan Varga 3da978e41b Log all sdb log messages to the log file instead of stdout. 2011-03-04 13:30:04 +01:00
Geoff Norton e8c3443bd3 When running in a linked environment, this file might not exist 2011-03-03 17:54:47 -05:00
Zoltan Varga 14b494ed61 Disable testbundle for powerpc too. 2011-03-03 16:35:53 +01:00
Zoltan Varga ef214d3a25 Resurrect THREAD_DEBUG. 2011-03-03 11:30:14 +01:00
Zoltan Varga 5038f10bb6 Change an #ifdef DEBUG to THREAD_DEBUG(). Fixes #676615. 2011-03-03 11:25:48 +01:00
Rodrigo Kumpera fd2b90b73b Reset iid of unloaded generic interfaces correctly.
* class.c (mono_get_unique_iid): Don't store
	the iid of generic instances on their GTD image
	since they can be unloaded before.

	* metadata.c (free_generic_class): Reset the iid
	used by interfaces.
2011-03-02 15:14:40 +01:00
Atsushi Eno 7225ae8eed Remove wrong overrides in RequestChannelBase in discovery. 2011-03-02 20:29:29 +09:00
Andrew Jorgensen 4f8349919a add xbuild-frameworks to rpm 2011-03-01 09:57:01 -07:00
Zoltan Varga 0214f7431a Use stdint.h for VS 2010 and later. 2011-03-01 16:34:40 +01:00
Marek Safar dbdcec54b4 [675777] Remove invalid zero based optimization 2011-03-01 08:59:02 +00:00
Geoff Norton 87cc02a04a Fix the build when using DESTDIR 2011-02-28 19:26:26 -05:00
Rodrigo Kumpera f5bba434cd Handle demormalized object and string types.
* metadata.c (do_mono_metadata_parse_type): NET 1.1
	assemblies can have string and object encoded in a denormalized
	way.

	Fixes #675464.
2011-02-28 22:02:05 +01:00
Rodrigo Kumpera 7048e3f49e Handle CompareTo(long) and huge numbers.
* BigInteger.cs (CompareTo): Handle numbers
	larger than 64bits.

	Fixes #674120
2011-02-28 14:57:35 +01:00
Ankit Jain ac1ad54ded [xbuild] ToolTask - make error column check a little non-specific. 2011-02-28 17:01:38 +05:30
Ankit Jain a1953b3f77 [xbuild] Make Engine.DefaultToolsVersion 2.0 .
Engine.DefaultToolsVersion is used when a project is unable
to determine a suitable ToolsVersion to use. Change this fallback
version to 2.0 . This allows vs2005 (.net 2.0) projects which
don't have ToolsVersion explicitly set, to build. Newer projects
set ToolsVersion by default.
2011-02-28 17:01:37 +05:30
Ankit Jain b100e0eed6 [xbuild] ResolveAssemblyReference - log task parameters 2011-02-28 17:01:35 +05:30
Ankit Jain 24e787e9ff [xbuild] ResolveAssemblyReference - add missing api. 2011-02-28 17:01:33 +05:30
Ankit Jain 916943ce1a [xbuild] GetReferenceAssemblyPaths - add missing license header. 2011-02-28 17:01:31 +05:30
Ankit Jain 93a4e248be [xbuild] Add support for multi-targeting arbitrary frameworks.
ToolsVersion 4.0 supports targeting arbitrary frameworks defined
by FrameworkList.xml files and referenced by $(TargetFrameworkMoniker),
which is of the format:
 Identifier,Version=<version>[,Profile=<profile>]

built as:
 $(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)[,Profile=$(TargetFrameworkProfile)]

eg. '.NETFramework,Version=v4.0' .

Frameworks are searched for in (order):

  1. Paths specified in the environment variable $XBUILD_FRAMEWORK_FOLDERS_PATH
  2. /Library/Frameworks/Mono.framework/External/xbuild-frameworks on Mac OSX.
  3. MSBuild property $(TargetFrameworkRoot)
  4. $prefix/lib/mono/xbuild-frameworks (default location)

.NET frameworks 2.0/3.0/3.5/4.0 have corresponding FrameworkList.xml
files now, which allows projects to target them. Custom frameworks like
MonoDroid can install suitable FrameworkList.xml files, and projects
can target them using the correct $(TargetFrameworkIdentifier) and
$(TargetFrameworkVersion).

Update man page.
2011-02-28 17:01:30 +05:30
Ankit Jain 8494641805 [xbuild] ToolTask - add missing api
* Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
(GetProcessStartInfo): Add missing api. This allows more control
over the execution of the tool.
2011-02-28 17:01:28 +05:30
Ankit Jain 82b37d914c [xbuild] Add missing property to Error/Warning tasks. 2011-02-28 17:01:26 +05:30
Ankit Jain 8c579dfce2 [xbuild] Add $(MSBuildToolsRoot) reserved property. 2011-02-28 17:01:24 +05:30
Ankit Jain 95af93f266 [xbuild] Remove property if Output TaskParameter is null.
If the TaskParameter for Output of a task is null, then remove
the corresponding property.
Add relevant test.
2011-02-28 17:01:22 +05:30
Geoff Norton 41b1fe814e Cache the result of the pthread_specific disassembly when checking for fast tls on darwin 2011-02-25 16:42:20 -05:00
Geoff Norton ac1e8e16a2 Fix the mobile build 2011-02-25 11:41:10 -05:00
Marek Habersack e8a578407b [asp.net] Fix for bug #671753. Route.GetVirtualPath must take ambient values into account. 2011-02-25 13:18:10 +01:00
Steve Bjorg 450b0f1c4a added units tests for TextReader ReadLine() and ReadToEnd() 2011-02-25 01:52:29 -05:00
Steve Bjorg d2b840c9fc TextReader.Null should return "" on ReadToEnd() 2011-02-25 01:51:39 -05:00
Miguel de Icaza ad9ddef21a Fix build 2011-02-25 01:49:02 -05:00
Miguel de Icaza 5c1fe2fedb [TerminfoDriver] be more tolerant to failures, and fallback gracefully, instead of aborting 2011-02-24 23:59:53 -05:00
Miguel de Icaza 268adea870 Do not throw exceptions, instead return a sensible value, fixes 656468 2011-02-24 23:36:33 -05:00
Atsushi Eno 70910f3f04 Fix 2.0 test build (disable it). 2011-02-25 12:38:51 +09:00
Zoltan Varga 02f2d4dbf7 Fix previous arm patch. 2011-02-25 03:20:32 +01:00
Miguel de Icaza dcec5908af Add default implementations to ReadLine() and ReadToEnd() to TextReader, fixes 655934 2011-02-24 16:52:00 -05:00
Zoltan Varga 85e594b968 Fix stop_debugger_thread () on windows. Shutdown both ends of the connection socket since shutting down only the receive part doesn't seem to work on windows. Wait for the debugger thread to exit in a loop, since we don't use condvars on windows. 2011-02-24 19:15:14 +01:00
Geoff Norton c08e02bc59 Enable ARMv6 for arm*-darwin 2011-02-24 12:22:34 -05:00
Martin Baulig a92669fc05 Fix bug #669836:
Treat exceptions that are caught by mono_runtime_invoke()
as unhandled in SDB.
2011-02-24 17:43:34 +01:00
Ankit Jain 0cce6b2bf5 [xbuild] Rename method to make it more consistent.
* Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs
(GetAssemblyNameFromFile): Rename to ..
(TryGetAssemblyNameFromFile): .. this, to make it consistent with
the similar method TryGetAssemblyNameFromFullName .
Track api changes.
* Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs:
Track api changes.
2011-02-24 18:31:49 +05:30
Ankit Jain 9f29e21ade [xbuild] Fix bug #674630.
Handle errors in trying to create AssemblyName from invalid
full names.
2011-02-24 18:31:45 +05:30
Zoltan Varga 93dd831a8b Only use memory barriers on arm when running on armv6 or later. 2011-02-24 13:56:15 +01:00
Marek Safar b860a9145c [674224] Type parameter constraint can resolve to nested type before it has been imported 2011-02-24 08:14:57 +00:00
Atsushi Eno c69896b97b Simple InstanceContext.Extensions implementation by David Schmitt.
Fixed bug #674057.
2011-02-24 14:40:52 +09:00
Atsushi Eno 094614ba92 Do not write empty items in Probe message. 2011-02-24 14:36:36 +09:00
Atsushi Eno 2bbbccf106 To header rewrite only happens in Adhoc mode.
Update contracts to comply with that and make it consistent between versions.
2011-02-24 14:36:24 +09:00
Atsushi Eno 37589e862a Pass Actor. use IsNullOrEmpty() instead of "!= String.Empty". 2011-02-24 14:29:45 +09:00
Atsushi Eno 80890aa751 Another fix to not write null header. Add UniqueId deserialization workaround. 2011-02-24 14:29:34 +09:00
Jonathan Pryor 05745bacdf Enable UDP Sockets on MOBILE platforms.
Fixes runtime part of #666736.
2011-02-23 23:03:13 -05:00
Zoltan Varga 26bbac8c8a Disallow EventType.Step in EnableEvents (). Fixes #674490. 2011-02-24 01:07:51 +01:00
Miguel de Icaza b60927f21f Fix win32 build 2011-02-23 14:21:01 -05:00
Ankit Jain a77fdbe8b5 [xbuild] Fix bug #674337.
Use appropriate path separator for handling environment variable
MSBuildExtensionsPath.
2011-02-23 21:29:37 +05:30
Jérémie Laval 81f2bb71ed Allow people to optionally fallback to the old scheduler with an environment variable 2011-02-23 14:44:59 +00:00
Jérémie Laval 3d1b4715eb Remove ctors in TpScheduler
This also remove the capping of the ThreadPool, problem needs to be fixed in the pool itself.
2011-02-23 14:44:58 +00:00
Jérémie Laval df12cf48c6 Make TryExecuteTaskInline a bit smarter 2011-02-23 14:44:57 +00:00
Jérémie Laval 4e37530b60 Refactor common code block of TpScheduler and SyncContextScheduler in SchedulerProxy 2011-02-23 14:44:57 +00:00
Jérémie Laval 95513a6be4 Kill old IScheduler interface.
We still use the ParticipateUntil facility of IScheduler internally and provide a default implementation for pure TaskScheduler
2011-02-23 14:44:56 +00:00
Jérémie Laval 8415e77fbe When finding best worker number in Parallel loops use current TaskScheduler instead of default TaskScheduler 2011-02-23 14:44:56 +00:00
Jérémie Laval 3e593ba735 Adapt TpScheduler to the new API in TaskScheduler 2011-02-23 14:44:55 +00:00
Jérémie Laval ddd9443f26 Cache callback delegate in TpScheduler when passing Task to QueueUserWorkItem 2011-02-23 14:44:55 +00:00
Jérémie Laval d0c67f7e87 Don't create a new lambda everytime when queuing Task via ThreadPool QueueUserWorkItem 2011-02-23 14:44:54 +00:00
Jérémie Laval b2e391a309 Try to execute task inline when they are ready to run and we wait on them with no timeout 2011-02-23 14:44:53 +00:00
Jérémie Laval 3d4f602354 Threadpool Task scheduler 2011-02-23 14:44:53 +00:00
Jérémie Laval 2b62b097df Create PLinq query tasks attached to their eventual task parent by default 2011-02-23 14:44:52 +00:00
Jérémie Laval b816837188 When choosing the number of Task to create for a PLinq query, check if we are already in a running Task 2011-02-23 14:44:52 +00:00
Jérémie Laval c084efc79e Implement properly TaskScheduler's FromCurrentSynchronizationContext 2011-02-23 14:44:51 +00:00
Jérémie Laval 07791b1406 Adapt Parallel.For stealing to all processor flavors 2011-02-23 14:44:51 +00:00
Jérémie Laval 9ba41cadd2 Allow multiple invocation of Task Execute method to allow short-circuiting without breaking deque ordering 2011-02-23 14:28:43 +00:00
Miguel de Icaza ca02c72ecb Avoid warnings, should fix OpenSUSE builds 2011-02-22 19:30:48 -05:00
Andrew Jorgensen f5b2849d72 Version 2.10.1 2011-02-22 14:16:00 -07:00
Ankit Jain 8c4808fc36 [xbuild] Add new reserved properties $(MSBuildThisFile*).
Also, fixes bug #668955.

Add new reserved properties $(MSBuildThisFile*).
Unlike the $(MSBuildProjectFile), the *This* properties are evaluated
in the context where they were used. Eg. if such a property was
referenced in a PropertyGroup, then it would refer to the file
containing the that definition, and *not* the main project file.
It applies to items and tasks/targets also.

* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildChoose.cs:
* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItemGroup.cs:
* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildPropertyGroup.cs:
Add DefinedInFileName property.

* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs:
Add a stack to keep track the "current" file, which is used to set
the $(MSBuildThisFile*) properties. Update the properties on
Push/Pop.

* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/GroupingCollection.cs:
Push/Pop the "current" file, when evaluating a property/item/etc.

* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs:
Push/Pop the "current" file, when building. This ensures that the
references in the target definition get evaluated correctly.

* Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs:
Add corresponding test.
2011-02-23 01:38:40 +05:30
Rodrigo Kumpera ed23f897c4 Properly check arguments in List<T> ICollection.CopyTo.
* List.cs (ICollection.CopyTo): Properly check
	the array argument to match MS semantics.

	Fixes #672907
2011-02-22 18:51:20 +01:00
Ankit Jain b636b093d2 [xbuild] Use the env var $MSBuildExtensionsPath before trying other paths.
Change the order of the "search paths", so that the environment
variable can always override it.
Update the man page to reflect the change.
2011-02-22 21:39:00 +05:30
Zoltan Varga e433c33f9f Fix the passing of the mrgctx argument in case of a virtual->nonvirtual optimization. Fixes #672446. 2011-02-22 15:30:33 +01:00
Hib Eris 21528f97be Fix gsize for 64-bit Windows 2011-02-22 14:41:14 +01:00
Zoltan Varga a7c3c38901 Avoid returning TRUE from mono_domain_finalize () if it is interrupted by sdb. Fixes #673592. 2011-02-22 05:36:34 +01:00
Zoltan Varga 5766da53da Fix arm thunk creation in dynamic methods. Fixes #673828. 2011-02-22 00:51:50 +01:00
Marek Habersack 3e6f82d10c [transactions] When cloning a transaction make sure to copy all the stuff that matters.
The volatiles and durables lists must be copied even if they are empty. The calling code
might still be accessing them via the original transaction (as is the case with Orchard+NHibernate)
2011-02-21 23:38:23 +01:00
Marek Habersack 01e4a9bb55 [asp.net] Fix for bug #669807. Cache session item locks as the item might be cleared before the lock needs to be released. 2011-02-21 19:50:33 +01:00
Geoff Norton e09f898428 Implement proper TSD lookup for arm-darwin 2011-02-21 13:37:06 -05:00
Geoff Norton 1d3ed22ab2 OSX 10.6 properly respected signal handlers before invoking the crash reporter 2011-02-20 23:01:50 -05:00
Zoltan Varga abdc66ca35 Implement mono_memory_barrier () and OP_MEMORY_BARRIER for ARM. 2011-02-20 03:23:33 +01:00
Zoltan Varga affd549250 Make the var/mvar caches per-image, since the generic params they refer to can be freed on domain unload. Fixes part of #672939. 2011-02-20 01:54:34 +01:00
Zoltan Varga a98ce10d71 Revert "[Win64] Compilation fix for eglib in win64"
This reverts commit 97bc578e86.
2011-02-19 23:27:25 +01:00
Zoltan Varga 432ed84634 Reorganize the way jump_target_hash is stored in the JIT. Free entries in jump_target_hash which point inside a dynamic method when it is freed. Fixes #669815. 2011-02-19 22:24:06 +01:00
Geoff Norton b2eaffda65 Avoid leaking a mach_port every time we query the counters 2011-02-19 12:22:19 -05:00
Miguel de Icaza 78a1ca7417 Backport support for add support for new PerformanceCounter("Process", "% Processor Time", "<process id as string>" on OS X 2011-02-19 12:03:32 -05:00
Gonzalo Paniagua Javier 7372ca74ef [eglib] Move definition of GPid to eglib-config.h
This new patch moves the definition of GPid from glib.h to eglib-config.h and
	determines the the type of pid_t in configure.

	Pach from Hib Eris that fixes bug #670076.
2011-02-19 11:50:46 -05:00
Gonzalo Paniagua Javier 97bc578e86 [Win64] Compilation fix for eglib in win64
Compiling for 64 bit windows breaks on incorrect gsize.
	Patch by Hib Eris that fixes bug #673581.
2011-02-19 11:43:54 -05:00
Miguel de Icaza adc1bd510c [594642] System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces fix for MacOS X 2011-02-19 11:06:00 -05:00
Gonzalo Paniagua Javier 5ef11410bd Fix the check for version and PublicKeyToken
When loading an assembly we were comparing Version(0,0,0,0) with null
	and a 0 length PKT with an actual one when those two cases are the
	default.
	Fixes bug #661461.
2011-02-19 10:14:12 -05:00
Rodrigo Kumpera 843a59e2ab Handle overrides on events when retrieving cattrs.
* MonoCustomAttrs.cs (GetBase): Special case events
	when retrieving the base event to lookup cattrs.

	* AttributeTest.cs: Add regression test.

	Fixes #662867
2011-02-18 23:38:28 +01:00
Mark Probst 9bd2159a5f [sgen] Fix some debug functions. 2011-02-18 23:18:09 +01:00
Zoltan Varga 0b63e96ade Set cfg->uses_rgctx_reg in another code path too on arm, to fix --regression generics.exe. 2011-02-18 23:09:51 +01:00
Zoltan Varga 17a13200f8 Work around a gcc bug on arm. 2011-02-18 23:06:32 +01:00
Rodrigo Kumpera b48e7b5988 Handle gsharing and marshal by ref.
* method-to-ir.c (mono_emit_method_call_full): Non virtual
	marshal by ref methods with gsharing context must always
	be called using indirect calls.

	Fixes #665893
2011-02-18 17:14:27 +01:00
Atsushi Eno ba4c090467 Fix infinite loop in DiscoveryMessageSequence equality comparison. 2011-02-18 16:32:57 +09:00
Atsushi Eno b9b1ae5876 Do not try to serialize null header item. 2011-02-18 16:23:58 +09:00
Atsushi Eno 223d09ec41 Fix wrong element name (AppSequenceType->AppSequence). 2011-02-18 16:14:08 +09:00
Atsushi Eno e72dcebf98 Almost eliminate wrong use of Constants.WsaNamespace.
They should be addressing-version-aware.
2011-02-18 16:11:16 +09:00
Atsushi Eno 980810dc82 EndpointAddressAugust2004 was not serialized correctly.
Well, Actually unified the implementation with 10.
2011-02-18 15:54:52 +09:00
Rodrigo Kumpera 6d7b16c0d2 Make sure we keep a root for the delegates when calling them.
* method-to-ir.c (mono_emit_method_call_full): Make sure
	we keep a root for delegates when calling them using the
	fast delegate dispatch.

	Fixes #667921
2011-02-17 21:59:44 +01:00
Marek Habersack d8d5da5c30 [asp.net,mvc3] Fix for bug #668655. Implemented a few more NameValueCollection method overloads. 2011-02-17 19:37:05 +01:00
Atsushi Eno 931c55c115 get out from NET_4_0. 2011-02-17 22:20:56 +09:00
Atsushi Eno dcd3787a52 Couple of corcompare fixes. 2011-02-17 21:09:50 +09:00
Atsushi Eno 995d298d00 Only use non-null values in ServiceAuthorizationBehavior. 2011-02-17 21:09:40 +09:00
Atsushi Eno 582c628f21 Fill a couple of missing ServiceAuthorizationElement implementation. 2011-02-17 21:09:29 +09:00
Atsushi Eno 10e94f0efa HTTP authentication in HttpListener had dropped during refactoring. Now it's back. 2011-02-17 21:09:19 +09:00
Geoff Norton f45ca2b65e Fix ARCH_STORE_REGS on arm to save r0->r12 properly 2011-02-16 16:10:31 -05:00
Geoff Norton c9231c0248 Remove dead code 2011-02-16 15:04:47 -05:00
Atsushi Eno b5491e25d9 MakXsdDataContractExporter refactoring to generally use SerializationMap.XmlName.
Fixed bug #670539.
2011-02-17 00:56:59 +09:00
Hib Eris ea0673de2b Decorate _image_base__ with __MINGW_LSYMBOL
This fix is needed in compiling for x86_x64.
2011-02-16 15:22:26 +01:00
Atsushi Eno f8d7872cc4 Don't reject serialization map for existing different (but same-purpose) type. 2011-02-16 18:50:02 +09:00
Atsushi Eno ead615dca5 To header seems mandatory in April2005, so fill it. 2011-02-16 18:19:14 +09:00
Atsushi Eno 4ed4702907 April2005 AppSequence needs default constructor for deserialization. 2011-02-16 18:19:03 +09:00
Atsushi Eno be750c099d xsi:type parsing is wrong in default namespace resolution.
Fixed case #3 in bug #652331.
2011-02-16 18:04:18 +09:00
Atsushi Eno 4b82e7b3b2 Operation interface methods also have ServiceKnownType attributes. 2011-02-16 17:07:10 +09:00
Atsushi Eno 1e17218a2d KnownTypeCollection; recursively registered type was not added to the collection while it is "registered" state. 2011-02-16 16:06:15 +09:00
Jérémie Laval 423f895412 Implement TaskFactory.FromAsync 2011-02-15 18:38:29 +00:00
Ankit Jain d6070f1383 [xbuild] Fix bug #671700, resource naming in presence of "Link".
AssignTargetPath.cs: If 'Link' metadata is present, then use that
as the target path.

Add relevant test.
2011-02-15 20:18:36 +05:30
Marek Safar f1e818a76f [671878] Fixes IKVM ordering of catch clauses 2011-02-15 14:33:14 +00:00
Atsushi Eno a28a9520b5 Async MessageContract pattern needs more sophisticated contract validity check.
It totally killed discovery.
2011-02-15 23:25:31 +09:00
Atsushi Eno 6907827b05 Message headers are now serialized and deserialized for MessageHeaderDescription. 2011-02-15 23:15:32 +09:00
Atsushi Eno 6ea68b9128 ServiceDescription.cs does not exist in moonlight, so move TypeExtension. 2011-02-15 22:38:20 +09:00
Atsushi Eno 7c37c423e1 MessageHeaderDescription were not filled in message contract. Reject wrong contracts. 2011-02-15 22:13:25 +09:00
Atsushi Eno 8854623440 implement some ServiceHostBase public methods that already existed internally. 2011-02-15 22:13:18 +09:00
Atsushi Eno 7b088dc2a4 When the callback contract type is the same as the contract, do not block replies. 2011-02-15 15:51:44 +09:00
Atsushi Eno e19f4be52c EndpointAddress could be empty on opening the factory. 2011-02-15 15:51:38 +09:00
Atsushi Eno 20b58344cc PeeDuplex ChannelFactory must be opened in prior to create channels. 2011-02-15 15:51:32 +09:00
Atsushi Eno c310cd6556 add private setter for message serialization.
Not sure if it is hack or required-to-do though.
2011-02-15 15:51:26 +09:00
Veerapuram Varadhan fc074bb4fa [bugfix]667855 - Fix handling of oracle raw data type appropriately. 2011-02-15 01:25:00 +05:30
Gonzalo Paniagua Javier a7bfba4549 [HttpListener] UserHostName includes the port. 2011-02-14 14:38:26 -05:00
Gonzalo Paniagua Javier a65b6c7523 [HttpWebRequest] EndGetResponse already does this. 2011-02-14 14:38:26 -05:00
Gonzalo Paniagua Javier 7730c00a02 [HttpWebRequest] Use the timeout in GetResponse()
The timeout was not being used in GetResponse.
	Fixes bug #603794.
2011-02-14 14:38:26 -05:00
Atsushi Eno 675dc5b693 support UdpTranspoerSettings.MulticastInterfaceId. This should fix bug #669328. 2011-02-15 01:57:02 +09:00
Veerapuram Varadhan 881d960b29 backport of r1012ab0b
Fixes 667236 - Handle numeric types appropriately
2011-02-14 21:18:04 +05:30
Miguel de Icaza 6c161687ea [670974] Use the underlying BaseStream to read bytes instead of trying to peek a character.
Peeking a character as it turns out is a really bad idea as it involves the encoder
to pull characters.   If the PeekChar happens to read a byte that is part of a
UTF8 string that needs more characters to process we would end up with the reported
crash.

Atsushi Enomoto tracked this down, and the fix is to use the binaryreader.BaseStream
to directly call into ReadByte and Read without ever probing with PeekChar ().   It
is not really possible to use BinaryReader.ReadByte since this one can throw on
end-of-buffer conditions instead of returning -1
2011-02-14 09:41:31 -05:00
Marek Safar 7acea3000f [671552] Use correct emit method for stobj type 2011-02-14 13:21:44 +00:00
Gonzalo Paniagua Javier a615812280 [HttpWebRequest] Avoid nullref on empty cookie header.
If the Set-Cookie header is empty, the cookie instance is not created.
	Fixes bug #670189.
2011-02-13 14:54:27 -05:00
Alexandre Mutel 7ec51b02e9 Fix sizeof(T) in non-gshared code. Fixes #580189. 2011-02-13 16:17:12 +01:00
Mark Probst 9b5ca2f366 Merge branch 'bugfix-main-thread-root' into mono-2-10 2011-02-13 16:10:37 +01:00
Zoltan Varga f4edc478f0 Add an assembly version to Mono.Debugger.Soft. Fixes #671536. 2011-02-13 16:06:57 +01:00
Mark Probst 586f777ec2 [sgen] Register the main_thread as a GC root. Fixes shutdown crashes. 2011-02-13 15:50:13 +01:00
Gonzalo Paniagua Javier ba0fbbe133 [HttpListenre] Avoid multiple calls to Close()
HttpListenerResponse could be calling HttpConnection.Close() more than
	once.
2011-02-13 07:08:34 -05:00
Zoltan Varga 86fdd99f9e Fix reading of cattr arguments of type Type[]. Fixes #670331. 2011-02-13 04:24:58 +01:00
Gonzalo Paniagua Javier 6390cf3b64 [gzip] Allow partial flush
When Flush() is called explicitly, do a Z_PARTIAL_FLUSH to force gzip
	into giving us whatever is available. Less efficient, but compatible
	with MS.
2011-02-12 00:05:35 -05:00
Gonzalo Paniagua Javier fcdb18822c [Socket] Fix invalid cast
Fix invalid cast when canceling pending operations due to socket.Close.
2011-02-11 18:36:54 -05:00
Zoltan Varga 79fddfa11d Fix token generation for TypeBuilder's in another assembly. Fixes #671245. 2011-02-12 00:15:59 +01:00
Miguel de Icaza 32f616acfb [fix] changing Form.Enabled sometimes can change the list of OpenForms, fixes 671098 2011-02-11 17:34:23 -05:00
Zoltan Varga 52e0febfe6 Add Mono.XBuild.Utilities/MSBuildUtils.cs to the build. 2011-02-11 21:58:02 +01:00
Zoltan Varga 4246c386a0 Pretty print MonoString* too in xdb. 2011-02-11 21:54:44 +01:00
Sebastien Pouliot d4ed08b5b4 Continue X509Chain processing even if the local machine directory does not exists
* corlib/Mono.Security.X509/X509Store.cs:
* Mono.Security/Mono.Security.X509/X509Store.cs:
	Fix key pair persistence to load key pairs from the same location
	(machine or user) as the requested certificate. This avoids an
	internal exception (on missing local machine directory) that stop
	the evaluation of the certificate validity (i.e. no user store
	check)
* System/System.Security.Cryptography.X509Certificates/X509Chain.cs:
Ensure that a missing local machine directory does not result in a NRE
while loading CRL (which would fail the certificate being validated)
2011-02-11 13:41:33 -05:00
Hib Eris e43d097f7c Earlier undefine HAVE_GETPROCESSID when cross compiling 2011-02-11 15:42:29 +01:00
Rodrigo Kumpera 1066c2c1b5 Make maxStackSize behavior compatible with MS.
* Thread.cs (.ctor): Check if maxStackSize is negative
	and raise and AOORE. Silently use a saner minimum size
	of 128k as mono can't really run with much less than that.
2011-02-11 14:58:12 +01:00
Zoltan Varga efa462d684 Make the wait in the finalizer thread alertable to fix sdb on windows. Fixes #670619. 2011-02-11 05:55:06 +01:00
Zoltan Varga 6a77ef2687 Change some Sleep(0)'s to Sleep(1) in the soft-debugger code to avoid 100% cpu utilization on windows. 2011-02-11 01:34:43 +01:00
Gonzalo Paniagua Javier 1829c15ee9 [HttpWebRequest] Can't ignore erros here 2011-02-10 17:26:09 -05:00
Gonzalo Paniagua Javier c214cd9488 [HttpWebRequest] Error handling for POST/PUT
When we get an error from the server before writing an entire
	unbuffered response, the server might close the connection leading to
	write errors. Ignore those and return the actual HTTP status code from
	the original server error.
2011-02-10 17:26:09 -05:00
Ankit Jain d08d05e197 [xbuild] Update Utilities.FromMSBuildPath from monodevelop.
Updating FromMSBuildPath also fixes a bug on windows.

* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Utilities.cs:
Move to..
* Microsoft.Build.Utilities/Mono.XBuild.Utilities/MSBuildUtils.cs:
.. this. Also, update FromMSBuildPath from monodevelop.
* Update Engine/* and Tasks/* to track the new api.
2011-02-11 02:57:58 +05:30
Andrew Jorgensen 0793c8ecae Mono.Debugger.Soft.dll is installed for 4.0 also. 2011-02-10 07:36:52 -07:00
Atsushi Eno 2031d77d6b Fix a couple of addressing namespace fixes (found in April2005 version). 2011-02-10 22:07:16 +09:00
Atsushi Eno 916479ff8a Fix wrong async completion handling in UDP channel receive.
After AsyncWaitHandle.Set(), order of filling results and WaitOne() are
undefined.
2011-02-10 21:19:02 +09:00
Marek Habersack 1630b8ecb9 [asp.net] Fix for bug #669048. Fix up virtual precompiled app virtual paths with the virtual root of the current app 2011-02-09 22:02:36 +01:00
Rodrigo Kumpera 1316be56bb Handle assignment check of variant type and its gtd.
* clas.c (mono_class_is_variant_compatible): Return
	FALSE if checking a variant type and its gtd instead
	of crashing.

	Fixes #668506
2011-02-09 16:42:17 +01:00
Zoltan Varga e61f3b7278 Install Mono.Debugger.Soft in the 4.0 profile as well. 2011-02-09 16:25:02 +01:00
Atsushi Eno b6b34d1051 Recent ContractDescription fix uncovered wrong contracts in discovery. 2011-02-09 20:06:07 +09:00
Rodrigo Kumpera c5cbc7e8e2 Cleanup the reference queue on domain unload.
* gc.c (finalize_domain_objects): Clear reference
	queues on domain unload after running all finalizers.
2011-02-09 11:22:23 +01:00
Atsushi Eno 3aad1fb2cf Support ServiceKnownTypes. Fixed another case on bug #652331. 2011-02-09 15:44:19 +09:00
Zoltan Varga c3cd3eb877 Disable OP_INEG cfolding on 32 bit arches, as it breaks the LNEG decomposition. The previous special casing didn't work as the spill pass could insert a store between the ineg and the adc_imm. Fixes #670479. 2011-02-09 05:11:43 +01:00
Gonzalo Paniagua Javier 610f8d77c9 [SmtpClient] Don't send empty display name.
If there's no display name, don't send '""'.
	Fixes bug #670475.
2011-02-08 21:02:33 -05:00
Miguel de Icaza 18efb9a9e2 Update docs 2011-02-08 20:19:02 -05:00
Miguel de Icaza 11b3ead24e Add prototype to .h file 2011-02-08 20:18:55 -05:00
Lucas Meijer dfcd93df2a implement mono_set_assemblies_path for platforms that cannot set MONO_PATH environment variable. 2011-02-08 20:18:39 -05:00
Atsushi Eno ee701df195 Fix bug #661400 - fix complicated namespace resolution issue.
Namespaces in nested external schemas have to be validated against
immediately-containing schema. If there is a schema A with urn:x
targetNamespace imports a schema B with urn:y targetNamespace which
in turn includes another schema C, then C must be validated its namespace
against B, not A.
2011-02-08 20:18:32 -05:00
Marek Habersack 142676a516 [asp.net] Be more careful with errors collection when compilation fails. 2011-02-09 01:26:17 +01:00
Marek Habersack 02f2fe8204 [asp.net] Implemented CustomErrorsRedirectMode 2011-02-09 01:26:10 +01:00
Miguel de Icaza be6ba4038a Fix Enum.HasValue, previous version crashed with negative values 2011-02-08 15:52:38 -05:00
Marek Habersack 9d4e229c2e [cross-compilation] Added some flexibility regarding the location of development packages
The script now supports an extra cross-compilation directory in which you can unpack the
library and development packages necessary for the build to succeed (glib, zlib etc). Also
supported now is specifying the location at which Mono will be installed on Windows.
Replaced SVN and GIT-SVN version checks with git checks.
2011-02-08 20:47:15 +01:00
Rodrigo Kumpera 9177ddc384 Fix reference queue under boehm.
* gc.c (finalizer_thread): Clean reference queues
	after finalizers are called to give boehm a chance
	to resurrect it.
2011-02-08 18:30:09 +01:00
Hib Eris b9c4865b04 Fix build-mingw32.sh for CROSS_PKG_CONFIG_DIR without *.pc files 2011-02-08 14:56:26 +01:00
Hib Eris 83c2b73c8c No longer include glib binaries in build-mingw32.sh builds.
By default, Mono now uses an embedded glib implementation, so there
is no need to ship external glib libraries anymore.
2011-02-08 14:55:51 +01:00
Hib Eris 77b6d414b9 Let build-mingw32.sh script also work on dist tarballs 2011-02-08 14:55:10 +01:00
Hib Eris cb8913217e Use winternl.h instead of ddk (when available)
These changes are nescessary for compiling with a mingw-w64 compiler.
2011-02-08 14:45:12 +01:00
Hib Eris c45dd61269 Remove implementation details from public header io-layer.h
The macro HAVE_GETPROCESSID is defined in config.h and should not be
exposed in public headers.
2011-02-08 14:44:52 +01:00
Marek Safar 2990e2e271 [657099] Fix cloning of remapped blocks 2011-02-08 12:53:05 +00:00
Atsushi Eno 7e69d0aa77 Simple content restriction was not validated when it is in further reference.
Fixed bug #595947. It was complexType [base]-> complexType [base]-> simpleType.
2011-02-08 20:55:16 +09:00
Marek Safar cf0928b53e Fix remapping of cloned block parent when already in cloned context 2011-02-08 11:23:46 +00:00
Atsushi Eno b2525e0cb0 For complexType simpleContent restriction, fill attributes from base type.
Part of bugfix #595947.
2011-02-08 18:32:53 +09:00
Atsushi Eno 38fe929b9f There's a tricky namespace-mismatching deserialization in .NET implementation.
Fixed bug #666333.
2011-02-08 17:11:15 +09:00
Atsushi Eno f5ef8da8e5 Contract-based type must ensure that the base type is also contract-based.
Fixed bug #661987 on WCF side.

Conflicts:

	mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs
2011-02-08 12:13:57 +09:00
Atsushi Eno 20453fcb9c Open and close client/service runtime channels in chains. Fixed bug #663278. 2011-02-08 12:08:10 +09:00
Atsushi Eno f3ddd9df63 handle IsTerminating. 2011-02-08 12:07:57 +09:00
Atsushi Eno 68ce0748e5 Duplex client has its own listener loop, so special care on reply is needed. 2011-02-08 12:07:45 +09:00
Atsushi Eno 34fad98bf0 Callback contract should be distinguished from others for DispatchOperation. 2011-02-08 12:07:33 +09:00
Atsushi Eno 176c92c21d Now operations are collected per corresponding ContractDescription.
This fixes naming of MessageDescription Action URI from its type.
2011-02-08 12:07:22 +09:00
Atsushi Eno a303481db4 Implement GetInheritedContracts(), towards bugfix #668089. 2011-02-08 12:07:11 +09:00
Atsushi Eno e2884a6c57 standard endpoint and protocol mapping support were lacking at client side.
Turned out that they had nothing to do with #668089..
2011-02-08 12:07:00 +09:00
Atsushi Eno be19163ffe Members in the base type in different namespace are serialized in base ns.
When the serializer serializes a Type B which is derived from A, it used to
serialize member M in A as in namespace_of_B, not in namespace_of_A.

This should fix bug #652331.
2011-02-08 12:06:50 +09:00
Atsushi Eno 44a9e7eef7 Manage opened proxy channels and close them when ChannelFactory is closed. 2011-02-08 12:06:39 +09:00
Atsushi Eno ab26a0788e Implemented a couple of async methods in InstanceContext as well as disposing. 2011-02-08 12:06:29 +09:00
Atsushi Eno 0870ad290d Avoid possible list modification error during close process. 2011-02-08 12:06:18 +09:00
Atsushi Eno c4c9b57b9d Make sure to close session once the client opened one. 2011-02-08 12:06:07 +09:00
Atsushi Eno 184d565783 Fix regression, avoid null key. 2011-02-08 12:05:55 +09:00
Atsushi Eno 84c27ca818 And rename source file name. 2011-02-08 12:05:44 +09:00
Atsushi Eno 561ec9f0e6 Rename InstanceBhavior, too ambiguous among IXxxBehavior interfaces. 2011-02-08 12:05:34 +09:00
Atsushi Eno cf586923d5 Sessions should not be keyed by MessageId but be done by channel SessionId. 2011-02-08 12:05:24 +09:00
Atsushi Eno be5559c59f Read body content if required. Fixed all issues in bug #656020.
Now it considers message content format and IsWrapped[Request|Response] to
retrieve XmlObjectSerializer.
2011-02-08 12:05:13 +09:00
Atsushi Eno 97a48b0eab Enable duplicate "UriMatched" error check, with couple of FIXMEs.
.NET is very unclear about those UriTemplate behavior. Too minor to mind.
2011-02-08 12:05:03 +09:00
Atsushi Eno fbc54c3de5 Fix template match logic to first check HTTP-method-matching ones.
Part of the fix for bug #656020.
2011-02-08 12:04:53 +09:00
Atsushi Eno e99c8b5a77 Serialize non-mapped message parameter as body content. Part of bug #656020 fix. 2011-02-08 12:04:43 +09:00
Marek Habersack 6eca3e53ed [crypto] Added missing 4.0 algorithm names 2011-02-08 00:34:33 +01:00
Hib Eris d1ef6f2e4b Do not distribute eglib-config.h
The file eglib-config.h is generated when running configure.
Distributing eglib-config.h in tarballs causes errors when building
out of the source tree.
2011-02-07 23:55:47 +01:00
Hib Eris 0ab1c82223 Use _vscprintf() for mingw-w64 compilers
The mingw-w64 compilers implement a vsnprintf() function that do not
conform to the C99 standard (just like MSVC).
2011-02-07 23:43:37 +01:00
Hib Eris dd8a1f2831 Include config.h in mono-profiler-aot.c
This change is nescessary for compiling with a mingw-w64 compiler.
2011-02-07 23:41:28 +01:00
Zoltan Varga 632a3c70c7 Cast the result of MONO_CONTEXT_GET_SP () to an int to fix the windows build. 2011-02-07 23:36:41 +01:00
Zoltan Varga 6b9347a35b Include sys/types.h for pid_t on mingw. Fixes #670076. 2011-02-07 23:33:11 +01:00
Zoltan Varga ccedbc64dc Use mono_method_get_vtable_slot () instead of accessing method->slot directly. Fixes #669808. 2011-02-07 16:11:47 +01:00
Zoltan Varga a962434e90 Fix the ia64 build. 2011-02-06 00:08:16 +01:00
Rodrigo Kumpera 129cfd47ee Fixes ldfnt to ldvtftn conversion.
* mini-trampolines.c (mono_delegate_trampoline): The ldftn
	to ldvtftn conversion must check if the method is abstract,
	otherwise it breaks delegate to base classes.

	Fixes #666008
2011-02-05 13:38:42 +01:00
Zoltan Varga 1c51463ed0 Print a normal stack trace even if a hard stack overflow happens in unmanaged code. 2011-02-04 12:55:47 +01:00
Zoltan Varga 719afa9b59 Print a normal stack trace on a hard stack overflow. 2011-02-03 23:04:47 +01:00
Zoltan Varga 8f45703547 Fix the handling of CompareExchange icalls in AOT, we were using the 'object' versions for everything, which broke with 64 bit types on 32 bit platforms. 2011-02-03 21:59:34 +01:00
Ankit Jain d47a028ed4 [webservices] Extensions can be unknown XmlElements also, fix.
* class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs:
Extensions can be XmlElement or ServiceDescriptionFormatExtension.
* class/System.Web.Services/System.Web.Services.Description/ServiceDescription.cs:
(AddExtensionNamespaces): Likewise. Also, ignore namespaces from
XmlElement, as we retain and write them out as-is.
(WriteExtension): Emit the XmlElement as-is.
* class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs:
Update to write out the wsdl also.
2011-02-04 01:03:45 +05:30
Marek Habersack 568f9ab996 [asp.net] HttpRuntimeSection.RequestPathInvalidCharacters default value is different 2011-02-03 17:43:31 +01:00
Marek Habersack c7f2fda73d [xml] XmlReaderSettings.{DtdProcessing,MaxCharactersFromEntities,MaxCharactersInDocument} are present in 3.5+
With the exception of DtdProcessing, the properties are part of .NET 3.5+. DtdProcessing appeared in 4.0.
2011-02-03 17:43:02 +01:00
Marek Safar c139a0e52d Don't even try to import type when its context is wrong 2011-02-03 15:21:38 +00:00
Marek Safar 320645f312 Add handling of broken Convert callsite from Orchard Project 2011-02-03 15:21:13 +00:00
Marek Safar 8b1e1255e6 Fix importing of private types under dynamic context 2011-02-03 15:16:50 +00:00
Zoltan Varga a96d068321 Fix the passing of vtype arguments for methods which return floats in soft-float mode. Fixes #668905. 2011-02-03 16:06:25 +01:00
Marek Safar a5f9b5d9c6 Allow any expression to be used in where clause. Some custom linq implementations use non-predicate version of where 2011-02-03 13:55:28 +00:00
Marek Habersack fe7386298f [reflection] Default binder's AdjustArguments method treats ParamArray parameters which are already arrays properly
Such parameters are not adjusted as it would lead to an InvalidCastException whenever an attempt to set an array
index's value would be made.
2011-02-03 02:23:15 +01:00
Zoltan Varga db64c7f8f1 Add support for --debug=casts to Array:SetValue (). Fixes #668851. 2011-02-03 00:37:45 +01:00
Zoltan Varga 63f4b4cdd4 Fix a warning. 2011-02-03 00:36:41 +01:00
Rodrigo Kumpera 0efd1e04f6 Fix dynamic method cleanup at shutdown.
* gc.c (mono_gc_cleanup): Cleanup all reference
	queues after regular finalization.

	* reflection.c: The dynamic method ref queue is finalized
	by the runtime itself.

	* runtime.c: Ditto.
2011-02-02 20:28:30 +01:00
Miguel de Icaza b4e49b89b4 [csharp] Change the signature for print 2011-02-02 13:09:53 -05:00
Marek Safar bf12c6eb03 Implement support for implicit user conversion for DefaultParameterValue (very odd) 2011-02-02 17:25:22 +00:00
Ankit Jain 15514b1b26 [xbuild] Warn for unknown toolsVersion only on build.
Emit warning for unknown toolsversion only on a build, and
*not* everytime the project file is parsed.

* class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
(GetToolsVersionToUse): Add a 'emitWarning' bool param.
(Build): Call GetToolsVersionToUse () to ensure that a warning is
emitted in case of a unknown tools version.
2011-02-02 18:26:43 +05:30
Rodrigo Kumpera 8dba556993 Align call instructions to make code patching SMP safe.
* mini-x86.c (emit_call): Align call instructions on
	3 mod 4 so the address is 4 bytes aligned and can't span
	two cache lines. This is required for proper SMP support
	as CAS is not atomic across cache lines.

	Fixes one of the crashes due to #667921.
2011-02-02 13:03:04 +01:00
Geoff Norton a40312f1c1 Avoid a stack overflow when deactivating a window 2011-02-01 23:54:06 -05:00
Lucas Meijer ca201f3478 make mono_print_thread_dump output to the visualstudio debugger window, for better debugger experience 2011-02-01 21:55:57 +01:00
Rodrigo Kumpera e7785a27ab Don't use finalization to cleanup dynamic methods.
* reflection.c: Use a reference queue to cleanup
	dynamic methods instead of finalization.

	* runtime.c: Shutdown the dynamic method queue
	before runtime cleanup begins.

	* DynamicMethod.cs: No longer finalizable.

	* icall-def.h: Remove unused dynamic method icall.

	Fixes #660422
2011-02-01 17:35:11 +01:00
Rodrigo Kumpera fd57b963ad Implement a reference queue API.
* gc.c: A reference queue allows one to queue
	callbcks for when objects are collected.
	It allows for safe cleanup of objects that can
	only be done when it is effectively collected.
	The major difference with regular finalization
	is that the collector makes sure the object
	was collected - and can't be resurrected.

	* gc-internal.h: Export entrypoints for the
	new API.
2011-02-01 17:35:11 +01:00
Zoltan Varga 88bfc71d89 Make caching in mono_marshal_get_virtual_stelemref () thread-safe. Fixes #668489. 2011-02-01 17:09:45 +01:00
Marek Safar efcd37f730 Fix empty cast conversion from dynamic type object type argument 2011-02-01 14:29:49 +00:00
Marek Habersack b27182bd5d [asp.net] FormsAuthenticationTicket.FromByteArray stops early if it is passed a null parameter 2011-02-01 09:21:13 +01:00
Marek Habersack e44310c079 [runtime] AddWatcher icall must look up the path in an IOMAP-aware way 2011-02-01 09:21:07 +01:00
Atsushi Eno 5d7723bc37 Members in the base type in different namespace are serialized in base ns.
When the serializer serializes a Type B which is derived from A, it used to
serialize member M in A as in namespace_of_B, not in namespace_of_A.

This should fix bug #652331.
2011-02-01 15:59:00 +09:00
Atsushi Eno 157111dbb5 quick build workaround. 2011-02-01 13:01:50 +09:00
Atsushi Eno 38bdb82f95 in NET_4_0, remove types that went into System.Xaml.dll. Change build order. 2011-02-01 11:05:11 +09:00
Bit Diff 0a8a210791 Fixes #527447 whereby it was not possible to pass additional arguments to mono-service2 (if your executable required command-line arguments of it's own). 2011-01-31 17:59:03 -05:00
Zoltan Varga ca0ededdc6 Fix stack walks on sparc. 2011-01-31 22:40:11 +01:00
Gonzalo Paniagua Javier 79633ee3d1 Handle wrapped ThreadAbortException
Third party ProcessRequest() like the one from Razor can wrap a
	ThreadAbortException originated from response.Redirect().
2011-01-31 16:36:16 -05:00
Jonathan Pryor 0577648c00 Fix the basic-profile build. 2011-01-31 15:16:05 -05:00
Jonathan Pryor 8cc7997a69 Fix the MonoDroid build.
Most System.TimeZoneInfo members weren't being included.
2011-01-31 14:05:19 -05:00
Gonzalo Paniagua Javier 1258d11fc3 Allow forcing HTTP protocol version
If the version is manually set, ignore the version from the service
	point when set.

	Fixes bug #668199.
2011-01-31 10:49:40 -05:00
Lluis Sanchez b5da420c28 Handle possible exceptions thrown by Socket.Close 2011-01-31 16:34:17 +01:00
Marek Habersack 879cb82456 [asp.net] Implemented 4.0 types System.Web.Security.{MachineKey,MachineKeyProtection} plus tests 2011-01-31 15:20:57 +01:00
Zoltan Varga 15aed192fb When using xdebug, allocate all code from the code manager of the root domain. Hopefully fixes #666152. 2011-01-31 14:02:29 +01:00
Marek Habersack 789c5a7f91 [asp.net] Ignore directories that don't exist instead of throwing. 2011-01-31 11:08:33 +01:00
Marek Habersack 684266d2b3 [runtime] Use IOAMP-aware method of looking for domain configuration file 2011-01-31 09:47:20 +01:00
Jo Shields c5302b7b52 Really fix sgen on PowerPC Linux. Assembler on Linux requires that register names are just bare numbers, unlike OSX, i.e. "r0" must be "0" on Linux. 2011-01-31 07:47:05 +01:00
Atsushi Eno fc0ec2635d Do not return DocumentFragment from AppendChild() etc. Fixed bug #666249. 2011-01-31 13:48:00 +09:00
Atsushi Eno 2d13b63f4e Fixed bug #666872; XElement.Changed and .Changing were not triggered. 2011-01-31 13:46:55 +09:00
Atsushi Eno b057032956 add public NetTcpSecurity .ctor() and close #667429. 2011-01-30 23:38:57 -05:00
Miguel de Icaza a11120ae36 [repl] Fix running specified scripts from command line, allow #! syntax, add print command
We were calling the Reset () method after we had initialized the driver
with the new command line arguments, clearing the list of files to execute
before we executed them.

Added support for #! in the csharp repl, and added the print() command to
the InteractiveBase

Add a better way of dealing with -e, without adding hacks to the core that wont work
in the future
2011-01-30 17:43:44 -05:00
Miguel de Icaza b56b8ad2c3 [repl] Add support for -e EXPRESSION to the csharp command 2011-01-30 12:06:10 -05:00
Miguel de Icaza 0b17f7feab Document csharp #! support 2011-01-30 11:41:09 -05:00
Miguel de Icaza abf855afe1 [repl] Fix running specified scripts from command line, allow #! syntax, add print command
We were calling the Reset () method after we had initialized the driver
with the new command line arguments, clearing the list of files to execute
before we executed them.

Added support for #! in the csharp repl, and added the print() command to
the InteractiveBase
2011-01-30 11:33:00 -05:00
Zoltan Varga af6065a810 Fix some quadratic behavior in the AOT compiler. 2011-01-30 09:13:51 +01:00
Zoltan Varga 9cffdf6cf4 Improve hashing of MONO_PATCH_INFO_TYPE_FROM_HANDLE. 2011-01-30 09:13:36 +01:00
Zoltan Varga 5a862ae52a Mark a newly added test as !FULLAOT. 2011-01-30 09:13:05 +01:00
Zoltan Varga 07b052d9c6 Don't crash when inlining static methods called using callvirt. Fixes #668170. 2011-01-30 07:00:30 +01:00
Zoltan Varga 70adac78be Clear the 'need_rgctx_tramp' flag when creating a synchronized wrapper. Fixes 2011-01-29 20:52:23 +01:00
Geoff Norton 51a4f125d1 Typo 2011-01-29 11:37:17 -05:00
Geoff Norton 8e4b73cb4a Avoid a crash when shutting down jit attached threads 2011-01-28 19:05:21 -05:00
Geoff Norton e0dd2115d6 Ensure we setup the vtable before accessing it 2011-01-28 01:08:57 -05:00
Zoltan Varga 54fe90cf1c Add an AtLeast version to sdb's VersionInfo class. 2011-01-28 06:28:55 +01:00
Geoff Norton abc793ffbd Bump SDB protocol so MonoDevelop can guard IL inspection of dynamic methods 2011-01-28 00:26:12 -05:00
Geoff Norton d23601d20b Dont leak loader errors in the aot compiler, as it could cause later methods to not get compiled erroneously 2011-01-27 23:23:27 -05:00
Gonzalo Paniagua Javier 2151a961f8 [HttpListener] Set each cookie in its own header
Send a Set-Cookie header per cookie instead of a Set-Cookie2 with
	multiple cookies.

	Fixes bug #667550.
2011-01-27 15:47:53 -05:00
Zoltan Varga b8bf630538 Fix AOT support for types in the EXPORTEDTYPE table. 2011-01-27 19:28:18 +01:00
Zoltan Varga 77f13bc288 Increase an aot buffer size again. 2011-01-27 17:25:07 +01:00
Marek Habersack dead19bc1e [asp.net] A bunch of fixes related to the default VirtualPathProvider (needed for Orchard)
* DefaultVirtualDirectory is now more careful when snipping off parts of the path passed to
  its constructor. Before removing the file part it checks whether the file indeed exists.
  Also sealed the class and made it use generic List instead of ArrayList
* HttpRequest does not normalize mapped paths when converting them to absolute ones. This is
  to avoid errors when path like "~/bin/../../file.txt" is passed to MapPath.
* VirtualPathUtility.ToAbsolute overload with normalize parameter really doesn't normalize
  the resulting path now.
2011-01-27 15:36:45 +01:00
Marek Habersack ef2c84591a [machine.config] Added the <system.transactions> section definition 2011-01-27 15:36:45 +01:00
Zoltan Varga 30f5e30bc4 Applied patch from Burkhard Linke <[email protected]>. Add support for newer boehm-gc versions. 2011-01-27 15:35:25 +01:00
Jérémie Laval cdd5b3f397 Leave db connection opened until requested to close it and add more unit tests 2011-01-27 13:18:19 +00:00
Zoltan Varga 4512ede1a0 Fix compilation of tests/assemblyresolve with newer mcs-es. 2011-01-27 11:06:35 +01:00
Marek Safar fb6c06445f [667261] Fixes overload resolution of an optional parameter followed by a params parameter of the same type 2011-01-27 09:06:10 +00:00
Zoltan Varga d2fddf5062 Fix dist issues in Mono.Debugger.Soft. 2011-01-27 07:16:44 +01:00
Gonzalo Paniagua Javier ae3683b3c2 Prevent abort
When cleaning up the sockets we no longer have access to Tls.
2011-01-26 23:09:50 -05:00
Zoltan Varga 36d4336429 Add AOT support for castclass_with_cache wrappers. 2011-01-27 01:44:47 +01:00
Kyle Ambroff 51a47770f2 version tolerant serialization fails with missing primitive members
Modifies ObjectReader so that when it encounters a primitive typed member in
an object stream which has no corresponding member in the app domain, it will
read the value anyway and throw it away. That way it can read the next block
from the stream.

Added a unit test which passes with the changes to ObjectReader.

Fixes bug #641821.
2011-01-26 18:07:42 -05:00
Kenneth Bell c0a4dd98cf Implement RawSecurityDescriptor.
* Marshals to/from SDDL and binary form.

 * Supports 'Common' ACEs and 'Object' ACEs
2011-01-26 17:58:57 -05:00
Kenneth Bell 27729c4b20 Implement SecurityIdentifier and improve NTAccount.
* Only translates between SecurityIdentifier and NTAccount for
    well-known accounts.

  * NTAccount changed to not upper-case values to match behaviour
    observed in Microsoft's .NET (see also unit tests)

  * Add unit tests for both classes
2011-01-26 17:46:28 -05:00
Antoine Cailliau c7f33c1904 Implements System.ComponentModel.DataAnnotations.RegularExpressionAttribute 2011-01-26 17:28:56 -05:00
Geoff Norton eb3626b925 Include operands when emitting the IL stream to sdb clients 2011-01-26 12:34:48 -05:00
Geoff Norton acba62755d Ensure we properly align the stack before resuming from breakpoint signal handlers 2011-01-26 12:13:52 -05:00
Andrew Jorgensen e62983964b Add 2.0 and 4.0 S.D.S.C 2011-01-26 09:48:47 -07:00
Geoff Norton 93966536b5 Dynamic methods are classes already here 2011-01-26 11:24:38 -05:00
Rodrigo Kumpera 9aa0d0ba0b Fix freeing of delegate wrappers.
* marshal.c (mono_marshal_get_delegate_invoke): If
	the target is a static method with first arg bound
	and it belongs to a different assembly than the delegate
	we might end up with a freed signature in the hashtable.

	Fix a moonlight crash.
2011-01-26 12:37:39 +01:00
Marek Safar e984af0443 Optimized constructor readonly access has to be inside same declarting type 2011-01-26 09:04:50 +00:00
Geoff Norton 97c46a7be6 MonoTouch doesnt support SRE, so we need to disable this code on MT 2011-01-25 23:04:33 -05:00
Zoltan Varga 7d5fce6c1b Add a 'suspend-on-unhandled' MONO_DEBUG option to help track down the random build failures on ia64. 2011-01-26 04:17:08 +01:00
Geoff Norton 3d19f5b624 Further .NET 4.0 ification of the mobile profile 2011-01-25 20:11:19 -05:00
Ankit Jain 16669c9944 [xbuild] Improve error messages for condition evaluation.
Also, add new ExpressionEvaluationException class.
Wrap Expression*Exceptions in InvalidProjectFileException with
info about the full condition being evaluated.
2011-01-26 05:03:16 +05:30
Ankit Jain a8f4de0f37 [xbuild] Support short-circuiting in conditions. 2011-01-26 05:03:14 +05:30
Ankit Jain ad8508c148 [xbuild] Correctly set CscToolExe if TargetFrameworkVersion is not set.
* tools/xbuild/xbuild/Microsoft.CSharp.targets: $(CscToolExe)
is set depending on the value of $(TargetFrameworkVersion).
Since, $(TargetFrameworkVersion)'s default value is set
by MS.Common.targets, set $(CscToolExe) *after* importing
MS.Common.targets .
2011-01-26 05:03:13 +05:30
Ankit Jain 081dc45b72 [xbuild] Fix bug #665637.
Pass $(WarningsNotAsErrors) to Csc task.
2011-01-26 05:03:11 +05:30
Ankit Jain b0f9fd65a1 [xbuild] Fix bug #665004. Honor /nologo option.
* tools/xbuild/Parameters.cs (DisplayVersion): Remove, not required.
2011-01-26 05:03:10 +05:30
Ankit Jain f995310582 [xbuild] Update Novell copyright. 2011-01-26 05:03:08 +05:30
Ankit Jain 5789f96b3c [xbuild] Error out, if no target is found in a project. 2011-01-26 05:03:07 +05:30
Jb Evain e413cf2327 [linq] Fix Reverse for IList implementors 2011-01-26 00:10:55 +01:00
Jb Evain bbd7f83168 [linq] Fix overflow check for Count 2011-01-26 00:10:41 +01:00
Jb Evain dcad2f1b22 [linq] fix Range extreme boundaries 2011-01-26 00:10:30 +01:00
Miguel de Icaza e9f180be6a Restoring some of the formal beauty of this text document as
we carefully restore the missing tabs that helped carefully
align the continuation characters in a list of assemblies.

As we align these newline separators, suddenly, a new form
emerges from the chaos, something that gives us the illusion
that this stream of bytes is indeed almost like a dawn of a
new day as we breathe the air in a valley overlooking a beautiful
mountain at the beginning of the spring.
2011-01-25 17:56:00 -05:00
Geoff Norton 8c3c6c4b54 Fix the mobile build 2011-01-25 14:16:11 -05:00
Mark Probst f97c2388cb Merge branch 'sgen-android' into mono-2-10
Conflicts:
	mono/metadata/sgen-gc.c
2011-01-25 16:35:16 +01:00
Marek Habersack 1e0d0e7c4c [corlib,crypto] RandomNumberGenerator implements IDisposable in 4.0 2011-01-25 15:49:24 +01:00
Marek Habersack f96a9873cc [system] SmtpClient implements IDisposable on 4.0 (a no-op for now) 2011-01-25 15:49:19 +01:00
Marek Habersack b10086345e [wcf] Install the System.Data.Services.Client properly. 2011-01-25 15:49:13 +01:00
Marek Safar 77a05371b4 Degrade wrong override member to virtual instead of non-virtual 2011-01-25 10:46:43 +00:00
Geoff Norton ff1caafd97 Add pfx to the mobile profile 2011-01-25 01:52:17 -05:00
Geoff Norton d1eb847ef2 Work around a full-aot issue for monotouch System.Json 2011-01-25 01:52:12 -05:00
Zoltan Varga 6e268ac849 Fix up CAS tests a bit. 2011-01-25 03:01:48 +01:00
Andrew Jorgensen 8f69b0e0e0 Add WebMatrix.Data to spec 2011-01-24 15:17:16 -07:00
Mark Probst ff955b463f [sgen] Don't assert when on Android. 2011-01-24 22:00:36 +01:00
Mark Probst af995f3d82 [sgen] Make the second bridge DFS pass use an implicit stack to avoid stack overflow. 2011-01-24 21:58:57 +01:00
Mark Probst ff37030fd1 [sgen] Use an explicit stack instead of recursion for the first DFS pass in the bridge code. 2011-01-24 21:58:56 +01:00
Mark Probst bf225c5c81 [build] pkg-config support for libmonosgen. 2011-01-24 21:58:55 +01:00
Mark Probst fe369d8746 [sgen] Bridge cross references pass.
This is an extension for the benefit of the Mono/Java bridge on
MonoDroid.  We go through all finalizable objects and report the
strongly connected components of bridge objects and their
connections between each other.
2011-01-24 21:58:54 +01:00
Tomasz Kubacki d70c578fc4 [Mono.CSharp] Improve error reporting 2011-01-24 15:44:42 -05:00
Geoff Norton 7ee94c1ca3 Avoid leaking the vmmap allocated by the kernel for the thread_act_array_t 2011-01-24 12:07:24 -05:00
Geoff Norton 8db070aae1 Fix a mach port leak 2011-01-24 11:39:19 -05:00
Jérémie Laval bc326d8e73 Add unit test for Database 2011-01-24 15:06:00 +00:00
Jérémie Laval 7c3bd246b6 Add unit tests for DynamicRecord 2011-01-24 15:05:58 +00:00
Jérémie Laval 1f40d73cdf Just fixup comment 2011-01-24 15:05:58 +00:00
Jérémie Laval b364173319 Add GetLastInsertId 2011-01-24 15:05:55 +00:00
Jérémie Laval f1acca540b Foobar trigger connection 2011-01-24 15:05:54 +00:00
Jérémie Laval 98c4b8992d Add Close method 2011-01-24 15:05:53 +00:00
Jérémie Laval 591be8a33f Add ConnectionOpened event to Database 2011-01-24 15:05:53 +00:00
Jérémie Laval f5b9efc784 Fix up compilation of Database and DynamicRecord 2011-01-24 15:05:52 +00:00
Jérémie Laval d607d23767 Add Dispose calls to Database 2011-01-24 15:05:52 +00:00
Jérémie Laval 1b4eee0534 Add Database type 2011-01-24 15:05:51 +00:00
Jérémie Laval 784198d66a Complete base DynamicRecord API 2011-01-24 15:05:50 +00:00
Jérémie Laval 77908fc88a Stub DynamicRecord 2011-01-24 15:04:53 +00:00
Jérémie Laval 9bcbd52f03 Add WebMatrix.Data assembly skeleton 2011-01-24 15:01:20 +00:00
Jérémie Laval b57515aa5a Make sure a synchronous continuation get executed synchronously in all cases 2011-01-24 14:33:57 +00:00
Marek Habersack 2d2834e4bc [asp.net] Global.asax assembly must be passed as reference when compiling. BuildManager.GetType improvements.
When user has their own global application class (global.asax is present) the assembly produced from it must
be passed as reference to the compiler.
BuildManager.GetType now supports fully-qualified type names for 'typeName' and searches for the type in the
top-level assemblies, the global.asax assembly and in the assemblies specified in as references in web.config.

All of this fixes certain MVC3+Razor applications.
2011-01-24 15:30:53 +01:00
Marek Habersack a87db25252 [asp.net] Avoid passing duplicate assemblies on mcs command line. 2011-01-24 15:30:47 +01:00
Marek Safar 450b15885d [666476] Use correct parameter count when checking ambiguous params methods 2011-01-24 14:04:41 +00:00
Marek Safar 3fc9d42ca0 Use byte array as underlying storage for AttributeEncoder 2011-01-24 13:59:33 +00:00
Zoltan Varga e50fc47fd5 Dist finally_guard.cs. 2011-01-24 04:15:05 +01:00
Gonzalo Paniagua Javier 234a2d72e8 Fix Dispose() 2011-01-22 13:30:22 -05:00
Marek Habersack 38e5ecca9f [asp.net,routing] Fix for bug #651966. Regular expression constraints must be treated as absolute regexps. 2011-01-22 12:44:25 +01:00
Gonzalo Paniagua Javier 7dabffd212 [HttpListener] Fix incorrect 411 error
Don't send a 411 for unknown methods without content length.
	No need to assign input_stream until requested.

	Fixes bug #666251.
2011-01-21 23:53:51 -05:00
Zoltan Varga 9e14e62935 Fix an assert which happens when a call is made to Nullable.Unbox from gshared code in AOT. 2011-01-22 03:08:26 +01:00
Bassam Tabbara 54b00f3630 Fix for 666225 2011-01-21 21:00:49 -05:00
Miguel de Icaza 6e81152a98 [getline] Fix history search in the cmdline editor 2011-01-21 20:48:51 -05:00
Miguel de Icaza 6593ea7a5e [Mono.CSharp] Fix bug where overwriting variables cleared the wrong value
This fixes #641910
2011-01-21 20:19:38 -05:00
Miguel de Icaza 70feb6a2b3 [csharp] repl using statement fix + support for --fatal
Fixes #638585 which kept reporting the same error on the using statements over and over
Added support for the --fatal flag to the REPL
2011-01-21 19:56:41 -05:00
Zoltan Varga 93f8f61c8a Transition non perf-critical users of klass->has_finalize over to mono_class_has_finalizer (). 2011-01-21 22:32:00 +01:00
Zoltan Varga cef819966a Obsolete VirtualMachine.GetNextEvent () as it is impossible to determine when to resume after an event, since the debuggee suspends only once per event-set. 2011-01-21 21:54:31 +01:00
Zoltan Varga 8b52311dfd Initialize klass->has_finalizer lazily. This allows us to remove the find_method_in_metadata () optimization without a perf cost which is broken in the presence of overrides. Fixes #665769. 2011-01-21 21:54:12 +01:00
Andrew Jorgensen faac64a083 Oops, Microsoft.Web.Infrastructure, not System. 2011-01-21 12:54:13 -07:00
Andrew Jorgensen 0e29d1e39b add Microsoft.Web.Infrastructure 2011-01-21 10:44:36 -07:00
Sebastien Pouliot ef3bdc76c2 Allow RSACryptoServiceProvider.SignHash to work with SHA-2 family
* System.Security.Cryptography/CryptoConfig.cs: Add OID for RIPEMD160
* System.Security.Cryptography/RSACryptoServiceProvider.cs: Update
GetHashNameFromOID to include SHA2-family OIDs. Remove historical
comments about 1.x FX behavior.

* Test/System.Security.Cryptography/CryptoConfigTest.cs: Add test cases
wrt RIPEMD160 OID
* Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs: Add
test case for SignHash with all FX-provided hash implementations (all
working except RIPEMD160). Remove some NET_2_0/NET_1_1 defines.
* Test/System.Security.Cryptography/RSAPKCS1SignatureFormatterTest.cs:
Remove hacks that were needed for running the tests under FX 1.x. Remove
some NET_2_0/NET_1_1 defines.
2011-01-21 08:39:32 -05:00
Zoltan Varga ec98a692a1 Add NET 4.0 Assembly.UnsafeLoadFrom () method. 2011-01-21 07:27:30 +01:00
Zoltan Varga a1681e5ee3 Fix the previous aot fix. 2011-01-21 05:58:29 +01:00
Miguel de Icaza 962fedd1e6 Do not build the Socket passing on Mobile systems 2011-01-20 22:50:08 -05:00
Atsushi Eno 5920237751 backport JavaScriptObjectDeserializer encoding detection fix. 2011-01-21 12:13:52 +09:00
Gonzalo Paniagua Javier 788535030b [System.Web] Razor works now (modulo DB) 2011-01-20 21:59:47 -05:00
Zoltan Varga 48f3edb3cd Add a test for infinite generic recursion + AOT. 2011-01-21 02:07:57 +01:00
Zoltan Varga e235e72884 Only add imt items whose is_equal flag is set to the array passed to the full-aot imt thunk. 2011-01-21 02:06:47 +01:00
Zoltan Varga 3a1ae308b8 Avoid emitting .note.GNU-stack on arm. 2011-01-21 01:52:51 +01:00
Zoltan Varga f1c1e02c38 Detect inifinite generic recursion differently in the AOT compiler. 2011-01-21 01:50:35 +01:00
Marek Habersack 43937146ac [asp.net] Don't throw NREX when a cache item to be removed is null 2011-01-20 23:39:12 +01:00
Miguel de Icaza c618dfe519 [sockets] Implement DuplicateAndClose and Socket (SocketInformation) constructor for in-process socket passing (AppDomains) 2011-01-20 16:52:49 -05:00
Andrew Jorgensen 42afbbaaa4 remove conflict marker 2011-01-20 11:24:24 -07:00
Jb Evain 730898592e [bug] Prevent a GetMethodBody call on a dynamic method. Fixes 665788 2011-01-20 16:45:43 +01:00
Marek Habersack 0a63027390 [asp.net,mvc] Make unobtrustive request validation in MVC v3 possible
Validation is enabled early in the pipeline during request. ValidationUtility makes sure that validation is indeed enabled and
replaces the default form and query string collections with a lazy version which will validate values only when an existing key
is found and requested.
2011-01-20 14:38:46 +01:00
Marek Habersack 61aa41abb7 [asp.net] Do not throw NREX when firstError is null in ErrorMessage getter 2011-01-20 14:38:37 +01:00
Marek Habersack 66818bb2b6 [asp.net] ValidationUtility implementation 2011-01-20 14:38:21 +01:00
Marek Habersack 1d180c57e1 [asp.net] Introduced unvalidated versions of Form and QueryString properties for MVC3 2011-01-20 14:38:12 +01:00
Marek Habersack 5119b6ef08 [asp.net] Implemented dynamic HTTP module registration 2011-01-20 14:38:02 +01:00
Marek Habersack 14698a4fbf [asp.net] Implemented BuildManager.GetObjectFactory
This method is not used by Mono internally but is called by MVC v3.
2011-01-20 14:37:53 +01:00
Marek Habersack bbca7f5660 [asp.net] Added internal property InputValidationEnabled to report whether the user enabled validation for current request. 2011-01-20 14:37:42 +01:00
Marek Habersack a0c987053d [asp.net] System.Web and Microsoft.Web.Infrastructure are now friends 2011-01-20 14:37:33 +01:00
Marek Habersack 61f6558eae [asp.net] Added the Microsoft.Web.Infrastructure assembly 2011-01-20 14:37:17 +01:00
Marek Safar ba139553af [665333] Encode Length of Public Key correctly 2011-01-20 08:36:02 +00:00
Zoltan Varga 15ead88bf2 Properly align the stack in the arm generic trampoline. 2011-01-20 05:36:20 +01:00
Zoltan Varga 626711d3ac Add a TID field to ThreadMirror which returns the system thread id. 2011-01-20 02:14:22 +01:00
Andrew Jorgensen 51d92f3a6a Dist more files needed by MSVC build 2011-01-19 15:43:12 -07:00
Rodrigo Kumpera 3914fd479a Document precise marking 2011-01-19 15:02:25 +01:00
Rodrigo Kumpera a3d0d6916e Properly clear weak refs that don't track resurrection.
* sgen-gc.c (finish_gray_stack): We must clear
	weak refs that don't track resurrection before
	processing finalizable objects otherwise we'll
	copy/mark them and the weak ref won't be cleared
	until after finalization.

	Fixes #657408
2011-01-19 15:02:09 +01:00
Gonzalo Paniagua Javier 347ad09426 Happy new year. 2011-01-18 22:44:15 -05:00
Zoltan Varga 744c3e2c5b Make the stacks of aot image non-executable. 2011-01-18 18:12:47 +01:00
Marek Safar ca11993157 Checking skd path for is not enough, add check for mscorlib as well 2011-01-18 17:11:07 +00:00
Marek Safar 132f745176 Fallback to corlib location when sdk path cannot be found 2011-01-18 17:10:46 +00:00
Zoltan Varga 001ea99047 Disable some of the FastCopy fast paths since they are racy. 2011-01-18 17:17:42 +01:00
Zoltan Varga 74d5f80e4a Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). 2011-01-18 16:42:22 +01:00
Marek Safar 8e600e2290 Remove devirtualization for Type members 2011-01-18 13:32:34 +00:00
Zoltan Varga fe6c36df0a Make runtime invoke wrappers use cdecl cconv on windows. 2011-01-17 23:18:17 +01:00
Zoltan Varga fe3cd893f7 OP_LCOMPARE_IM has type 'L', not 'I'. Fixes #664630.
This is the same as 6c02c15153, but only for ia64, to avoid destabilizing the
branch.
2011-01-17 22:46:43 +01:00
Rodrigo Kumpera 7dfbfce2c4 Don't check for brokeness when verifying contraints.
* verify.c (is_valid_generic_instantiation): Don't
	check if any argument is broken during constraint check
	as an instance should be valid, but not realizable, even
	if it has broken arguments.

	Fixes one of the issues with #664612
2011-01-17 20:05:16 +01:00
Marek Safar fd66549c35 Add new mcs -sdk option 2011-01-17 17:22:12 +00:00
Zoltan Varga 61b183faa3 Avoid another case of infinite recursion in AOT. 2011-01-17 16:15:10 +01:00
Jb Evain 029c168ffb Fix pdb2mdb when a pdb has a method with no seq points.
Patch by Thad Thompson <[email protected]>
2011-01-17 15:55:11 +01:00
Marek Safar 2ec8c50752 Update to the latest mcs version 2011-01-17 14:15:43 +00:00
Marek Safar 322bc4c9c2 Update IKVM.Reflection 2011-01-17 14:13:26 +00:00
Marek Habersack 8341dc023d [asp.net] (4.0) Validate the form data in Form getter 2011-01-17 14:03:09 +01:00
Zoltan Varga 52ac70bd71 Fix the previous marshalling change so it only applies to chars, not structures which contain char fields. 2011-01-17 00:09:39 +01:00
Zoltan Varga 3229ba977b Pass the string encoding to emit_struct_conv () so marshalling of char arrays works on big-ending machines like s390/ppc64. 2011-01-16 21:11:45 +01:00
Zoltan Varga 02c5d6df68 Make OP_CHECK_THIS do a byte load on arm, since the source argument might point to a vtype if a vtype method is inlined. 2011-01-14 22:29:29 +01:00
Marek Habersack 10ed451a10 [asp.net] Make StopRoutingHandler actually stop the routing instead of throwing an exception
Patch from Damir Simunic <[email protected]>, thanks!
2011-01-14 21:37:18 +01:00
Ankit Jain 31458593f0 [xbuild] Use the backing field directly to avoid evaluating again.
* Microsoft.Build.BuildEngine.Project.cs (InitializeProperties): Use
evaluatedProperties field instead of EvaluatedProperties property,
to avoid invoking a Reevaluate, since it is already in progress.
2011-01-14 04:11:23 +05:30
Ankit Jain 4a914ca1bf [xbuild] Fix bug #664349 .
* Microsoft.Build.BuildEngine/Project.cs (BuildInternal): Set needToReevaluate to
false, when reevaluating.
2011-01-14 04:11:18 +05:30
Ankit Jain 66a2165e37 [xbuild] Add $(TargetDir) property.
Add $(TargetDir) and set TargetPath only if its not set already.
2011-01-14 04:11:12 +05:30
Ankit Jain 035f96e4f8 [xbuild] Clear the built targets cache on project unload.
Remove the entries for a project from the built targets cache, on
project unload.

* Microsoft.Build.BuildEngine/Engine.cs (ClearBuiltTargetsForProject): New.
* Microsoft.Build.BuildEngine/Project.cs (BuiltTargetKeys): Remove.
(RemoveBuiltTargets): Use Engine.ClearBuiltTargetsForProject .
* Microsoft.Build.BuildEngine/Target.cs: Track api changes.
*
2011-01-14 04:11:00 +05:30
Ankit Jain 88b0d19f8b [xbuild] Copy metadata from Project items to target outputs.
Copy metadata from Project items to the corresponding target
outputs in MSBuild task.

Fix the corresponding test also.
2011-01-14 04:10:46 +05:30
Ankit Jain ca46b25e6a [xbuild] Ensure trailing slash on some properties.
Ensure trailing slash on $(BaseIntermediateOutputPath) and
$(IntermediateOutputPath).
2011-01-14 04:10:37 +05:30
Ankit Jain 6140b9ca09 [xbuild] ConsoleLogger - Correctly indent multi-line messages.
Split and correctly indent multi-line messages in ConsoleLogger.
2011-01-14 04:10:29 +05:30
Geoff Norton 5ed112e660 Fix the win32 build 2011-01-13 12:38:44 -07:00
Geoff Norton 318ddb4924 Fix win32 build 2011-01-13 12:38:34 -07:00
Andrew Jorgensen b073713bfa Add vcxproj files for msbuild 2011-01-13 12:37:39 -07:00
Marek Habersack 4085f52f2c [data-annotations] Added some missing 4.0 members 2011-01-13 20:23:36 +01:00
Marek Habersack 71d78c2ceb [asp.net] Implemented the 4.0 type, FileLevelMasterPageControlBuilder 2011-01-13 20:23:26 +01:00
Zoltan Varga 7d25fb2f5e Add null check to stelem_ref_check () jit icall. Fixes #664297. 2011-01-13 18:42:52 +01:00
Jérémie Laval 6418ad41d2 Make use of the wait changes in the internal TaskScheduler -> IScheduler proxy. 2011-01-13 17:19:13 +00:00
Jérémie Laval 6a8c4a6220 Rework internal wait mechanism in thread workers participation code 2011-01-13 17:18:58 +00:00
Andrew Jorgensen 97d18f0c32 2.10 2011-01-13 09:50:27 -07:00
Jb Evain 92b8771128 Remove custom ResolutionException now that Cecil is providing one 2011-01-13 16:09:42 +01:00
Jb Evain 4689cde2f6 Update cecil from upstream 2011-01-13 16:09:17 +01:00
Jérémie Laval 7132ff6bc1 Fix continuation not being scheduled because of too early and too greedy disposing. 2011-01-13 14:40:02 +00:00
Rodrigo Kumpera e159ffb746 Fix 2.0 remapping of System.Transations to 2.0 and not 3.5. 2011-01-13 11:40:42 +01:00
Rodrigo Kumpera 882fad8a8e Fix array assignability to one of its generic interfaces.
* verify.c: mono_class_is_assignable_from can't handle
	IList<GTD<T>> x GTD[] since GTD[] won't have the right
	iface slots set. This isn't a problem for the runtime
	since GTD[] will never happen as it's an unrealizable type.

	Fixes #663815
2011-01-12 18:32:48 +01:00
Rodrigo Kumpera 6c6008506f Handle more cases of gtd encoded as ginst over itself.
* verify.c (mono_type_is_valid_type_in_context_full):
	The trick of encoding the GTD as an instantiation over its
	own arguments is also valid for component types such as GTD[]
	GTD[,] and Foo<GTD>.
2011-01-12 18:32:35 +01:00
Atsushi Eno 403346372f Fix cygwin build. 2011-01-12 20:05:08 +09:00
Marek Safar 4ae2b5037d Update copyright years 2011-01-12 09:28:03 +00:00
Marek Safar a67eb7f224 Use base type parameters to extract params modifier of virtual method 2011-01-12 09:27:39 +00:00
Marek Safar d9619cbfa9 Install new ikvm based C# compiler as mcs 2011-01-12 09:26:46 +00:00
Marek Safar c098d0d842 [662222] Import dynamic attribute using attribute type reader 2011-01-12 09:26:20 +00:00
Christian Hergert b2823262ba Fix broken g_int_hash/g_int_equal semantics
Both g_int_hash and g_int_equal used the semantics that an
integer is stored directly in the pointer. This is incorrect
as the pointer actually points to a location containing an
integer.

For those wanting the previous (incorrect) implementation,
they should look at g_direct_hash and g_direct_equal.
2011-01-11 19:46:05 -05:00
Marek Habersack 42d8b111ec [asp.net] Fix for bug #662918. Do not create the HtmlTitle child control for HtmlHead if <title> wasn't used in the page code. 2011-01-11 23:23:58 +01:00
Zoltan Varga cfa37dc27d Disable system AOT when using the loaded llvm, as it seems to cause crashes on the x86 buildbot. 2011-01-11 20:56:15 +01:00
Zoltan Varga 2be48ab1fa Dump the AOT log upon a failure. 2011-01-11 20:44:22 +01:00
Geoff Norton cd6a73c07f Fix AOT on OSX/x86 2011-01-11 10:34:03 -05:00
Geoff Norton 4264916df5 Fixed loadedllvm on OSX
The default build of libmono-llvm.dylib includes libmono and all its dependencies,
but our statically compiled mono binary does as well.  OSX can actually load both
into its process space, and get confused as to which symbol it should call, leading
to non-deterministic crashes.  We'll remove all the mono dependencies, and use
-undefined suppress to mitigate this on OSX.
2011-01-11 00:55:52 -05:00
Jonathan Pryor 32b1aa404a [monodoc/osx] Look for docs in additional directories.
Fixes #663182.

OSX allows multiple framework versions to be installed side-by-side,
and the current version is available through
/Library/Frameworks/Mono.framework/Versions/Current.

However, documentation installed into /L/F/M.f/V/C/lib/monodoc/sources
is specific for that Mono version; upgrade Mono.framework, and the
documentation is "lost," not visible to the newly installed version.

To fix this, we're creating an *unversioned* directory to contain
documentation, which will thus be persistent across Mono.framework
upgrades: /Library/Frameworks/Mono.framework/External/monodoc

This will allow Mono.framework to be upgraded without "losing" the
documentation visible within monodoc.
2011-01-10 21:09:26 -05:00
Zoltan Varga 1302702ad5 Fix a regression introduced by db4299a1. 2011-01-11 01:12:47 +01:00
Ankit Jain 3fb44e93e2 [xbuild] Update man page, new search paths for extensions and .pc files. 2011-01-11 05:19:12 +05:30
Rodrigo Kumpera 666d378293 Move coree functionality under a specific define.
* assembly.c:
	* domain.c:
	* image.c:
	* coree.c: Coree funcionality is now under the
	ENABLE_COREE define that is not set by default. The
	current code breaks the verification infrastructure.
2011-01-10 23:24:52 +01:00
Marek Safar e6d990d8fa Fix IKVM float encoding on big-endian 2011-01-10 22:17:11 +00:00
Ankit Jain eac08ba026 [xbuild] Fix bug #663180, second part.
Fix the way RunningOnMac is detected (use `uname`=="Darwin"), thanks
to Michael Hutchinson.
And use "/Library/Frameworks/Mono.framework/External/pkgconfig" as a
search path for pkg-config files on MacOSX.

	* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs:
	Change the order of paths.
	* Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources:
	Use MS.Build.Tasks/Utilities.cs, for using RunningOnMac .
	* Microsoft.Build.Tasks/Microsoft.Build.Tasks/PcFileCache.cs:
	Look in "/Library/Frameworks/Mono.framework/External/pkgconfig"
	for .pc files, on Mac.
	* Microsoft.Build.Tasks/Microsoft.Build.Tasks/Utilities.cs
	(RunningOnMac): New.
2011-01-11 03:44:14 +05:30
Marek Habersack 4421a52c48 Fix for bug #659064. Resource URLs must always be the same. UpdatePanel triggers must always be initialized.
String hash cache must not be thread-local. Hashes computed for a string once must be shared by
all the threads or different URLs may be generated for the same assembly+resource pair.
UpdatePanel triggers must be initialized not only during the Load event but also when they are
inserted after that point.
2011-01-10 22:19:12 +01:00
Zoltan Varga 8cf300a21b Force a build. 2011-01-10 21:39:17 +01:00
Zoltan Varga d40b79b2b0 Implement all SIMD intrinsics in LLVM used by basic-simd.exe. 2011-01-10 20:27:51 +01:00
Marek Safar c1a042dff6 Fixed another missing protected internal modifier 2011-01-10 17:27:00 +00:00
Zoltan Varga 7a34addfd0 Fix the loadable llvm build. 2011-01-10 17:49:32 +01:00
Martin Baulig 1c92979d55 Fix short trampoline branch. 2011-01-10 17:24:59 +01:00
Zoltan Varga 4d17d8d8e2 Add another bunch of SIMD intrinsics to the LLVM backend. 2011-01-10 16:45:36 +01:00
Ankit Jain 97e2778d37 [xbuild] Fix bug #663159 .
Emit location information in error messages for condition parsing
errors.

	* Microsoft.Build.BuildEngine/Token.cs: Add position information.
	* Microsoft.Build.BuildEngine/ConditionParser.cs: Track api changes.
	Improve error messages.
	(ExpectToken): Rename to ..
	(IsAtToken): .. this, to better reflect its behavior.
	* Microsoft.Build.BuildEngine/ConditionTokenizer.cs: Track api
	changes and improve error messages.
	* Microsoft.Build.BuildEngine/ConditionFactorExpresion.cs: Track api
	changes
2011-01-10 20:24:09 +05:30
Ankit Jain f64bfd6929 [xbuild] Sync *PcFileCache.cs changes from monodevelop. 2011-01-10 20:24:09 +05:30
Marek Safar ddee741f56 Fixed more protected internal modifiers 2011-01-10 14:38:48 +00:00
Marek Safar e7ce660267 Report correct base modifier for inaccessible protected internal members 2011-01-10 14:38:48 +00:00
Rodrigo Kumpera 7b610f0a26 Couple with missing methods in MonoClass::methods.
* class.c (mono_class_get_virtual_methods): Handle missing
	methods in the methods array.

	Fixes #572223

	Patch by Sebastien Pouliot <[email protected]>
2011-01-10 15:36:05 +01:00
Rodrigo Kumpera 0b7cc0f0ab Fix a deadlock on the interrupt guard machinery.
* mini-exceptions.c (mono_walk_stack): Change the do_il_offset
	parameter into unwind_options which is an enum that allows
	multiple options to be passed.

	* mini-exceptions.c (mono_jit_walk_stack_from_ctx): Ditto.

	* mini.h: Introduce MonoUnwindOptions which allow stack
	unwinding callers to specify that they don't want precise
	method lookup (IOW, no need to deal with  gsharing) which
	allow those functions to be signal safe.

	* mini-exceptions.c (mono_install_handler_block_guard): Ask
	mono_walk_stack to perform signal safe unwinding.

	Fixes #662741
2011-01-10 14:37:54 +01:00
Zoltan Varga 556e665840 Mark mono_print_method_from_ip () with __attribute__((used)) to prevent the linker from optimizing it away in embedding setups. 2011-01-10 14:09:23 +01:00
Rodrigo Kumpera d6c47b1a62 Implement mono.simd new conversion ops on amd64 2011-01-10 10:55:19 +00:00
Marek Habersack df3af8d7ec [asp.net,mcs] Fixed 'protected internal' build errors and removed System.Web-specific hack from mcs 2011-01-10 11:16:44 +01:00
Rodrigo Kumpera a2ee24ee50 Implement a few conversion operations.
Add conversion operations between 4f, 2d and 4i.
	Implemented only on x86 for now.
2011-01-10 10:42:00 +01:00
Rodrigo Kumpera 7d3a6b23ce Fix 64bits Shuffle/3 when simd intrinsics are disabled 2011-01-10 10:42:00 +01:00
Marek Safar d82dda826c Fixed more missing protected internal modifiers 2011-01-10 08:45:01 +00:00
Ankit Jain 70ecdaea7e [xbuild] Fix bug #663180 .
Add "/Library/Frameworks/Mono.framework/External/xbuild" to
MSBuildExtensionsPath on MacOSX.

From the bug report:
The purpose of this directory is to provide a place for third-party
installers to place extensions where they will not be removed by Mono
upgrades. MonoDevelop patches this into the xbuild MSBuildExtensionsPath
for builds within MD but it would be useful to have it work outside of MD.
2011-01-10 02:48:13 +05:30
Jérémie Laval ed19acd65f [System.Web] Add web fonts mimetypes to let browser do caching on client-side 2011-01-09 19:27:27 +00:00
Sebastien Pouliot fd7b7a2b89 Add NIE stubs for new 4.0 methods to ease running IronPython test suite
* SecurityManager.cs: Add new stubs for 4.0 methods. Add [Obsolete]
attributes on most methods (new in 4.0)
2011-01-09 10:57:45 -05:00
barkerm fec01b5d11 Ignore files ending in '~' 2011-01-08 23:13:06 -05:00
barkerm b899701aca Fix for running against RabbitMQ 2.2 2011-01-08 23:12:40 -05:00
Miguel de Icaza 6fd6faecec [eglib] Another bug fix for g_shell_parse
We do not create a new string after a quotation, unless the next
character after a closing quote is a space.   This allows parsing
the string:
	"foo","bar"

As:
	foo,bar

This fixes #655896

1# Explicit paths specified without -i nor -o; assuming --only paths...
2011-01-08 23:10:27 -05:00
Miguel de Icaza 53be988d65 [eglib] Add more tests for the g_shell_parse 2011-01-08 23:10:27 -05:00
Zoltan Varga 9bea20ddfe Pass -relocation-model=static to llc in static mode. 2011-01-08 21:44:54 +01:00
Geoff Norton 7ce78ae3c1 Add CPSR to Apple arm ucontext macros as well 2011-01-08 15:13:34 -05:00
Marek Safar db5af0e429 [663059] Add check for protected modifier in InternalsVisibleTo assembly 2011-01-08 19:26:53 +00:00
Marek Safar aeb5ba7f5a Test update 2011-01-08 19:26:53 +00:00
Marek Safar c8c8fc7769 Fixed missing protected internal modifier 2011-01-08 19:26:53 +00:00
Marek Safar 526e61c3f0 Update System.ServiceModel.Discovery version info 2011-01-08 19:26:52 +00:00
Marek Safar 108fbf32c3 Allow trailing comma for resource argument 2011-01-08 19:26:52 +00:00
Zoltan Varga 0bb51ab602 Apply .no_dead_strip to all symbols. Unify __APPLE__/__MACH__ defines. 2011-01-08 20:22:41 +01:00
Zoltan Varga 0c3ba8cc5f Emit .no_dead_strip directives for all LLVM methods on OSX. 2011-01-08 18:13:52 +01:00
Zoltan Varga 886ab6007f Emit .no_dead_strip directives for all LLVM methods on OSX. 2011-01-08 18:11:30 +01:00
Zoltan Varga 79782da93c Avoid an assert if System.Diagnostics.DebuggableAttribute is linked away. 2011-01-08 17:16:29 +01:00
Zoltan Varga 475888ee63 Fix the arm dyncall code after the this passing changes. 2011-01-08 14:12:33 +01:00
Zoltan Varga 577517c3bc Disallow loading of non-llvm compiled aot modules into llvm runtimes on arm. 2011-01-08 14:12:15 +01:00
Zoltan Varga d89c5f6c2c Tidy up AOT trace messages a bit more. 2011-01-08 12:51:29 +01:00
Zoltan Varga f6b25e5a66 Generate an icall wrapper for CompareExchange<object> into the mscorlib image. 2011-01-08 12:49:02 +01:00
Zoltan Varga bf074880da Make an AOT trace message shorter. 2011-01-08 12:37:16 +01:00
Zoltan Varga 06bb9cebb1 Fix the previous fix. 2011-01-08 04:40:40 +01:00
Zoltan Varga 29b2379762 Fix the apple aot problem. 2011-01-08 04:33:53 +01:00
Zoltan Varga 5b39881f00 Include the assembly name in AOT symbol names in static mode to avoid duplicate symbol errors. 2011-01-08 04:23:30 +01:00
Zoltan Varga aebcc775e7 Change how double/long alignment is saved in the AOT image on arm to support cross-compilation. 2011-01-08 04:06:53 +01:00
Zoltan Varga c6c47bf337 Various changes to make thumb work under osx. 2011-01-08 04:04:16 +01:00
Zoltan Varga f463e1669e Emit thumb unbox trampolines for thumb functions. 2011-01-08 03:38:55 +01:00
Zoltan Varga 24c8fac0ba Use 'globals' instead of '.Lglobals' to name an aot symbol. 2011-01-08 02:21:07 +01:00
Zoltan Varga 7107df48c8 Add 'no-write-symbols' aot option. 2011-01-07 21:05:20 +01:00
Zoltan Varga 2794dbdce4 Add an 'llvm-path' aot option. 2011-01-07 21:03:32 +01:00
Zoltan Varga 068f65893d Avoid 0b notation, older gcc's can't handle it. 2011-01-07 20:48:45 +01:00
Thomas Goldstein 22c53124ae Merge branch 'master' of github.com:mono/mono 2011-01-07 20:27:12 +01:00
Thomas Goldstein 10441bad4c Add new NumericUpDown tests. 2011-01-07 20:18:12 +01:00
Thomas Goldstein 3019106f0a Add unit test for bug 661750. 2011-01-07 20:15:26 +01:00
Zoltan Varga 0c524e988d Use emit_zero_bytes () instead of .skip directive. 2011-01-07 20:06:18 +01:00
Thomas Goldstein 7296434d2b Remove NumericUpDownTest.cs from the -crlf list (file line-ending encoding converted by mistake) 2011-01-07 19:48:47 +01:00
Rodrigo Kumpera 87abb9a1a5 Remove debug spew 2011-01-07 18:23:36 +01:00
Jonathan Pobst 67c6168c75 Add __default_codegen__ to *all* msvc profiles. 2011-01-07 11:20:34 -06:00
Jonathan Pryor 825512bff9 [monodroid] Look for zlib support functions from __Internal.
Partial fix for #660928; the rest of the fix will require embedding
the zlib functions within libmonodroid.so.
2011-01-07 11:59:44 -05:00
Jonathan Pobst 63ad747700 Add __default_codegen__ define to fix the msvc build. 2011-01-07 10:46:34 -06:00
Zoltan Varga 181922c94f Make 'mono_aot_assembly_name' a local symbol as well. 2011-01-07 17:41:31 +01:00
Zoltan Varga 976bc4da85 Fix the DISABLE_JIT build. 2011-01-07 17:38:01 +01:00
Marek Safar 2b11233fd8 Ignore more files 2011-01-07 16:20:40 +00:00
Marek Safar e854848231 Tests update 2011-01-07 16:20:40 +00:00
Zoltan Varga 795ab85d8a Reorganize the static AOT support a bit more: the 'mono_aot_.._info' symbol will now point the MonoAotFileInfo structure itself, not to a table of globals. 2011-01-07 16:17:13 +01:00
Rodrigo Kumpera 13c8ad0f1a Properly search overwrites for custom attributes.
* MonoCustomAttr.cs (GetBase): For the purpoise of
	searching for custom attributes we need to use the
	immediate overwritee and not the base definition.

	Fixes #662867 and possibly more.
2011-01-07 16:13:36 +01:00
Zoltan Varga 2856a08e71 Add sanity check to AOT for long/double alignment. 2011-01-07 15:05:07 +01:00
Jérémie Laval 011503ddaf Remove now unused internal classes 2011-01-07 13:50:32 +00:00
Zoltan Varga fd3c66a2e0 Disallow the 'soft-debug' aot option when compiling using LLVM. 2011-01-07 14:37:21 +01:00
Zoltan Varga de2ff8ad17 Use symbolic constants and sizeof(mgreg_t) instead of 4/sizeof(gpointer)/sizeof(gulong) in the arm backend. 2011-01-07 13:38:12 +01:00
Jérémie Laval 4dfafb9da5 Add bigger unit test for Intersect and Union 2011-01-07 11:18:23 +00:00
Jérémie Laval 6471d38ea2 Directly use ConcurrentDictionary with PLinq set operations 2011-01-07 11:18:23 +00:00
Marek Safar 71318ceb31 Better anonymous methods require same parameter types 2011-01-07 09:58:14 +00:00
Rodrigo Kumpera 997a9efb97 AMD64 version of the new mono.simd ops 2011-01-07 00:19:03 +00:00
Rodrigo Kumpera a0ec721f84 remove stupid debug spew 2011-01-06 22:03:42 +01:00
Gonzalo Paniagua Javier cf7b685e40 Revert 2011-01-06 16:02:43 -05:00
Gonzalo Paniagua Javier ae259d8393 [windows] Improve drive search
Windows allows "A", "A:", @"a:\"... as synonyms for the same drive.
	Patch by Vincent Povirk that fixes bug #660911.
2011-01-06 15:54:48 -05:00
Rodrigo Kumpera f677e5ad57 Implement Shuffle for 64bits types.
* x86-codegen.h: Add macro and define to emit pshufpd.

	* mini-ops.h: Add OP_SHUPD.

	* cpu-x86.md:
	* mini-x86.h: Implement x86 support.

	* simd-intrinsics.c: Handle shuffle on 64bit types.

	* VectorOperations.cs: Add new methods.
2011-01-06 21:52:12 +01:00
Rodrigo Kumpera 46fc923e6a Implement Shuffle/3 2011-01-06 21:52:11 +01:00
Rodrigo Kumpera 4896cf0447 Implement runtime support (x86 only) for 3 args Shuffle.
* cpu-x86.md: Add shufps.

	* mini-ops.h: Add OP_SHUFPS.

	* mini-x86.c (mono_arch_output_basic_block): Emit
	OP_SHUFPS.

	* simd-intrinsics.c (simd_intrinsic_emit_shuffle): Handle
	3 args variant.
2011-01-06 21:52:11 +01:00
Rodrigo Kumpera d80ff97931 Add SHUFPS and macro to emit it. 2011-01-06 21:52:10 +01:00
Rodrigo Kumpera c8867682ed Add test for call clobbering of XMM regs 2011-01-06 21:52:10 +01:00
Rodrigo Kumpera 9b8c19352d Properly free xmm hregs.
* mini-codegen.c (free_up_hreg): Use the bank argument instead of
	a hardcoded one.
2011-01-06 21:52:10 +01:00
Gonzalo Paniagua Javier 7c8a36f5ca [Windows] Implement GetDrives.
Drive names are ok, but the type is always 'Fixed'.
	Fixes bug #660907.
2011-01-06 15:44:28 -05:00
Thomas Goldstein 0753e79bf8 Replace decimal to hex string conversion code with a much more simple alternative (suggested by Oliver Thimm). Fixes bug 661750. 2011-01-06 21:24:55 +01:00
Thomas Goldstein 056a0023db Remove #if NET_2_0. 2011-01-06 21:07:02 +01:00
Zoltan Varga d6b1f611b5 Re-enable and fix the nacl changes. 2011-01-06 20:29:02 +01:00
Zoltan Varga b9f5ff1fe0 Put back a macro definition accidently removed by the nacl changes. 2011-01-06 19:36:27 +01:00
Jérémie Laval 093ed98316 Fix .NET 4 API 2011-01-06 16:08:31 +00:00
Jérémie Laval 4ce910052b Add missing Debugger and ReliabilityContract attributes to .NET 4 types 2011-01-06 16:07:48 +00:00
Jérémie Laval 907cba59ec Avoid random failure in CountdownEvent unit test 2011-01-06 15:17:24 +00:00
Rodrigo Kumpera abb1dbc5e6 Fail nice if the current profiler doesn't support ICustomMarshaler.
* marshal.c (emit_marshal_custom): If the lookup for ICustomMarshaler
	fails, emit code to raise an exception instead of asserting.

	Fixes #560334
2011-01-06 15:52:45 +01:00
Jérémie Laval 4b446ed05a Use while loop instead of if for removing as much stalled tickets as possible 2011-01-06 14:43:12 +00:00
Jérémie Laval b712c20362 Fix comments 2011-01-06 14:42:26 +00:00
Jérémie Laval 10f99bac05 Protect SpinLock's Enter method against asynchronous exception 2011-01-06 14:37:49 +00:00
Rodrigo Kumpera c3ff5bf8e9 Check if the method signature has type parameters when it shouldn't.
* verify.c (mono_method_verify): If neither the method or
	its class is generic a signature can't have type parametets.

	Fixes #662238
2011-01-06 15:29:54 +01:00
Zoltan Varga b99bbf419f Change some usages of ArrayList to List<T> to avoid calls to the slow ArrayList.ToArray(Type) method. 2011-01-06 13:17:01 +01:00
Zoltan Varga 836840b008 Fix x86 build. 2011-01-06 13:11:56 +01:00
Zoltan Varga 9899a5f249 Change some usages of ArrayList to List<T> to avoid calls to the slow ArrayList.ToArray(Type) method. 2011-01-06 13:11:56 +01:00
Jérémie Laval 65b8ba493d Add unit test for nested Parallel.For execution 2011-01-06 11:57:38 +00:00
Jérémie Laval 76b4f31bd7 Explicitely attach loop underlying tasks to their eventual parent 2011-01-06 11:42:55 +00:00
Jérémie Laval 9ccdd58415 Use wider acceptance criteria to cope with nested child Task waiting and external task waiting 2011-01-06 11:42:55 +00:00
Zoltan Varga 0287445999 Revert a nacl change which is causing crashes. 2011-01-06 12:42:09 +01:00
Zoltan Varga a3631fb7b8 Fix warnings introduced by the NACL merge. 2011-01-06 11:49:32 +01:00
Zoltan Varga e4d9a7a2e9 Merge remote branch 'google-nacl/master' 2011-01-06 11:33:54 +01:00
Marek Habersack ec3fd3ea70 [xml] Out of range errors should be swallowed when doing string -> datetime conversion 2011-01-06 10:37:49 +01:00
Marek Safar 94f1209fff Tests update 2011-01-06 09:21:07 +00:00
Marek Safar 6f7e5c5a9c More global state hacking 2011-01-06 09:21:06 +00:00
Thomas Goldstein 4d5451a61c Remove #if NET_2_0 flags. 2011-01-05 23:13:33 -08:00
Geoff Norton 05f6fc799e Bump winconfig version 2011-01-05 21:31:23 -05:00
Zoltan Varga 88d676ffd4 Fix an uninitialized memory error in the aot compiler. 2011-01-06 01:56:56 +01:00
Elijah Taylor 5b558abeeb Merge remote branch 'upstream/master' 2011-01-05 16:02:57 -08:00
Gonzalo Paniagua Javier 45890e8b46 [sockets] Fixed reading blocking flag
Calling ioctlsocket() would set the flag...
	Thanks to Thad Thompson for finding this.
2011-01-05 13:36:16 -05:00
Mark Probst f9fb2cff03 [sgen] Always use the GC descriptor instead of MonoClass.has_references.
has_references can be set even though the class has no references
registered by the GC.  One case is Ephemeron.  Now we always go by the
GC descriptor which holds the information relevant to SGen.

This fixes a crash in the 4.0 corlib testsuite.
2011-01-05 18:16:17 +01:00
Jérémie Laval 70485027b5 Ensure task wait chain isn't executed out of order in scheduler 2011-01-05 15:53:18 +00:00
Marek Safar 744039ce74 [662440] Don't expand nested type builders of non-generic types 2011-01-05 15:45:53 +00:00
Rodrigo Kumpera f63ceee13b Handle the case when the parent fails to inflate.
* class.c (mono_generic_class_get_class): Use the checked
	version of mono_class_inflate_generic_class to avoid
	aborting on error.

	Fixes #560327
2011-01-05 16:44:41 +01:00
Zoltan Varga 7853d84434 Add missing files to dist. 2011-01-05 16:13:34 +01:00
Mark Probst 6bc00aabc1 Don't assert in mono_get_lmf() if there is no LMF.
This function is called from mini-gc.c when a collection is triggered,
which can happen before any managed call is executed by the thread.
At least the allocation of the thread object happens in unmanaged code.
2011-01-05 15:40:38 +01:00
Marek Safar a4a5e6f338 Fixed WinFormsTest System.Drawing namespace reference 2011-01-05 13:33:15 +00:00
Elijah Taylor 1c4ffb7584 Replace SIZEOF_REGISTER with sizeof(mgreg_t) for consistency with sizeof(gpointer) 2011-01-04 16:25:42 -08:00
Elijah Taylor e0075e6461 more ilp32 defines 2011-01-04 15:44:00 -08:00
Elijah Taylor 5300f18603 change first batch of __native_client_codegen__ && TARGET_AMD64 to __mono_ilp32__ where appropriate 2011-01-04 14:38:57 -08:00
Elijah Taylor 4141e0007f fix IMT_REG assignments that got switched for non-nacl builds, provide no-op versions of nacl routines to avoid #ifdef's all over 2011-01-04 13:12:00 -08:00
Rodrigo Kumpera 0ced0b3f67 Fix win32 build 2011-01-05 02:23:55 +08:00
Marek Safar 99c26525e4 Add mcs solution file 2011-01-05 12:37:25 +00:00
Rodrigo Kumpera 4f590cb41a Fix operator != handling of LHS null 2011-01-05 00:15:18 +08:00
Rodrigo Kumpera 6fbb313683 Fix test suite as boehm doesn't support ephemerons 2011-01-05 00:15:18 +08:00
Marek Habersack 92df0458c0 [runtime] Include the al script in temporary installation directory
This is needed as the 4.0 profile calls 'al' (which is defaults to 4.0) and not
'al2' and if Mono older than 2.8 is installed on the machine, 'al' coming from it
will fail to work with the current Mono and thus some tests will fail.

The commit should fix the 300+ failing tests on the build bots.
2011-01-05 12:06:30 +01:00
Marek Habersack 1b67522d98 [asp.net] Disabled a racy test 2011-01-05 12:06:30 +01:00
Marek Safar b64ce512d0 Unify naming convention for all 2.0 files 2011-01-05 10:36:07 +00:00
Marek Safar 3b042a2c6c Fix invalid test constraint 2011-01-05 10:36:06 +00:00
Marek Safar da59d7e8ed Add missing Accessibility reference 2011-01-05 10:36:06 +00:00
Marek Safar ee09a3a9e5 Build mcs before docs 2011-01-05 10:36:05 +00:00
Marek Habersack 028b4edbc0 [asp.net] Rewrote CacheItemPriorityQueue tests generator to produce simpler test case.
The new test case uses arrays and postpones creation of CacheItemPriorityQueueTestItem and TestCacheItem
instances till the actual test is ran. This reduces complexity of the CacheItemPrioritQueueTest class
constructor and allows the code to run successfully on 32 bit machines.
2011-01-05 10:30:08 +01:00
Atsushi Eno 8fd76fb60d Fix ToDateTime() with serialization mode to not mess hour based on timezone.
Fixed bug #661787.
2011-01-05 17:00:58 +09:00
Marek Safar f9033582b7 Set build-in types modifiers 2011-01-05 07:33:27 +00:00
Marek Safar e6ec440228 New test 2011-01-05 07:33:27 +00:00
Atsushi Eno d466b52029 AssemblyPath support, patch by Michel Faucault. 2011-01-05 16:17:20 +09:00
Ankit Jain 84c1749c0c [xbuild] Fix failing test in msbuild.tasks . 2011-01-05 06:14:20 +05:30
Ankit Jain fb535c288e [xbuild] Fix bug #662355.
Support reference aliases in Csc task.
2011-01-05 06:09:48 +05:30
Rodrigo Kumpera 5cc54ad830 Make test messages more usefull 2011-01-04 11:13:35 +08:00
Rodrigo Kumpera 3b0cc12bb6 Fix guard interrupt protection.
* mini.h: Introduce a new MonoContext variable to be used
	by the interrupt protection code.

	* mini-exceptions.c: Use new field.

	* mini-trampolines.c: Ditto.

	This fixes finally_guard.exe on OSX.
2011-01-04 11:13:34 +08:00
Rodrigo Kumpera 3a53bd834e Fix alignment of the block guard trampoline.
* tramp-x86.c (mono_arch_create_handler_block_trampoline): Make
	sure we call the target with a properly aligned frame.
2011-01-04 11:13:34 +08:00
Zoltan Varga a41700e69e Eliminate the first PLT entry, it is no longer used. 2011-01-04 22:07:39 +01:00
Zoltan Varga c5be9038a5 Emit separate thumb2 plt entries called by LLVM code. 2011-01-04 22:04:37 +01:00
Sebastien Pouliot 74314129d2 [moon] String.Join needs 'params' on MOONLIGHT profile too
* String.cs: Silverlight 4 use the same API as FX4 for Join
2011-01-04 15:38:06 -05:00
Zoltan Varga f58d8447e4 Avoid thumb->arm trampolines when calling between llvm methods. 2011-01-04 20:01:13 +01:00
vvaradhan 6a8077e7c5 Fixes #635335 - map System.Transactions to 4.0 framework assemblies. 2011-01-04 23:49:15 +05:30
Marek Safar f0564d5543 Type correctly implicit as expression 2011-01-04 17:58:22 +00:00
Jérémie Laval 1e9443a9b6 Use correct exception when a key is not found in ConcurrentDictionary 2011-01-04 17:37:49 +00:00
Jérémie Laval 2ac2887700 Use proper pattern for executing synchronous Task 2011-01-04 16:53:03 +00:00
Zoltan Varga a457e88362 Remove glib dependencies from the embed samples. Fixes #660117. 2011-01-04 16:38:33 +01:00
Zoltan Varga 2d3d933497 Add AssemblyLoadEventRequest () type to the sdb api, and use it to fix the test suite. 2011-01-04 15:30:36 +01:00
Rodrigo Kumpera 68bbe747df Fixes the Monitor.Enter race on x86.
* mini-x86.h: Define MONO_ARCH_MONITOR_ENTER_ADJUSTMENT to
	cover the whole stack adjustment add that comes after call.

	* mini.c (create_jit_info): Use an ARCH define for how
	big the try block adjustment needs to be as x86 is more
	spacy than amd64.
2011-01-04 02:47:55 +08:00
Marek Habersack ef87ecaf87 [system] Unbreak a 4.0 System.ServiceModel test.
This type is instantiated by one of the tests for the System.ServiceModel.Channels.HttpTransportBindingElement type.
2011-01-04 14:29:18 +01:00
Marek Safar 0cfd931542 Cleanup isinst expression resolver 2011-01-04 13:06:59 +00:00
Marek Safar 4277590f54 Use reduced expression for transparent is check 2011-01-04 13:06:58 +00:00
Marek Habersack 6005f0a7df [wcf] UriTemplate must trim the first leading slash in the rendered template.
When using BindBy{Name,Position} UriTemplate must remove the the first slash from
the rendered URI. This fixes the 4 failing tests.
2011-01-04 13:56:12 +01:00
Marek Habersack 950369e856 [asp.net] The test must always run with the en-US locale 2011-01-04 13:13:01 +01:00
Marek Safar 6c59d190bb Use one routine for type argument scan for type parameter 2011-01-04 11:30:40 +00:00
Jérémie Laval 8f1768e2de Update ThreadLocal to use default(T) for initialization with parameterless ctor following comment on https://connect.microsoft.com/VisualStudio/feedback/details/630350/threadlocal-documentation-and-actual-behavior-mismatch 2011-01-04 11:14:25 +00:00
Marek Habersack 23691dacd6 [system.runtime.caching] Do not test the invalid behavior 2011-01-04 10:22:22 +01:00
Marek Habersack 3939f4ddf6 [asp.net] Failing tests fixes. 2011-01-04 10:03:11 +01:00
Zoltan Varga 0f64ab01a6 Fix ia64 build. 2011-01-04 09:37:10 +01:00
Marek Habersack 39fac8ab1c [asp.net] Added code to handle local resources copying in the test suite 2011-01-04 08:22:21 +01:00
Marek Habersack ed34e652c7 [asp.net] Don't attempt to use System.Web resources in System.Web.Extensions test build
WebTest is now a partial class and every code outside System.Web that uses it can copy its own
resources in addition to the common ones by implementing the CopyResourcesLocal partial method.
2011-01-04 08:21:20 +01:00
Luke Halliwell c135c68bf6 Fix for bug 349053 - unable to serialize SortedDictionary 2011-01-03 21:43:27 -05:00
Gonzalo Paniagua Javier 91a69045c9 Socket is not connected after error 2011-01-03 21:09:29 -05:00
Gonzalo Paniagua Javier 4043ebef2c Add a case-insensitive hashtable
Use a hashtable instead of a loop when 'ignoreCase' is set.
	Based on a patch by Curtis Wensley.
2011-01-03 17:20:21 -05:00
Zoltan Varga 9452f17016 Implement VBByRefStr marshalling. Fixes #661917. 2011-01-03 22:24:15 +01:00
Rodrigo Kumpera c7ee414015 Get rid of mymono_metadata_type_(equal|hash).
* reflection.c: The copy versions of type/hash functions
	is no longer needed. Just get rid of them which brings
	some niceties such such as support for FNPTR.
2011-01-03 10:10:26 +08:00
Zoltan Varga c432e6f917 Fix a warning. 2011-01-03 21:32:46 +01:00
Zoltan Varga a326c54730 Add more comments for the fields of MonoAotFileInfo. 2011-01-03 19:26:05 +01:00
Zoltan Varga d526cdf821 Don't make the 'thumb_end' symbol global. 2011-01-03 19:10:40 +01:00
Zoltan Varga 3b3f1c9674 Reorganize the AOT file format once more, get rid of most globals, store them as pointers inside MonoAotFileInfo instead. 2011-01-03 18:55:52 +01:00
Rodrigo Kumpera 44651e524b Ignore non-realizable reflection types.
* class.c (mono_class_implement_interface_slow): If the reflection
	type has not been realized, ignore it since can't affort
	to do it from here.

	Fixes #656262
2011-01-03 05:53:44 +08:00
Zoltan Varga b9c8b83774 Avoid mixing llvm aot code and non-llvm code on arm. Clean up the printing of AOT messages. 2011-01-03 17:14:37 +01:00
Zoltan Varga caea684258 Implement support for llvm+thumb2+aot on arm. 2011-01-03 16:47:17 +01:00
Zoltan Varga 2313946694 Add thumb2 support for ARM EH code. 2011-01-03 16:47:17 +01:00
Zoltan Varga c8761953ee Implement support for NULL pointers in the bin_writer_emit_pointer (). 2011-01-03 16:47:17 +01:00
Paolo Molaro 027f5b085c Allow the special ECMA key when parsing assembly names (bug#660570). 2011-01-03 16:01:09 +01:00
Zoltan Varga 489ec324d3 Avoid computing GC maps if precise stack marking is disabled. 2011-01-03 15:52:11 +01:00
Zoltan Varga 53c76f5069 Merge branch 'precise-gc-maps' 2011-01-03 15:45:14 +01:00
Zoltan Varga 63181a0a3f .gitignore 2011-01-03 15:42:44 +01:00
Zoltan Varga f97b92d9c8 Make conservative stack marking the default for now. 2011-01-03 15:42:44 +01:00
Zoltan Varga 8316b58261 Fix an assert which can be hit for types unloadable types. 2011-01-03 15:42:44 +01:00
Zoltan Varga 805d849534 Add 'save_locations' to mono_arch_find_jit_info () signature on all platforms. 2011-01-03 15:42:44 +01:00
Zoltan Varga f10a56c333 Fix a warning. 2011-01-03 15:42:44 +01:00
Zoltan Varga 65086bcaa8 Fix some merge problems. 2011-01-03 15:42:44 +01:00
Zoltan Varga 50a089e652 Don't set 'last' after emitting the OP_GC_SPILL_SLOT_LIVENESS_DEF () opcode. 2011-01-03 15:42:43 +01:00
Zoltan Varga 211234aaab Fix a merge problem. 2011-01-03 15:42:43 +01:00
Zoltan Varga 9609a25c23 Properly copy the contexts for FRAME_TYPE_MANAGED_TO_NATIVE. 2011-01-03 15:42:43 +01:00
Zoltan Varga 6f21673a21 Remove obsolete conservative-stack-mark MONO_GC_DEBUG option, it is superseded by a MONO_GC_PARAMS option. 2011-01-03 15:42:43 +01:00
Zoltan Varga faa029089c Fix some merge problems. 2011-01-03 15:42:42 +01:00
Zoltan Varga 108bc307e3 Implement AOT support. 2011-01-03 15:42:42 +01:00
Zoltan Varga e78b0b96bf Add stats for the number of pinned objects during all collections. Avoid scanning the frames above the start_wrapper () frame. Rework start_wrapper () to avoid references to the Thread object, so hopefully it won't get pinned. 2011-01-03 15:42:42 +01:00
Zoltan Varga 7c6f28015f Fix formatting. 2011-01-03 15:42:42 +01:00
Zoltan Varga 2ccc0288a7 Implement x86 support. 2011-01-03 15:42:42 +01:00
Zoltan Varga 7621facfef Remove unused DEBUG_GC_MAP macros. 2011-01-03 15:42:42 +01:00
Zoltan Varga 6b9a7d2771 Log to stdout by default, so it matches up with the output of the program. 2011-01-03 15:42:41 +01:00
Zoltan Varga 5b883fd5cf Share the log file between sgen and the stack marking code. 2011-01-03 15:42:40 +01:00
Zoltan Varga 443376d9cd Don't crash in one place if logging is turned on. Add some FIXMEs. 2011-01-03 15:42:40 +01:00
Zoltan Varga e9f5884277 Revert "Flush the actual file too in binary_protocol_flush_buffers ()."
This reverts commit 27bb69444433cd4eda1fccfcd45fcc619559a29d.
2011-01-03 15:42:40 +01:00
Zoltan Varga 255f33195f Flush the actual file too in binary_protocol_flush_buffers (). 2011-01-03 15:42:40 +01:00
Zoltan Varga 1b62e48689 Use sizeof (mgreg_t) in a few more places. 2011-01-03 15:42:39 +01:00
Zoltan Varga bc25b85939 Print frame info during the precise pass as well. 2011-01-03 15:42:39 +01:00
Zoltan Varga 2bed7c52da Add a MONO_GCMAP_DEBUG env variable. Redirect debug messages to a logfile. Fix tracking of registers through managed-to-native transitions. 2011-01-03 15:42:39 +01:00
Zoltan Varga 7dbca1a110 Allow an argument to collect-before-allocs to force sgen to do a minor collection every N allocations. Implement major_ptr_is_in_non_pinned_space (). 2011-01-03 15:42:39 +01:00
Zoltan Varga 5a627626f2 Allocate a few more vregs as REF/MP. 2011-01-03 15:42:39 +01:00
Zoltan Varga b751822baf Improve logging even more. Fix a crash which happened when tls->nframes was not initialized in a code path. 2011-01-03 15:42:39 +01:00
Zoltan Varga 2dea3e89fe Improve logging, really set vtype slots without liveness info to PIN. 2011-01-03 15:42:38 +01:00
Zoltan Varga 2fc876e3b4 Don't treat arguments in registers live for the whole method. 2011-01-03 15:42:38 +01:00
Zoltan Varga ceadbfc5cb Make gshared variables GC tracked. 2011-01-03 15:42:38 +01:00
Zoltan Varga 466ecc03a6 Add stats for the size of the scanned native stacks. 2011-01-03 15:42:38 +01:00
Zoltan Varga eb6a4cf66e Fix the computation of frame start so some areas are not scanned twice. 2011-01-03 15:42:38 +01:00
Zoltan Varga 5bff6dbd91 Log if the frame stack is full. 2011-01-03 15:42:38 +01:00
Zoltan Varga a25c00f445 Move the handling of finally clauses into a separate function. Treat the frame pointer as a precise reg. 2011-01-03 15:42:37 +01:00
Zoltan Varga b9254a1ae5 Make a log statement depend on cfg->verbose_level. 2011-01-03 15:42:37 +01:00
Zoltan Varga 2ffdeb28f9 Fix the handling of methods with finally clauses so it is correct and reasonable efficient: only callsites inside finally blocks are treated conservatively. 2011-01-03 15:42:37 +01:00
Zoltan Varga 0b217846fe Mark the dreg of OP_NEWARR as a ref. 2011-01-03 15:42:36 +01:00
Zoltan Varga e4aad9b3d3 Add an option to turn on CLEAR_AT_GC. 2011-01-03 15:42:36 +01:00
Zoltan Varga 49a3fcb431 Improve logging. Treat the result of an LDIND.REF as a ref. Treat methods with finally clauses very conservatively again. 2011-01-03 15:42:36 +01:00
Zoltan Varga 45fa8e6955 Rename a few fields. 2011-01-03 15:42:36 +01:00
Zoltan Varga 6aa1e6c83c Make GC maps for methods with finally clauses more precise. 2011-01-03 15:42:35 +01:00
Zoltan Varga b572f321c7 Optimize the frames with finally clauses a bit so at least the non-ref slots are scanned precisely. 2011-01-03 15:42:35 +01:00
Zoltan Varga 52f235d3df Don't assert in describe_ptr () for oldspace pointers. 2011-01-03 15:42:35 +01:00
Zoltan Varga f4f69ed08f Allow wrapper frames to be precisely tracked. 2011-01-03 15:42:35 +01:00
Zoltan Varga 3525050661 Fix regressions introduced by the last few changes. Mark THROW/RETHROW as call sites. 2011-01-03 15:42:35 +01:00
Zoltan Varga 42c7efebcc Treat the frame reg as precisely tracked. 2011-01-03 15:42:35 +01:00
Zoltan Varga a5195b7697 Encode regmasks compactly. 2011-01-03 15:42:35 +01:00
Zoltan Varga 543957a72c Registers are now NOREF by default outside their live range. 2011-01-03 15:42:34 +01:00
Zoltan Varga 229186d620 Remove a debug printf. 2011-01-03 15:42:34 +01:00
Zoltan Varga d3412dca27 Fix a warning. 2011-01-03 15:42:34 +01:00
Zoltan Varga 70f6c172f5 Disable heavy logging. 2011-01-03 15:42:34 +01:00
Zoltan Varga 67cf39e67f Fix logging and add more logging to the liveness pass. 2011-01-03 15:42:33 +01:00
Zoltan Varga bfed9a164e Create GC maps for methods with nono-finally clauses. 2011-01-03 15:42:33 +01:00
Zoltan Varga 1e85870e69 Add comments about reducing the size of the GC maps. 2011-01-03 15:42:33 +01:00
Zoltan Varga 4d662ad4a5 Fix some FIXMEs. 2011-01-03 15:42:32 +01:00
Zoltan Varga f27f39b221 Add a free callback to sgen, use it to free our TLS data. 2011-01-03 15:42:32 +01:00
Zoltan Varga a3e238ad7a Optimize the size of TlsData. 2011-01-03 15:42:32 +01:00
Zoltan Varga 75693ca9c1 Optimize GC map memory usage a bit more, add more memory usage stats. 2011-01-03 15:42:32 +01:00
Zoltan Varga 757e667d87 Update some comments. 2011-01-03 15:42:31 +01:00
Zoltan Varga 0211f6e5c8 Rename StackSlotType to GCSlotType. 2011-01-03 15:42:31 +01:00
Zoltan Varga ce547c6cb1 Add the conservative-stack-mark option to the MONO_GC_DEBUG help. 2011-01-03 15:42:31 +01:00
Zoltan Varga a85ad9923a Refactor mini_gc_create_gc_map () into smaller functions. 2011-01-03 15:42:31 +01:00
Zoltan Varga 1ac3696a9e Implement precise scanning of param area slots. Fix lots of bugs. 2011-01-03 15:42:28 +01:00
Zoltan Varga 8fddd132d8 Don't treat the saved ebp slot as pinned. Fix support for noref structs smaller than a pointer. Don't treat 'this' in gshared methods as pinned. Fix the handling of volatile variables. 2011-01-03 15:42:28 +01:00
Zoltan Varga ecff485f2b Fix order of entries in GCEncodedMap. 2011-01-03 15:42:27 +01:00
Zoltan Varga 88a6d5637f Update comments. 2011-01-03 15:42:27 +01:00
Zoltan Varga 84a63a959d Split the marking function into two functions, save information during the conservative pass to avoid doing a stack walk during the precise pass. 2011-01-03 15:42:27 +01:00
Zoltan Varga 797071a861 Omit empty columns from the register bitmaps. 2011-01-03 15:42:27 +01:00
Zoltan Varga 97084c133b Fix a typo. 2011-01-03 15:42:27 +01:00
Zoltan Varga 81178f773d Embed the callsite table after the gc map. 2011-01-03 15:42:27 +01:00
Zoltan Varga 800d8a53f4 Implement compression of the fixed fields in the GCMap struct. 2011-01-03 15:42:27 +01:00
Zoltan Varga c506516683 Compute the GC bitmap offsets instead of storing them inside the GCMap structure, to reduce its size. 2011-01-03 15:42:26 +01:00
Zoltan Varga 5c62420f05 First pass at reducing the memory usage of GC Maps.
Remove constants fields, embed the bitmap array after the structure, use
offsets into the bitmap array instead of pointers, encode the callsites
table using i8/i16 if possible.
2011-01-03 15:42:26 +01:00
Zoltan Varga 2583ced590 Rewrite everything. Instead of computing liveness intervals, compute the set of live variables at each call site, and use this to create gc bitmaps which are only precise at call sites. 2011-01-03 15:42:26 +01:00
Zoltan Varga 9b5bc0d08c Trim starting and ending NOREF columns from the GC bitmaps. 2011-01-03 15:42:26 +01:00
Zoltan Varga 21e6c0c7a9 Merge process_locals () and process_arguments (). 2011-01-03 15:42:26 +01:00
Zoltan Varga 835528495f Don't treat 'this' as byref. Don't treat ref regs as pinned. 2011-01-03 15:42:25 +01:00
Zoltan Varga b40ab69453 Add a new regbank for spill slots holding managed pointers. Treat those as PIN.
Make LDELEMA return an MP.
2011-01-03 15:42:21 +01:00
Zoltan Varga 12219d0944 Generate liveness info for non-ref variables allocated to registers. 2011-01-03 15:42:19 +01:00
Zoltan Varga 4b7d66097f Update comments. 2011-01-03 15:42:19 +01:00
Zoltan Varga 9fb57e5c04 Implement precise scanning of registers by scanning the stack slots where they are saved. 2011-01-03 15:42:19 +01:00
Zoltan Varga 7c322dc9a5 Mark some LMF fields as NOREF. 2011-01-03 15:42:19 +01:00
Zoltan Varga 2df4781927 Mark non-ref spill slots as NOREF. Mark copies of ref vregs as ref during SSA construction. Treat 'this' as a ref. 2011-01-03 15:42:18 +01:00
Zoltan Varga 6759a0ef89 Add support for GC tracking of some spill slots. 2011-01-03 15:42:18 +01:00
Zoltan Varga d0ccd0ed10 Mark stack slots allocated to dead locals as noref. 2011-01-03 15:42:18 +01:00
Zoltan Varga b919a3e55a Rename locals_start/end to frame_start/end. 2011-01-03 15:42:18 +01:00
Zoltan Varga d67901b25d Add more logging code. 2011-01-03 15:42:18 +01:00
Zoltan Varga 9f73fe2522 Add infrastructure for marking the whole frame, not just the locals. Mark arguments plus a few stack slots initialized in the prolog precisely. 2011-01-03 15:42:18 +01:00
Zoltan Varga 78ee2047f3 Use mono_find_jit_info_ext (). 2011-01-03 15:42:17 +01:00
Zoltan Varga 943bc73210 Align 'nslots' properly. 2011-01-03 15:42:17 +01:00
Zoltan Varga bf3b6365b9 Fix an uninitialized memory bug. 2011-01-03 15:42:17 +01:00
Zoltan Varga 6668409bbb Fix the computation of the stack space statistics. 2011-01-03 15:42:17 +01:00
Zoltan Varga 432d8721a5 Mark only the ref slots of a vtype with uncertain liveness as pinned. 2011-01-03 15:42:17 +01:00
Zoltan Varga 4a42deafdb Use two bitmaps instead of the 'slots' array, this makes it possible for a slot to start out as 'pin' and later change to 'ref' after it was defined. 2011-01-03 15:42:17 +01:00
Zoltan Varga 1530d74728 Compute approximate liveness intervals for vtypes and volatile variables. 2011-01-03 15:42:17 +01:00
Zoltan Varga 213199c92c Add infrastructure for marking vregs as holding a GC refs. Use this to avoid pinning variables of type I. Add more GC map stats. 2011-01-03 15:42:16 +01:00
Zoltan Varga 28eea2f411 Add a test for JIT temporaries. 2011-01-03 15:42:16 +01:00
Zoltan Varga 1141cbff4b Disable GC maps for methods with causes for now. 2011-01-03 15:42:16 +01:00
Zoltan Varga 2da5ccb82f Add a [NotWorking] test for liveness + finally clauses. 2011-01-03 15:42:16 +01:00
Zoltan Varga 4305fe15c3 Don't treat U/PTR as a managed ref. 2011-01-03 15:42:16 +01:00
Zoltan Varga fc9f01be19 Add further comments/fixmes. 2011-01-03 15:42:16 +01:00
Zoltan Varga 8a9f1e953a Really fix the computation of statistics. 2011-01-03 15:42:15 +01:00
Zoltan Varga 7136d68a9a Update 'Problems' section. 2011-01-03 15:42:15 +01:00
Zoltan Varga d122f2e7f9 Compute the stack scanning stats correctly, handle threads without a saved
context.
2011-01-03 15:42:15 +01:00
Zoltan Varga f0bbe430ff Update comments. 2011-01-03 15:42:15 +01:00
Zoltan Varga f8a1d28e8d Store the liveness information in a two dimensional bitmap in the GC map. Fix a few problems in the liveness calculation. Turn on precise stack scanning by default. 2011-01-03 15:42:15 +01:00
Zoltan Varga 694223ac7c Add a MONO_INST_GC_TRACK inst flag to mark variables needing GC tracking, use it in various places to avoid inserting and processing GC_LIVENESS instructions. 2011-01-03 15:42:15 +01:00
Zoltan Varga 4e35fc5c81 Add a modified liveness analysis pass to compute precise liveness intervals for variables which need GC tracking. 2011-01-03 15:42:14 +01:00
Zoltan Varga e725621c34 Ongoing work. 2011-01-03 15:42:14 +01:00
Miguel de Icaza 35969b2043 [mscorlib/getfolderpath] Special-case MacOS X.
The following changes were done to specially support OSX:
* MyMusic on OSX is ~/Music
* MyPictures on OSX is ~/Pictures
* Fonts on OSX is ~/Library/Fonts
* Favorites on OSX is ~/Library/Favorites
* ProgramFiles on OSX is /Applications
* InternetCache on OSX is ~/Library/Caches

The documentation has been updated accordingly.
2011-01-03 09:02:34 -05:00
Miguel de Icaza d224fe524c [mscorlib] New Path.Combine methods are exposed internally on pre 4.0 profiles
This allows our mscorlib code to be cleaner
2011-01-03 08:50:53 -05:00
Miguel de Icaza 9d7cff663c [mscorlib/getfolderpath] Remove MonoTODO 2011-01-03 08:41:33 -05:00
Miguel de Icaza d2a367e0a2 [GetFolderPath] Handful of .NET 4 changes
* Actually use the SpecialFolderPathOptions where we need them
  -> Create is acknowledged
  -> DoNotVerify is ignored, as Mono historically did not throw an
     exception on missing directories.
* Rename InternalGetFolderPath to UnixGetFolderPath as this is what it is.
* Fix existing references to the code
* Fix indentation in routine that was never properly formatted (ReadXdgUserDir)
2011-01-03 08:37:31 -05:00
Miguel de Icaza 411fb0a0a2 [mscorlib] inside mscorlib Platform's value will be correct for OSX, but userland still gets Unix.
This change allows mscorlib to get the real PlatformID, to split code between
OSX and general Unix.   We continue to expose the value 4 (Unix) to usercode
as changing this might break user applications.
2011-01-03 08:12:36 -05:00
Marek Habersack d2066b9583 [corlib] Fix for bug #659061. Adjust size of the last group when formatting numbers with group separators.
When the number format includes several groups make sure that the last (leftmost) one is adjusted
so that its width is not larger than the number of remaining characters.
2011-01-03 13:15:49 +01:00
Zoltan Varga 86aba52e0c .gitignore. 2011-01-03 12:57:16 +01:00
Zoltan Varga d313dc902c Use a more compact encoding for references to icall/ptr-to-struct/struct-to-ptr
wrappers, this saves about 50k from the full-aot mscorlib image size.
2011-01-03 11:42:53 +01:00
Zoltan Varga 5ad1115d9e Fix the fullaotcheck target. 2011-01-03 11:42:53 +01:00
Thomas Goldstein a421a02dde Add unit tests for bug 661753. 2011-01-01 04:35:27 -08:00
Thomas Goldstein f148c54da8 Add missing properties that should be copied when cloning a TreeNode. Fixes bug 661753. 2011-01-01 04:28:55 -08:00
Jb Evain 812c108cd3 [LINQ] Fix non generic AsQueryable issue #661462 2010-12-30 16:21:40 +01:00
Jb Evain beb2696811 Add test for bug #661462 2010-12-30 16:20:44 +01:00
Jonathan Pobst dec5ac4085 Update for moving \mcs to \mono\mcs. 2010-12-29 16:05:21 -06:00
Jonathan Pobst 81de891e90 mono.dll -> mono-2.0.dll 2010-12-29 15:19:57 -06:00
Jonathan Pobst e85dee8a74 Do previous SKEL_DIRECTORY change for Release profile as well. 2010-12-29 15:04:17 -06:00
Jonathan Pobst f6179677be Escape SKEL_DIRECTORY define. 2010-12-29 14:58:22 -06:00
Jonathan Pobst 2a4822d4d6 All the other vcxproj files seem to be build to $(Platform) instead of $(Platform)_$(Configuration), so make this one match. 2010-12-29 14:45:23 -06:00
Jonathan Pobst d0c01c51be Remove obsolete files from MSVC build. 2010-12-29 14:39:32 -06:00
Jonathan Pobst 9d819a4133 Build 'eglib' in the Win32|Release profile. 2010-12-29 14:23:31 -06:00
Miguel de Icaza 751eeba04a [monodoc] Use points instead of relative-sizing, so that we render the same on web browsers and on WebKit 2010-12-29 15:05:18 -05:00
Marek Safar 38d9849d6d Another missing System.Windows.Forms reference 2010-12-29 17:50:39 +00:00
Marek Safar defa75dda9 Update issues error list 2010-12-29 17:50:15 +00:00
Marek Safar ef6c88b09e Implements checking of referenced members with missing references 2010-12-29 17:16:40 +00:00
Marek Safar f71ceb0e0e Add few more missing references 2010-12-29 17:03:17 +00:00
Marek Safar e35b0995a6 Removed 1.1 version of Mono.Data.Sqlite 2010-12-29 16:50:23 +00:00
Marek Safar a73bda3b22 Fixed Mono.Data.Sqlite dependencies 2010-12-29 16:46:05 +00:00
Marek Safar 0aef583a13 Build culevel in basic as well 2010-12-29 14:16:56 +00:00
Marek Safar e6c5285ece [661642] Fixed v4 resgen compilation 2010-12-29 12:56:54 +00:00
Marek Safar d84d7c7eb9 Remove no longer used BOOTSTRAP conditionals 2010-12-29 12:41:12 +00:00
Marek Safar d86fc07959 Remove no longer used bootstrap profiles 2010-12-29 10:00:08 +00:00
Marek Safar fea8332dcd New tests 2010-12-29 10:00:07 +00:00
Miguel de Icaza 102e30651a Revert accidental patch 2010-12-28 20:57:33 -05:00
Miguel de Icaza da43dacd43 [monodoc] Update the stylesheets to use Jonathan Pobst's UI design.
This is a temporary measure, as we only use 1/10th of Jonathan's
icons and style, but will do while we get Kipunji deployed.

The major benefit is that the native Linux and MacOS Monodoc
clients when using Gecko or WebKit can render something that is not
hideous.
2010-12-28 20:56:13 -05:00
Miguel de Icaza 027af8e474 [monodoc] Header no longer needed, we now keep it on the top 2010-12-28 20:56:12 -05:00
Miguel de Icaza a4e17dba01 [monodoc] Fix the root display once and for all: web does not do editing 2010-12-28 20:56:11 -05:00
Miguel de Icaza 965f3be81a Update README 2010-12-28 20:56:11 -05:00
Atsushi Eno 3f94471b5a Actually we have almost what we need on mobile profiles. 2010-12-28 22:02:08 +09:00
Zoltan Varga f59335471f Update sdb API documentation. 2010-12-26 01:10:10 +01:00
Zoltan Varga 53d80e3d29 Partially revert 759ebbb3df: pass the 'err'
argument to mono_dl_open () again. Fixes #661356.
2010-12-24 15:06:40 +01:00
Zoltan Varga 65d5055e87 Remove an obsolete comment. 2010-12-24 05:29:17 +01:00
Marek Safar b4706d358e Fixed wrong AttributeUsageAttribute 2010-12-23 16:13:07 +00:00
Marek Safar bc05e36a09 Implement missing v4 attribute types 2010-12-23 16:03:19 +00:00
Marek Safar 64054760c4 Add new tests 2010-12-23 14:11:06 +00:00
Marek Safar 802949550b Update mono-api-info to work with latest cecil. Updated to latest SL4 2010-12-23 13:55:51 +00:00
Marek Safar ff805322f6 Report obsolete warning for generic methods which base implementation constraints are obsolete 2010-12-23 11:00:50 +00:00
Marek Safar fb125bbd00 Fixed corlib tests to run on en-gb 2010-12-23 11:00:50 +00:00
Andrew Jorgensen 5d40ea706b Package the new mcs.exe instead of gmcs.exe 2010-12-22 15:21:28 -07:00
Alan McGovern bc80a7e283 [mono-api-info] Do not ignore finalizers
Finalizer chaining is done at compile time, so if you compile
against a lib with no finalizer and then run against one with
a finalizer, you'll end up ignoring the finalizer in the second
lib and it will never be run. Therefore we need to take these
into account.
2010-12-22 20:59:20 +00:00
Thomas Goldstein fe1f59426d Remove null check in ComboBox.SelectedText setter (now handled in TextBoxBase). 2010-12-22 10:30:54 -08:00
Thomas Goldstein a40a91ad5e If SelectedText is given a null value, set it to String.Empty. 2010-12-22 10:28:45 -08:00
Geoff Norton 5ae40c0119 Add some missing files needed for windows to the tarball 2010-12-22 12:05:18 -05:00
Marek Safar b4a5ea2985 Fixed NumberFormatInfo.InvariantInfo currency symbol 2010-12-22 12:48:55 +00:00
Marek Safar a9afb00c93 [660553] Fixed delegate name hiding. 2010-12-22 11:55:08 +00:00
Kenneth Bell 4ac6a56d98 Add block device support to file_getfilesize on Linux
FileStream.Length for a block device (such as '/dev/sr0') now returns actual size, rather than Zero on Linux.
2010-12-21 17:49:15 -05:00
Thomas Goldstein 9ec33796d2 Add unit test for bug 660294. 2010-12-21 13:05:38 -08:00
Thomas Goldstein a57e44b5a9 When ComboBox.SelectedText is given a null value, set it to String.Empty. Fixes bug 660294. 2010-12-21 12:45:26 -08:00
Elijah Taylor 24134641fe fix comment 2010-12-21 10:49:09 -08:00
Atsushi Eno 090b3d89ab Fix incorrect internal node cleanup in MoveToRoot(). Fixed bug #654433. 2010-12-22 02:08:58 +09:00
Atsushi Eno 9cc9294607 Add tests from XPathNavigatorEvaluateTests. 2010-12-22 01:39:23 +09:00
Atsushi Eno a76bbbe698 Add another bunch of tests from XPathNavigatorTests. 2010-12-22 01:29:52 +09:00
Atsushi Eno e41225ef4c Several fixes in XNodeNavigator to pass XPath tests from System.Xml. 2010-12-22 00:41:09 +09:00
Jb Evain c628dfee43 Fix cecil update script 2010-12-21 10:35:58 +01:00
Jb Evain 5931d4ccc0 update cecil from upstream 2010-12-21 09:53:18 +01:00
Gonzalo Paniagua Javier 26459b1b2c Previous patch was wrong. 2010-12-20 21:54:48 -05:00
Gonzalo Paniagua Javier bb34699508 [OSX] semaphore_timedwait might return > 0 for errors
Errors, including timeout, are reported with a positive return in
	semaphore_timedwait.
2010-12-20 20:46:18 -05:00
Elijah Taylor 7f11a9e501 Merge selective files from fsa branch 2010-12-20 17:13:21 -08:00
Andreia Gaita 217c16b39f Moonlight build fixes and cleanup 2010-12-21 01:06:44 +00:00
Zoltan Varga 04c9550a92 Pass -verbose-asm=false to llc, since verbose assembly slows it down greatly. 2010-12-21 01:59:12 +01:00
Mark Probst cf5e8bf2ca [sgen] Make Mark&Sweep compile without card tables. 2010-12-20 21:00:33 +01:00
Elijah Taylor 1201863c1b Add back SHARED_MONO line that got deleted accidentally, always enable shared mono for NaCl 2010-12-20 11:55:27 -08:00
Marek Safar 2bbb93851b Enable fixed ikvm exception mode 2010-12-20 19:13:33 +00:00
Marek Safar 975afa580f Emit constant data type using compiler type containers 2010-12-20 19:13:32 +00:00
Marek Safar 95db77b7c5 Import ikvm fixes 2010-12-20 19:13:32 +00:00
Elijah Taylor 9ad2f519c9 Changes to get NaCl builds working minimally 2010-12-20 11:04:02 -08:00
Elijah Taylor 43c6ad37bc NaCl build and test scripts 2010-12-20 10:55:00 -08:00
Ankit Jain 73ed1253ad [xbuild] Fix bug #660508 .
Use correctly escaped project+target names when
specifying project dependencies in the project
file generated from a .sln file.
2010-12-20 20:33:58 +05:30
Marek Safar a4de65fd00 Add a workaround for ikvm unfixed baked method tokens 2010-12-20 12:37:39 +00:00
Marek Safar 636d65a48f Disable ikvm exception optimization until it's fixed 2010-12-20 12:17:46 +00:00
Marek Safar 983c39adbe Keep looking for references assembly after first lib path fails 2010-12-20 11:51:58 +00:00
Marek Safar b0f20458aa Replace initial eval Reset with PartialReset 2010-12-20 11:51:02 +00:00
Marek Safar bedfdae806 Add missing files to Mono.CSharp.csproj 2010-12-20 11:50:09 +00:00
Marek Safar e07dd12e9f [660260] A static method is inaccessible from a nested type with explicit generic args 2010-12-20 10:50:58 +00:00
Marek Safar de4a87e245 [660255] Keep inflated non-inflated method info independently 2010-12-20 10:50:58 +00:00
Atsushi Eno 7977b08ae8 Use DateTime ToBinary() and FromBinary() for DateTime serialization. 2010-12-20 17:17:57 +09:00
Atsushi Eno 544cfd1db7 Implemented support for attached properties in xamlreaders and xamlwriters. 2010-12-20 11:25:53 +09:00
Zoltan Varga 0fc50cf3a6 Add support for accessing ThreadStatic fields in sdb. Fixes #645217. 2010-12-19 23:13:04 +01:00
Zoltan Varga cf1d488517 Add functions to access values of ThreadStatic fields from another threads. 2010-12-19 23:13:03 +01:00
Marek Safar 56c5f3c396 Add aot-compiler to dist list 2010-12-18 10:20:34 +00:00
Zoltan Varga 0070661268 Fix a buffer overflow in the aot compiler. 2010-12-18 03:51:20 +01:00
Zoltan Varga 69d5baed9f Name the llvm methods using the debug symbol by default, instead of using the cryptic m_<token> name. 2010-12-18 03:39:35 +01:00
Zoltan Varga 256afe8374 Support passing vtypes on llvm/arm. 2010-12-18 02:59:17 +01:00
Marek Safar 1b30134ae7 Add more files to mcs dist 2010-12-17 22:55:19 +00:00
Zoltan Varga 01715c3d97 Support methods returning vtypes by addr on arm/LLVM. 2010-12-17 23:06:18 +01:00
Zoltan Varga 43ff0aa594 Add support for OP_SETFRET to the llvm backend. 2010-12-17 22:29:15 +01:00
Zoltan Varga 6cf2d84622 Fix OP_LCONV_TO_OVF_I4 under LLVM. Don't use the Mono LLVM calling convention for pinvoke calls. 2010-12-17 22:07:38 +01:00
Zoltan Varga f55bc7d06d Allow decomposition of some complex 64 bit opcodes on 32 bit platforms when running with llvm. 2010-12-17 21:48:37 +01:00
Gonzalo Paniagua Javier 44a043e5d1 Mach uses wait_time not abs_time
The time to wait is relative in the Mac functions.
2010-12-17 15:08:07 -05:00
Andreia Gaita 52aac691d9 Fix moonlight build 2010-12-17 20:04:48 +00:00
Andreia Gaita 68032088ce Document the new --with-moon-gc flag on the README 2010-12-17 18:27:42 +00:00
Andreia Gaita db5d050444 Add --with-moon-gc to select the gc to use with moon (boehm/sgen) 2010-12-17 17:57:47 +00:00
Paolo Molaro 66efe2cc38 Log profiler: fix statistical mode on linux amd64. 2010-12-17 17:40:44 +01:00
Jonathan Pobst 0df612b813 Reverse #elif check since 4.0 profile defines NET_2_0. Fixes broken test. 2010-12-17 10:30:52 -06:00
Andrew Jorgensen e704c1eb97 get-monolite-latest now pulls a versioned archive
In order to ensure that monolite actually works you need to ensure that
the corlib in it has the same version as your runtime.  Monolite
archives are now versioned monolite-MONO_CORLIB_VERSION-DATE.
2010-12-17 09:10:54 -07:00
Jérémie Laval 82264df085 Remove a leftover debugging scwl 2010-12-17 16:09:37 +00:00
Marek Safar fc940fba4a Update mcs name for monolite build 2010-12-17 15:58:31 +00:00
Marek Safar c1d41511b8 [660077] Setup class interfaces for defined types in same way as for imported types 2010-12-17 11:58:26 +00:00
Marek Safar 4029237c92 Made SecurityAction predefined type 2010-12-17 09:36:10 +00:00
Marek Safar 510289542e Add an error to obsolete attribute to get consistent compiler error code 2010-12-17 09:36:09 +00:00
Marek Safar 093d9ef448 [657601] Fixes parsing pragma warning when encounter eof 2010-12-17 09:36:09 +00:00
Gonzalo Paniagua Javier b5ba5bfb20 [ThreadPool] Reset the abort state when unloading a domain
Properly reset the abort state of threadpool threads that processed
	domain unloading or were running in a domain that was being unloaded.

	Thanks go to Kumpera for finding this out.
2010-12-17 00:37:02 -05:00
Jonathan Pobst 9bc4f0d82f Fix some broken tests that check for assembly version 2.0.0.0 on the 4.0 profile. 2010-12-16 22:19:30 -06:00
Zoltan Varga 01e4a7c9c2 Convert the new NO_SEQ_POINT_AT_IL_OFFSET sdb error code into an exception. 2010-12-17 04:45:09 +01:00
Zoltan Varga 5b0a74c1c7 Send back an error instead of asserting when a breakpoint cannot be set at an il offset because it has no seq point. Fixes #620099. 2010-12-17 04:39:49 +01:00
Zoltan Varga f7ad295d05 Reserve r7 on arm/darwin even if iphone_abi is disabled. 2010-12-17 03:33:50 +01:00
Elijah Taylor 06fa666aee Merged in rest of Native Client changes, untested 2010-12-16 16:26:34 -08:00
Sebastien Pouliot 0cf8705abf Fix access policy when more than one scheme is present #659791
* ClientAccessPolicy.cs: Remove special case for scheme
* ClientAccessPolicyParser.cs: Add scheme-only entries like full URI
2010-12-16 16:29:56 -05:00
Zoltan Varga b3dce5c637 Don't put llvm type infos into the text segment, it is no longer needed. 2010-12-16 22:31:13 +01:00
Zoltan Varga 8609775f13 Null out trace_ips after freeing it to avoid crashes. 2010-12-16 22:26:00 +01:00
Jonathan Pobst bfb617e863 Move line inside if () to fix 2 tests.
Broke by 9aa23d8ebe.
2010-12-16 14:43:32 -06:00
Marek Safar 3455cf823e Set ImageRuntimeVersion based on mscorlib version when available 2010-12-16 19:07:03 +00:00
Martin Baulig bfb5bf16b8 Add documentation for my new exception filter code. 2010-12-16 19:46:42 +01:00
Marek Safar 89587c475a [659970] Close anonymous method scope also for top-level blocks 2010-12-16 18:24:28 +00:00
Martin Baulig 1fe8f7eca5 Improve support for exception filters.
* mini-exceptions.c (mono_handle_exception_internal_first_pass): Store the
  exception object in bp + ei->exvar_offset before invoking an exception
  filter.  Use mono_debugger_agent_exception_filter().

* debugger-agent.c: Add mono_debugger_agent_exception_filter(); stores
  the original context in `tls->filter_ctx' while invoking the filter.

* Mono.Debugger.Soft/Test: Add test cases.
2010-12-16 19:22:42 +01:00
Jonathan Pryor 8a263984e9 [monodroid] Add support for the Android TimeZone file format.
Fixes #657609.

Android uses "ye standard" timezone file format, but instead of using
a directory + file structure as libc uses, they throw everything into
two files, a "zoneinfo.dat" and a "zoneinfo.idx", where "zoneinfo.dat"
is the concatenation of all the TZIF files and "zoneinfo.idx" contains
the timezone names and offsets into "zoneinfo.dat".  From the
ZoneInfoDB documentation:

	However, to conserve disk space the data for all time zones
	are concatenated into a single file, and a second file is
	used to indicate the starting position of each time zone
	record.  A third file indicates the version of the zoneinfo
	databse used to generate the data.

TimeZoneInfo.Android.cs is a C# port of the corresponding Android
ZoneInfoDB type so that Mono can use Android's timezone DB.
2010-12-16 13:17:38 -05:00
Miguel de Icaza 8c686c3e13 Update instructions 2010-12-16 13:01:37 -05:00
Miguel de Icaza 77af6420b9 Undo adding of README2 test file 2010-12-16 12:59:50 -05:00
Miguel de Icaza 9aa23d8ebe [winforms] undo accidental removal of a line 2010-12-16 12:58:44 -05:00
Miguel de Icaza a791cfc164 [winforms] revert patch, it regresses the test suite: https://github.com/mono/mono/commit/8334fe3a56c978ffe7f8cb199536f9b3234afdbe 2010-12-16 12:56:55 -05:00
Atsushi Eno 7a49c5d397 Add attachable event support in XamlType (not yet in readers and writers). 2010-12-17 01:32:49 +09:00
Miguel de Icaza 5fc671180e Update COPYING file with MS-PL and Apache2 texts 2010-12-16 11:10:43 -05:00
Miguel de Icaza 36fbacfe85 Add README2 2010-12-16 11:10:43 -05:00
Jérémie Laval 15e3272b1c Clean and finish TaskFactory 2010-12-16 14:45:44 +00:00
Jérémie Laval 09185b9e81 Add support for storing elements with the same hashcode in ConcurrentDictionary. Add corresponding unit test. 2010-12-16 13:39:32 +00:00
Marek Safar 4657d0ac34 Build po files from cs-parser.jay and not cs-parser.cs 2010-12-16 13:33:49 +00:00
Marek Safar 9b61c27be8 Updated mcs translations, added Brazilian Portuguese 2010-12-16 13:04:10 +00:00
Marek Safar 4eaa975aa3 Don't build aot symbols on make dist 2010-12-16 12:42:29 +00:00
Marek Safar de462599f2 Adjust MONO_PATH, it's still needed for all profiles 2010-12-16 12:16:23 +00:00
Marek Safar 8bb7d1d7b3 Monolite mcs compiler 2010-12-16 12:06:53 +00:00
Marek Safar 1fef6badac Fix resgen build order 2010-12-16 11:44:06 +00:00
Marek Safar de0d03146a Add dist only Makefile 2010-12-16 10:05:48 +00:00
Marek Safar 49b0253a7f Switch to single mcs compiler for all managed code build 2010-12-16 09:59:39 +00:00
Marek Safar f9d82bd990 dist IKVM.Reflection 2010-12-16 09:30:32 +00:00
Marek Safar 82579609f6 Add IKVM.Reflection 2010-12-16 09:29:45 +00:00
Marek Safar 6954973148 Some 4.0 API tweaks 2010-12-16 09:25:47 +00:00
Marek Safar db16de1527 Cleanup references in static mode 2010-12-16 09:25:47 +00:00
Marek Safar 5eea47a4e1 New test 2010-12-16 09:25:46 +00:00
Marek Safar 6c1d871040 Add more attribute arguments checks 2010-12-16 09:25:46 +00:00
Atsushi Eno 3f71818dcd Implement XamlType.GetAllAttachableProperties() and family, except for events. 2010-12-16 18:13:22 +09:00
Atsushi Eno c84f6ede0d For IXmlSerializable/XData, Instance property returns null (!) 2010-12-16 16:27:19 +09:00
Marek Habersack ecd103fe4e Fix the build 2010-12-16 07:17:08 +01:00
Zoltan Varga 446ab2fafe Modify the Mono EH Frame decoding so it handles the LSDA+type_info embedded into the FDE. 2010-12-16 02:14:22 +01:00
Bojan Rajkovic 50278f2555 Correct LDFLAGS on the Darwin platform so the profiler will build. 2010-12-15 16:41:09 -05:00
Jérémie Laval 5976833aee Sys.Core parameters fixup 2010-12-15 17:43:55 +00:00
Jb Evain c0b19d1afc Make sure AppdDomain.PermissionSet doesn't return null 2010-12-15 18:35:29 +01:00
Marek Safar a24ada6a4e Fixed cloning of default switch case 2010-12-15 17:25:43 +00:00
Marek Safar 78d78bc466 New tests. 2010-12-15 17:25:42 +00:00
Marek Safar 7b27c2f3f3 [659536] Don't re-create array expressions when infering implicit array type 2010-12-15 17:25:42 +00:00
Marek Safar 1b5c2e4dd9 [659528] Fixed cloning of switch sections 2010-12-15 17:25:41 +00:00
Jérémie Laval edef0d70bc Add missing members in AggregateException 2010-12-15 17:10:17 +00:00
Jérémie Laval 1a29dfd260 Add prototype for Parallel.For long overloads 2010-12-15 17:09:47 +00:00
Jérémie Laval 89fecf7d97 Yet more parameter manual fixup 2010-12-15 17:09:19 +00:00
Jérémie Laval ed404a7b74 More parameter renaming 2010-12-15 16:39:58 +00:00
Sebastien Pouliot c3e7a90fa5 [moon] Return true for IsolatedStorageFile.IsEnabled
* MoonIsolatedStorageFile.cs: Return true, instead of throwing a NIE,
for IsEnabled since this is the behavior for Silverlight 3 (i.e. always
enabled) even if the call is new in SL4 (but part of ML3 ;-)
2010-12-15 11:36:29 -05:00
Sebastien Pouliot ba688ff8b9 Test case for security issue 2010-12-15 11:06:41 -05:00
Jérémie Laval 80502502e1 Update Task parameter names 2010-12-15 14:13:33 +00:00
Marek Safar 0a0e04ba13 [656150] Fix repl recovery after invalid expression. 2010-12-15 13:26:20 +00:00
Marek Safar 073a0e3051 Fix comment typo 2010-12-15 12:18:08 +00:00
Marek Safar 2fad7a53fa Workaround problem when compiling many resource files references 2010-12-15 12:06:10 +00:00
Marek Safar 25b26705a4 Add existing class to System.Net build 2010-12-15 11:40:59 +00:00
Marek Safar 6391925927 Keep only single Dispose implementation in ResourceReader 2010-12-15 11:36:24 +00:00
Marek Safar 754b331640 Switch to resizeable array when adding second item to base member cache 2010-12-15 11:35:22 +00:00
Marek Safar bd05c6c836 Some .net 4.0 api compatibility fixes 2010-12-15 11:12:07 +00:00
Marek Safar d615165879 Emit delegate constructor parameter names 2010-12-15 11:12:07 +00:00
Marek Safar 4384daff77 Recover from invalid linq block syntax 2010-12-15 11:12:06 +00:00
Elijah Taylor 9e73759b4d Merge mono/io-layer, mono/metadata, mono/arch/x86 and configure.in for Native Client 2010-12-14 16:03:45 -08:00
Elijah Taylor e9d089527d Changes to mono/arch/amd64 for Native Client 2010-12-14 14:37:36 -08:00
Zoltan Varga 6a8e4e51fc Add llvm_label_prefix to a few symbols. 2010-12-14 22:39:20 +01:00
Jeffrey Stedfast ee5160d55d Fixed AesManaged parameter names to make gui-compare happy 2010-12-14 16:20:35 -05:00
Zoltan Varga fbd6a1b09a Put llvm type infos into the .text section. 2010-12-14 21:34:57 +01:00
Zoltan Varga 2b83ff4fd6 Add support for an additional TType encoding. 2010-12-14 21:34:57 +01:00
Rodrigo Kumpera 002317f5d4 Release per-appdomain binding information.
* appdomain.c (unload_thread_main): Call function
	bindings cleanup.

	* assembly.c (mono_assembly_apply_binding): Dupe the
	content of per-domain bindings. Assign a domain_id on
	such entries to be possible to track them later.

	* assembly.c (mono_assembly_cleanup_domain_bindings):
	New function that removes per-domain bindings on
	unload.

	* metadata-internals.h (MonoAssemblyBindingInfo): Add
	domain_id field so it's possible to track if an entry
	is appdomain bound.
2010-12-14 18:41:55 -02:00
Rodrigo Kumpera ccc16fe531 Merge branch 'master' of github.com:mono/mono 2010-12-14 18:41:53 -02:00
Jeffrey Stedfast 094962c7bf Add TypeForwardedTo for Aes on MOONLIGHT and BOOTSTRAP_NET_4_0 2010-12-14 15:08:55 -05:00
Michael Hutchinson 32d328ef78 Socket.Dispose is public in 4.0. 2010-12-14 14:20:23 -05:00
Rodrigo Kumpera e400d3bc23 Add one more test for marshaling of char arrays 2010-12-14 14:34:45 -02:00
Rodrigo Kumpera db4299a192 Fix marshaling of chars on structs.
* marshal.c (emit_struct_conv): Take the native type of
	the field to decide what kind of conv to use if field
	is of type char.

	* marshal.c (mono_pinvoke_is_unicode): Unify auto
	and default.

	* marshal.c (emit_struct_conv_full): Kill this variant
	that doesn't make any sense as structures are marshaled
	in the same way regardless of the charset of the method.

	* metadata.c (mono_type_to_unmanaged): Handle marshalspec
	for char.

	Fixes the regression on MD caused by 1f3cfba.
2010-12-14 14:34:45 -02:00
Marek Safar 32fd52c54c [653710] Check type parameter reference type constraint recursively 2010-12-14 16:32:05 +00:00
Marek Safar 4de18f97cb [656918] Implement expression tree access to hoisted variable reference 2010-12-14 16:05:47 +00:00
Atsushi Eno 0de2ef480c Add experimental "#if NET_2_1" mode (it builds w/o s.x.permissions). 2010-12-15 00:15:20 +09:00
Marek Safar bc7cc6c935 [656918] Emit instance expression for ET delegate creation 2010-12-14 14:11:20 +00:00
Marek Safar c14f0bebfa Reject automatic version number at major and minor positions 2010-12-14 13:36:42 +00:00
Marek Safar 6b05daa743 [655284] Implemented automatic assembly version numbers 2010-12-14 13:06:39 +00:00
Marek Safar 8d25ac7be3 [655770] Emit unused members warning for nested types as well 2010-12-14 11:26:53 +00:00
Marek Safar df576a3b2e [657623] Fix incorrect logic in value type parameter `is' check 2010-12-14 11:26:52 +00:00
Marek Safar 45d00032c7 Add more restrictions to custom attribute encoding 2010-12-14 11:26:52 +00:00
Marek Safar f0b234748e [657797] Expand type member cache using secondary constraints as well. 2010-12-14 11:26:51 +00:00
Marek Habersack 833aab4906 [asp.net] Fix for bug #467221. Properly match location sub-paths for security trimming
When security trimming is requested for sub-path of a location specified in the config file,
make sure that we match such a request to its parent location.

Based on patch from Mike Morano <[email protected]>, thanks!
2010-12-14 10:07:24 +01:00
Marek Habersack 149ff0a30b [asp.net] Added verbose mode to the standalone test runner 2010-12-14 10:06:48 +01:00
Atsushi Eno eabd497033 add missing method in IAmbientProvider. 2010-12-14 13:50:43 +09:00
Zoltan Varga 12b8c6eb71 Don't prepend llvm_label_prefix to plt symbol names. 2010-12-14 03:19:15 +01:00
Gonzalo Paniagua Javier 98532db21b Don't throw in EndReceive/EndSend + out error
The overloads of EndReceive and EndSend that have an out SocketError
	parameter do not throw.

	Patch by Sven Groot that fixes bug #659056.
2010-12-13 18:56:52 -05:00
Gonzalo Paniagua Javier 4186a1455a Change parameter name.
Fixes bug #659123.
2010-12-13 17:00:49 -05:00
Andrew Jorgensen 86e618a14a Simplify the profiler line in the spec file
Stuff sometimes appears or disappears here, just use a wildcard.
2010-12-13 13:57:46 -07:00
Zoltan Varga fa9b02b8be Emit a seq_point after OP_START_HANDLER, not before. 2010-12-13 20:42:59 +01:00
Zoltan Varga ca1a219141 Avoid passing a name to mono_register_jit_icall () which is later freed. 2010-12-13 20:21:41 +01:00
Michael Hutchinson 50f8314921 Fixi soft debugger dll crash on Windows w/redirected console
Windows socket behaviour seems to be slightly different from
Linux/Mac, and Mono.Debugger.Soft was trying to disconnect a socket
that that doesn't get connected, causing an exception at launch.

For some reason it did check the main debugger socket before trying
to disconnect it, but not the console socket, so only apps with
redirected console output would crash.
2010-12-13 13:51:30 -05:00
Michael Hutchinson 920563b6b3 Remove default arg usage from sdb dll so it can be compiled with csc 3.5 2010-12-13 13:51:30 -05:00
Zoltan Varga 286e819e9c Implement support for the .mono_eh_frame created by llc on LLVM mono branch. 2010-12-13 19:23:10 +01:00
Zoltan Varga 8bfda40a8a Fix full-aot+llvm support on arm. 2010-12-13 19:23:10 +01:00
Marek Safar bf0e87ed65 Remove duplicate checks 2010-12-13 18:08:54 +00:00
Marek Safar c019be7d88 New test. 2010-12-13 18:00:56 +00:00
Marek Safar 082873782a [659038] Check interface hierarchy before reporting ambiguous errors 2010-12-13 18:00:56 +00:00
Marek Safar d80ea6c37b [657862] Correctly scan for parent of base method override 2010-12-13 18:00:55 +00:00
Marek Safar 4c54d54be6 [658722] Don't require arity symbol to be part of the typename 2010-12-13 18:00:55 +00:00
Zoltan Varga fb702c0e2e Avoid registering sequence points in the per-domain hash when AOT compiling. 2010-12-13 18:23:23 +01:00
Lluis Sanchez 0943712481 Fix several issues in the code generator
Issues include: casts not being properly generated for nullable
types, missing cast when the type of a member does not match
the forced serialization type, and incorrect code generated
for handling [XmlText] members.
2010-12-13 16:51:44 +01:00
Bojan Rajkovic 9dc2ec91e8 Add FreeBSD to the list of supported platforms for SGen on i386 and x86_64. 2010-12-13 10:53:26 -05:00
Bojan Rajkovic 7418206816 Update build-csproj2k5 script to use /bin/sh, since there are no obvious bash-isms in the script. 2010-12-13 10:53:26 -05:00
Bojan Rajkovic f5de47c516 Use SIGXFSZ on FreeBSD too by checking for the __FreeBSD__ define. Like Apple and OpenBSD, it doesn't have SIGPWR. 2010-12-13 10:53:26 -05:00
Atsushi Eno 1d2fc1166f Fix enum serialization too. 2010-12-14 00:11:33 +09:00
Jérémie Laval 98d5dfb35e Increment Count even on single-processor in SpinWait. Fix #624849. 2010-12-13 13:41:31 +00:00
Marek Habersack 6567b6c320 [asp.net] Test suite configuration updates for 4.0
When running the tests on the 4.0 profile, the configuration must no longer include
the System.Web.Extensions section declarations as they are merged with machine.config right now.
2010-12-13 14:40:37 +01:00
Marek Safar 20f08e15cb [659022] Resolve reduced expressions 2010-12-13 13:32:22 +00:00
Lluis Sanchez 0dcc87e549 Fix code generation issue with nested generic types
The type argument list for generic nested types include
all types arguments for the whole declaring type chain.
When generating the C# name of the class, each type
argument has to be assigned to the correct class in
the chain.
2010-12-13 13:49:35 +01:00
Lluis Sanchez 6eb0ebd56c Fix flags enum deserialization
Flag enums values can be a composition of several
values separated by spaces. The deserializer now
properly handles this case.
2010-12-13 13:49:34 +01:00
Lluis Sanchez 3dc10b0fd1 Throw correct exceptions when using generated serializer
Invocations to generated serializers are done through
reflection, so exceptions are masked by TargetInvocationException.
The inner exception has to be rethrown so that the client
code gets the correct exception.
2010-12-13 13:49:34 +01:00
Marek Safar 71c948128d Re-enable EmbedResourceFile overload used by al.exe 2010-12-13 12:10:54 +00:00
Marek Habersack a1a3235872 [asp.net] Fix for bug #658278. Panels render children only when parent is present and ChildrenAsTriggers is enabled
Fix from Avior Computing <[email protected]>, thanks!
2010-12-13 12:59:28 +01:00
Marek Habersack f222bb2a46 [asp.net] .NET 4.0 declares the <system.web.extensions> section in machine.config 2010-12-13 08:59:41 +01:00
Marek Habersack de1e6a882c [asp.net] Implmeneted the System.Web.Configuration.ScriptingRoleServiceSection type 2010-12-13 08:58:33 +01:00
Miguel de Icaza 869fd0336e [winforms] Pass 4 of removing NET_2_0 from winforms 2010-12-12 23:32:36 -05:00
Miguel de Icaza 60ca042c3b [winforms] Pass 3 of removing NET_2_0 from winforms 2010-12-12 23:32:36 -05:00
Miguel de Icaza 8f9dbbc286 [winforms] Pass 3 of removing NET_2_0 from winforms 2010-12-12 23:32:35 -05:00
Miguel de Icaza 51c01f5aa0 [winforms] Pass 2 of removing NET_2_0 from winforms 2010-12-12 23:32:35 -05:00
Miguel de Icaza 63103537a8 [winforms] Pass 2 of removing NET_2_0 from winforms 2010-12-12 23:32:35 -05:00
Miguel de Icaza e4f22a9c91 Pass 1 of removing NET_2_0 from winforms 2010-12-12 23:32:35 -05:00
Zoltan Varga 1146f40c27 Fix ARM build. 2010-12-13 05:14:16 +01:00
Zoltan Varga 6c657df861 Fix full-aot+llvm support on amd64. 2010-12-13 03:03:49 +01:00
Zoltan Varga 074b762ef7 Add targets to run aot/full-aot tests with LLVM. 2010-12-13 03:03:14 +01:00
Zoltan Varga 23b2ee07fa Add a patch each time a plt entry is requested in the llvm backend, so wrappers can be generated in full aot. 2010-12-13 03:02:29 +01:00
Zoltan Varga e8a21b1811 Add a Make variable to run the aot tests using --llvm. 2010-12-13 01:08:17 +01:00
Zoltan Varga ec8b2a401b Don't make the mtriple argument mandatory, clean up processing of llc arguments. 2010-12-12 21:03:49 +01:00
Jonathan Pryor d7925c318b [mdoc] Fix code formatting.
The expression in `if(expr)`, if overly-long and spanning mulitple
lines, should be indented beyond the normal indent so that the
expression is more easily distinguished from the `if` body:

	if (expr &&
			expr2 &&
			expr3)
		body;

not:

	if (expr &&
		expr2 &&
		expr3)
		body;
2010-12-11 22:57:31 -05:00
Jonathan Pryor 3fffcf65ae Merge branch 'master' of https://github.com/XTZGZoReX/mono into XTZGZoReX-master 2010-12-11 22:53:27 -05:00
XTZGZoReX 92918b0599 [Monodoc] add GetDeclaringType(this CustomAttribute) extension method. 2010-12-12 04:42:12 +01:00
XTZGZoReX 07cf519f25 [monodoc] don't display methods with ContractInvariantMethodAttribute. 2010-12-12 04:33:39 +01:00
XTZGZoReX 48b6e0948a [Monodoc] eliminate a few warnings. 2010-12-12 04:33:26 +01:00
Thomas Goldstein 9f69887d40 [winforms] Small optimizations, use properties that do not compute values 2010-12-11 22:18:29 -05:00
Zoltan Varga 502b70362f Add an 'mtriple' aot option to set the target triple used by the AOT compiler in LLVM mode. 2010-12-11 22:27:17 +01:00
Zoltan Varga 09768e2fa7 Add a mono_arch_set_target () function to set the target triple which should
be targeted by the JIT in AOT mode on ARM.
2010-12-11 22:27:17 +01:00
Miguel de Icaza a22c4b9689 [winforms] Style, braces 2010-12-10 23:34:22 -05:00
Miguel de Icaza 855f654bea [winforms] Use conditional attributes, not ifdefs to insert conditional code 2010-12-10 23:32:36 -05:00
Miguel de Icaza 79d63d526b [winforms] Use conditional attributes, not ifdefs to insert conditional code 2010-12-10 23:25:52 -05:00
Gonzalo Paniagua Javier 588fb657fb Line endings 2010-12-10 23:19:06 -05:00
Ralph Leckett 80253e7210 [System.Drawing] Remove unnecessary verbosity 2010-12-10 23:07:07 -05:00
Ralph Leckett fcd9f10f29 [System.Drawing] On image load from stream errors, return null, not an exception 2010-12-10 23:05:55 -05:00
Ralph Leckett 858dc2e7ec [winforms] Fix graphics leak 2010-12-10 23:02:51 -05:00
Ralph Leckett e335b1e2ee [winforms] Fix graphics leak 2010-12-10 23:01:54 -05:00
Ralph Leckett 23d072b4ca [winforms] For what it appeared to be a crasher from the JumboPatch 2010-12-10 23:01:08 -05:00
Ralph Leckett 49493982d2 [winforms] Reorder code a bit 2010-12-10 22:59:05 -05:00
Ralph Leckett c5334a0c71 [winforms] Avoid leaking the Graphics 2010-12-10 22:53:53 -05:00
Ralph Leckett a78861b259 [winforms] Avoid leaking the Graphics + style 2010-12-10 22:53:07 -05:00
Ralph Leckett fe185d14b6 [winforms] Cope with null current regions 2010-12-10 22:51:01 -05:00
Ralph Leckett 6a0140ef05 [winforms] Cope with small windows 2010-12-10 22:49:21 -05:00
Ralph Leckett 986e5a1948 [winforms] Style 2010-12-10 22:45:52 -05:00
Ralph Leckett c918b2eb02 [winforms] Style 2010-12-10 22:43:59 -05:00
Ralph Leckett 97783cbb02 [winforms] Style, reduce full sizes of common types 2010-12-10 22:43:03 -05:00
Ralph Leckett 3035ae4756 [winforms] Do not leak Graphics in Invalidate + some Style 2010-12-10 22:41:16 -05:00
Miguel de Icaza e8bce62f47 [winforms] style, and NET_2_0 dropped 2010-12-10 22:35:52 -05:00
Ralph Leckett a0a65a6fa3 [winforms] Style 2010-12-10 22:26:51 -05:00
Ralph Leckett efc9d3ed8b [winforms] Cope with null Hwnd value from Hwnd.ObjectFromHandle 2010-12-10 22:25:41 -05:00
Ralph Leckett 60c8bfaeac [winforms] Win32 fixes for window class name
This is extracted from Ralph Leckett's jumbo-patch to winforms
2010-12-10 22:23:33 -05:00
Thomas Goldstein 8805219da5 [winforms] quick cleanup patches for a few WinForms classes 2010-12-10 22:09:04 -05:00
Thomas Goldstein 770af47e2c [winforms] Small optimization 2010-12-10 22:05:48 -05:00
Miguel de Icaza 4b0981d3d7 [winforms] Prepare for Gnome 3, by not depending on libgnomeui 2010-12-10 22:00:05 -05:00
joncham d8d703fbe2 Use 2.0 instead of 1.0 when probing install dirs. 2010-12-10 20:27:11 -05:00
Tom Hindle 6169e99a3d [winforms] Fix ContextMenuStrip vertical position can be wrong.
Fixes #658945

This can lead to the top of the context menu being off the screen.
This only happens with context menus with lots of items.
2010-12-10 19:54:13 -05:00
Tom Hindle 0c5085f5bc [winforms] WM_SETFOCUS is sent before Keyboard Focus is changed.
Switches Keyboard focus so that it occurs before WM_SETFOCUS is sent.

This means that the wrong keyboard im is selected while process winform events
caused by WM_SETFOCUS.

Attaching patch that changes this so that keyboard im is focused before
WM_SETFOCUS is sent.

Fixes: #557277
2010-12-10 19:54:13 -05:00
Tom Hindle 1436ec9426 [winforms] Allow WinForm controls to use on-the-spot XIM input methods
Attached Patch allows WinForms controls to get preedit notifications (by
overriding WndProc) when mono is run with  MONO_WINFORMS_XIM_STYLE=on-the-spot
mono

Changelog from attach patch:

2009-11-20    Tom Hindle <[email protected]>
    * XplatUIStructs.cs: Added user messages WM_XIM_PREEDITSTART,
    WM_XIM_PREEDITDONE, WM_XIM_PREEDITDRAW, WM_XIM_PREEDITCARET
    * X11Keyboard.cs: Changed preedit callbacks to emit WM_XIM_* messages
    * X11Structs.cs: Added XIMFeedbackStruct and XIMFeedback enum.

Here is some sample code which make use of this feature:

/// <summary>
/// Proof on concept implementation of a user defined TextBox that does on-the-spot
/// input method editing.
/// There is a number of know flaws - eg. doesn't end preedit when user moves cursor with mouse.
/// Need to run with MONO_WINFORMS_XIM_STYLE=on-the-spot mono
/// </summary>
public class OnTheSpotTextBox : TextBox, XIM.IPreedit
{
    // store text before preedit.
    string backup;

    #region IPreedit implementation
    public int PreeditStart (IntPtr clientData, IntPtr callData)
    {
        Console.WriteLine ("PreeditStart");
        backup = Text;
        return 100;
    }

    public int PreeditDone (IntPtr clientData, IntPtr callData)
    {
        Clear ();
        AppendText (backup);
        return 0;
    }

    public int PreeditDraw (IntPtr clientData, IntPtr callData)
    {
        XIM.PreeditDrawInfo info = new XIM.PreeditDrawInfo (callData);
        Console.WriteLine ("PreeditDraw PreeditDrawInfo {0}", info);
        if (info.ChangeLength > 0) {
            Clear ();
            AppendText (backup);
        }
        if (info.Caret > 0)
            AppendText (info.Text);
        return 0;
    }

    public int PreeditCaret (IntPtr clientData, IntPtr callData)
    {
        XIM.PreeditCaretInfo info = new XIM.PreeditCaretInfo (clientData);
        Console.WriteLine ("PreeditCaret PreeditCaretInfo {0}", info);
        return 0;
    }

    protected override void WndProc (ref Message m)
    {
        switch (m.Msg) {

        case         /*WM_USER*/0x400 + 0x1d00:
            // WM_XIM_PREEDITSTART
            // The WParam value identifies what is occurring.
            PreeditStart (m.WParam, m.LParam);
            break;
        case         /*WM_USER*/0x400 + 0x1d01:
            // WM_XIM_PREEDITDONE
            PreeditDone (m.WParam, m.LParam);
            break;
        case         /*WM_USER*/0x400 + 0x1d02:
            // WM_XIM_PREEDITDRAW
            PreeditDraw (m.WParam, m.LParam);
            break;
        case         /*WM_USER*/0x400 + 0x1d03:
            // WM_XIM_PREEDITCARET
            PreeditCaret (m.WParam, m.LParam);
            break;
        }
        base.WndProc (ref m);
    }

    #endregion

}
2010-12-10 19:54:12 -05:00
Tom Hindle a1db6a7798 [winforms] Add modal support to Forms
This fixes 614850 "Modal dialogs should prevent closing their parent windows."
2010-12-10 19:54:12 -05:00
Tom Hindle bedd606171 [winforms] DataGridView.cs : Made MoveCurrentCell not attempt access Column index -1.
Fixes #516960
2010-12-10 19:54:12 -05:00
Tom Hindle 21e662c237 [winforms,fix] Prevent Clipboard APIs from running any Idle handlers
Fixes: 641756

This prevents idle methods to be invoked when calling the Clipboard
APIs on X11, which is not the expected behavior.

The description from the bug report is:

Mono X11 Clipboard handling calls UpdateMessageQueue, which has the side affect
of potentially calling Idle handlers.

If any Idle handlers call Clipboard functions, this can cause idle handler
reentry.

See attached test case.

Incidentally removing the reentry check from the idle handler will actually
cause mono to segfault.

I will attach a patch shortly which fixes this by overloading
UpdateMessageQueue to allow Clipboard methods to call a version that doesn't
run idle processing.
2010-12-10 19:54:12 -05:00
Thomas Goldstein a253347e36 [winforms, fix] Keep the carret in sync with changes to the text entry value
Patch from Thomas Goldstein for bug #621475

The IndexOutOfRangeException is apparently a caret position bug. As a
workaround, doing textbox.SelectionStart = 0; before resetting the Text avoids
the bug.

Here's a patch to fix the bug. Basically, it applies the same caret updates
whether the Text is null/empty or not.
I hope I can get away with the minor style updates without having to submit
them as a separate patch...
2010-12-10 19:54:11 -05:00
Andy Hume fe46434c38 [fix, winforms] Fix the ProgressBar speed in Marquee situations
This issue was identified as:

 Marquee speed is very weird, changing between very very fast and very very
very very fast, and in inverse to the speed setting?

In https://bugzilla.novell.com/show_bug.cgi?id=440220

Also fixes this bug which was the test case isolated:

https://bugzilla.novell.com/show_bug.cgi?id=655797
2010-12-10 19:54:11 -05:00
Nagappan Alagappan 8334fe3a56 [winforms, datagrid, fix] fixes crasher reported in 416111 2010-12-10 19:54:11 -05:00
Miguel de Icaza 8850735c06 Update docs 2010-12-10 19:54:11 -05:00
Sebastien Pouliot 7321eb428b Ensure types are resolved when checking fields under coreclr
* security-core-clr.c: call mono_field_get_type_checked to ensure the
field's type is resolved since coreclr checks can occurs before the
"normal" check done by mono. Fix crashes in DRT#8005
2010-12-10 15:08:33 -05:00
Rodrigo Kumpera 39a820b041 Fix marshaling of Ansi strings.
* marshal.c (emit_struct_conv): Add _full variant that
	takes an extra boolean argument to tell if char is to be
	marshaled with one or two bytes.

	* marshal.c (emit_marshal_array): Use emit_struct_conv_full
	to correctly marshal ansi char arrays.
2010-12-10 15:54:20 -02:00
Alex 9a1075956e [monodoc] display setter after the getter 2010-12-10 10:27:24 -05:00
Zoltan Varga 5320848ddf Fix handling of gshared methods declared in generic superclasses of nongeneric classes in stack traces. Fixes #658645. 2010-12-10 16:12:39 +01:00
Marek Safar 1b5faeaf7a Revert unwanted makefile change 2010-12-10 13:20:45 +00:00
Marek Safar 55907ab262 Add v1 runtime target (broken by design) 2010-12-10 13:14:34 +00:00
Marek Safar 29662496fe Resolve entire base initializer block in correct context 2010-12-10 13:14:33 +00:00
Marek Safar 45f1c6f872 Removed compiler generated attributes 2010-12-10 13:14:33 +00:00
Marek Safar 2c7b380a13 Base constructor method calls have to be static 2010-12-10 13:14:32 +00:00
Marek Safar 76dd12142a Report missing types (some of them for now) 2010-12-10 13:14:32 +00:00
Marek Safar cec1fce68b Add missing dependency 2010-12-10 13:14:32 +00:00
Marek Safar 6dcfb495a6 Try to handle missing generic type definition 2010-12-10 13:14:31 +00:00
Zoltan Varga 02d1d7b65b Use the mono calling convention for all LLVM methods, not just ones with rgctx/imt arguments. 2010-12-10 01:37:35 +01:00
Gonzalo Paniagua Javier 5ab786b5b4 Get system.web/httpRuntime only once
Get that section only once and keep it in HttpRuntime.
2010-12-09 19:01:41 -05:00
Rodrigo Kumpera ed8e4e2cb9 Add a few more undocumented bits to allowed AssemblyFlags
Fixes #657516
2010-12-09 17:59:37 -02:00
Rodrigo Kumpera 08aee85f36 Check for coded token with zero index for typedef::parent.
* metadata-verify.c (verify_typedef_table): Fail if the token
	index is encoded as zero.

	Fixes #651682
2010-12-09 17:28:13 -02:00
Jérémie Laval dd36115a4b Fix semantic of CountdownEvent Reset methods. Fix #658244. 2010-12-09 17:32:04 +00:00
Jérémie Laval c4d8a92388 Implement CreateSetComparer method in HashSet 2010-12-09 16:00:15 +00:00
Jérémie Laval a4ce700a64 Refactor Add/Take/TryAdd/TryTake methods into a common block in BlockingCollection 2010-12-09 16:00:15 +00:00
Jérémie Laval 4a43b8e34d Fix GetConsumingEnumerable exception handling in BlockingCollection 2010-12-09 16:00:15 +00:00
Jérémie Laval 6c7937ec44 [PLinq] Detect when AsParallel is called multiple time in a query and simply reuse the existing ParallelQuery object 2010-12-09 16:00:14 +00:00
Marek Safar 007ca74e9a New test 2010-12-09 14:58:05 +00:00
Marek Safar fbfb86eb9e Read custom attribute name without resolving attribute type if possible 2010-12-09 14:58:05 +00:00
Marek Safar 46e8ec1f32 Redirect all mscorlib loads into assembly builder when compiling corlib 2010-12-09 14:58:04 +00:00
Marek Safar baa1ae6757 Fix parameter name 2010-12-09 14:58:04 +00:00
Marek Safar 6fe779611c Add initial handling of missing assemblies 2010-12-09 14:58:03 +00:00
Marek Safar e7edddeccb Add internal --runtime option 2010-12-09 14:58:03 +00:00
Marek Safar bb09e094af Add references loading trace 2010-12-09 14:58:02 +00:00
Marek Safar 35e872d116 Removed check for generics on 1.1 runtime 2010-12-09 14:58:02 +00:00
Zoltan Varga 3e02c096ec Unify the rgctx/non-rgctx call emission functions in the JIT. 2010-12-09 15:15:03 +01:00
Jérémie Laval c6927845e9 Fix behavior of Partitioner.Create when more than one partition is requested and used 2010-12-09 10:56:13 +00:00
Geoff Norton e9c765654f Ensure we always save the GState, not just when the context is flipped 2010-12-09 00:46:48 -05:00
Geoff Norton ee545525d2 Avoid leaking our unwind ops when not populating the trampoline info 2010-12-08 17:16:41 -05:00
Geoff Norton c78a8e3c57 Avoid leaking the name buffer since we already resolve this below 2010-12-08 16:24:00 -05:00
Rodrigo Kumpera 649aa95659 Fix some memleaks under -v
* mini.c: A monomac leak detector depends on -v
	not leaking memory, so lets fix some of those.
2010-12-08 19:19:46 -02:00
Rodrigo Kumpera 84c22bbb8d Fix a memleak when returning SRE cattrs.
* reflection.c (lookup_custom_attr): Since we memdup
	the returned cattr, we better mark it as not cached.
2010-12-08 18:51:00 -02:00
Rodrigo Kumpera b5721bf652 Handle GTDs used as element or type arguments.
* verify.c (mono_type_is_valid_type_in_context):
	Refuse a GTD if not at a root positision.

	Fixes #656913
2010-12-08 18:50:59 -02:00
Zoltan Varga 08f0bcaad8 Mark runtime invoke wrappers as pinvoke, since they are called from native code. 2010-12-08 21:36:53 +01:00
Zoltan Varga dd5f537bde Get rid of the 'is_pinvoke' argument to get_call_info (), use sig->pinvoke instead. 2010-12-08 21:36:53 +01:00
Gonzalo Paniagua Javier 1551f0279a InitOnce does not throw 2010-12-08 14:37:25 -05:00
Gonzalo Paniagua Javier 6f597d378c Fixes problem with exceptions on init
Multiple threads might be waiting on the lock and the modules get
	loaded and initialized multiple times, leading to an error. This patch
	fixes it and always returns the right initialization exception, if any,
	to the client.
2010-12-08 14:11:39 -05:00
Zoltan Varga 70808e944c Update a comment. 2010-12-08 12:37:24 +01:00
Mark Probst a3b69ea9f2 [sgen] Have an allocated block list for fixed-heap M&S, too.
It turns out we iterate over all allocated blocks often enough that
the way we did it for fixed-heap Mark&Sweep (iterating over all blocks
and jumping over the non-allocated ones) slows us down considerably.
So, use the same allocated block list as "regular" Mark&Sweep, which
also unifies the code a bit.
2010-12-08 10:49:13 +01:00
Mark Probst 71bae261fe [sgen] Don't increase degraded_mode in alloc_degraded().
Mature allocation uses the degraded allocation machinery to allocate
objects in the major space.  Modifying degraded_mode in those cases
will actually put us into degraded mode which slows us down immensely.
2010-12-08 09:39:41 +01:00
Zoltan Varga b8dde493c7 Tidy up the assembly loading log messages a bit. 2010-12-08 01:40:16 +01:00
Zoltan Varga 769e981372 Clean up the appdomain at the end of the remoting4 test. 2010-12-08 01:18:20 +01:00
Marek Safar 6f6128c2a4 Put back actual save of module target 2010-12-07 22:59:54 +00:00
Marek Safar 6e3ef38a81 Revert ordering of compiler tests 2010-12-07 22:58:06 +00:00
Marek Safar 8a8dfa0c5b Check file extension manually 2010-12-07 22:28:27 +00:00
Marek Safar cc07d797a1 Symbol writer has to use 4.0 methods in static mode 2010-12-07 22:28:27 +00:00
Gonzalo Paniagua Javier cdc65357fa Delete end local endpoint when stopping the server
Fixes bug #647204.
2010-12-07 17:04:44 -05:00
Zoltan Varga 9e2b41afe1 Log images still loaded during shutdown. 2010-12-07 22:41:51 +01:00
Zoltan Varga f613ad6248 Fix some small memory leaks. 2010-12-07 21:13:14 +01:00
Rodrigo Kumpera 96c3489edf Fix memberref method signature verification.
* metadata-verify.c (mono_verifier_verify_memberref_method_signature):
	Memberref method signatures allow sentinels.
2010-12-07 16:07:49 -02:00
Rodrigo Kumpera 993f259629 Correctly check for ptr compatibility.
* verify.c (mono_delegate_type_equal): Properly check
	if candidate is a pointer type.

	Fixes #657746
2010-12-07 15:54:18 -02:00
Rodrigo Kumpera e07951bd15 Set a default element class for failed enums.
* class.c (mono_class_create_from_typedef): Set failed enums
	to extends int32 as the whole runtime can't handle this been
	null.

	Fixes #657745
2010-12-07 15:33:25 -02:00
Marek Safar 3abe771dfe Add IKVM.Reflection support 2010-12-07 17:03:57 +00:00
Marek Safar 71aa7f6715 Test update 2010-12-07 17:03:57 +00:00
Marek Safar bb45cd47e2 Sort the files manually to always get same order 2010-12-07 17:03:57 +00:00
Marek Safar b60a137215 New test 2010-12-07 17:03:56 +00:00
Marek Safar 7be5aad8e4 Extract reflection specific assembly builder 2010-12-07 17:03:56 +00:00
Marek Safar 8a6ea72ad5 Re-use existing code path 2010-12-07 17:03:56 +00:00
Rodrigo Kumpera 688ca714e3 Honor skip visibility in more places.
* verify.c (do_newobj): Honor skip visibility request.

	* verify.c (do_load_function_ptr): Ditto.

	Fixes #657694
2010-12-07 15:00:20 -02:00
Rodrigo Kumpera c3222f061b Do separate checking of field and method memberref.
* loader.c: Use new split functions.

	* metadata-verify.c (parse_custom_mods): Make sure encoded
	type tokens are not zero.

	* metadata-verify.c (parse_generic_inst): Ditto.

	* metadata-verify.c (parse_type): Ditto.

	* metadata-verify.c (mono_verifier_verify_memberref_signature):
	Replace this function with a pair that does field or method
	verification.

	Fixes #656914
2010-12-07 13:32:48 -02:00
vvaradhan 455b2f894a Merge branch 'master' of github.com:mono/mono into masterwork 2010-12-07 20:43:28 +05:30
vvaradhan 367fe78d52 2010-12-07 Veerapuram Varadhan <[email protected]>
** Fixes #456234 - Patch by [email protected]
	* OdbcDataReader.cs (GetValue): Handle SQL_NO_TOTAL sanely and
	use corresponding Decoder.GetChars instead of Encoding.GetString.
2010-12-07 20:39:47 +05:30
Guillaume Pouillet 0d98fbbe29 Fix bug in BlockingCollection<T>.TryTake Add corresponding unit test 2010-12-07 11:24:03 +01:00
Atsushi Eno 44ceb84e44 Implemented XData support in XamlObjectWriter. 2010-12-07 18:09:56 +09:00
Atsushi Eno c807359587 Implement XData support in XamlXmlReader. 2010-12-07 17:08:49 +09:00
Atsushi Eno b202524c5d XData support in XamlXmlWriter. 2010-12-07 16:46:53 +09:00
Atsushi Eno dacee05e27 Implemented XData object reader support. Add missing test files. 2010-12-07 16:23:53 +09:00
Atsushi Eno c3ac00fbd9 Add another couple of IXmlSerializable tests. 2010-12-07 15:32:58 +09:00
Gonzalo Paniagua Javier 86b5d36c9d Fix Process.HasExited regression
When we have a pseudo handle, we can at least check whether the process
	is alive or not, instead of always returning FALSE.

	Fixes bug #650979.
2010-12-06 19:54:21 -05:00
Geoff Norton a76b4352ab Ensure we save and restore the gstate 2010-12-06 14:40:25 -05:00
Zoltan Varga 132ac62026 Fix a few SRE memory leaks. 2010-12-06 19:50:45 +01:00
Gonzalo Paniagua Javier 608fb833b3 Workaround bug in AcquireWriterLock
AcquireWriteLock should be the same as UpgradeToWriterLock when the
	thread is already a reader.

	Fixes bug #656850.
2010-12-06 13:18:33 -05:00
Zoltan Varga 67b98dce9f Remove some #ifdef HAVE_SGEN_GC deps, centralize others to gc-internal.h. 2010-12-06 18:00:40 +01:00
Jérémie Laval be41cdb078 [System.Xml] Enable existing API under 4.0 profile too 2010-12-06 16:07:27 +00:00
Marek Safar 0296eeab1c Refactor assemblies loading into a base class 2010-12-06 15:40:15 +00:00
Marek Safar 256d7bf69f Move more fields to RootContext 2010-12-06 15:40:15 +00:00
Marek Safar c0aa5eb5da Removed obsolete files 2010-12-06 15:40:14 +00:00
Marek Safar 0604d35f7f Use type definition for generic type forwarders 2010-12-06 15:40:14 +00:00
Marek Safar c526008a23 Don't close same type twice when base call closes this declaration 2010-12-06 15:40:13 +00:00
Jonathan Pryor 42d1957cfc [mono.options] Ensure that IEnumerators are disposed.
It's possible that the IEnumerable<string> that
OptionSet.ArgumentEnumerator is enumerating may be generated via
'yield return', in which case any method `finally` blocks are moved
into the IDisposable.Dispose() method.

To ensure proper resource cleanup, we need to make sure that Dispose()
is called on the IEnumerator<string>s.
2010-12-06 08:11:03 -05:00
Atsushi Eno 491de14adb Add missing xml file. 2010-12-06 21:52:59 +09:00
Atsushi Eno cb14a2be9a Finally got XData tests that make sense. Implemented IsXData. 2010-12-06 21:52:06 +09:00
Atsushi Eno cd1f840f10 Enable another test. 2010-12-06 20:36:24 +09:00
Marek Safar fe29d17c48 Use Version type instead of string value 2010-12-06 11:19:28 +00:00
Marek Safar d53b2fe21a Use decimal optional parameter value decoded by System.Reflection 2010-12-06 11:19:28 +00:00
Marek Safar e5d8bddb52 Extract reflection specific code from extended builder 2010-12-06 11:19:27 +00:00
Marek Safar 4774e3e459 Move assembly security declaration to extened builder 2010-12-06 11:19:27 +00:00
Marek Safar 395db913f9 Don't call module symbol writer methods when we are not using it 2010-12-06 11:19:27 +00:00
Atsushi Eno 18ce69f876 Add missing files. 2010-12-06 20:17:48 +09:00
Atsushi Eno ddda7df985 Implemented Reference resolution in XamlObjectWriter. 2010-12-06 20:16:41 +09:00
Geoff Norton 9bf59d4882 Ensure we properly translate the CTM for NSView's when dealing with flipped views
Patch from James Clancey <[email protected]>
2010-12-05 14:22:00 -05:00
Zoltan Varga 872235153f Make sgen-protocol.c into its own module. 2010-12-05 17:53:03 +01:00
Zoltan Varga 56aeb59b9b Call mini_parse_debug_options () earlier. 2010-12-05 17:18:42 +01:00
Zoltan Varga 226f73e539 Add more logging to the soft debugger code. 2010-12-05 12:17:49 +01:00
Zoltan Varga 82e184a141 Fix a debug log message in the soft debugger. 2010-12-05 10:42:57 +01:00
Gonzalo Paniagua Javier e5074473d6 Handle closed sockets in the callbacks
Accept returns a Socket in AcceptSocket even when the listener is closed.
	Handle ObjectDisposedException for the other callbacks.

	Fixes bug #657593.
2010-12-04 23:29:14 -05:00
Jonathan Pryor 4c1daa9b8c [mdoc] Response file cleanup.
Use Mono.Options.ResponseFileSource instead of implementing response
file parsing manually.
2010-12-04 23:09:41 -05:00
Miguel de Icaza 43dba6d2a5 Add part3 of the Google GCI 2010 contributions 2010-12-04 18:01:54 -05:00
Joe Dluzen c740b96462 Fix for #656021. 2010-12-04 17:27:15 -05:00
Zoltan Varga 2d9639a029 Remove a dead variable. 2010-12-04 12:15:15 +01:00
Zoltan Varga cb5c7bd1ad Set MONO_PATH while running the profiler tests. 2010-12-04 10:53:58 +01:00
Zoltan Varga 0deed69d16 Disable a test which breaks under AOT. 2010-12-04 10:19:40 +01:00
Zoltan Varga e267deacc0 Fix a warning. 2010-12-04 09:36:35 +01:00
Zoltan Varga 9b401295ce Really fix the ia64 build. 2010-12-04 09:35:26 +01:00
Zoltan Varga 095f5317ba Fix ia64 build. 2010-12-04 09:24:15 +01:00
Zoltan Varga 76aeccbcfa Hopefully fix the ia64 libgc build. 2010-12-04 09:18:57 +01:00
Zoltan Varga 4945c44282 Fix make check in profiler/. 2010-12-04 08:41:25 +01:00
Rodrigo Kumpera 2cca6f16e4 Fix dynamic type string validation.
* verify.c (do_ldstr): We encode string tokens in a weird
	way in dynamic modules.
2010-12-03 19:43:21 -02:00
Rodrigo Kumpera d8e2846754 Handle one more case we cmods can appear in odd places. 2010-12-03 18:43:18 -02:00
Rodrigo Kumpera 64314629be Merge branch 'master' of github.com:mono/mono 2010-12-03 18:17:43 -02:00
Andreia Gaita cbeaf9a556 [Moon] include cecil when building mono for moon 2010-12-03 18:12:44 +00:00
Zoltan Varga bc9b369713 Remove unused lmf->ebp field on ia64. 2010-12-03 18:59:43 +01:00
Rodrigo Kumpera 5b26dcb28d Fix validation of cmods in some odd places.
* metadata-verify.c (parse_generic_inst): A ginst
	param can have a cmod.

	* metadata-verify.c (parse_param): We can have a cmod
	after the byref.

	* metadata-verify.c (parse_property_signature): A property
	signature can have a cmod on the parameters.

	Fixes the verifier for #656787
2010-12-03 15:31:20 -02:00
Jérémie Laval d0bc2ba835 Fixicate some unit test 2010-12-03 16:59:44 +00:00
Jérémie Laval a85f4ab07d [Task scheduler] Change waiting layout/wakeup point and use adaptative deep sleeping 2010-12-03 16:59:43 +00:00
Jérémie Laval 890702e6c9 [Task Scheduler] Revisit Task waiting in Scheduler using ManualResetEventSlim 2010-12-03 16:59:43 +00:00
Jérémie Laval 306a286962 [Task Scheduler] Track re-entrant call to WorkerMethod from normal ThreadWorker and make them use their deque 2010-12-03 16:59:42 +00:00
Zoltan Varga 082354743d Remove unused nunit.key file. 2010-12-03 15:00:50 +01:00
Zoltan Varga 443fd47847 Add a 'check' target to mcs/tests. 2010-12-03 14:32:48 +01:00
Mark Probst e6bf58477f Merge branch 'concurrent-sweep' 2010-12-03 13:51:38 +01:00
Mark Probst 08c58ba733 [sgen] Make concurrent sweep user-selectable.
It's off by default for now.
2010-12-03 13:51:31 +01:00
Mark Probst 641acd60b1 [sgen] Compute allowance when sweeping is finished.
Before sweeping hasn't finished we don't know how many major blocks
are in use, so we delay computing the minor collection allowance until
sweeping is done.  In the mean time we use the minimum allowance.
2010-12-03 13:51:31 +01:00
Mark Probst bc00e94e01 [sgen] Concurrent sweep. 2010-12-03 13:51:30 +01:00
Marek Safar f75c7bad75 Delay initialization of missing methods needed by symbol writer 2010-12-03 12:31:39 +00:00
Marek Safar 31f1a2a1ff Apply implicit parameter attributes using standard path to avoid any duplicates 2010-12-03 12:31:38 +00:00
Jérémie Laval 2a90fa3856 [Task] Slight tweak of WaitAny unit test 2010-12-03 12:07:19 +00:00
Jérémie Laval 587c9336fc [Task] Add an extra check in Task.WaitAny to make sure the index returned is valid 2010-12-03 12:07:18 +00:00
Jérémie Laval 72e6e904a5 [Task] Dumb bugfix when checking timeout in Task.WaitAny 2010-12-03 12:07:18 +00:00
Zoltan Varga e672d0b45b Fix another AOT crash if a signature cannot be loaded. 2010-12-03 12:18:49 +01:00
Zoltan Varga 9d422eaf8b Parse custom modifiers in mono_type_create_from_typespec (). 2010-12-03 11:32:27 +01:00
Marek Safar 578e0521a6 Don't throw an obsolete exception 2010-12-03 10:13:03 +00:00
Marek Safar 7f9de67b68 More symbol writer clean-up 2010-12-03 10:13:02 +00:00
Marek Safar 7a64aa0a6c Test files update 2010-12-03 10:13:01 +00:00
Zoltan Varga 6a3135719c Revert a warning fix as it breaks the windows build. 2010-12-03 11:07:19 +01:00
Zoltan Varga 750b664908 Fix a crash in the AOT compiler if a method cannot be loaded. 2010-12-03 10:32:52 +01:00
Atsushi Eno af690f806a name resolver could also be name provider. 2010-12-03 18:24:38 +09:00
Atsushi Eno 4c3566e2cc Split internal base class into new file. 2010-12-03 18:24:16 +09:00
Atsushi Eno 005843a956 Rename source. 2010-12-03 16:56:56 +09:00
Atsushi Eno 4e6a0acd83 Now object reader returns PositionalParameters for non-root Reference objects. 2010-12-03 13:13:52 +09:00
Zoltan Varga 269cd91b37 Fix warnings. 2010-12-02 21:27:08 +01:00
Zoltan Varga 5f346ea87f Disale logging profiler. 2010-12-02 21:23:42 +01:00
Atsushi Eno 50f1efa781 Implemented reference support (almost working, except for Reference contents).
There are several refactorings as well as some hacky workarounds to avoid
wrong saving of names. References should return PositionalParameters, but
in the standalone tests they don't return it, so I have to sort both out.
Enabled xml writer tests as they are working.
2010-12-03 03:30:22 +09:00
Atsushi Eno 7bffa51bb0 Members are not ordered by collection kind. 2010-12-03 03:16:45 +09:00
Jérémie Laval 01a0ef45a8 [PLinq] Wrap PLinq processing task body in a try/finally so that endAction is always called no matter what happen. 2010-12-02 14:02:56 +00:00
Jérémie Laval 96bf5ac961 [PLinq] Cleanup and prettify code from earlier commit 2010-12-02 14:02:56 +00:00
Zoltan Varga 73e34fb96c Include alloca.h into glib.h if needed. 2010-12-02 14:32:29 +01:00
Zoltan Varga efee7a14a8 Make the debugger agent at least compile on the ps3. 2010-12-02 14:32:29 +01:00
Mark Probst b00b16d5dd [sgen] Remove skip_size in sgen-scan-object.h.
Dead code.
2010-12-02 14:07:54 +01:00
Mark Probst 9b1da29cff [sgen] Handle forwarding in mono_gc_scan_for_specific_ref().
This function is used for debugging purposes only.  Previously it
didn't handle forwarding which meant that it couldn't be used during a
collection.
2010-12-02 14:07:53 +01:00
Mark Probst a0512964fa [sgen] Zero freed blocks in fixed heap Mark&Sweep.
Fresh blocks must be zeroed, which means that when we free blocks we
must ensure that they are zeroed before they are used again.
2010-12-02 14:06:54 +01:00
Jb Evain e445dde4c4 [ilasm] fix the metadata version for v4 assemblies 2010-12-02 13:21:16 +01:00
Marek Safar c0825e5b1a Don't try to parse invalid namespace declarations, it does more harm than good 2010-12-02 12:10:28 +00:00
Marek Safar 89d372ff9f Update setting of buildin internal types 2010-12-02 12:10:27 +00:00
Marek Safar 420704e733 Removed InitOptionalCoreTypes 2010-12-02 12:10:27 +00:00
Marek Safar ba80f08479 Clean-up module indirections 2010-12-02 12:10:26 +00:00
Marek Safar 34bcf18ec1 Move all predefined types to module to work with any mscorlib 2010-12-02 12:10:26 +00:00
Marek Safar f46d143602 Move references loading into a new class 2010-12-02 12:10:25 +00:00
Marek Safar 99aa664204 Move AssemblyResource to assembly.cs 2010-12-02 12:10:25 +00:00
Zoltan Varga 25e2360f3c Fix a typo. 2010-12-02 12:10:00 +01:00
Atsushi Eno 0970775137 Make room for XamlNameResolver in XamlObjectReader, and some related changes. 2010-12-02 19:51:00 +09:00
Jérémie Laval 599332d0e9 [SafeHandle] Fixing docs 2010-12-02 10:40:09 +00:00
Zoltan Varga a34f2115de Allow breakpoints set using --break in wrappers. 2010-12-02 10:53:57 +01:00
Zoltan Varga 4ad39d8a8e Move the identical MonoLMFExt declarations to mini.h. 2010-12-02 10:53:34 +01:00
Zoltan Varga 0413d434af Split the exception handling code into test_only and !test_only passes, ending up with two simpler/shorter functions. 2010-12-02 08:23:10 +01:00
Zoltan Varga dc02f96de9 Revert "Fix the OSC build breakage by only compiling mach_dep.c on openbsd."
This reverts commit 103450e4a2.
2010-12-02 07:06:49 +01:00
Jérémie Laval 2c5ff41b8b [SafeHandle] Add bits of documentation 2010-12-01 20:00:53 +00:00
Jérémie Laval 4f56dfeaa3 [SafeHandle] Make success parameter setting atomic wrt async exception in DangerousAddRef 2010-12-01 20:00:52 +00:00
Jérémie Laval 0597ee873f [SafeHandle] Protect Close against asynchronous exceptions 2010-12-01 20:00:52 +00:00
Miguel de Icaza 92537e6841 Documentation for Mono.Cairo contributed by knairda from Google GCI 2010 2010-12-01 15:00:17 -05:00
Zoltan Varga 103450e4a2 Fix the OSC build breakage by only compiling mach_dep.c on openbsd. 2010-12-01 17:53:48 +01:00
Paolo Molaro 3be9f5a036 Log profiler: fixed allocation and call frames end detection in test runner. 2010-12-01 17:20:26 +01:00
Zoltan Varga a89bde9974 Save the original throw context into TLS so stack walks done from profiler functions work during exception handling. 2010-12-01 17:05:30 +01:00
Jb Evain 9aa0e189bf Update Mono.Cecil 2010-12-01 16:46:46 +01:00
Jb Evain e8312cb428 Add script to update Cecil from upstream 2010-12-01 16:46:22 +01:00
Paolo Molaro 5c80e3f0b9 Fixed env path setting. 2010-12-01 15:46:45 +01:00
Jérémie Laval ff80eb8f67 [ReaderWriterLockSlim] Fix for #656353. Add corresponding unit test.
When in SupportsRecursion mode, a test was not including proper state check for short-circuiting.
2010-12-01 14:38:28 +00:00
Zoltan Varga 5f99c02058 Add an asm (""); to the body of __jit_debug_register_code () to prevent gcc from
eliminating calls to it.
2010-12-01 15:34:12 +01:00
Paolo Molaro 0dd2944adc Log profiler: added test suite. 2010-12-01 15:16:23 +01:00
Zoltan Varga c92c8ca51a Export mono_xdebug_flush (). 2010-12-01 14:38:58 +01:00
Zoltan Varga 0422028f37 Make sgen-los.c into a proper C module. 2010-12-01 14:04:48 +01:00
Rodrigo Kumpera a8967d719a Fix thread attaching 2010-12-01 09:55:42 -02:00
Zoltan Varga fc41d5457f Move the DEBUG() macro to sgen-gc.h and resurrect debug logging in the major collectors. 2010-12-01 06:21:56 +01:00
Jonathan Pryor 08fb9274e6 Add response file suport to Mono.Options.
Response file support is an "opt-in" feature, performed by adding a
ResponseFileSource to the OptionSet initialization logic:

	var p = new OptionSet () {
		// normal options here...
		new ResponseFileSource (),
	};

Response files make use of the new "ArgumentSource" support, which
acts as a low-level argument pre-processor, allowing processing of
arguments _before_ Option processing is performed.
2010-12-01 00:09:02 -05:00
Zoltan Varga 94d81ebabe Fix some warnings. 2010-12-01 05:55:57 +01:00
Zoltan Varga 4a6436228a Emit write barriers for multi-dim Array.Set (). Fixes #656128. 2010-12-01 05:53:04 +01:00
Zoltan Varga f53f97f17e Handle LOS objects in describe_ptr (). 2010-12-01 05:53:04 +01:00
Rodrigo Kumpera efb1035d49 Fix a few more cases of bad token verification.
* verify.c (do_load_function_ptr): Handle wrappers
	correctly.

	* verify.c (do_sizeof): Remove superfluous check.

	* verify.c (do_ldstr): Handle wrappers correctly.
2010-12-01 01:28:00 -02:00
Rodrigo Kumpera 3cec452ea0 Add regression test for #647267 2010-12-01 01:10:13 -02:00
Rodrigo Kumpera 1f3cfba319 Marshal char taking Charset into account.
* metadata.c (mono_type_to_unmanaged): Return
	the appropriate type for char based on unicode option.

	* marshal.c (emit_marshal_array): Calculate char size
	based on marshaling preferences.

	Fixes #647267
2010-12-01 01:10:13 -02:00
Marek Safar 5a0a50c4e6 Tests update 2010-11-30 19:09:59 +00:00
Marek Safar ff24d36495 Import parameter default values using TypeCode 2010-11-30 18:07:36 +00:00
Marek Safar 0e929b2901 Remove remaining typeof 2010-11-30 18:07:35 +00:00
Marek Safar 458d211f26 Read dynamic attribute using CustomAttributeData 2010-11-30 18:07:35 +00:00
Rodrigo Kumpera cb34f150bd Add mono_gc_alloc_mature and use it for threads.
* gc.c: Implement mono_gc_alloc_mature
	for boehm and null-gc.

	* sgen-gc.c (mono_gc_alloc_mature): Alloc
	using the degrated machinery.

	* threads.c (create_internal_thread_object):
	Alloc using mono_gc_alloc_mature instead of
	mono_gc_alloc_pinned_obj as the later requires
	explicit freeing and we don't do it.

	* threads.c (create_thread_object): Ditto.
2010-11-30 15:24:48 -02:00
Rodrigo Kumpera 80e7e4d92b Check for null and valuetypes.
* CustomAttributeBuilder.cs (Initialize): Check if we are
	not passing null as values to valuetypes as this is invalid.

	Fixes #515938
2010-11-30 14:54:27 -02:00
Atsushi Eno 2dbfcf82b3 Add name reference tests to all readers/writers. 2010-12-01 01:15:03 +09:00
Rodrigo Kumpera f021e2d50c Fix a crash when signature decoding fails.
* class.c (check_interface_method_override): Check if
	signatures decoded correctly before comparing them.

	Fixes #541815
2010-11-30 14:19:16 -02:00
Rodrigo Kumpera 8329b73d6a Fix the ldftn to ldvirtftn feature.
* mini-trampolines.c (mono_delegate_trampoline): A ldftn
	is only to be promoted to a ldvirtftn if the target method
	belongs to an abstract class. This fixes mcs/test/test-283.
2010-11-30 14:06:53 -02:00
Rodrigo Kumpera fc623f7976 Merge branch 'master' of github.com:mono/mono 2010-11-30 14:06:26 -02:00
Rodrigo Kumpera 829bbe716b Fix token checking for dynamic methods. 2010-11-30 14:05:54 -02:00
Atsushi Eno c69f828983 Add test xml files. 2010-12-01 00:30:56 +09:00
Atsushi Eno dfe010dd6b Add name reference test (not working). 2010-12-01 00:30:23 +09:00
Marek Safar 5509a08459 Emit optional default value-type parameter using nullref 2010-11-30 13:27:11 +00:00
Marek Safar 8bd95230a0 Move core predefined types into a new class 2010-11-30 13:27:10 +00:00
Marek Safar cb893c6e02 Add initial reflection dependant code 2010-11-30 13:27:09 +00:00
Marek Safar 58d5ce4740 Move metadata importer out of compiler context finally 2010-11-30 13:27:09 +00:00
Marek Safar 3f2369465d New test 2010-11-30 13:27:08 +00:00
Atsushi Eno 85b1b8fe4c Add another XData test case.
Though I wonder how to serialize XData then... :-?
2010-11-30 20:06:58 +09:00
Atsushi Eno 750111da31 empty namespace should be successfully parsed. 2010-11-30 20:03:38 +09:00
Paolo Molaro 30cba27527 Log profiler: BSD/win32 portability fixes. 2010-11-30 11:05:18 +01:00
Atsushi Eno f0f0363306 Call GetObject only once per current member.
Previous code was errorneous if there is an array inside a collection.
2010-11-30 18:22:11 +09:00
Atsushi Eno 584bf41795 Fill List's implementation details gap. 2010-11-30 15:45:43 +09:00
Atsushi Eno b548698ac7 Do not retrive properties with get parameters (indexers). 2010-11-30 15:40:19 +09:00
Atsushi Eno 4c473e946d Add another test xml file. 2010-11-30 15:20:03 +09:00
Atsushi Eno 7fddb7b82d Add another reader/writer test, for List of Array. 2010-11-30 15:19:09 +09:00
Atsushi Eno 8e68020156 Renamed test files. 2010-11-30 14:48:47 +09:00
Atsushi Eno 09f8e62fdb Extract XamlObjectReaderTest class into another file. Files are to be renamed. 2010-11-30 14:45:17 +09:00
Sebastien Pouliot bc1786b120 Fix randomly failing unit test
* MachineKeySectionUtilsTest.cs: Do not assume xor will change a byte
2010-11-29 22:21:52 -05:00
Jb Evain d368e0a10a Add MakeBinary test for ArrayIndex expressions 2010-11-29 22:51:55 +01:00
Daniel Sell 16a8d26971 Fix Expression.MakeBinary so it can return ArrayIndex nodes 2010-11-29 22:51:55 +01:00
Rodrigo Kumpera 698a624756 Don't allow zero index tokens on IL streams.
* verify.c (token_bounds_check): Check if token index is zero.

	Fixes #651682
2010-11-29 19:59:00 -02:00
Marek Safar 703f261159 Check imported custom attributes based on name only 2010-11-29 21:39:51 +00:00
Marek Safar 0957822510 Made type member kind logic more flexible 2010-11-29 21:39:50 +00:00
Marek Safar 088b9fe91b Don't special case value type constraint 2010-11-29 21:39:50 +00:00
Marek Safar 54414050be Add sanity check for imported static fixed buffer 2010-11-29 21:39:50 +00:00
Rodrigo Kumpera 893e7e86ea Remove some junk I left by accident 2010-11-29 19:25:57 -02:00
Rodrigo Kumpera ec3898cea2 Fix crasher in core clr security.
* security-core-clr.c (get_default_ctor): Handle nulls in
	MonoClass::methods.

	Fixes #569542
2010-11-29 19:20:42 -02:00
Rodrigo Kumpera f56e8be2b8 Don't mono_class_init when creating a token.
* reflection.c (mono_image_create_token): Don't mono_class_init
	here as it's not needed and break mcs for cases doing
	typeof() over broken types.

	Fixes a TLE in #653211
2010-11-29 19:06:54 -02:00
Rodrigo Kumpera 1e92545179 WIP 2010-11-29 18:13:44 -02:00
Mark Probst 9cd7fe19b4 [sgen] Recompute heap boundaries at each major collection.
Previously we updated heap boundaries when a new block was allocated,
but no updates were performed for freed blocks, resulting in a
constant increase in the heap boundaries which can lead to unnecessary
work during pinning.

Now we recompute the heap boundaries during the sweep phase at each
major collection.
2010-11-29 18:02:32 +01:00
Zoltan Varga 8d27217915 Fix amd64 build. 2010-11-29 17:34:10 +01:00
Paolo Molaro eaa896a4ee Forgot old header file in profiler.c. 2010-11-29 17:17:12 +01:00
Paolo Molaro ac5079864b Make dist fixed in profiler. 2010-11-29 17:17:11 +01:00
Rodrigo Kumpera 24ea1f06e8 Fix a crash on MassTransit.
* class.c (make_generic_param_class): Don't assert if parent
	is broken.

	Fixes #653211
2010-11-29 14:23:24 -02:00
Robert Nagy 065506369b Add support for the internal boehm-gc on OpenBSD 2010-11-29 17:05:46 +01:00
Robert Nagy f2e095f92c Add support for the internal boehm-gc on OpenBSD 2010-11-29 17:05:46 +01:00
Paolo Molaro 9360ad43cd Profiler: reomved the old builtin default profiler.
The new log profiler is now used automatically instead of the old
default profiler.
2010-11-29 16:17:10 +01:00
Paolo Molaro 09c883c9bb M linux performance counters.
Added missing file for
2010-11-29 16:17:10 +01:00
Atsushi Eno 1a5e666592 Support attribute validation. 2010-11-30 00:10:36 +09:00
Atsushi Eno 960484aa14 Use AttributeSchemaType as it is 2.0 API. This fixes incorrectly skipped type validation. 2010-11-30 00:09:13 +09:00
Atsushi Eno d0f2492f2b Handle more type conversion. 2010-11-30 00:08:40 +09:00
Paolo Molaro deb5bf02c9 Log profiler: portability checks. 2010-11-29 15:44:56 +01:00
Paolo Molaro 015ecaf0a9 Log profiler: added statistical sampling mode.
* man/mprof-report.1, log-profiler.txt: updated the documentation.
* decode.c: added jit report and sample report.
* proflog.h, proflog.c: implemented statistical sampling mode, using
either the mono built-in signal based sampling and the Linux
perforamnce counters perf subsystem. Unmanaged symbols are
currently available for ELF systems implementing dl_iterate_phdr()
or systems implementing dladdr().
2010-11-29 15:44:55 +01:00
Atsushi Eno 487f4c0518 Implemented XDocument.Validate(). 2010-11-29 21:39:16 +09:00
Atsushi Eno 26eaa08958 Return different instances of XmlSchemaInfo for each validated node in XmlSchemaValidatingReader. 2010-11-29 21:36:50 +09:00
Atsushi Eno 960aaaecbb TypeExtension and StaticExtension should now be correctly written and read. 2010-11-29 20:33:55 +09:00
Atsushi Eno c3f95e8ad2 Refactoring Instance handling for consistent MarkupExtension reading.
Removed tricky GetWrappedValue() while attempting to reduce its use (could
totally remove it out) to identify which parts these readers and writers need
it. Now It is in TypeExtensionMethods. Still needs fix for StaticExtension.

Add another tricky test case: List of Array (not working) which also involves
MarkupExtension.
2010-11-29 16:13:46 +09:00
Miguel de Icaza 10cae3d65c Awesome doc contributions from Adrian Kummerlaender 2010-11-28 11:14:52 -05:00
Miguel de Icaza 830f830936 Awesome doc contributions from Adrian Kummerlaender 2010-11-28 11:12:38 -05:00
Rodrigo Kumpera 3138b27d0c Enable test for #318677 2010-11-27 16:12:07 -02:00
Rodrigo Kumpera 98656625d3 Handle fallthru to out of line blocks.
* mini.c (mini_method_compile): Add a BR to all basic blocks
	that fallthru blocks that are out of line.

	* branch-opts.c (mono_optimize_branches): Don't eliminate
	a BR to the next block if is out of line.

	Fixes #318677
2010-11-27 16:12:07 -02:00
Zoltan Varga 9959e8193d Disable finally_guard.exe on amd64 until it is fixed. 2010-11-27 09:17:54 +01:00
Rodrigo Kumpera 9d15836e9e Fix corlib regression 2010-11-27 03:20:29 -02:00
Rodrigo Kumpera 96c8bf1560 Remove some culture caching dead code 2010-11-27 03:05:50 -02:00
Rodrigo Kumpera 0a609bf3de Move culture handling to Thread from InternalThread.
* Thread.cs: Move culture data from InternalThread to Thread
	and thus completely avoid the whole caching and serialization
	nightmare. Even thou this is a cleanup it should speed up
	multi-appdomain setups.

	* threads.c: Remove culture caching machinery.

	* icall-def.h: Ditto.

	Fixes #318750 as a byproduct.
2010-11-27 02:56:37 -02:00
Zoltan Varga 2cb7171648 Fix an aot crash if field->type is not initialized. 2010-11-27 04:00:21 +01:00
Rodrigo Kumpera 7da662cbf1 Add regression test for #317488 2010-11-27 00:13:52 -02:00
Rodrigo Kumpera 37f76dda09 Handle another extension to delegates.
* mini-trampolines.c (mono_delegate_trampoline): Handle the
	case of a delegate created with ldftn on which the method token
	points to an abstract method. This case behaves in the same way
	as ldvirtftn.

	Fixes #317488
2010-11-27 00:13:52 -02:00
Zoltan Varga 26cd7771a3 Throw an exception if a custom attr cannot be decoded. Fixes #656058. 2010-11-27 02:31:05 +01:00
Zoltan Varga 6e096b6424 Update the help message for --verify-all. 2010-11-27 01:53:58 +01:00
Zoltan Varga 187071319e Define MONO_ARCH_INIT_TOP_LMF_ENTRY for all architectures. 2010-11-26 22:43:52 +01:00
Zoltan Varga 3878943126 Merge branch 'master' of github.com:mono/mono 2010-11-26 16:28:09 -05:00
Zoltan Varga 5833e55fde Remove unused lmf->ebp field on arm. 2010-11-26 16:24:23 -05:00
Rodrigo Kumpera a5a1271ae2 Fix typo 2010-11-26 15:42:05 -02:00
Rodrigo Kumpera 5206bfdb3f Fix those tests so they are verifiable. 2010-11-26 15:30:16 -02:00
Rodrigo Kumpera a450df6584 Check TOS for compatibility with return type.
* method-to-ir.c (mono_method_to_ir): Check if TOS
	is store compatible with the return type of the
	current method.

	Fixes #655497
2010-11-26 15:30:15 -02:00
Rodrigo Kumpera af989eedd7 Handle dynamic methods inside the verifier.
* verify.c (mono_verifier_is_enabled_for_method):
	A dynamic method has a different wrapper kind than regular
	methods.

	* verify.c (mono_verifier_is_method_full_trust): Dynamic
	methods can't be handled as fulltrust since they don't
	store proper origin for verifying it.

	* mini.c (mini_assembly_can_skip_verification): Dynamic
	methods have a different wrapper kind than regular
	methods.

	FIxes #655497 under sandbox.
2010-11-26 15:30:15 -02:00
Jérémie Laval 057b5e88d7 [Task] In every TaskFactory method accepting a Task array, we have to make a private copy to avoid changes to the array content from the moment we register the continuation to when we call the callback 2010-11-26 16:54:38 +00:00
Jérémie Laval 8543749882 [Task] Check if Task isn't finished before going into the Scheduler for Wait 2010-11-26 16:54:37 +00:00
Jérémie Laval db76564321 [Task] Set continuation status to WaitingForActivation in ContinueWithCore 2010-11-26 16:54:37 +00:00
Jérémie Laval 14d5a91386 [Task] Only launch continuation synchronously when the corresponding option in TaskContinuationOptions is set 2010-11-26 16:54:37 +00:00
Marek Safar de057f1261 Removed few custom attribute IsDefined calls 2010-11-26 16:29:22 +00:00
Marek Safar b600deb8ac Import constants using their raw values only 2010-11-26 16:29:21 +00:00
Jérémie Laval 34f14e5178 [PLinq] Split long running test in two 2010-11-26 14:10:04 +00:00
Jérémie Laval 7e01c4b1be Adjust sleeping values 2010-11-26 14:10:04 +00:00
Jérémie Laval b1a85944f4 [PLinq] Remove double delegate cost when non indexed in SelectMany query node 2010-11-26 14:10:04 +00:00
Jérémie Laval a7cdfb1717 Remove debugging spew wrongly introduced by earlier commit 2010-11-26 14:10:03 +00:00
Zoltan Varga 0b61d882f8 Avoid parsing of /proc entries on ppc when cross-compiling. 2010-11-26 12:04:23 +01:00
Zoltan Varga e428a72101 Avoid emitting uninitialized memory into the AOT image. 2010-11-26 12:04:23 +01:00
Marek Safar b5814de79b New test 2010-11-26 10:27:27 +00:00
Marek Safar 11ee375aa0 [655766] Encode string null attribute argument 2010-11-26 10:21:23 +00:00
Marek Safar d27d548298 Cleanup typed constants 2010-11-26 09:48:50 +00:00
Marek Safar 5e61ba899a Switch symbol writer to public api 2010-11-26 09:08:12 +00:00
Marek Safar a153d37792 More using cleanup 2010-11-26 09:08:11 +00:00
Marek Safar 0b1c3915fb Remove TypeBuilder from DefineType 2010-11-26 09:08:11 +00:00
Marek Safar 9e7dfae4e0 Unify System.Reflection usings 2010-11-26 09:08:11 +00:00
Atsushi Eno d488e78c06 Add missing test xml files. 2010-11-26 17:39:41 +09:00
Atsushi Eno 65309c4336 Add List of Type test case, and some FIXMEs. 2010-11-26 17:38:54 +09:00
Atsushi Eno ab1b6bb932 Add not-working tets for some MarkupExtension wrapper types. 2010-11-26 16:31:48 +09:00
Zoltan Varga baab2d8f6e Make Int32.MinValue/-1 throw OverflowException on ppc too. 2010-11-26 08:08:27 +01:00
Zoltan Varga 9a339cd1a6 Fix the DISABLE_REFLECTION_EMIT build. 2010-11-26 07:46:28 +01:00
Zoltan Varga db95700614 Fix crashes inside find_method_in_metadata (). Fixes #561728. 2010-11-26 07:27:34 +01:00
Atsushi Eno f166d738ba Do not add 'zzz' to all DateTime formats blindly. Fixed bug #655089. 2010-11-26 14:36:31 +09:00
Zoltan Varga c9b1c06718 Update a http link. 2010-11-26 04:09:29 +01:00
Zoltan Varga 204e0b693a Use $build instead of $target in a few places in configure.in, $target is about building cross compilers, not cross compiling itself. 2010-11-26 03:44:44 +01:00
Zoltan Varga 55525710c5 Commit the iphone abi support changes for ARM. 2010-11-26 03:41:29 +01:00
Zoltan Varga c3a36eac1f Simplify the arm prolog/epilog generation by not saving the sp to the stack, its not needed. 2010-11-26 03:09:19 +01:00
Zoltan Varga 907cf62694 Implement frame pointer elimination for arm. 2010-11-26 01:25:22 +01:00
Zoltan Varga b8aabd1d8e Fix stack alignment when resuming from a signal handler in the soft debugger. Fixes #647464. 2010-11-25 23:32:20 +01:00
Rodrigo Kumpera 5ca6fa9e22 Add regression test for #655741 2010-11-25 20:23:16 -02:00
Rodrigo Kumpera eac32c3cb1 Handle abstract methods in Delegate::CreateDelegate.
* icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
	CreateDelegate can be called with an abstract method in a
	similar fashion to how ldvirtftn works.

	Fixes #655741
2010-11-25 20:23:16 -02:00
Zoltan Varga c34cc3d465 Fix another place. 2010-11-25 22:50:12 +01:00
Zoltan Varga 6a033df32c Throw an OverflowException on Int32.MinValue/-1 when using the JIT icall too. 2010-11-25 22:48:20 +01:00
Zoltan Varga 1b679bc5aa Fix a bug introduced by the last change to mono_marshal_get_virtual_stelemref () in r038598e503d3db631224288ca5295988c3d22288. 2010-11-25 22:37:04 +01:00
Rodrigo Kumpera eb2fd8e1f0 Add regression test for #655847 2010-11-25 14:25:18 -02:00
Rodrigo Kumpera cf1ec146f7 Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
	method instantiations.

	* reflection.c (mono_reflection_bind_generic_method_parameters):
	Check the instantiation before returning it.

	Fixes #655847
2010-11-25 14:23:31 -02:00
Rodrigo Kumpera 1ea8e3951f Fix argument name on the exception 2010-11-25 14:23:11 -02:00
Rodrigo Kumpera aef40673ca Add regression test for #655669 2010-11-25 12:28:01 -02:00
Rodrigo Kumpera 5f29a18825 Store the domain id of weak references.
* gc.c (alloc_handle): Set domain_ids if it's a weak ref handle.

	* gc.c (mono_gchandle_set_target): Ditto.

	Fixes #655669
2010-11-25 12:28:01 -02:00
Atsushi Eno 33b3d8e04e Remove extra CWL. 2010-11-25 12:26:50 +09:00
Atsushi Eno 7638efab1a Add refresh XamlObjectWriter implementation.
This writer can process a lot more xaml inputs. It is now unified to
XamlXmlWriter, sharing some internals (already existed in XamlXmlWriter.cs).

Had to disable a few minor tests that used to pass for invalid inputs.
2010-11-25 12:24:35 +09:00
Atsushi Eno c7343a4dab More changes for XamlObjectWriter unification. 2010-11-25 12:24:06 +09:00
Atsushi Eno 49ccd46080 Eliminate XamlObjectWriter-dependent test lines. 2010-11-25 12:23:33 +09:00
Atsushi Eno 43a09ea661 ParseNameList() failed to parse nested generic type names. 2010-11-25 11:29:35 +09:00
Marek Safar 01e525697b Recover from broken for statement 2010-11-24 20:25:34 +00:00
Marek Safar 9940f0880a Inflate imported type arguments types with type definition type arguments 2010-11-24 18:29:59 +00:00
Jb Evain 040767a806 Port mcs/tests to cecil-light 2010-11-24 18:32:59 +01:00
Jérémie Laval 93c081c5ee Add a fast path in EnumerablePartitioner for strip partitioning 2010-11-24 17:21:57 +00:00
Jérémie Laval 4c3c83de9c [PLinq] Remove layer of unneeded indirections in OrderingEnumerator 2010-11-24 17:21:57 +00:00
Jérémie Laval f3b15f2ab8 [PLinq] Fix the mess out of SelectMany node and speed it up (avoid Tuples creation) 2010-11-24 17:21:57 +00:00
Jérémie Laval 2aca100d01 [PLinq] Improve Where query node speed by avoiding creation of dozen of Tuples everytime and instead use static struct 2010-11-24 17:21:57 +00:00
Rodrigo Kumpera 9235c738e8 Fix broken free call.
* class.c (mono_class_setup_interfaces): Don't free
	MonoClass::interfaces on failure since this is now
	allocated from a mempool.

	Fixes #655749
2010-11-24 15:07:29 -02:00
Jb Evain 8f4a229a7a [Linker] fix the moonlight tuning wrt debug symbols 2010-11-24 17:13:40 +01:00
Jb Evain 77a2711e07 [Linker] properly read symbols 2010-11-24 16:27:56 +01:00
Atsushi Eno f1d78d1afd Merge branch 'master' of github.com:mono/mono 2010-11-25 00:16:30 +09:00
Jb Evain b116ebd84e [Linker] fix custom AssemblyResolver 2010-11-24 16:15:20 +01:00
Atsushi Eno d616bc5953 Parse() and ToString() array type name correctly. 2010-11-25 00:15:10 +09:00
Jb Evain cb595ef82b [Linker] refactorize how symbols are loaded 2010-11-24 15:28:44 +01:00
Jb Evain 7073ada69c Add overloads to IAssemblyResolver.Resolve which take a ReaderParameters for better control 2010-11-24 15:21:52 +01:00
Gonzalo Paniagua Javier ba9d007624 [Sockets] Support Remote/LocalEndPoint for AF_UNIX
We were not handling correctly the AF_UNIX family when getting the
	socket name or the peer name.

	Fixes bug #655637.
2010-11-24 00:49:01 -05:00
Andreia Gaita 23f5d3a41e [Moon] Speed up the moonlight build by stripping it down to the bare basics 2010-11-24 04:17:58 +00:00
Zoltan Varga ab6b3727ed Make some changes to the stack overflow handling code so it works to some degree even if the kernel doesn't give us the fault address. 2010-11-24 04:51:14 +01:00
Zoltan Varga c164f11b3b Disable a test which exposes mcs bug #646744. 2010-11-24 04:51:14 +01:00
Rodrigo Kumpera bcdbd24355 Handle another case of binding to first arg of static method.
* Delegate.cs (CreateDelegate): Fix visibility and make
	sure that we fail to bind to first argument of static
	arguments to overloads that don't pass it.

	* DelegateTest.cs: Add tests for the previous change.

	Fixes #655439
2010-11-23 18:52:13 -02:00
Rodrigo Kumpera a2be3fa309 Fix corlib testsuite crash.
* icall.c (ves_icall_Type_MakeGenericType): We can inflate
	into the gtd and the verifier function is not able to handle
	it.
2010-11-23 18:51:22 -02:00
Rodrigo Kumpera 4d2e8b9e93 Fix typo. 2010-11-23 16:45:43 -02:00
Rodrigo Kumpera 27f0404c5b Fix some array overflow bugs 2010-11-23 16:24:11 -02:00
Marek Safar d3ad34299b Remove typeof comparisons 2010-11-23 17:35:25 +00:00
Marek Safar 41ba5828ad Remove typeof usage from DefaultCharSet 2010-11-23 17:35:25 +00:00
Rodrigo Kumpera c66e414be1 Check generic instantions for constraint violations.
* class.c (mono_class_init): Check instantiations of generic
	instances.

	* icall.c (ves_icall_Type_MakeGenericType): Ditto.

	* verify.c: Add mono_verifier_class_is_valid_generic_instantiation
	to the internal API so generic instances can be checked.

	Fixes #654136
2010-11-23 12:38:40 -02:00
Jb Evain 3f96ed7adb Remove the processing of the Cecil docs 2010-11-23 15:02:23 +01:00
Jb Evain b3bb12705b More linker fixes for moonlight 2010-11-23 12:14:43 +01:00
Jérémie Laval 4016c03e34 Fix ReaderWriterLockSlim Exit methods in SupportsRecursion mode and add corresponding unit tests 2010-11-23 10:59:07 +00:00
Jb Evain a520998b6a Remove dead code 2010-11-23 11:17:06 +01:00
Jb Evain 6068950ead Fix sweeping of nested types 2010-11-23 11:13:00 +01:00
Jb Evain 25e8720598 Fix corlib type lookup 2010-11-23 11:13:00 +01:00
Zoltan Varga aa832fdafb Disable a PS3 test, fix up the argument processing in the Test Driver. 2010-11-23 01:21:26 +01:00
Jb Evain 58fdac7b8a Merge branch 'cecil-light' 2010-11-23 00:37:13 +01:00
Jb Evain 480893c953 Facilitate the merge 2010-11-23 00:28:22 +01:00
Jonathan Pryor 5f90f7a8e4 Remove IVT from System.ServiceModel on MonoDroid, MonoTouch profiles.
This is ~identical to commit a3ba2ab7a0,
just applied to the MonoDroid and MonoTouch profiles.

Furthermore, without this patch the MonoDroid & MonoTouch profiles fail to
build, as current versions of mcs (nicely) attempt to verify that the output
assembly name matches the IVT of a referenced assembly, which isn't possible
when System.Xml.dll has an IVT entry for System.ServiceModel.Web.dll which
differs from System.ServiceModel.dll's IVT entry for
System.ServiceModel.Web.dll.
2010-11-22 17:30:15 -05:00
Sebastien Pouliot a3ba2ab7a0 Remove IVT from System.ServiceModel on Moonlight profile
* AssemblyInfo.cs: Remove IVT from System.ServiceModel on Moonlight
profile since SL use a different public key and it is not required
for the limited build provided by SL.
2010-11-22 14:54:56 -05:00
Jérémie Laval 28bea32383 Improve fallback SpinWait to include the initial logic of SpinWait 2010-11-22 18:05:20 +00:00
Jérémie Laval 8e89861961 Plug SplitOrderedList inside TemplateControl. 2010-11-22 18:05:20 +00:00
Jérémie Laval 9024c24431 Define more correctly 2010-11-22 18:05:20 +00:00
Jérémie Laval 68fab8082c Add a default implementation of SpinWait when SplitOrderedList is built with Sys.Web 2.0 and add it to the build 2010-11-22 18:05:19 +00:00
Zoltan Varga 198518eadb Fix a memory leak. 2010-11-22 18:48:36 +01:00
Marek Safar 4e519c3a22 Don't multiply fixed buffer size (it's done by runtime). Fixes #654058 2010-11-22 17:37:12 +00:00
Marek Safar 311e2d637f Removed SetCharSet 2010-11-22 16:50:33 +00:00
Marek Safar 1a525eb46e Emit fixed buffers using standard api only 2010-11-22 16:49:47 +00:00
Marek Safar 7efaa11c51 Fix retrieving of StructLayoutAttribute.Pack 2010-11-22 16:37:36 +00:00
Marek Safar d3faa17314 group all fixed buffer tests 2010-11-22 15:18:12 +00:00
Marek Safar f47f73e852 Tweak async modifier constant value 2010-11-22 12:07:56 +00:00
Alexander Corrado 282c5e6f67 Added 'async' as a recognized method modifier. 2010-11-22 12:01:55 +00:00
Jérémie Laval 623280c5bc Use a custom-wrapper for Aggregate operation invocation 2010-11-22 11:47:51 +00:00
Jérémie Laval ef8c50f4d1 Remove AreTasksFinished in Scheduler and directly use a non volatile version of IsCompleted 2010-11-22 11:47:51 +00:00
Jérémie Laval 21dafe0edb Increase the deepSleepTime of ThreadWorker 2010-11-22 11:47:51 +00:00
Marek Safar ea6c9f5408 Comment out no longer used code 2010-11-22 11:36:46 +00:00
Marek Safar f794a4339f Updated mcs tests failures 2010-11-22 11:28:51 +00:00
Marek Safar a5641afb29 Add comment details to DefineUnmanagedResource 2010-11-22 11:00:58 +00:00
Marek Safar 42effb5b9b Define embeded resources using standard API 2010-11-22 09:52:56 +00:00
Marek Safar 574321e1ee Move entry point handling to AssemblyDefinition 2010-11-22 09:52:56 +00:00
Marek Safar fa1270407a Make generated assembly attributes container name unique 2010-11-22 09:52:55 +00:00
Marek Safar 97cd13b1d8 Don't sign netmodules. 2010-11-22 09:52:55 +00:00
Marek Safar afa3ae21f3 Put back private key handling 2010-11-22 09:52:54 +00:00
Marek Safar f1aa6dcba5 Improve handling of netmodules. Fixes #504085 2010-11-22 09:52:54 +00:00
Marek Safar 137a691d0b Add AssemblySpec to handle all assembly attributes in same way. 2010-11-22 09:52:54 +00:00
Marek Safar 6d9ff98c89 Add missing file 2010-11-22 09:52:53 +00:00
Zoltan Varga fc9df1eacf Allocate memory for generic instances from the mempool of the image set they belong to. Use this to simplify the freeing of these instances. 2010-11-22 05:51:37 +01:00
Zoltan Varga ff2f169350 Fix g_hash_table_remove_all (). 2010-11-22 05:51:37 +01:00
Rodrigo Kumpera d6f47d2e55 Handle cattr with arrays of System.Type.
* metadata-verify.c (is_valid_fixed_param): Handle arrays
	of types. They can be encoded as 0x1B or 0x50.

	* metadata-verify.c (is_valid_cattr_content): Ditto.

	Fixes #655159
2010-11-22 01:07:57 -02:00
Jb Evain e0dbf35cfc internalize private cecil 2010-11-21 22:38:10 +01:00
Jb Evain 1e12848de3 Fix makefile 2010-11-21 22:29:28 +01:00
Jb Evain 29e9001a01 Preserve mono-cil-strip feature by embedding the old Cecil 2010-11-21 22:16:10 +01:00
Gonzalo Paniagua Javier c22160538c [File.ReadLines] Dispose the StreamReader in the right place.
The StreamReader was being disposed immediately after the call to
	ReadLines() causing the enumerator to fails.

	Fixes bug #649464.
2010-11-21 15:14:31 -05:00
Zoltan Varga 384ee20e85 Free the JIT tls data for the main thread. 2010-11-21 20:24:05 +01:00
Zoltan Varga e59fb23967 Allocate generic param constraint data from the image mempool. 2010-11-21 20:15:03 +01:00
Zoltan Varga 42464e8873 Unref all handles on shutdown so their memory is freed. 2010-11-21 19:06:45 +01:00
Jb Evain dc764b553d update cecil to upstream 2010-11-21 13:39:57 +01:00
Zoltan Varga 038598e503 Fix some small memory leaks. 2010-11-21 06:49:48 +01:00
Zoltan Varga c838c89eb2 Remove the AOT log files on 'clean'. 2010-11-21 05:32:15 +01:00
Zoltan Varga 07b5550e67 Link the iomap profiler against eglib. Fixes #627889. 2010-11-21 05:26:55 +01:00
Zoltan Varga e11fa34591 Fix a warning. 2010-11-21 01:48:59 +01:00
Gonzalo Paniagua Javier c416abafcc [HttpListener] Reduce the code inside lock {}
Avoid nesting locks when they are not needed.
2010-11-20 16:48:01 -05:00
Gonzalo Paniagua Javier 37a947e74e [HttpListener] Use RWL instead of lock()
Most of the time we just want to read the prefixes instead of
	adding/removing one.
2010-11-20 16:46:07 -05:00
Gonzalo Paniagua Javier fa67678aaf [Timer] Use a WaitHandle instead of Wait/Pulse
Notifications of changes were sent using Monitor.Pulse() while the
	scheduler thread was in a Monitor.Wait(). The way we handle
	Monitor.Wait() internally involves creating an manual-reset event and
	waiting on it each time Monitor.Wait() is called.

	With this change, one 1 event is created for the lifetime of the
	appdomain. These seems to help avoiding contention when there are a lot
	of timers in play.
2010-11-20 16:44:41 -05:00
Miguel de Icaza e1ff1ccc0a Remove experimental from the name 2010-11-20 13:09:16 -05:00
Geoff Norton 14f0ab6aa1 Fix a potential NRE when using bitmap contexts 2010-11-19 23:33:13 -05:00
Zoltan Varga 8dc590f85c Increase maximum size of ppc prolog. Fixes #654460. 2010-11-20 03:13:04 +01:00
Zoltan Varga cc36f2ba46 Add support for the processorArchitecture field in assembly names. Fixes #655096. 2010-11-20 03:09:49 +01:00
Mark Probst 9ce8f38edd [sgen] Implement evacuation for parallel mark. 2010-11-19 22:57:16 +01:00
Jackson Harper ea5741998a Parse RequestPathInvalidCharacters properly. Fixes urls with commas in them.
This fixes bug #654476. https://bugzilla.novell.com/show_bug.cgi?id=654476

These values are stored as a comma separated list, not just a list
of chars. So we need to parse out all the values, ignoring whitespace.
2010-11-19 15:48:55 -05:00
Gonzalo Paniagua Javier 4f3157b972 Web service help fix
Generate the wsdl document with UTF8 encoding.
2010-11-19 12:46:48 -05:00
Gonzalo Paniagua Javier 0dfbd6131c Fix the build. 2010-11-19 12:36:04 -05:00
Zoltan Varga 73f90bbab3 Fix the previous arm EH change. 2010-11-19 17:19:28 +01:00
Miguel de Icaza 8f7e4b7f29 Remove mentions of Logging and Heap Shot profilers from man page 2010-11-19 11:12:10 -05:00
Zoltan Varga 5d9a8ac05d Load dependent assemblies of an aot image from the assembly's basedir. Fixes #654850. 2010-11-19 17:08:48 +01:00
Atsushi Eno ba0496004f Implement XamlType.CanAssignTo(). Remove extra writer state members. 2010-11-19 21:24:36 +09:00
Atsushi Eno 534cecac54 Call OnWriteStratObject() after pushing current state. 2010-11-19 16:21:26 +09:00
Atsushi Eno bc4f3e7ebe Fix TypeValueSerializer and ValueSerializerContext to work fine with XamlObjectWriter. 2010-11-19 15:05:49 +09:00
Atsushi Eno 0b159f6300 Remove unnecessary code. String type check is only for XamlXmlWriter. 2010-11-19 13:31:03 +09:00
Atsushi Eno 4ceceaf50b The test is network dependent. 2010-11-19 13:04:58 +09:00
Atsushi Eno db1b970add Merge branch 'myeisha-xml-fixes' 2010-11-19 13:02:04 +09:00
Atsushi Eno 292eea651d Merge branch 'xml-fixes' of https://github.com/myeisha/mono into myeisha-xml-fixes 2010-11-19 12:28:01 +09:00
Marek Habersack 4b785e19d7 [asp.net] Disabled array clearing on heap resize in CacheItemPriorityQueue as it causes NREX to be thrown with > 8192 items in the queue.
- Rewrote the CacheItem priority queue test generator to generate better code.
- CacheItem in System.Web doesn't have the unused Guid field now (the field is used only for tests)
- Added a huge sequence to CacheItem priority queue tests (10k entries)
2010-11-19 02:30:16 +01:00
Marek Habersack 90768d5b2d [asp.net] Added a reminder comment about stack scanning in CacheItemPriorityQueue.ResizeHeap 2010-11-19 02:30:16 +01:00
Zoltan Varga 9458c05d90 Set the thumb bit in the CPSR when resuming from a signal handler to a thumb function on arm. 2010-11-19 01:38:36 +01:00
Zoltan Varga 9b9202012d Fix the thumb build. 2010-11-19 00:57:52 +01:00
Gonzalo Paniagua Javier 61742431c8 Hush cross-compilation warnings 2010-11-18 18:16:22 -05:00
Zoltan Varga 7284f5ac16 Improve tail call support on x86 too. 2010-11-19 00:02:56 +01:00
Gonzalo Paniagua Javier 93483a4b8f Don't throw when unable to write autogen keys
It is possible that the user running the ASP.NET application does not
	have permission to write to the registry. In this case, the auto
	generated keys will be created on every application start.
2010-11-18 17:39:01 -05:00
Zoltan Varga 9e681b8fa3 Fix an assert in single stepping if an IL offset doesn't correspond to a seq point. Fixes #654694. 2010-11-18 21:11:11 +01:00
Mark Probst 1e39ad6c61 [sgen] Use bit fields for the booleans in MSBlockInfo. 2010-11-18 20:50:43 +01:00
Zoltan Varga 7a203c1308 Fix infinite recursion in the CompareExchange aot code. 2010-11-18 18:59:08 +01:00
Gonzalo Paniagua Javier 57b3ddd7ab Fix g_dir_open et al for windows.
This was using the *A functiones instead of the *W ones and passing in UTF16.
	It was also opening and closing the directory just to check that it was
	there and then open it again !?.

	Fixes bug #645189.
2010-11-18 12:30:49 -05:00
Mark Probst ac9ddb5319 [fix] Fix build. 2010-11-18 18:01:33 +01:00
Sebastien Pouliot d917b2b12f Fix bugs in UriFormat.SafeUnescaped
* System/Uri.cs: Add support for 'safe' unescaping rules
* System/UriParser.cs: Add support for SafeUnescaped in Format. Avoid
escaping the # when adding a fragment at the end of the Uri

* Test/System/UriTest.cs: More test cases for GetComponents wrt
different UriFormat
2010-11-18 11:22:26 -05:00
Jonathan Pryor 7d4af82165 [mdoc export-html] Fixup href generation for nested generics.
In certain situations, the type-parameter counting code doesn't
skip tokens properly.  In some circumstances, this results in
invalid links (e.g. refing KeyValuePair`1, not KeyValuePair`2),
in others it results in an XSLT error with "!WTF 2".

The problem was we weren't properly checking for nested types.
2010-11-18 10:49:48 -05:00
Rodrigo Kumpera 47d16a9f29 Handle broken invalid generic instantiations.
* loader.c (method_from_methodspec): Don't crash
	if parsing of the generic instance fails.

	Fixed #560834
2010-11-18 11:52:32 -02:00
Rodrigo Kumpera e426a47d50 Add regression test for #562324 2010-11-18 11:52:32 -02:00
Jérémie Laval 72f264d0ab Revert the CER-like changes made to SpinLock.Enter method and document the problem. 2010-11-18 12:47:29 +00:00
Rodrigo Kumpera 338189c0d6 Verify the return value of called functions.
* verify.c (do_invoke_method): Make sure the returned
	value is valid in the caller's context.

	Fixes #562324
2010-11-18 10:35:04 -02:00
Jérémie Laval d687cbbd43 Another fix related to the rebase 2010-11-18 12:05:34 +00:00
Jérémie Laval d0623ba210 Fix compile error introduced by rebasing 2010-11-18 12:05:34 +00:00
Jérémie Laval c2638c0156 Protect TryEnter and Exit methods of SpinLock against asynchronous exceptions. 2010-11-18 12:05:33 +00:00
Jérémie Laval 50d7302246 Protect ExitUpgradeable part of ReaderWriterLockSlim against asynchronous exception.
This ensure that the lock state remains consistent even when it's interrupted by an async exception (such as ThreadAbortException).
2010-11-18 12:05:32 +00:00
Jérémie Laval 01a09fd9fe Protect Enter/Exit write part of ReaderWriterLockSlim against asynchronous exception.
This ensure that the lock state remains consistent even when it's interrupted by an async exception (such as ThreadAbortException).
2010-11-18 12:05:31 +00:00
Jérémie Laval ec9b7a2216 Protect Enter/Exit read part of ReaderWriterLockSlim against asynchronous exception.
This ensure that the lock state remains consistent even when it's interrupted by an async exception (such as ThreadAbortException).
2010-11-18 12:05:31 +00:00
Paolo Molaro 31df8dd714 Provide better coverage of jitted methods to the profiler.
Sometimes we use wrapper methods or other tricks under the hood,
but we provided to the profiler some inconsistent information,
for example the MonoMethod pointer in enter/leave events could be
different from the one used in reporting jit compilation.
This patch introduces a concept of aliased methods: more
than one MonoMethod pointer could correspond to the same jit info
and as such, more end_jit notifications can happen for the same
compiled code. This also means, in turn, that you can get a
end_jit notification for MonoMethod pointers that weren't reported
in a start_jit event.
This partially reverts the change in 2e0067422b, which doesn't
have an associated bug report anyway (this change instead fixes
the issue with unresolved methods in the log profiler).
2010-11-18 11:47:32 +01:00
Paolo Molaro 12de9e1cdd Log profiler: be more specific about unknown methods and classes. 2010-11-18 11:47:32 +01:00
Zoltan Varga 66075a788c Pop the arguments to the throw trampoline from the stack on x86. Fixes #654322. 2010-11-18 03:46:34 +01:00
joncham af340af428 Update vcxproj files. 2010-11-17 21:41:38 -05:00
joncham a410aa0a4b Undefine AF_INET6 on windows to disable IPv6 for now. 2010-11-17 21:41:37 -05:00
Jonathan Pryor d80fadfb44 [mdoc-update] Add C#4 dynamic support for method declarations. 2010-11-17 21:28:29 -05:00
Marek Habersack f0c2471465 [system] NameObjectCollections.Init clears the items container and array before reallocating them. 2010-11-18 02:21:47 +01:00
Marek Habersack d65749c571 [asp.net] A few memory usage optimizations.
* System.Web.Caching/CacheItemPriorityQueue.cs: when the heap is resized, the old heap memory
  is cleared.
* System.Web.SessionState_2.0/SessionInProcHandler.cs: the session items collection is cleared
  when the InProcSessionItem is destroyed
* System.Web/HttpApplicationState.cs: instantiate SessionObjects and StaticObjects collections
  only on demand.
  Replaced ReaderWriterLock with ReaderWriterLockSlim.
  Removed a few variables which aren't needed.
* System.Web/HttpStaticObjectsCollection.cs: replaced a Hashtable with a Dictionary <string, object>.
  The objects dictionary is created on demand only.
2010-11-18 02:21:47 +01:00
Gonzalo Paniagua Javier 3d5f9dedc7 Updated remove_wsq.
remove_wsq() should only clean up the queue when the runtime is shutting down.
	In any other case, removing a queue that still contains work items is an error.
2010-11-17 19:19:22 -05:00
Gonzalo Paniagua Javier 968c36409f Fix typo.
Thanks Rolf debugging this.
2010-11-17 18:52:28 -05:00
Gonzalo Paniagua Javier eef96ae0ef Wrong return value in mono_sem_timedwait()
The return value of mono_sem_timedwait() with a timeout 0 was incorrect
	(0=failure, !0=success instead of 0=success). This worked on
	non-Windows platforms because the only call with timeout 0 was
	expecting the incorrect return value, but it made the mono threadpool
	in Windows fail.

	Fixes bug #653928.
2010-11-17 16:35:56 -05:00
Atsushi Eno 4c8dd3f47b Support x:Arguments in XamlObjectWriter. 2010-11-18 05:52:55 +09:00
Atsushi Eno 57e7541ed4 Avoid examining converted type after using TypeConverter. Add ArgumentAttributed test for object writer. 2010-11-18 05:37:18 +09:00
Atsushi Eno 2219b5db9b Gave up finding "correct" way to deserialize XamlType and made it special case :( 2010-11-18 05:12:25 +09:00
Atsushi Eno 46ddb72741 Add TypeValueSerializer, as it does not seem to work fine with TypeConverter. And tests. 2010-11-18 05:11:45 +09:00
Gonzalo Paniagua Javier 926575ab50 User name and home directory initialization
User name and home directory are initialized at the same time from the
	information in /etc/passwd if possible.
2010-11-17 14:01:28 -05:00
Atsushi Eno 847225fd85 Rewrote ValueSerializer.GetSerializerFor() with couple of tests. 2010-11-18 02:36:33 +09:00
Atsushi Eno 369c0235ca Add missing test file. 2010-11-18 02:35:59 +09:00
Paolo Molaro c46bd7c4a7 Log profiler: implemented command server and ondemand heapshot. 2010-11-17 18:19:41 +01:00
Jérémie Laval 4870f96b08 [Task scheduler] Refactoring and cleanup. Removed a bunch of not-so needed lambdas to avoid delegate invocation cost. 2010-11-17 15:47:27 +00:00
Jérémie Laval 53d15eec62 [Partitioner] Use custom made enumerator for GetPartitions proxying from GetOrderablePartitions 2010-11-17 15:47:27 +00:00
Jérémie Laval 9f607944a4 [CancellationToken] Speed up ThrowIfCancellationRequested operation 2010-11-17 15:47:27 +00:00
Rodrigo Kumpera a68820dc31 Handle method load failure.
* loader.c (find_method_in_class): Properly
	handle failure of loading a method.

	* loader.c (find_method_in_class): Handle method load
	failure. We can't just bail out since working code
	depends on working while having broken methods in the
	mix.

	Fixes #562009
2010-11-17 13:03:56 -02:00
Marek Habersack 2ef160b5cf [asp.net] Part of fix for bug #653013. AsyncPostBackTrigger must react to events generated by the trigger control's children. 2010-11-17 14:20:23 +01:00
Marek Habersack 90248a3bd1 [asp.net] Part of fix for bug #653013. StateManagedCollection must perform a full clear in LoadViewState
If all the items in the collections were saved to the view state, the collection must call the Clear ()
method in order for the OnClear and OnClearComplete methods to be invoked. Telerik RadComboBox depends
on it to remove dynamically added entries before they are recreated when the view state is loaded by
the control.
2010-11-17 14:11:11 +01:00
Marek Habersack ff8730d74b [asp.net] Removed the DEBUG ifdefs, for the tests to compile.
This is temporary until the tests are rewritten (soon)
2010-11-17 14:11:11 +01:00
Jérémie Laval 16e87dee36 [PLinq] Use a custom loop for iterating in ProcessAndAggregate to avoid the if cost at each round. 2010-11-17 12:22:49 +00:00
Paolo Molaro 43bc11cf7d Log profiler: track GC time per thread so it's properly calculated. 2010-11-17 12:49:37 +01:00
Atsushi Eno e9c9454467 Add test for writing string and native Type value as PositionalParameters. 2010-11-17 19:08:56 +09:00
Atsushi Eno d0bce1c5c2 Get object instantiation correctly invoked when non-constructive StartMember is invoked. 2010-11-17 18:46:27 +09:00
Atsushi Eno 491fa8542c Consider PositionalParametesr in XamlObjectWriter. 2010-11-17 18:19:16 +09:00
Atsushi Eno 2e100c5e48 Made a couple of PositionalParameter related fixes, disabling test, etc. 2010-11-17 15:50:18 +09:00
Gonzalo Paniagua Javier 2370aa1ac7 Get the user name from the UID not the USER env
Fixes bug #653564.
2010-11-17 00:42:38 -05:00
Zoltan Varga 0d82272033 Bump the max size of the arm prolog to prevent overflows. 2010-11-16 23:30:14 +01:00
Zoltan Varga 508c201a19 Remove a debug printf. 2010-11-16 22:42:59 +01:00
Zoltan Varga a34456490c Fail LLVM compilation when using sgen + OP_STOREV_MEMBASE with structs with reference fields. Fixes #653842. 2010-11-16 21:33:25 +01:00
Rodrigo Kumpera 206370cb12 Better handle of loading the interfaces of a type.
* loader.c (find_method): Instead of asserting when
	a type has its interfaces missing, ignore them and
	keep searching.

	Fixes #560346
2010-11-16 18:31:46 -02:00
Rodrigo Kumpera e9a265ec75 Handle broken types in assignment test.
* class.c (mono_class_is_assignable_from): Simply
	return false if any of the arguments is broken.

	Fixes #651287
2010-11-16 17:59:00 -02:00
Zoltan Varga ff8921bb3d Special case Interlocked.CompareExchange<T> in the aot runtime. 2010-11-16 20:44:45 +01:00
Zoltan Varga f1d551d25b Improve tail call support on amd64 to support more methods, not just ones whose signature is equal to their caller. 2010-11-16 19:49:35 +01:00
Atsushi Eno a7dd42d725 Remove some illogical hacks in GetSerializerFor(). 2010-11-17 02:41:55 +09:00
Paolo Molaro c910858923 Log profiler: collect root information during GC. 2010-11-16 18:07:30 +01:00
Paolo Molaro b3378410e7 GC/Profiler: added API to enumerate roots.
* profiler-private.h, profiler.c, profiler.h: added API to
enumerate the roots used during a garbage collection.
* sgen-gc.c: enumerate roots if requested by the profiler.
2010-11-16 18:07:30 +01:00
Rodrigo Kumpera ac5ffb3fc7 Don't allow zero cattr type column.
* metadata-verify.c (verify_cattr_table): Type column
	can't have a zero index.

	Fixes #651682
2010-11-16 14:07:59 -02:00
joncham 5b91074865 Fix #ifdef to fix windows build. 2010-11-16 07:52:12 -05:00
myeisha 5150ffd9f3 Add testcase for multiple missing IDs 2010-11-16 13:04:30 +01:00
Atsushi Eno 8ea8f31dfb ContentProperty will just show up as an ordinal property, so no need to worry here. 2010-11-16 20:54:58 +09:00
Atsushi Eno acdfa36f4b Remove for-object-writer-only code from common non-object writer base. 2010-11-16 20:53:57 +09:00
KISHIMOTO Makoto 0a0ab739b5 Fix profiler build on freebsd. 2010-11-16 11:39:14 +01:00
Atsushi Eno 8f63d8bc6f Removed unused code / commented out unused test lines. 2010-11-16 17:44:50 +09:00
Atsushi Eno 4b92142df2 cleaning up some FIXMEs. 2010-11-16 13:17:57 +09:00
Marek Habersack 3b8cd7bbce [asp.net] New version of code to purge underused entries from the cache.
This version uses an LRU cache to hold the cache items. Priority is not taken into account
when removing the underused entries (with the exception of the CacheItemPriority.NotRemovable
- items with this priority are never purged), they are treated equally.
A separate thread is not used to perform purging, instead the collection happens in the current
requests's thread.
Minor improvements to cache item enumerator and to the CheckDependencies method.
2010-11-16 04:03:26 +01:00
Rodrigo Kumpera 7c6e535565 Properly encode GMD on a GTD.
* reflection.c (mono_reflection_method_on_tb_inst_get_handle):
	Ensure the typebuilder had it's generic arguments initialized.

	Fixes #652952
2010-11-15 23:17:09 -02:00
Marek Habersack bd2ff0ebde [asp.net] Remove unnecessary try/catch block from the old entries expiration code. 2010-11-15 22:57:11 +01:00
Zoltan Varga 729a4bfad4 Remove an unneccesary assert which is hit when a double is passed in split reg-stack in soft-float mode on non-EABI arm. 2010-11-15 19:42:13 +01:00
Marek Safar 6ce8dda488 Remove old accessibility check routine 2010-11-15 18:11:45 +00:00
Zoltan Varga 069ca834d2 Make libgc use dolt too. 2010-11-15 14:56:30 +01:00
Atsushi Eno 139958b3cf Make string convertibility check more strictly. 2010-11-15 21:35:46 +09:00
Atsushi Eno 04bd5a3d48 Use CanConvertTo(typeof(string)) before converting to string. Add Object writer tests. 2010-11-15 21:06:11 +09:00
Atsushi Eno 7d7d808cab Pass IValueSerializerContext as ITypeDescriptorContext. 2010-11-15 21:05:09 +09:00
Zoltan Varga 32340d1fe2 Remove the unused and incomplete CMake build scripts for now. 2010-11-14 01:21:43 +01:00
Vincent Povirk 579faaab5f Convert MONO_MARSHAL_CONV_LPSTR_STR to mono_string_to_utf16 on windows. 2010-11-13 17:00:20 +01:00
Zoltan Varga e6e56cebf5 Fix the DISABLE_JIT build. 2010-11-13 14:29:15 +01:00
Zoltan Varga 74718c80cd Fix the previous change. 2010-11-13 14:14:40 +01:00
Zoltan Varga 1cae8e2584 Fix build breakage on platforms without execvp. 2010-11-13 14:05:18 +01:00
Zoltan Varga 72745b14bb Fix a typo (DISABLE_SOCKET->DISABLE_SOCKETS). 2010-11-13 13:53:48 +01:00
Zoltan Varga 0cc9d6ecd0 Use CloseHandle () for closing process handles if HOST_WIN32 is defined, so it works on windows based cross compilers. 2010-11-13 13:29:48 +01:00
Marek Habersack 8940995fc8 [asp.net] Cache + SessionInProcHandler memory usage improvements
* Cache.cs: cache removes old/least recently used items when the item count exceeds 15000. Items
  are removed until they reach the count of 10000.
* SessionInProcHandler.cs: replaced ReaderWriterLock with ReaderWriterLockSlim and added a Dispose
  method to the InProcSessionItem type which disposes the associated lock and other resources.
2010-11-13 04:14:33 +01:00
Andrew Jorgensen 75fbdd231a Add new profiler to mono-devel package 2010-11-12 16:45:18 -07:00
Gonzalo Paniagua Javier 9c0c172c6e make -jX should work in libgc/ now. 2010-11-12 17:37:28 -05:00
Paolo Molaro 959e710559 Log profiler: removed the hsmode option, use heapshot=MODE instead. 2010-11-12 21:38:05 +01:00
Paolo Molaro 1c21bf5d8d Log profiler: updated to the new heap walk API.
The GC now provides also offset information for each referenced object
in the heap walk API: this info is saved in the profile data now.
Updated the data version for the file format change.
2010-11-12 21:38:05 +01:00
Paolo Molaro 328b795c2e GC: changed the heap walk API to also report the offset of referenced objects. 2010-11-12 21:38:05 +01:00
Paolo Molaro 5ea94df40f Log profiler: use the output value as a filename when report is specified.
* proflog.c: if the output option is used together with report, the report
is saved to the named file instead of being printed to stdout.
* decode.c: zlib seems to get confused with a non-compressed strem
coming from stdin: disable it in that case...
Also deal with reading 0 bytes from a buffer.
2010-11-12 21:38:04 +01:00
Paolo Molaro b2d330da2b Log profiler: allow overwriting data files and name them from date and pid.
* utils.h, utils.c: added getpid() wrapper.
* decode.c: display the program pid if available.
* proflog.c: added substitutions for the output name, change the default
behaviour to not overwrite a file and allow '-' at the start of the
file name to force overwrite.
2010-11-12 21:38:04 +01:00
Rodrigo Kumpera 1015aecfdd Improve tests.
* gc-oom-handling.cs: Modify this test to test major
	fragmentation too.

	* gc-oom-handling2.cs: Add tests for some heavy reflection
	allocators.
2010-11-12 17:14:24 -02:00
Rodrigo Kumpera bf60953f34 Handle OOM under evacuation.
* sgen-marksweep.c (major_copy_or_mark_object): Stop evacuating
	major objects if we fail to alloc them.
2010-11-12 17:14:24 -02:00
Andreia Gaita ba36a57d91 [Xml] duh, don't hide the stacktrace 2010-11-12 16:55:54 +00:00
Marek Safar b458997dcb Move an assembly declaration handling into a new file 2010-11-12 16:14:22 +00:00
Marek Safar aa50def326 Add local version of constructor info constants 2010-11-12 16:14:21 +00:00
Marek Safar af9193d9cc Remove unused namespaces 2010-11-12 16:14:21 +00:00
myeisha 73b53a30b0 Don't add IDREFs to set of missing IDs multiple times 2010-11-12 17:08:27 +01:00
Andreia Gaita 773b544db0 [Xml] Check if the underlying writer supports LookupPrefix and return empty
instead of blowing up.
2010-11-12 16:07:51 +00:00
Jérémie Laval 4a71197d1b Throw an an exception when Break and Stop are used in combination. 2010-11-12 14:02:41 +00:00
Jérémie Laval f50ff56d62 Simplify Parallel.ForEach loop execution 2010-11-12 14:02:12 +00:00
Jérémie Laval 248b261dfb Cleanup ForEach overloads in Parallel 2010-11-12 13:52:54 +00:00
Jérémie Laval 92e252135e Directory cleanup for System.Collections.Concurrent partitioners 2010-11-12 13:20:00 +00:00
Paolo Molaro 55e3f73ced Log profiler: prevent possible corruption from writing to the same file.
* proflog.c: we now unlink the output file before creating it to
prevent possible corruption from multiple processes writing to the
file. Added also extra checks for async events (which shouldn't happen).
* decode.c: fix file offset when using zlib.
2010-11-12 14:13:15 +01:00
Atsushi Eno 05410fca44 Return XamlLanguage.Items for dictionary and ContentProperty as implicit member. 2010-11-12 21:26:18 +09:00
Atsushi Eno 88a39fe25d Fix wrong attribute value string indexing. 2010-11-12 21:09:46 +09:00
Atsushi Eno 3c2a4fd608 XamlSchemaContext.GetXamlType(XamlTypeName) now resolves assemblies then types.
And use it in appropriate place.
Fixed part of XamlXmlReaderTest.PositionalParameters2().
2010-11-12 20:54:03 +09:00
Marek Safar 0962bce5e4 New tests 2010-11-12 11:21:34 +00:00
Atsushi Eno cbb6518d6a Extension types may have omitted "Extension" from XML name. 2010-11-12 19:56:28 +09:00
Marek Safar 9bc6016df0 Add MessageQueue::GetMessageEnumerator2 2010-11-12 10:32:42 +00:00
Marek Safar a73af072dc CRLF->LF conversion 2010-11-12 10:32:41 +00:00
Marek Safar 8e47d66933 Fix QueuePathDialog signature 2010-11-12 10:32:41 +00:00
Marek Safar 3e4eec4f0f Show more details for CS1061 eror 2010-11-12 10:32:40 +00:00
Marek Safar a45c289ac5 Inflate nested non-generic interfaces inside generic type 2010-11-12 10:32:40 +00:00
Daniel J Sell d53c11003d [asp.net] Fix for bug #653192. making MasterPageFile handle relative paths
MasterPageFile should be relative to the file being parsed, not the
request path
2010-11-12 11:21:40 +01:00
Atsushi Eno bdb3b93f2b Fix XamlMember comparison and get relevant tests working. 2010-11-12 17:51:38 +09:00
Marek Safar 240486239d [652390] Return type inference can inflate using type parameters out of the reach 2010-11-12 08:25:37 +00:00
Marek Safar 5058c01c80 New tests. 2010-11-12 08:25:37 +00:00
Atsushi Eno 99fd235718 Add support for MarkupExtension attribute in XamlXmlReader. 2010-11-12 15:11:19 +09:00
Gonzalo Paniagua Javier aea4443fcf Don't cache child nodes when security trimming is enabled.
When SecurityTrimmingEnabled is set to true for the node, the cached children
collection also depends on the IPrincipal set for the current context.

Fixes bug #641449.
2010-11-11 21:19:12 -05:00
Atsushi Eno c34c85ed4e Actually XamlXmlReader was already working for PropertyDefinition. 2010-11-12 10:02:25 +09:00
Atsushi Eno 56f65a39af Add test for writing PropertyDefinition. 2010-11-12 09:59:26 +09:00
Atsushi Eno 53c7ebac26 Add new ValueSerializerContext and use it everywhere appropriate.
This change was basically for string serialization of XamlTypeName, namely
PropertyDefinition serialization.
Turned out it should be used in a lot of places where IServiceProvider
and ITypeDescriptorContext is expected.
IServiceProvider implementations in XamlWriters are replaced.
2010-11-12 09:51:52 +09:00
Zoltan Varga 68b442aab9 Avoid 'sgen not supported' warnings when no --with-sgen=yes argument was passed to configure. 2010-11-12 01:41:01 +01:00
Zoltan Varga 968e5acaf3 Remove obsolete cygwin glib checks. 2010-11-12 01:36:50 +01:00
Zoltan Varga 7a3bf1d6fc Fix the definition of G_BREAKPOINT on x86 when cross compiling. 2010-11-12 01:34:58 +01:00
Zoltan Varga 3a6b4c58bd Fix a ppc cross compile problem. 2010-11-12 01:14:14 +01:00
Zoltan Varga a1ffc97d75 Use dolt for eglib too. 2010-11-12 00:04:13 +01:00
Zoltan Varga 1eedfc74ae Pass -mno-cygwin to eglib's configure. 2010-11-11 23:56:47 +01:00
Gonzalo Paniagua Javier 918cd627f3 Don't disable IPv6 if bulding with VS.
When building with Cygwin or a cross-compiler there are at least 4
	functions that are not present (inet_ntop, getaddrinfo, getnameinfo and
	freeaddringo) so in these cases we just disable IPv6. Note that
	Socket.OSSupportsIPv6 will still return true.

	When building with VS, IPv6 will be supported without a problem.
2010-11-11 16:39:40 -05:00
Sebastien Pouliot 90f76e6521 Query SupportsCookieContainer ini Moonlight build
* HttpRequestChannel.cs: Do not use CookieContainer unless we know its
supported (e.g. client stack) otherwise we'll throw (browser stack)
2010-11-11 15:28:54 -05:00
Sebastien Pouliot 4ca096f7a6 Add internal SetCompatibilitySwitch to AppDomain
* AppDomain.cs: Add internal SetCompatibilitySwitch so it is possible
to set values that will be returned by (public) IsCompatibilitySwitchSet
(needed by Moonlight)
2010-11-11 15:28:53 -05:00
Sebastien Pouliot 570ddb5097 [moon] Allow creating AES with the fully qualified name in S.Core
* CryptoConfig_2_1.cs: Add fully qualified name (to simple name) to
allow the creation of AES using (internal) CryptoConfig
2010-11-11 15:28:52 -05:00
Jérémie Laval 021deca604 Refine precedent algorithm for Parallel.For index stealing. 2010-11-11 18:12:48 +00:00
Jérémie Laval 8a37df630e Add a new lightweight stealing algorithm to Parallel.For 2010-11-11 18:12:48 +00:00
Jérémie Laval 92f611ac93 In Parallel.For, returns immediately if the initial bound is superior or equal to the upper bound. 2010-11-11 18:12:48 +00:00
Jérémie Laval f99729b759 Small logic fix in choosing step in Parallel.For 2010-11-11 18:12:48 +00:00
Marek Safar 195accd498 [650850] Inflate all hoisted type parameter constraints 2010-11-11 17:19:31 +00:00
Paolo Molaro 39ecc85b9c Added the mprof-report manpage. 2010-11-11 16:37:59 +01:00
Paolo Molaro c963609e64 Added a proper define for the external zlib and check for sched_getcpu(). 2010-11-11 15:56:33 +01:00
Paolo Molaro 92b0e3fe03 Log profiler: implemented the reverse reference feature in the heapshot report. 2010-11-11 14:35:39 +01:00
Zoltan Varga 3d4efed01d Remove one more compile-time dependency on sgen. 2010-11-11 13:03:20 +01:00
Marek Safar 7239b02c73 Synchronize event add/remove using CAS 2010-11-11 11:58:08 +00:00
Marek Safar f7f6e2675c Unwraped equality operators cannot use a user operator of different types 2010-11-11 11:58:08 +00:00
Zoltan Varga 96f6aafe12 Define mono_gc_get_card_table () for boehm/null gc too, to reduce the number of sgen dependencies in mini/. 2010-11-11 12:53:01 +01:00
Atsushi Eno 3e3804bd9d XamlMember.TypeConverter should return correct converter now.
Also adding usage of that member, but not perfectly working yet.

Disabled broken tests that depends on not-implemented XamlObjectWriter part.
2010-11-11 17:48:41 +09:00
Atsushi Eno 53f99680c9 When collection instance returned null, do not try to GetItems(). 2010-11-11 15:46:11 +09:00
Atsushi Eno 00ef616425 Remove old code (overwrite). 2010-11-11 12:24:30 +09:00
Atsushi Eno aa4cf49ae6 Remove extra copy lines. 2010-11-11 12:19:44 +09:00
Atsushi Eno 6e5eedaba4 Split XamlNode.cs to object-reader specific code and else. 2010-11-11 12:17:23 +09:00
Atsushi Eno eb818ee223 Fix readonly collection check (should use IsWritePublic). 2010-11-11 12:15:53 +09:00
Atsushi Eno d4659e7b67 removed xml output code (mostly harmless but could break xml files). 2010-11-11 12:14:04 +09:00
Marek Habersack 46997e25fd [corlib] Fix for bug #652807. Handle RegistryValueKind.QWord in Win32RegistryApi.{Get,Set}Value 2010-11-11 01:57:20 +01:00
Geoff Norton 461418d605 [OSX] Dont use nested functions to determine if we can use the system zlib 2010-11-10 14:32:42 -05:00
Rodrigo Kumpera d1d82af134 Merge branch 'gc_oom' 2010-11-10 17:36:27 -02:00
Rodrigo Kumpera bb52426c90 Assert if we OOM during major evacuation.
* sgen-marksweep.c (major_copy_or_mark_object): Until we
	figure out how to handle OOM while evacuating major objects
	lets assert.
2010-11-10 17:35:51 -02:00
Rodrigo Kumpera 0baf5312c0 Handle OOM on string intern icall. 2010-11-10 17:35:51 -02:00
Rodrigo Kumpera b5e3da7e58 Add test for string interning OOM. 2010-11-10 17:35:51 -02:00
Rodrigo Kumpera adc7a9ef17 Handle OOM with string interning. 2010-11-10 17:35:51 -02:00
Rodrigo Kumpera 68918326d5 Handle OOM with string interning. 2010-11-10 17:35:50 -02:00
Rodrigo Kumpera 030f348396 Add tests for OOM handling. 2010-11-10 17:35:50 -02:00
Rodrigo Kumpera 004b5bfd73 Make the parallel OOM handling code more resilient.
* sgen-marksweep.c (major_copy_or_mark_object): Use
	a loop around CAS'ng on failed memory allocation to make
	sure we have the right behavior in place.
2010-11-10 17:35:50 -02:00
Rodrigo Kumpera 572913bac4 Implement oom handling for MS.
* sgen-gc.c (collect_nursery): If any object was pinned
	after initial pinning, sort the queue so build_nursery_fragments
	will see the aditional objects.
	If pinning due to OOM happened ask for a major collection.

	* sgen-gc.c (major_do_collection): Adjust the pin queue if
	OOM happened. Here we have to clean discarded entries before
	optimizing the queue or we might end with interior pointers
	in the mix.

	* sgen-gc.c (sgen_collect_major_no_lock): New function so
	major collectors can trigger a collection. They can't
	use public API since the gc lock is not meant to be reentrant.

	* sgen-major-copy-object.h (copy_object_no_checks): Pin
	the object if we can't promote it.

	* sgen-marksweep.c (alloc_obj): Return null if we fail
	to allocate a block for a given freelist size.

	* sgen-marksweep.c (major_alloc_degraded): Ditto.

	* sgen-marksweep.c (major_copy_or_mark_object): Handle OOM.

	* sgen-marksweep.c (major_alloc_small_pinned_obj): If allocation
	fails, try a major collection since this is memory requested by
	the runtime and it's much harder to handle failure.
2010-11-10 17:35:50 -02:00
Rodrigo Kumpera 5692f8f465 Adjust major collection heuristics for OOM scenarios.
* sgen-gc.c (need_major_collection): Add a space_needed
	parameter that is checked against the available space
	quota.

	* sgen-gc.c (alloc_degraded): Adjust call to
	need_major_collection. Pass zero as space_needed since
	it's won't help to do a major gc if we're already doing
	degrated alloc and old gen is full.

	* sgen-gc.c (alloc_large_inner): Pass size to
	need_major_collection as shrinking major might be needed
	to meet the space quota for.
2010-11-10 17:35:49 -02:00
Rodrigo Kumpera fe152b5281 Add heap size accounting.
* sgen-gc.c: Simple accounting with no los/major reserve.

	* sgen-los.c:
	* sgen-marksweep.c: Account for allocation and release of
	memory. Fail to allocate if above alloc quota.
2010-11-10 17:35:49 -02:00
Rodrigo Kumpera c0831ab104 Handle failure on allocation functions.
* sgen-gc.c (mono_gc_alloc_obj_nolock):
	* sgen-gc.c (mono_gc_alloc_obj):
	* sgen-gc.c (mono_gc_alloc_vector):
	* sgen-gc.c (mono_gc_alloc_array):
	* sgen-gc.c (mono_gc_alloc_string):
	* sgen-gc.c (mono_gc_alloc_pinned_obj): Handle
	allocation failure.
2010-11-10 17:35:49 -02:00
Rodrigo Kumpera ea59d7d8bd Add max-heap-size parameter to MONO_GC_PARAMS
* sgen-gc.c (mono_gc_base_init): Added new parameter.
	Right now it is not used.
2010-11-10 17:35:49 -02:00
Rodrigo Kumpera e6ed0b60f0 Add boehm support for max-heap-size.
boehm-gc.c (mono_gc_base_init): Check MONO_GC_PARAMS environment
	variable for max-heap-size.
2010-11-10 17:35:48 -02:00
Rodrigo Kumpera 1ca5d68634 Move function from sgen to gc so boehm can use it too.
* sgen-gc.c (mono_sgen_parse_environment_string_extract_number):
	Move this function to gc.c and rename.
2010-11-10 17:35:48 -02:00
Rodrigo Kumpera 4aef74290d Handle OOM better.
* object.c (mono_print_unhandled_exception): We can't really
	do a ToString () during an OOM.
2010-11-10 17:35:48 -02:00
Marek Habersack 8a63927fd1 [wcf] .NET allows for service contract methods to be decorated only by Web{Get,Invoke}Attribute
Usually WCF requires that each service method is marked with the OperationContract attribute with the exception
of methods decorated with the Web{Get,Invoke}Attribute attributes which are defined in System.ServiceModel.Web.
This patch adds a simple way to extend the ContractDescriptionGenerator in order to provide this functionality
without circular dependency of System.ServiceModel on System.ServiceModel.Web. Several extenders can be registered
with the description generator and they will be invoked in the registration order until any of them returns 'true'.
Extenders are passed a reference to the OperationContract attribute with which the current method is decorated - if
the reference is null, the extender should create a default instance of the attribute so that the description generator
considers the method as one to be included in the contract description.
2010-11-10 19:22:26 +01:00
Marek Safar e152071d2a New test. 2010-11-10 17:57:08 +00:00
Marek Safar 55def591e2 Implement dynamic mutator over dynamic indexer 2010-11-10 17:57:08 +00:00
Marek Safar bdf6dee0fa More tweaks for nullable binary operation 2010-11-10 17:57:08 +00:00
Marek Safar e02fd2fdd6 False user-operator has priority over logical not user-operator 2010-11-10 17:57:07 +00:00
Zoltan Varga f75c08f2cf When single stepping from a exception throw site, single step to the catch site. Fixes #652590. 2010-11-10 18:24:39 +01:00
Andrew Jorgensen c308b2128b Remove compat-4.0 dir (nothing there anymore) 2010-11-10 10:18:04 -07:00
Jérémie Laval 0e22ba327d Simplify Parallel.For execution.
This commit remove the stealing path until a better solution for it is devised.
2010-11-10 16:32:28 +00:00
Zoltan Varga d1e798502f Allocate MonoInternalThread/MonoThread objects using mono_gc_alloc_pinned () when using sgen, since they will be pinned anyway. 2010-11-10 14:43:50 +01:00
Jérémie Laval fe0be24bea Final performance improvement on ReaderWriterLockSlim 2010-11-10 13:38:55 +00:00
Zoltan Varga a7aee37e52 Fix the --enable-shared=no build. 2010-11-10 13:55:36 +01:00
Zoltan Varga adb10f2ad9 Fix a warning. 2010-11-10 13:55:36 +01:00
Paolo Molaro 25002af4f6 Log profiler: fixed timeout heapshot mode and sorted heapshots.
* proflog.c: fixed heapshot timeout mode (setting the last time it was performed).
* decode.c: sort heap shot list according to the time sequence.
2010-11-10 10:50:54 +01:00
Paolo Molaro d1bf818a60 Log profiler: track thread names with the new profiler API. 2010-11-10 10:50:53 +01:00
Paolo Molaro 175ca9ba15 Set the name of some runtime threads.
* gc.c: set the name of the finalizer thread.
* threadpool.c: set the name of the threadpool worker threads.
2010-11-10 10:50:53 +01:00
Paolo Molaro 62dd77c10c Profiler: added new API for notification of thread names.
* profiler-private.h, profiler.c, profiler.h: users can now get a callback
when the name of a thread gets set when MONO_PROFILE_THREADS is enabled.
* threads.c: notify profilers about thread name changes.
2010-11-10 10:50:53 +01:00
Paolo Molaro 1ab70b5ea4 Log profiler: added support for GC handles tracking.
* proflog.c, proflog.h: added support for tracking GC handle creation
and destruction. Updated profiler version.
* decode.c: added support for GC handles in the GC report, including
backtraces.
2010-11-10 10:50:53 +01:00
Paolo Molaro 8fe4e8bdc0 Added profiler interface to track GC handles.
* profiler-private.h, profiler.c, profiler.h: new API to get notiffications
when GC handles are created or destroyed.
* gc.c: notify the profiler on GC handle creation/destruction.
2010-11-10 10:50:52 +01:00
Marek Safar b1abd92c2a Reorder logic in DMO type conversion 2010-11-10 09:05:44 +00:00
Marek Safar 7f078f05e3 Fixes a logic error in filtering out operators like methods 2010-11-10 09:05:43 +00:00
Marek Safar 2fcade7d5c Don't crash on liften null left/right shift 2010-11-10 09:05:43 +00:00
Marek Safar 57e7f36a44 Logical binary operarions with dynamic arguments have to be unfolded 2010-11-10 09:05:43 +00:00
Zoltan Varga 0682d4b4fd Add an AOT flag for aot images compiled with soft-debugging support, and avoid loading aot images without this flag when running with the soft debugger. 2010-11-10 09:25:33 +01:00
Ankit Jain ee5c9692cb [xbuild] Emit /platform: for *mcs
Emit /platform:foo for the *mcs. Based on patch from
technomage1972 <[email protected]> .
2010-11-10 10:59:18 +05:30
Geoff Norton e8c396cf57 [OSX] Prevent an invalid write to mono_lmf_addr
mono_set_lmf () calls *(mono_get_lmf_addr ()) = lmf, but
mono_get_lmf_addr could potentially point to the address we just
g_free'd.  Ensure that we clear the settings, before freeing the memory.
2010-11-09 23:46:58 -05:00
Geoff Norton 58396601cb [OSX] Disabled eglib tests build by default
On OSX our local system glib might be 32 or 64 bit, and we have
no simple way of testing wether it meeds the needs of the current
built, lets just disable tests by default for now
2010-11-09 23:46:58 -05:00
Alex Fort c68a4a0906 Add support for the CancelKeyPress event on Windows
Adds a call to the Win32 function SetConsoleCtrlHandler for Windows,
which adds the DoWindowsConsoleCancelEvent wrapper for
DoConsoleCancelEvent to the Ctrl-C handler when an event handler is
added, and removes the handler once all event handlers are removed.
2010-11-09 22:24:29 -05:00
Rodrigo Kumpera 726d23a523 Add test for transitive constraint validation. 2010-11-09 18:05:05 -02:00
Rodrigo Kumpera a8ab40d5d7 Fix banshee breakage with trunk.
* verify.c (mono_generic_param_is_constraint_compatible):
	Handle transitive constraints where one type can only satisfy
	the constraints required by means of the other types it's
	constainted to. For example:

	Bar<K> where K : IFace
	Foo<T, U> where T : U where U : IFace
		Bar<T>

	On the above example, T can only satisfy K constraint by means
	of the constraints that U has.
2010-11-09 18:05:05 -02:00
Zoltan Varga 150aa825d5 Fix the previous change. 2010-11-09 20:00:23 +01:00
Zoltan Varga 8e0d6b1111 Speed up Thread.ManagedThreadId. 2010-11-09 19:53:05 +01:00
Andreia Gaita 972005a311 [Xml] Only call Close on the base Writer if it hasn't been closed yet. Fixes #651647
The serialization classes provided by the SL toolkit
(System.Runtime.Serialization.dll) don't like having Close called more than
once, so it seems that they don't check their own state and we have to do it
to avoid making repeated Close calls.
2010-11-09 18:02:27 +00:00
Atsushi Eno 96bfef3d48 Add and/or altered a bunch of XamlXmlReader tests based on common reader tests.
Lots of tests are duplicate for the same XML inputs, so they are just removed.
2010-11-10 01:11:44 +09:00
Rodrigo Kumpera 586295c91d Fix handling of LastIndexOf and empty strings.
* String.cs (LastIndexOf): All all overloads to
	be compatible with MS with empty strings.

        * String.cs (LastIndexOfAny): Ditto.

	* StringTest.cs: Add tests for the above.

	Fixes #605340
2010-11-09 13:11:28 -02:00
Jérémie Laval 87f072d29c Remove CurrentLockState in ReaderWriterLockSlim and reuse ThreadLockState instance more often. 2010-11-09 14:57:14 +00:00
Jérémie Laval 1bd648c615 Use ulong to represent element hashes internally allowing full width 32bits hashes. Replace SpinLock+ManualResetEvent based bucket resize with a simpler reader-writer lock. Revert from two layers storage to a bare array storage for buckets temporarily as it causes a weird concurrency bug. 2010-11-09 14:57:14 +00:00
Jérémie Laval 5f71cbd7d6 Small condition fix in ReaderWriterLockSlim, avoid an extra loop pass. 2010-11-09 14:57:14 +00:00
Marek Habersack d5e6ca38d5 [wcf] AJAX GET requests work now.
HttpListenerManagerTable always looked up HttpListerManager instances using the full URI
while it should have disregarded the /operation?parameters part of the request in order
to match the service endpoint's base address.
2010-11-09 15:16:36 +01:00
Marek Safar d1c1958433 Import declaring type base type when walking up the tree 2010-11-09 11:33:02 +00:00
Atsushi Eno 984eea9774 Making XamlObjectReader tests for common basis to XamlXmlReader.
... as it turned out that their behaviors are almost the same.
2010-11-09 19:02:45 +09:00
Paolo Molaro b532e6cfb1 Log profiler: osx/win32 portability fixes. 2010-11-09 09:50:44 +01:00
Zoltan Varga 347312a440 Add a workaround for a failed assert in the amd64 EH code which happens when running under the soft debugger. 2010-11-09 09:27:25 +01:00
Zoltan Varga 1bf0502619 Fix the DISABLE_REFLECTION_EMIT build. Fixes #652188. 2010-11-09 08:53:40 +01:00
Zoltan Varga 816f10975c Tidy up the configure output a bit. 2010-11-09 08:53:40 +01:00
Zoltan Varga bc2c920306 Fix a warning. 2010-11-09 08:53:40 +01:00
Atsushi Eno 272a2cd18c Fix generic XamlTypeName output and GetType() to get some xml reader case working. 2010-11-09 15:41:01 +09:00
Marek Habersack 2f5f1984ec [asp.net] Don't instantiate the hash algorithm used to encrypt resource URLs on each request if it can be reused.
The algorithm instance is kept in a thread-local variable.
2010-11-09 02:15:11 +01:00
Marek Habersack be6b0eeb9b [asp.net] Optimize buffer reuse in HttpWriter.
When HttpWriter requests a byte buffer to send data to the output stream it now uses
a thread-local static buffer pre-allocated to at most 128KB (all threads' buffers should
not exceed 4MB). If a buffer exceeding the static buffer size is requested, a transient
one is allocated.
2010-11-09 01:40:59 +01:00
Marek Habersack 218262b92a [asp.net] A micro-optimization to not call String.Format too much in a loop. 2010-11-09 01:39:49 +01:00
Paolo Molaro 78b8d385fc Log profiler: disable zlib support on windows.
Someone on windows needs to look at this: it defines HAVE_ZLIB but
doesn't actually have it (missing zlib.h or not linking to -lz).
2010-11-08 21:02:46 +01:00
Zoltan Varga cdb7d98fc0 Revert "Avoid building the log profiler on windows, it has no libz."
This reverts commit 3d81ea258f.
2010-11-08 21:02:08 +01:00
Zoltan Varga 3d81ea258f Avoid building the log profiler on windows, it has no libz. 2010-11-08 21:01:22 +01:00
Rodrigo Kumpera 5d07d2934a Add regression test for ##595044 2010-11-08 17:40:25 -02:00
Rodrigo Kumpera 0d9fa0fd59 IL can't reference literal fields.
* verify.c (verifier_load_field): Fail if the
	field is literal.

	Fixes #595044
2010-11-08 17:40:25 -02:00
Marek Safar 1b0ef80b2f API compatibility work 2010-11-08 19:29:49 +00:00
Marek Safar 13760ac52b Emit correctly EndInvoke parameters attributes and names 2010-11-08 19:29:49 +00:00
Marek Safar 873ab79586 Fixed ambiguity for overload resolution between params and optional parameter of same type 2010-11-08 19:29:48 +00:00
Marek Safar ee6616c94e Clean up event expression assigning error reporting 2010-11-08 19:29:48 +00:00
Marek Safar 1c3c785592 New test 2010-11-08 19:29:47 +00:00
Marek Safar 4d1c0d945c [651547] Check definitely assigned struct this access correctly. 2010-11-08 19:29:47 +00:00
Marek Safar a1f9dbc5f6 Removed platform attributes 2010-11-08 19:29:47 +00:00
Marek Safar 9d179ba4a7 Report error duplicate only when expected error has been found 2010-11-08 19:29:46 +00:00
Marek Safar 2282e20cc1 Add missing default ctor call 2010-11-08 19:29:46 +00:00
Zoltan Varga c992c14413 Fix a typo in process_breakpoint_inner which doesn't break our tests for some reason. 2010-11-08 20:23:20 +01:00
Paolo Molaro a3f7f33f6b Log profiler: better object tracking.
* decode.c: the --track option can now take more than one object address to track.
Added the --find option to automatically track objects of a given size and/or
type name. When backtrace and heapshot information is present, we can now, for
example, find when and where all the byte[] arrays bigger than a certain size
have been created and which other heap objects reference them.
2010-11-08 20:03:38 +01:00
Paolo Molaro 3be51e2a0e Log profiler: more timer compatibility fixes. 2010-11-08 17:36:34 +01:00
Paolo Molaro 672f4a3fb2 Log profiler: track and display contended monitor wait times. 2010-11-08 17:36:33 +01:00
Paolo Molaro 618a1271e5 Log profiler: fill and display a few more data fields in the header. 2010-11-08 17:36:33 +01:00
Paolo Molaro 2700046738 More log profiler doc clarifications. 2010-11-08 17:36:33 +01:00
Rodrigo Kumpera bc21b3eafa Don't allow zero local var tokens.
* metadata-verify.c (is_valid_method_header): The local
	token cannot have a zero index.

	* metadata.c (mono_metadata_parse_mh_full): Fail if locals
	token index is zero.

	Fixes #651682
2010-11-08 13:32:09 -02:00
Zoltan Varga 0aa5299876 Transition ves_icall_get_frame_info () to use find_jit_info_ext (), remove the managed->native wrapper hacks. 2010-11-08 16:01:11 +01:00
Marek Habersack 1ed35b4740 [asp.net] Optimize memory usage a bit. String hashes are cached in thread-local storage. 2010-11-08 15:42:14 +01:00
Rodrigo Kumpera 9bb741408e Work with classes been loaded.
* metadata.c (do_mono_metadata_parse_type): It's possible
	that we're decoding a reference to a class that it's currently
	been loaded so byval_arg.type will be zero.
2010-11-08 12:40:01 -02:00
Rodrigo Kumpera 1a7a15a7c2 Fix FieldInfo::GetFieldFromHandle signature. 2010-11-08 12:40:00 -02:00
Paolo Molaro a8b78ff188 Fixed make dist for log profiler. 2010-11-08 14:45:22 +01:00
Paolo Molaro 158c0a4fd9 Emit object heap sizes for allocations and heap-shot in the log profiler. 2010-11-08 14:45:22 +01:00
Atsushi Eno 46fde0a06b Forgot to add a test xml. 2010-11-08 20:37:37 +09:00
Atsushi Eno 8e87c03a72 Fix positional parameter argument output location check.
MarkupExtension with multiple arguments are prohibited at top level.
2010-11-08 20:35:12 +09:00
Paolo Molaro d65e2eedb3 Added a check for a corner case of a stack walk during thread startup.
* mini-exceptions.c: sometimes an allocation happens at thread startup
where the data structures are not yet setup to allow stack walking.
If we request a stack trace there, we'd crash. To reproduce the crash
without this change, just run xsp with the log profiler with the nocalls
option.
2010-11-08 12:33:14 +01:00
Atsushi Eno 9bff0f7ab4 Fix attribute state management to handle x:Key inside MarkupExtension correctly.
Namely TypeExtension (it got working).
2010-11-08 20:22:09 +09:00
Paolo Molaro 5fc8a5719a More log profiler portability and warning fixes. 2010-11-08 11:23:30 +01:00
Paolo Molaro 38cb5187d3 Integrated the log profiler in the build, warning and portability fixes. 2010-11-08 11:23:30 +01:00
Paolo Molaro 6c06f55291 Log profiler: added copyright header and comments. 2010-11-08 11:23:30 +01:00
Paolo Molaro 7f93becb13 Ported log profiler to windows (untested) and OSX time factor fix. 2010-11-08 11:23:29 +01:00
Paolo Molaro f67923665f Documented the current version for the log profiler data format. 2010-11-08 11:23:29 +01:00
Zoltan Varga 68ab07d8df Make frames of type FRAME_TYPE_MANAGED_TO_NATIVE act as a marker, i.e. the caller should ignore them and unwind once more to get the last managed frame and its associated context. 2010-11-08 11:20:48 +01:00
Atsushi Eno a7458b3b37 Fix PositionalParameter serialization in collections.
Dictionary still needs another fix.
2010-11-08 17:46:38 +09:00
Atsushi Eno f84b250c5e Forgot to remove old internal stuff. 2010-11-08 16:51:32 +09:00
Atsushi Eno 4aeba5a662 Fixed member order in Dictionary key and item in XamlObjectReader.
This requires messy and complicated change and sort of illogical member ordering!
2010-11-08 16:41:43 +09:00
Zoltan Varga 7a467ce886 Fix llvm build with LLVM 2.8. 2010-11-08 08:04:22 +01:00
Mark Probst 3d84063923 Merge branch 'marksweep-evacuate' 2010-11-07 02:46:11 +01:00
Mark Probst 620491fbeb [sgen] Don't compile evacuation for parallel mark.
Parallel Mark doesn't yet support evacuation, so don't compile
it in.
2010-11-07 02:45:59 +01:00
Mark Probst 45a572c7f8 [sgen] User-settable evacuation threshold.
A MONO_GC_PARAMS option for setting the evacuation
threshold.
2010-11-07 02:45:59 +01:00
Mark Probst 6bb3054454 [sgen] Mark&Sweep evacuation.
When the occupancy for some block size falls below a certain
threshold the objects in that block size will be evacuated in
the next major collection, resulting in optimal occupancy.
2010-11-07 02:45:58 +01:00
Mark Probst dde29351d5 [sgen] Function for querying current collection generation.
This lets the major collector query whether the current collection
is a minor or a major one.
2010-11-07 02:45:58 +01:00
Mark Probst 7660facdde [sgen] Dump Mark&Sweep heap occupancy.
For each block size dump the occupancy to the heap-dump
file.
2010-11-07 02:45:57 +01:00
Mark Probst 73f1564d9d [sgen] Flush the binary protocol file when protocol is flushed. 2010-11-07 02:45:57 +01:00
Zoltan Varga 3d6867b8a5 Remove the s390 hacks from the EH code by decreasing the ip stored into ctx->ip by 1, as it is done on all other platforms. 2010-11-06 19:27:03 +01:00
Zoltan Varga 5fcd60cb2b Add another assert to the amd64 EH code. 2010-11-06 16:00:25 +01:00
Zoltan Varga 5828db2141 Add a few exceptions to the EH code to determine whenever they hold on all platforms in all cases. 2010-11-06 15:57:49 +01:00
Zoltan Varga 6a8f8293b6 Reorganize mono_handle_exception_internal ():
* Use mono_find_jit_info_ext ()
	* Avoid putting the main body of code inside two if's.
2010-11-06 15:16:25 +01:00
Zoltan Varga 78cab86f88 Rework an if () inside an #ifdef since it confuses emacs. 2010-11-06 10:14:14 +01:00
Zoltan Varga 8c49ed4d49 Fix encode/decode_sleb128 () on 64 bit systems. 2010-11-06 08:26:14 +01:00
Marek Safar c1e37c3871 Add *.xml to ignore list 2010-11-05 23:03:29 +00:00
Marek Safar d03341dbdd Merge branch 'marek' 2010-11-05 22:56:38 +00:00
Geoff Norton f647af4ec5 Implement the new logging profiler on OSX 2010-11-05 17:23:49 -04:00
Jb Evain 5c97b5844c Update Mono.Cecil from upstream 2010-11-05 21:59:16 +01:00
Atsushi Eno 1227d3d127 Dictionary key might be inappropriately serialized into an attribute. 2010-11-06 04:14:37 +09:00
Sebastien Pouliot e7b97d3d29 Add CookieParser to Moonlight's System.Net assembly
* moonlight_raw_System.Net.dll.sources: Add new CookieParser to the
build
2010-11-05 14:39:32 -04:00
Sebastien Pouliot 27c2fe35b0 Refactoring to ease fix cookie support in moonlight client stack
* System.Net/CookieParser.cs: Add more common/shared code
* System.Net/HttpWebResponse.cs: Move out CookieParser class and some
utility methods so they can be shared with Moonlight http client stack

* System.dll.sources:
* mobile_System.dll.sources:
* moonlight_shared_System.dll.sources:
	Add new CookieParser.cs to the build
2010-11-05 14:39:31 -04:00
Atsushi Eno e3ac503b2f Add support for ContentPropertyAttribute (e.g. Reference) in XamlXmlWriter. 2010-11-06 03:32:08 +09:00
Atsushi Eno 8bdc98daec Implement member pending at StartMember when it should be indeterminant. Lots of code cleanup. 2010-11-06 03:18:15 +09:00
Zoltan Varga d429e99ba1 Enlarge try-finally blocks preceeded by a Monitor.Enter () call to include the call itself, to avoid races inherent in such code. Fixes #651546. 2010-11-05 19:11:46 +01:00
Atsushi Eno 83d8b694f7 Add new XamlXmlWriter implementation. Marked some as NotWorking while removed a lot. 2010-11-06 02:11:17 +09:00
Atsushi Eno 3a2ac55105 MarkupExtension type xml names are omitted their "Extension" parts. 2010-11-06 02:10:18 +09:00
Atsushi Eno 77ff0df5c2 indent text xml. 2010-11-06 02:09:24 +09:00
U-monkeytimeline2\atsushi 119c076db1 A few refactoring for new XamlXmlWriter. Add tests for [ContentProperty]. 2010-11-06 00:50:51 +09:00
Paolo Molaro 6612c9b9fd First cut of the new log profiler and report generator.
This is the first preview version of the new log profiler.
It is not included in the build yet because it needs some
portability cleanups, see the top of proflog.c for compilation
instructions.
It currently works on Linux x86 (64 bit support may work but it
is untested).
The documentation is included in the log-profiler.txt file.
2010-11-05 16:40:18 +01:00
Zoltan Varga e9651677ae Fix DISABLE_REFLECTION_EMIT build. 2010-11-05 16:30:04 +01:00
Marek Safar 47e2203ea3 Better 843 error message 2010-11-05 15:01:38 +00:00
Marek Safar 80185a4ba2 Move 2.0 Monitor.Enter back out of the try block 2010-11-05 15:00:29 +00:00
Marek Safar 18fe51510d Only when importing nested types definition base type cannot be setup 2010-11-05 14:45:16 +00:00
Zoltan Varga da71d7b013 Get rid of gregs_from_ucontext (), use the normal UCONTEXT_REG_... macros instead. 2010-11-05 12:23:06 +01:00
Marek Habersack 69461167e7 [asp.net,routing] Fix for bug #651593. Don't match all-literal routes for URLs with excessive segments. 2010-11-05 11:36:49 +01:00
Marek Safar bf6d573cca Don't build obsolete Compat.ICSharpCode.SharpZipLib in 4.0 profile to avoid another version conflict 2010-11-05 09:59:57 +00:00
Zoltan Varga d9b81d69ce Unify stack walking functions:
* Rename mono_jit_walk_stack_from_ctx_in_thread to mono_walk_stack.
	  * Make the old stack walker use this one.
	  * Remove the old mono_walk_stack functions.
2010-11-05 09:55:21 +01:00
Zoltan Varga 91a8cbb014 Fix a bug introduced by the previous change to mono_jit_walk_stack_from_ctx_in_thread (). 2010-11-05 07:45:33 +01:00
Zoltan Varga 389dd714ae Fix crashes in the debugger stack walk code if a gshared method calls another using a managed-to-native translation. 2010-11-05 06:53:11 +01:00
Zoltan Varga 0df8863a69 Fix more gshared problems in the soft debugger. 2010-11-05 06:37:28 +01:00
Zoltan Varga b288c467f3 Fix gshared support in the soft debugger. Fixes #651251. 2010-11-05 05:20:54 +01:00
Carlos Alberto Cortez a55d4cde7d Add our new System.ServiceModel.Channel test files to the build.
* System.ServiceModel_test.dll.sources: Add
	MsmqTransportSecurityTest.cs,
	CustomPolicyConversionContext.cs,
	ConnectionOrientedTransportBindingElementTest.cs,
	and MsmqBindingElementBaseTest.cs to our test build.
2010-11-04 21:20:55 +01:00
Carlos Alberto Cortez 4ba9634043 Add IPolicyExportExtension tests for classes in System.ServiceModel.Channels.
* CustomPolicyConversionContext.cs: New file, containing a dummy
	child of PolicyConversionContext.
	* MsmqBindingElementBaseTest.cs: New test file.
	* ConnectionOrientedTransportBindingElementTest.cs: New test file.
	* HttpTransportBindingElementTest.cs: Add IPolicyExportExtension
	tests.
2010-11-04 21:20:54 +01:00
Carlos Alberto Cortez 1d6f9ec0cc Implement IPoliciExportExtension support for MsmqBindingElementBase.
* MsmqBindingElementBase.cs: Implement ExportPolicy.
2010-11-04 21:20:54 +01:00
Carlos Alberto Cortez 842e1ab9c5 Implement IPolicyExportExtension support for ConnectionOrientedTransportBindingElement.
* ConnectionOrientedTransportBindingElement.cs: Implement ExportPolicy.
2010-11-04 21:20:54 +01:00
Carlos Alberto Cortez 17b69cf278 Implement IPolicyExportExtension support for HttpTransportBindingElement.
* HttpTransportBindingElement.cs: Implement ExportPolicy.
2010-11-04 21:20:54 +01:00
Carlos Alberto Cortez 9566ef1777 Properly set the default values for MsmqTransportSecurity.
* MsmqTransportSecurity.cs: Use the proper default values for
	this class.
2010-11-04 21:20:53 +01:00
Carlos Alberto Cortez c2f7031954 Add MsmqTransportSecurityTest.cs to our test suite.
* MsmqTransportSecurityTest.cs: New test file.
2010-11-04 21:20:53 +01:00
Marek Habersack ff393a15e0 [asp.net] HttpContext.TimeoutReached - check whether timer != null before using it. 2010-11-05 00:35:56 +01:00
Marek Habersack c4b5cb7a86 [asp.net] Expire items must always check if the dequeued item is not null before using it. 2010-11-05 00:30:10 +01:00
Sebastien Pouliot 0e648f53f6 Move assignation earlier to ensure value is available for parameter checks
* FileStream.cs: Move anonymous assignation earlier so the value is
available when validation are made (and calls other methods)
2010-11-04 15:13:55 -04:00
Jonathan Pryor 4b60c1460d [mdoc-update] Explicitly order //Type children.
Unlike 03c231a585, this isn't needed for
'mdoc-validate', it's instead for "niceness" reasons.

For example, as with f6e4f65b, if we update docs generated by an older
version mdoc, we'll add a <TypeSignature/> for ILAsm.  However, the
added <TypeSignature/> is at the end of the file, nowhere near the
existing <TypeSignature/>s, which is...odd.  Not bad, per-se, but
"undesirable".

Thus, we order things for consistency during/after updates.
2010-11-04 15:23:33 -04:00
Marek Safar fbc0f47adc Allow liften null as a given number of bit positions for shift operator 2010-11-04 17:49:54 +00:00
Marek Safar e713418aa0 For some strange reason Console.Write(Line) allows null params formatter arguments 2010-11-04 17:49:53 +00:00
Jonathan Pryor 03c231a585 [mdoc] Explicitly order //Member children.
The problem is the intermixing of updating "old" documentation and
wanting the result to pass `mdoc validate`.

For example, mdoc-2.6 will only generate a <MemberSignature/> for C#,
while mdoc-2.8+ will generate two, one for C# and one for ILAsm.
Unfortunately, mdoc will _append_ the new <MemberSignature/> as the
_last_ child within <Member/>; result: 'mdoc validate' gives errors.

Oops.

Thus, we explicitly reorder //Member children so that the ordering
matches the order in monodoc-ecma.xsd.
2010-11-04 12:06:31 -04:00
Jérémie Laval e3e0486d54 ConcurrentDictionary performance improvements 2010-11-04 15:51:33 +00:00
Jérémie Laval 63ebd7b9d6 ReaderWriterLockSlim performance improvements 2010-11-04 15:51:33 +00:00
Jérémie Laval bf297d5546 ManualResetEventSlim performance improvements 2010-11-04 15:51:33 +00:00
Jérémie Laval 1068c0ee3e SpinLock performance improvements 2010-11-04 15:51:33 +00:00
Marek Safar c061169613 Fix SharpZipLib 4.0 profile version number to not overwrite non-4.0 version of same assembly in GAC 2010-11-04 15:36:49 +00:00
Geoff Norton 72156a2da9 [RUNTIME] Ensure that we initialize the cpu for every thread [Bug #650439]
It appears that on OSX the FPU settings on x86/amd64 are not inherited
to child threads of a process, leading to differences in precision between
the main thread and the sub thread.  We now call mono_arch_cpu_init
on every thread on every platform
2010-11-04 11:30:07 -04:00
Marek Safar 2615d87274 Add boxing for dynamic nullable conversion of coalescing operator 2010-11-04 14:57:46 +00:00
Marek Safar 0ebd360dd8 Reject inaccessible members based on declaring type in dynamic context 2010-11-04 14:57:45 +00:00
Marek Safar b50a97b65c Inflate also event backing field 2010-11-04 14:57:45 +00:00
Marek Safar bb3eee4ca5 Another missing full dynamic type equality check 2010-11-04 14:57:44 +00:00
Marek Habersack 515968a6f2 [asp.net] Part of fix for bug #649546. Better handling of nested UpdatePanels
Nested update panels don't ever output a script block in RenderChildren, they write to the passed
HtmlTextWriter instead.
2010-11-04 14:57:45 +01:00
Atsushi Eno 4f7f56a7a7 Move XamlType-generic PositionalParameter stuff from XamlObjectReader-specific source for writer support. 2010-11-04 16:49:44 +09:00
Rodrigo Kumpera 13585bc169 Handle incorrectly encoded types.
* metadata.c (do_mono_metadata_parse_type): Fail if
	a valuetype is encoded as MONO_TYPE_CLASS and vice-versa.
	This can't be done easily in the verifier since it requires
	resolving the destination type.

	Fixes #650936
2010-11-03 21:40:28 -02:00
Gonzalo Paniagua Javier b9e194af17 a5 2010-11-03 19:07:23 -04:00
Gonzalo Paniagua Javier bbb27444f1 a4 2010-11-03 19:05:30 -04:00
Gonzalo Paniagua Javier 3ed2932719 a3 2010-11-03 19:04:17 -04:00
Gonzalo Paniagua Javier c110be734c a2 2010-11-03 18:59:34 -04:00
Gonzalo Paniagua Javier c3ec9e6597 iii 2010-11-03 18:48:22 -04:00
Rodrigo Kumpera b8bdca9e16 Don't allow zero index token in signatures.
* metadata-verify.c (parse_type): Don't allow zero index type
	tokens.

	* metadata.c (mono_metadata_decode_row): Assert on negative
	indexes.

	Fixes #560359
2010-11-03 20:37:48 -02:00
Gonzalo Paniagua Javier fd4f48aec4 i 2010-11-03 18:05:33 -04:00
Gonzalo Paniagua Javier 20f1940f2c Last 2010-11-03 17:57:59 -04:00
Gonzalo Paniagua Javier 8c88b1da85 Test 5 2010-11-03 17:29:52 -04:00
Gonzalo Paniagua Javier b3e34f7c47 Last test 2010-11-03 16:58:36 -04:00
Gonzalo Paniagua Javier 63b6f2becf Test 3 2010-11-03 16:49:56 -04:00
Gonzalo Paniagua Javier 739189e9db Test 2 2010-11-03 16:45:24 -04:00
Gonzalo Paniagua Javier 57cce04631 TEST 2010-11-03 16:42:11 -04:00
Gonzalo Paniagua Javier fc51c16274 Avoid locking in WireupAutomaticEvents
Replace a big lock with a ReaderWriterLockSlim.
2010-11-03 16:29:05 -04:00
Jérémie Laval f46227866e Fixicate net_4_0_bootstrap build. 2010-11-03 20:27:14 +00:00
Jérémie Laval 0932636327 Add tiny bit of doc on ReaderWriterLockSlim. 2010-11-03 20:14:06 +00:00
Martin Baulig 31f7bc2fef Add mono_register_symfile_for_assembly() for bundles.
2010-11-03  Martin Baulig  <[email protected]>

	* mono-debug.c (mono_register_symfile_for_assembly): New method.
	This is used together with mono_register_bundled_assemblies() and
	mono_register_config_for_assembly() to support bundles.
2010-11-03 20:41:38 +01:00
Marek Habersack 355291ccc7 [asp.net] Use faster string comparison in caches in System.Web.Compilation 2010-11-03 20:35:51 +01:00
Rodrigo Kumpera 0d3c28c1a8 Init the right runtime version.
* pedump.c (verify_image_file): Finish initializing the
	runtime here since at this point we can safely query
	what version the supplied image requires.

	Fixes #650916
2010-11-03 17:43:05 -02:00
Sebastien Pouliot f136fb348b Fix condition so the new feature is available outside NET_2_1
* mcs/class/corlib/Mono.Security.X509/X509Store.cs:
* mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs:
	Replace INSIDE_CORLIB by !NET_2_1 so the new feature is
	available to mono/full framework but not where CspParameters
	(or file system, or key persistance) might not be possible
2010-11-03 15:19:59 -04:00
Zoltan Varga 579af2445d Fix encoding of large strings in the soft debugger api. Fixes #648832. 2010-11-03 19:16:41 +01:00
Jérémie Laval 90e64cabf9 Implement Partitioner.Create int and long overloads. Add corresponding unit tests. 2010-11-03 17:41:06 +00:00
Marek Safar 8ab52d2f6a Implement lock statement over generic type parameter 2010-11-03 16:50:19 +00:00
Marek Safar 29fcd8ff32 Issue a warning about re-assigned locked local variable 2010-11-03 15:53:12 +00:00
Marek Safar 1f23474174 Fixes NRE in pre-4.0 compilation 2010-11-03 13:10:36 +00:00
Marek Safar bd5cdbbddf Reset lock_taken before entering Monitor.Enter 2010-11-03 12:51:47 +00:00
Marek Safar a1745900a8 ExclusiveOr is not nullable bitwise boolean operator 2010-11-03 12:51:47 +00:00
Marek Safar 410f44d05b A candidate method can use dynamic in expanded form at non-first position 2010-11-03 12:51:47 +00:00
Jérémie Laval 9539c3e471 Add TaskExtensions class and Unwrap extension methods 2010-11-03 11:51:04 +00:00
Jérémie Laval 0d685c5ea8 Refactor Task.Wait and Task.WaitAny methods and add support for scheduler-less waiting.
A scheduler-less waiting is useful for instance in case Tasks are waited upon without having being started (like in some continuation chaining case).
2010-11-03 11:51:04 +00:00
Jérémie Laval 3e487ef9fe Set more state on TaskCompletionSource inner Task<T> 2010-11-03 11:51:04 +00:00
Paolo Molaro aa765be136 Introduced a GC heap walk API.
This API is currently only implemented for the sgen GC.
It can be used to iterate over all the managed objects in the heap
and it allows to also easily track object references.
2010-11-03 11:42:29 +01:00
Marek Safar dfbc41a9d3 typeof expression does not need unsafe context for pointer types 2010-11-03 10:34:06 +00:00
Marek Safar 704f42f6ba Pass checked context to compound member access setters 2010-11-03 10:34:06 +00:00
Zoltan Varga be4313457f Remove extra whitespace from a Makefile. 2010-11-03 07:31:18 +01:00
Marek Habersack 70f77d14ac Fix mixed newlines 2010-11-03 03:26:26 +01:00
Marek Habersack a9cb57cc13 [asp.net] Part of fix for bug #649546. A partial rewrite of the web/script resource handler.
* System.Web/System.Web.Handlers/AssemblyResourceLoader.cs: AssemblyResourceLoader/ScriptResourceHandler must
  always generate the same URL for every assembly+resource pair, or otherwise the browser would re-fetch
  the resource in situations where it is not desired (e.g. during an async request to the server to update
  a panel).
  The generated URLs are not encrypted using real encryption, just hashed.
  In addition, the handler code got modernized a bit.

* System.Web.Extensions/System.Web.UI/ScriptManager.cs: scriptStartupBlock is a 3.5+ thing

* System.Web.Extensions_1.0/Makefile: use the 1.0 Microsoft AJAX library for this compat assembly

* System.Web/System.Web.Util/MachineKeySectionUtils.cs: made GetValidationKey public
2010-11-03 03:21:02 +01:00
Marek Habersack 34537d734b [runtime] System.Web.Extensions must not be remapped to the current framework.
The reason for this is applications which still use Sys.Web.Ext 1.0* (note: 1.0 does NOT
mean the assembly is for the 1.x runtime - it's for 2.0). Remapping would cause 1.0* not
to be loaded, instead a 3.5 or 4.0 assembly would be fetched.
2010-11-03 03:21:02 +01:00
Zoltan Varga 24643f58d0 Remove obsolete mcs/configure script. Fixes #650806. 2010-11-03 02:17:00 +01:00
Sebastien Pouliot 39446cdff3 Fix bootstrapping issue wrt moonlight profile
* mcs/class/corlib/Mono.Security.X509/X509Store.cs:
* mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs:
	Add if !INSIDE_CORLIB around code that use CspParameters
	in order to allow compilation to work when bootstraping
	the moonlight profile
2010-11-02 19:26:22 -04:00
Pablo Ruiz Garcia 6276334d1b [API] X509 related enhacemnts to allow 1) associating keystore's private keys with their corresponding public certificates found at X509Stores, and 2) importing private keys to X509Stores along with certificates.
mcs/class/corlib/Mono.Security.X509/X509Store.cs:
mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs:
mcs/class/corlib/Mono.Security.X509/X509StoreManager.cs:
mcs/class/Mono.Security/Mono.Security.X509/X509StoreManager.cs:
	Modified MSX.X509Store to allow importing privateKeys along certificates (by using RSACryptoServiceProvider and KeyPairPersister).
	Fixed X509Store to use certificate's hash as CspParameters.KeyContainerName.

mcs/tools/security/certmgr.cs:
	Added a new -importKey action to certmgr, which allows importing a PKCS12 contained key into our KeyPair store.
	Added a more (verbose) output to certmgr's -list action.

man/certmgr.1:
	Updated certmgr man page ti reflect -importKey addition.

mcs/class/corlib/System.Security.Cryptography/CspParameters.cs:
mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs:
	Implemented RSACryptoServiceProvider.CspKeyContainerInfo getter
	RSACryptoServiceProvider will not take into account CspParameterFlags.UseExistingKey by throwing a CryptographicException if keyset identified by KeyContainerName does not exists.
2010-11-02 19:26:22 -04:00
Gonzalo Paniagua Javier fbba364ce6 Revert change in FromBinary 2010-11-02 18:57:33 -04:00
Andrew Jorgensen 11a6cf6d42 Map libcups for mac
Fixes bnc#649994
2010-11-02 15:02:41 -06:00
Gonzalo Paniagua Javier 356497b1dc Renaming a dangling symlink works now
Ditto.

	Fixes bug #650779.
2010-11-02 14:50:03 -04:00
Atsushi Eno 4559e7636f Extracted PrefixLookup to another file. Add more XamlTypeName.ToString() tests. 2010-11-03 02:31:28 +09:00
Marek Safar 846609d3e8 Emit lock statement using Monitor.Enter (object, ref bool) when available 2010-11-02 15:21:46 +00:00
Atsushi Eno 0de0024076 Move around some members (to correct/appropriate places) for isolated xaml writer implementation. 2010-11-02 22:39:34 +09:00
Marek Safar cefe597544 Updated to r54115 2010-11-02 13:33:59 +00:00
Marek Safar 19d94dd762 Implements indirect delegates invocation via dynamic member dispatch 2010-11-02 12:45:51 +00:00
Marek Safar 892abc6f3d Pass value type dynamic members as by-ref to persist member side effects 2010-11-02 12:45:51 +00:00
Jérémie Laval 4a059f12d4 Use Task helper methods in TaskCompletionSource instead of manual setting, allow continuation flow to happen smoothly and task status to be set accordingly. 2010-11-02 11:57:01 +00:00
Marek Habersack 06cdf56198 [asp.net] 4.0-only types don't need the NET_4_0 ifdef and should be in net_4_0_System.Web.dll.sources 2010-11-02 11:30:26 +01:00
Zoltan Varga 739dc3eee9 Fix the text of the Signatures size stat. 2010-11-02 00:33:32 +01:00
Zoltan Varga 545f445662 Add a stat for the memory occupied by MonoMethodSignature structures. 2010-11-02 00:32:28 +01:00
Zoltan Varga a9e2628014 Add a stat for the the memory occupied by MonoMethod structures. 2010-11-02 00:27:55 +01:00
Zoltan Varga 329f86d220 Print double stats with more precision. 2010-11-02 00:27:54 +01:00
Zoltan Varga ccacc0e999 Include JIT time in --stats output. 2010-11-02 00:27:54 +01:00
Gonzalo Paniagua Javier e71a9ba492 Avoid killing the thread if socket already null
In some weird cases socket is null when we try to close it.
2010-11-01 18:54:14 -04:00
Marek Safar 0ed510ff0c Convert dynamic assignment in checked context when set 2010-11-01 13:26:34 +00:00
Marek Safar 7cec033f70 Check for unfixed type arguments before calling overload resolution for inferred return type 2010-11-01 13:26:33 +00:00
Marek Safar 66d8595f37 Set correct result type for chained folded enum subtraction 2010-11-01 11:41:26 +00:00
Marek Safar 7bd9ba94d6 Check binary header using right methods. 2010-11-01 11:41:26 +00:00
Zoltan Varga 7b3ac641bf Avoid adding generic classes during non-full AOT, since it leads to a huge code blowup. 2010-11-01 01:16:07 +01:00
Zoltan Varga 2509e3f624 Don't save xdebug info during AOT compilation. 2010-11-01 00:44:21 +01:00
Zoltan Varga 158658b540 Cache the array of classes in find_typespec_for_class (). 2010-11-01 00:44:20 +01:00
Zoltan Varga b79a319c25 Avoid asserts if a forced inline fails. Fix typos. Fixes #650407. 2010-11-01 00:44:20 +01:00
Gonzalo Paniagua Javier b353b9cc84 Check that the default from is not empty
This should fix a bunch of tests failing since MailAddress parsing was
	fixed.
2010-10-31 17:29:21 -04:00
Gonzalo Paniagua Javier 604d5faa0b More StringComparison.Ordinal
Use StringComparison.Ordinal when calling IndexOf to find the index of
	an ASCII string.
2010-10-31 17:23:18 -04:00
Gonzalo Paniagua Javier 0a99fc98e7 Use ordinal comparison when looking for "::"
This should fix 650355, but it might just hide the actual problem which
	seems to be related to loading CJK encodings data.
2010-10-31 17:23:17 -04:00
Nikolaos Georgiou 023a11ba6c Changed new method back to private, it was accidentally public. 2010-11-01 04:06:28 +08:00
Nikolaos Georgiou b8c064a01c Modified ResXResourceWriter so that the comment of ResXNode is not lost.
Added unit test.
2010-11-01 04:06:27 +08:00
Miguel de Icaza 1147a41ac7 Expose some of our internals to the Mono.Winforms assembly 2010-10-31 15:59:40 -04:00
Miguel de Icaza 0a25f1b2c0 Fix broken patch 2010-10-31 15:54:51 -04:00
Miguel de Icaza ff0446f219 Allow this file to expose its types as public if needed 2010-10-31 15:50:47 -04:00
Zoltan Varga 397024490c Disable inlining if the assembly has a DebuggableAttribute with the IsJITOptimizerDisabled flag set. Fixes #604486. 2010-10-31 10:26:57 +01:00
Brian Luczkiewicz 1150dee5cc Enable --aot (but not --aot=full) on osx/x86 2010-10-31 03:16:58 +01:00
Zoltan Varga 0b67580d66 Fix the amd64 dyn call code after the this passing changes. 2010-10-31 02:53:16 +01:00
Zoltan Varga 7f5005289b Call mono_field_get_type () in one place to fix an aot problem. 2010-10-31 02:36:50 +01:00
Zoltan Varga 0de8e13cf8 Return information from decode_method_ref () in a MethodRef structure instead of a bunch of arguments. 2010-10-31 02:36:08 +01:00
Zoltan Varga 856bf105d7 Fix the generation of GenericEqualityComparer () instances in AOT. 2010-10-31 02:57:01 +02:00
Zoltan Varga 1a99c2d0f4 Rework decoding of method references in the AOT runtime.
* Improve the hashing of methods to include generic arguments
	   * Get rid of can_method_ref_match_method (), use a 'target' argument
	     to decode_method_ref () instead.
	   * Bump corlib file format version.
2010-10-31 02:46:00 +02:00
Geoff Norton 64fb66ca3a Fix the build 2010-10-30 18:21:53 -04:00
Zoltan Varga be23648c92 Fix some copyright messages. 2010-10-30 21:23:45 +02:00
Koushik Dutta 5c63fcc96b Fix Android build. MINI_THREAD_VAR_OFFSET needs to be defined as MONO_THREAD_VAR_OFFSET (which returns -1). 2010-10-30 21:03:18 +02:00
Marek Habersack 552458f072 [asp.net] Fix for bug #650050. HtmlSelect must render non-standard attributes of every ListItem. 2010-10-30 03:36:10 +02:00
Alex Fort f056dfcbd9 Don't use a buffer size of 1 for zero-length buffers
Using a size of 1 for zero length buffers causes (on linux) the last character to be eaten by the buffer until the next flush.
2010-10-30 08:49:58 +08:00
Alex Fort 1605e82860 [Fix] Don't enforce a minimum size for zero-length buffers, fixing #645193
InitBuffer was forcing the length of any buffer smaller than 8 to be 8, but for zero-size buffers, this isn't correct.
2010-10-30 08:49:57 +08:00
Zoltan Varga 9c48c696c0 Int32.MinValue/-1 should throw OverflowException, not ArithmeticException. Our tests didn't catch this because the former is a subclass of the latter. Fixes #649889. 2010-10-30 01:04:49 +02:00
Zoltan Varga d8ad9f9133 Update the LLVM backend to latest LLVM SVN. 2010-10-30 00:41:42 +02:00
Geoff Norton b51eba0323 [OSX] Reintroduce Cocoa System.Drawing support
The old Cocoa backend for System.Drawing appears to still work.  You must
pass in a NSView.Handle while in the DrawRect method, or with lockFocus
called to prepare the NSGraphicsContext.
2010-10-29 15:46:26 -04:00
Marek Safar 4f39070a86 Fix line endings. 2010-10-29 19:23:47 +01:00
Marek Safar f212360d70 Merge branch 'marek' 2010-10-29 19:17:29 +01:00
Marek Safar 313bb63cc0 Make dynamic array access index expresions in checked context 2010-10-29 19:15:50 +01:00
Rodrigo Kumpera dccf4cc6e5 Handle lazy field loading.
* icall.c (ves_icall_MonoField_SetValueInternal): Handle
	lazy field loading. Fixes buildbot crash.
2010-10-29 15:51:04 -02:00
Rodrigo Kumpera c22f608491 Make GetGenericTypeDefinitionImpl not init the class.
* icall.c (ves_icall_Type_GetGenericTypeDefinition_impl):
	Don't mono_class_init the type. Fixes test-792.
2010-10-29 14:00:25 -02:00
Rodrigo Kumpera ab6ed140dc Replace an assert with a nicer check.
* icall.c (ves_icall_get_method_info): Use _checked variant
	and avoid the assert.
2010-10-29 13:26:28 -02:00
Rodrigo Kumpera 5692054959 Fix vtable check that broke banshee compilation.
* class.c (mono_class_check_vtable_constraints): Only
	fetch the class of generic arguments as those are the only
	ones we care about. This fixes the case where a generic
	arguments has its container as a constraint and we crash
	with a stackoverflow.
2010-10-29 13:15:28 -02:00
Andreia Gaita 5f78cb8870 [JsonWriter] Fix JsonWriter yet again. Behaviour of WriteRaw on .net and sl is
different, so ifdef to make everyone happy!
2010-10-29 16:03:57 +01:00
Marek Habersack 19e5207189 [asp.net] Fix for bug #649551. The LosFormatter (bool, string) constructor does not expect a base64-encoded string.
Telerik controls pass the string "string" as the macKeyModifier parameter to the constructor. Tests show that .NET
accepts such input without throwing an error. The passed string is now converted into a byte array and passed to
the LosFormatter (bool, byte[]) constructor.
2010-10-29 15:53:19 +02:00
Marek Habersack 67ad55bc49 [asp.net] Fix for bug #649034. Control.FindControl continues to search for controls above itself if it's a naming container.
When a control is a naming container and an attempt to find a control with non-segmented id (e.g. 'myControl') is made,
the search continues to the control's naming container if pathOffset is 0, that is we're at the start of the search.
2010-10-29 14:44:56 +02:00
Atsushi Eno 70c7392f53 Add tests for all types that are tested for XamlObjectReader (mostly NotWorking). 2010-10-29 20:46:37 +09:00
Marek Safar beb87ce1ea Ignore private methods in batch import 2010-10-29 11:56:05 +01:00
Atsushi Eno c10b6198ca Remove old code. 2010-10-29 19:31:22 +09:00
Atsushi Eno 30c4562e33 (Finally) replace old XamlObjectReader implementation with new one. 2010-10-29 19:23:05 +09:00
Atsushi Eno 4d2f56704e Added some notes on how we can use and/or test this XamlReader under .NET. 2010-10-29 19:16:22 +09:00
Atsushi Eno 9ec578b7e3 Make it strict to apply PositionalParameters to limit to only simple arguments.
Simple arguments can be written as "{foobar}" markup string within an attribute.
2010-10-29 19:07:45 +09:00
Atsushi Eno afb8a42303 More compliant ordering of GetAllMembers() results. ConstructorArguments and PositionalParameters go first. 2010-10-29 18:32:18 +09:00
Atsushi Eno c90699d047 GetAllMSeveral fixes regarding property readability and writability.
XamlMember.IsReadOnly returns false if there is private get accessor.
This is used to filter nonpublic accessors out, so replaced its usage with
!IsWritePublic to check truly read-only members.

This fix also required some changes in markup types (as IsReadOnly value now
differs).
2010-10-29 16:50:19 +09:00
Geoff Norton 4e7462b7a3 [OSX] Fix DriveInfo.GetDrives on OSX [Bug #643910]
Merge a patch from John Labovitz <[email protected]> which
correctly populates the DriveInfo structure on OSX instead of returning
random values.
2010-10-29 00:38:20 -04:00
Atsushi Eno 5a406fd3a3 Fix JsonWriterTest.WriteRaw() regression. WriteRaw() is (looking) almost identical to WriteString() here. 2010-10-29 13:30:35 +09:00
Marek Habersack 8cedb72187 [asp.net] Fix for bug #646505. BoundField must not assume the sender of the OnDataBindField is DataControlFieldCell. 2010-10-29 02:25:25 +02:00
Marek Habersack 51bf1e84a9 [asp.net] HttpRequest.MapPath changes to match .NET
When MapPath is passed a rooted, absolute path which is not in the current application's virtual
root, it should throw an exception. If the path is rooted and within the current application, it
will be mapped as if it was relative to the root.
2010-10-29 00:06:21 +02:00
Atsushi Eno 9f00ccba9e Introduce new XamlObjectReader implementation.
Nodes are iterated in XamlNodeIterator which is used by XamlObjectReader.
It collects namespace declarations as it does in the reading the objects.
The new code is somewhat better, with less "special" hardcoded rules.

It can be even compiled with .NET (with TypeExtensionMethods).
2010-10-29 05:58:20 +09:00
Atsushi Eno f1d77de5c8 Add GetItems tests for collection invoker. 2010-10-29 05:56:18 +09:00
Geoff Norton 42c08bab07 [OSX] Fix debug=casts on OSX (Bug: 639172)
mono --debug=casts requires fast tls access and the jit tls intrinsic.
We already had support for OP_TLS_GET on darwin/x86, but we did not
expose the "tls offset (pthread_key_t)" from mini to the intrinsic,
instead falling back on the io-layer keys.  We now store mono_lmf_addr
in a pthread_key for darwin/x86 so that we can do fast-tls in the jit
and fix this feature.  X86 only for now.

r: kumpera
2010-10-28 16:07:08 -04:00
Atsushi Eno e2268cbf02 Collected tested types into a new file. 2010-10-29 03:24:13 +09:00
Atsushi Eno 6ccc7c3dd8 Add empty List<int> case. 2010-10-29 03:03:25 +09:00
Andrew Jorgensen d470131bdb Move version to 2.9 (next to be 2.10) 2010-10-28 11:49:41 -06:00
Atsushi Eno ed055f6d6b Add more object reader tests with corner cases. 2010-10-29 01:40:10 +09:00
Atsushi Eno 7d698bc65e Fix XamlType.Name to take TypeArguments into consideration. 2010-10-29 01:38:52 +09:00
Atsushi Eno 54bab18c9a Use ArrayList like .NET (no practical changes). 2010-10-29 01:36:54 +09:00
Marek Safar d9a6b2c266 Fix emitted code for predefined or/and operation between bool? and bool 2010-10-28 16:42:55 +01:00
Rodrigo Kumpera 6e3b1178b5 Better handle failure when loading types.
* class.c (mono_class_create_from_typedef): If the type
	fails due to a problem with the parent make sure we have
	byval_arg and this_arg are setup properly as the whole
	runtime requires those two to be setup even for broken
	types.
2010-10-28 12:25:03 -02:00
Rodrigo Kumpera 40a4ce020d Kill some loader leaks.
* class.c (mono_class_create_from_typedef): Avoid a loader leak
	on parent load.

	* class.c (mono_method_signature_checked): Avoid a loader leak
	if type parsing fails.
2010-10-28 12:25:03 -02:00
Marek Habersack 244ae1ff20 [asp.net] Fix for bug #646479. Do not call control's OnLoad twice when it is dynamically added.
Control.AddedControl will call the new control's LoadRecursive which would trigger its OnLoad
handler. OnLoad must be called only if control hasn't already been loaded.
2010-10-28 15:59:18 +02:00
Marek Habersack 66eab5d08e [asp.net] Cosmetics + dead code removal 2010-10-28 15:16:41 +02:00
Marek Habersack 3639946555 [asp.net] Fix for bug #646810. Implemented FormsAuthentication.EnableFormsAUthentication + tests 2010-10-28 14:57:31 +02:00
Marek Safar e1bc810225 Add more type parameter checks for inherited constraints. 2010-10-28 13:44:32 +01:00
Marek Safar 24630e8743 New test. 2010-10-28 13:44:31 +01:00
Marek Safar 304f7d04b2 Implement type inference of dynamic arguments used as unknown types 2010-10-28 13:44:31 +01:00
Marek Safar b2b95ef137 Use correct location for unexpected type parameter 2010-10-28 13:44:30 +01:00
Atsushi Eno 0019f8a9ab Add another couple of MarkupExtension related tests. 2010-10-28 21:06:01 +09:00
Atsushi Eno 1e4ea0c7a3 Add more complicated PositionalParameters test (which actually does not use it). 2010-10-28 17:58:51 +09:00
Atsushi Eno a38b96f783 Remove extra DateTime handling and add some rules for PositionalParameters. 2010-10-28 17:57:38 +09:00
Geoff Norton 0502ed902d Fix the profiler thread start/end hooks for threadpool threads 2010-10-27 16:47:27 -04:00
Andreia Gaita ef80c566af [Xml] Fix GetAttribute to handle null namespaces properly, add unit test. 2010-10-27 19:33:56 +01:00
Rodrigo Kumpera b34c251a36 Only set lockTaken to TRUE if it did not timeout. 2010-10-27 14:29:17 -02:00
Rodrigo Kumpera 698600df43 Don't crash with bad signatures.
* reflection.c (mono_param_get_objects_internal): Use checked
	variant of mono_method_signature.
2010-10-27 14:28:17 -02:00
Atsushi Eno 4358b4fe71 Some internal refactoring for new XamlObjectReader implementation. 2010-10-27 22:58:29 +09:00
Rodrigo Kumpera 699882da11 Make MonoType::GetField lazier.
* icall.c (ves_icall_Type_GetField): Use
	code path that lazy load the field type.

	Fixes #649522
2010-10-27 11:04:40 -02:00
Rodrigo Kumpera 2b6bf5fe94 Change a g_warning into a mono_trace call.
* loader.c (mono_loader_set_error_assembly_load): Don't
	g_warning on failure. Use our tracing facility instead.
2010-10-27 11:04:40 -02:00
Marek Safar 7e31b3942f Reorder MethodBase::Attributes usage 2010-10-27 13:37:44 +01:00
Marek Safar 46e844f36f More tests 2010-10-27 13:37:44 +01:00
Marek Safar 630f551d7f [649448] Compare original goto block for cloned blocks. 2010-10-27 13:37:43 +01:00
Rodrigo Kumpera 0bc59aeab2 Load less stuff when resolving MethodInfo::Attributes.
* MonoMethod.cs: Add new icall for ::Attributes.

	* icall.c: New icall to resolve ::Attributes so it can
	avoid loading the signature and work around methods with
	broken signatures.

	Fixes #649527
2010-10-27 10:39:44 -02:00
Marek Habersack 30bbf985d2 [asp.net] Fix for bug #646984. Theme stylesheets must be output in correct order.
This patch changes the way we output theme stylesheets to match .NET behavior. Theme
.css files are sorted using an ordinal and case-insensitive comparer and are output
to the page at the top of the <head> element's contents instead of at the end.
2010-10-27 14:23:21 +02:00
Atsushi Eno c20fc380bc Add a few more default value tests. 2010-10-27 19:34:45 +09:00
Atsushi Eno da9c060963 Move member ordering code to LookupAllMembers(). 2010-10-27 19:33:53 +09:00
Marek Habersack d0b8416d37 [asp.net] Fix for bug #643847. Membership.CreateUser overloads must check username and password for correctness. 2010-10-27 11:56:41 +02:00
Marek Safar a48ae5445c [648360] When inflating nested generic type use same type arguments to not inflate already inflated type 2010-10-27 10:41:30 +01:00
Atsushi Eno a0211617fc Uncommend code that prohibits XamlMemberInvoker.GetValue() on XamlDirective. 2010-10-27 18:05:19 +09:00
Atsushi Eno f874f479be Fix wrong lookup base call. 2010-10-27 18:04:13 +09:00
Marek Habersack 4b528bc0ed [asp.net] Fix a build-breaking typo introduced in ea730c5de2 2010-10-27 10:53:37 +02:00
Marek Safar b1bdd5d48c Make the static field readonly 2010-10-27 09:52:25 +01:00
Marek Safar 38be62a8d3 Make static fields readonly 2010-10-27 09:50:24 +01:00
Marek Safar 708a0fece0 crlf fix 2010-10-27 09:50:07 +01:00
Marek Safar b74ec136d3 Revert unwanted changes 2010-10-27 08:40:44 +01:00
Marek Safar 7ef9d2c493 Check nested declaring types when testing member overrides 2010-10-27 08:40:43 +01:00
Marek Safar a6d9b644a7 Delay expensive inflator construction for type parameter constraints 2010-10-27 08:40:43 +01:00
Marek Habersack ea730c5de2 [asp.net] Fix for bug #648407. HttpCachePolicy must use the value passed to AppendCacheExtension when generating the Cache-Control header 2010-10-27 01:27:45 +02:00
Marek Habersack 8af1840778 [asp.net] Added encryption notes to ObjectStateFormatter.{Serialize,Deserialize} 2010-10-27 01:09:13 +02:00
Marek Habersack a763ff40a4 [asp.net] Fix for bug #648432. HttpResponse.WriteFile maps file path if it isn't an absolute one.
Both on Linux and on Windows file paths starting with x:\\, x:// and //server don't have their
paths mapped. On Linux it may have weird (and unexpected for a Windows developer) effects since
we cannot treat those names in any special way - the are valid Unix file names. On Windows things
will work as expected.
2010-10-27 00:57:34 +02:00
Rodrigo Kumpera 1533b39ccd Fix some counters under 32bits. 2010-10-26 18:53:28 -02:00
Rodrigo Kumpera e07d43896e Implemenent v4 Monitor::TryEnter overloads.
* Monitor.cs (TryEnter): Implement v4 overloads that take
	a "ref book lookTaken" var. Setting this flag must be done
	in the runtime to avoid async exceptions.

	* Monitor.cs (Enter): Fix v4 overload to be async exception
	safe.

	* monitor.c: New icall for the above.

	Fixes #649159
2010-10-26 18:53:28 -02:00
Sebastien Pouliot 7b3f524735 Add missing 'same-module' check for GetConstructorToken
* ModuleBuilder.cs: Add missing 'same-module' check for GetConstructorToken
just like methods and fields already have
2010-10-26 16:26:25 -04:00
Rodrigo Kumpera ba585b5454 Properly encode field signatures created using gtds.
* reflection.c (field_encode_signature): If the field
	was constructed with a GTD, encode it as an open instance.

	Fixes #649233
2010-10-26 16:07:18 -02:00
Rodrigo Kumpera 8a828011d0 Fix exception message 2010-10-26 14:20:10 -02:00
Rodrigo Kumpera 53522f1963 Check for declaring type.
* TypeBuilder.cs (GetField): Check if the declaring type
	matches the supplied type gtd.

	* TypeBuilderTest.cs: Add regression test.

	Fixes #649237
2010-10-26 14:17:33 -02:00
Atsushi Eno 69bf97bca7 XamlLanguage.Items is not correctly supported in XamlObjectReader. 2010-10-27 01:00:59 +09:00
Atsushi Eno c46d53afd0 Add Dictionary related tests. 2010-10-27 00:19:01 +09:00
Atsushi Eno 452a1df964 ItemType returns Value item for Dictionary type. 2010-10-27 00:17:37 +09:00
Rodrigo Kumpera 31147ee679 Avoid initing the class for some array related methods in Type.
* icall.c (ves_icall_MonoType_GetArrayRank): Don't
	mono_class_init the class as it's not needed.

	* icall.c (ves_icall_Type_make_array_type): Ditto.

	Fixes #648833
2010-10-26 13:16:29 -02:00
Rodrigo Kumpera d7f6eeea6a Add regression test for #649014 2010-10-26 12:58:26 -02:00
Rodrigo Kumpera e718d3c4dc Casts must be to realizable types.
* verify.c (do_cast): The casted to type must be a boxable type.

	Fixes #649014
2010-10-26 12:42:21 -02:00
Sebastien Pouliot e1cc1b33a5 Fix moonlight build since [s]mcs now depends on System.Diagnostics.Stopwatch
* moonlight_shared_System.dll.sources: Add Stopwatch to fix the build
2010-10-26 09:28:16 -04:00
Marek Habersack b538ab1129 [asp.net] Cosmetics to make code a bit more efficient 2010-10-26 13:36:00 +02:00
Marek Habersack 0e0e9a334b [asp.net] Fix for bug #648439. Do not prefix HttpRequest.ServerVariables ["QUERY_STRING"] with a '?' 2010-10-26 13:16:25 +02:00
Marek Habersack 94d7d01269 [asp.net] Fix for bug #649198. Implement MasterPage.InstantiateInContentPlaceHolder
Code based on patch from Rikard Johansson <[email protected]>, thanks!
2010-10-26 12:00:29 +02:00
Zoltan Varga 63465fe9e2 Mark tls_get with clob:c on arm. 2010-10-26 04:35:02 +02:00
Carlos Alberto Cortez 360a4af131 [fix] #647689: Fire the Mouse* events on ComboBox when using the child TextBox.
* ComboBox.cs: Fire the Mouse* events when using the child
	TextBox.
	Fixes #647689.
2010-10-25 22:32:56 +02:00
Carlos Alberto Cortez dd3f5813b0 [fix] #648449: When updating Z-order for our controls add the scrollbars as well.
* ListView.cs:  When updating the Z-order for our controls don't
	forget to add the implicit scrollbars we well.
	Fixes #648449.
2010-10-25 22:32:56 +02:00
Gonzalo Paniagua Javier 1735719902 Send Keep-Alive when reusing
Send Keep-Alive headers when reusing a connection and limit reuses to
	100.
2010-10-25 20:28:38 -04:00
Gonzalo Paniagua Javier d20e427694 Add connection timers and reuses
Use a timer to handle read timeouts and extend reuses to regular
	connections, not just chunked. The timer is set to 90s for the first
	request and 15s for subsequent requests.
2010-10-25 20:27:48 -04:00
Gonzalo Paniagua Javier d0c0ed0788 Implemente HttpListenerRequest.KeepAlive
Ditto.
2010-10-25 20:27:47 -04:00
Gonzalo Paniagua Javier 224001610d Use SocketAsyncEventArgs
BeginAccept/EndAccept replaced by AcceptAsync.
2010-10-25 20:27:47 -04:00
Marek Habersack 967d70e50b [asp.net,routing] Fix for bug #648901. Matching engine must ignore trailing slash in the URLs. 2010-10-26 02:00:21 +02:00
Marek Habersack 7244e38c9f [asp.net] HttpRuntime.AppDomainAppPath may be null during tests, check it before using. 2010-10-26 02:00:21 +02:00
Rodrigo Kumpera 1f5fc722bb Add regression test for #649017. 2010-10-25 19:47:45 -02:00
Rodrigo Kumpera 9e3af35518 Rename create_methodspec to create_open_instance. 2010-10-25 19:47:44 -02:00
Rodrigo Kumpera ca01c95ed7 Encode all gtd as open instantiations by default.
* ILGenerator.cs (TokenGenerator): GetToken now taken an extra
	argument create_open_instance if it should encode a gtd as
	a generic instance.

	* ILGenerator.cs (ILGenerator): Ask TokenGenerator to create
	an open instance under all cases but if the opcode is ldtoken.

	* ModuleBuilder.cs: Adjust to signature change.

	* DynamicMethod.cs: Ditto.

	* Environment.cs: Since an icall signature has changed, we
	must bump corlib version.

	* appdomain.c: Ditto.

	* icall.c: Pass the new value forward to
	mono_image_create_token.

	* reflection.c (mono_image_create_token): Handle create_methodspec
	for TypeBuilder and MonoType.

	Fixes #649017
2010-10-25 19:47:44 -02:00
Marek Safar abd9a33306 Keep only 1 Dispose implementation 2010-10-25 18:55:05 +01:00
Marek Safar a0d7b20774 Recover from invalid implicit lambda block 2010-10-25 18:55:04 +01:00
Marek Safar 7495adfbd9 Add more details to timing debugging 2010-10-25 18:55:04 +01:00
Marek Safar 11811e9de3 Warnings cleanup. 2010-10-25 18:55:04 +01:00
Marek Safar 573f37c118 Make setting a position out of the buffer size actually work 2010-10-25 18:55:03 +01:00
Latif Khalifa 4bd17ff18d Avoid nullref when clearing TextBox that has not yet been displayed 2010-10-26 01:33:55 +08:00
Pablo Ruiz Garcia 47a7aa40fd [API] Fix for bug: https://bugzilla.novell.com/show_bug.cgi?id=648888 2010-10-26 01:31:34 +08:00
Atsushi Eno 92a36f40c5 Improve namespace collector implementation to prepare for positional parameters. 2010-10-26 01:35:15 +09:00
Zoltan Varga 572c0d6f4f Add a test for #632224. Fix dtest-app.exe dependencies. 2010-10-25 18:08:51 +02:00
Zoltan Varga 53b58abc55 Disable catchpoints when the DISABLE_BREAKPOINTS flag is used during an invoke. Fixes #632224. 2010-10-25 18:08:10 +02:00
Atsushi Eno 33c42bac10 checkin forgotten files. 2010-10-25 22:34:42 +09:00
Atsushi Eno 0c883c719d Add PositionalParameters tests (NotWorking).
Before hacking StaticExtension support, we need it working.
2010-10-25 22:33:01 +09:00
Marek Habersack a7bfa6b633 [corlib] added a few missing Environment.SpecialFolder definitions to InternalGetFolderPath (4.0) 2010-10-25 13:25:39 +02:00
Marek Habersack 4662d97427 [asp.net] Better handling of application's AppDomain restart
* HttpRuntime.cs: disable filesystem watchers on appdomain shutdown and refuse to process
  requests while the current AppDomain is unloading
* HttpApplicationFactory.cs: if the current AppDomain is unloading, ignore FileSystemWatcher
  notifications
* WebConfigurationManager.cs: work around a deadlock issue when entering a ReaderWriterLockSlim
  upgradeable read lock very early during ASP.NET runtime/AppDomain initialization. Every few runs
  the attempt would lock up and since adding a section to cache is not a critical operation we can
  afford timing the lock out in this case. The lockup is probably due to the fact that RWLS is using
  thread local storage to store the current thread's lock status and it may happen that the TLS is
  not cleared during thread object finalization (see metadata/threads.c, the start_wrapper function)
2010-10-25 13:25:39 +02:00
Atsushi Eno abd9cbfd72 Refactoring namespace declaration output for getting .NET-like attribute output. 2010-10-25 20:19:24 +09:00
Atsushi Eno 2d6b132f64 Write some special names back when writing xaml to XmlWriter. 2010-10-25 17:57:58 +09:00
Atsushi Eno 86e2fc2faa Add a couple of writer tests (NotWorking) and fixed XamlServices to not omit xmldecl. 2010-10-25 16:17:53 +09:00
Gonzalo Paniagua Javier f4f515fd0e Throw exceptions here instead of in DeflateStream
To get the same stack trace as in bug #647948, we need to set the
	underlying DeflateStream to null and throw the ObjectDisposedException
	from this class. Same applies to the NotSupportedException.
2010-10-24 18:44:33 -04:00
Gonzalo Paniagua Javier bf7c6cfc35 BinaryWriter.BaseStream calls Flush()
Before returning the base stream, BinaryWriter.BaseStream calls Flush
	on it. Added test for this.

	Fixes bug #647948.
2010-10-24 18:43:18 -04:00
Zoltan Varga 7dd94584f4 Add tests for the eglib remapper. 2010-10-24 19:30:08 +02:00
Zoltan Varga fc3b6c4641 Add a g_hash_iter symbols to the eglib remapper. 2010-10-24 19:30:07 +02:00
Marek Safar d3a30b68f8 Add missing v3 language version 2010-10-24 16:58:05 +01:00
Marek Safar c37022a015 New test. 2010-10-24 16:58:05 +01:00
Zoltan Varga fd036a2b56 Extract the default profiler into its own file. 2010-10-23 23:41:56 +02:00
Zoltan Varga bf338e5a43 Use int 3 as G_BREAKPOINT on x86-64 too. Hopefully fixes #648838. 2010-10-23 20:38:12 +02:00
Zoltan Varga 8e755d3501 Fix another regression in the Array.Sort () methods, allow keys and items to be of different length. Fixes #648828. 2010-10-23 16:47:30 +02:00
Zoltan Varga 4c883ffdd5 Implement memory barriers for amd64/x86. Fixes #648831. 2010-10-23 16:30:31 +02:00
Michael Hutchinson fbd6abac72 [SDB] Add BeginConnect/EndConnect to VirtualMachineManager
Launch and Listen methods had async version but Connect did not.
2010-10-23 04:06:29 -04:00
Rodrigo Kumpera e8a3aabb67 MonoType::GetGenericArguments don't need to mono_class_init.
* icall.c (ves_icall_MonoType_GetGenericArguments): Don't
	mono_class_init here since it's not needed.

	Fixes #648725
2010-10-22 19:18:01 -02:00
Rodrigo Kumpera 8f1e86cc79 Checks the constructor declaring type.
* TypeBuilder.cs (GetConstructor): Check if the ctor
	declaring type is the right one and the same as type.

	* TypeBuilderTest.cs: Add regression test.

	Fixes #648391
2010-10-22 17:57:00 -02:00
Rodrigo Kumpera 3d8030db17 Correctly encode fields with GTD types.
* reflection.c (mono_image_get_generic_field_token): If
	the field type is a GTD, ensure its generic_container is
	properly initialized.

	Fixes #648616
2010-10-22 17:15:16 -02:00
Marek Safar 4473fcc20e Use faster MemberKind when checking for a nested type 2010-10-22 19:32:11 +01:00
Marek Safar b5b838910c Include parent type parameters when inflating nested type parameter constraint of type parameter type 2010-10-22 19:32:10 +01:00
Marek Safar dc31abbde1 Move nested declaration looup to TypeContainer 2010-10-22 19:32:10 +01:00
Marek Safar 552c72c039 Add dynamic conversion to coalescing operator 2010-10-22 19:32:09 +01:00
Gonzalo Paniagua Javier fe9a8c3328 Unbreak the world 2010-10-22 14:20:38 -04:00
Gonzalo Paniagua Javier 4a183ff5d6 Remove 'web' directory 2010-10-22 12:53:17 -04:00
Gonzalo Paniagua Javier f8c9c87512 Sniff, sniff
Remove the old (really) stuff to generate the website from makefiles.
2010-10-22 12:52:19 -04:00
Gonzalo Paniagua Javier 231527ee62 Update mappings after latest changes to Mono.Posix
New mappings created for the epoll code.
2010-10-22 12:48:39 -04:00
Zoltan Varga b50141c93a Emit GenericEqualityComparer<T> instances for each EqualityComparer<T> instance in AOT, the former is created dynamically by the latter. 2010-10-22 17:57:57 +02:00
Zoltan Varga 9972d8c661 Use locale_charset() from iconv which will use nl_langinfo (CODESET) anyways but it will
do canonicalization so we will get the correct charset name, because nl_langinfo (CODESET)
can return different things on different systems. This at least fixes OpenBSD.
2010-10-22 17:57:57 +02:00
Jb Evain 981dc2505e simplify code 2010-10-22 16:38:26 +02:00
Jb Evain a99236c085 update cecil.pc 2010-10-22 16:38:11 +02:00
Jb Evain b0f727733d delete unused file 2010-10-22 16:37:55 +02:00
Jérémie Laval adedfedd00 Use test-and-test-and-set pattern in LazyInitializer::EnsureInitialized 2010-10-22 15:16:49 +01:00
Jérémie Laval 252741661e Fix a dodgy ReaderWriterLockSlim unit test 2010-10-22 15:16:49 +01:00
Atsushi Eno 8cbb38d404 We can use ImportAllEndpoints(). 2010-10-22 19:07:46 +09:00
Atsushi Eno a536dadf89 It should not have to import all schema elements, but those only used by contracts. 2010-10-22 19:06:20 +09:00
Atsushi Eno 4ef5d6daee Small refactoring on enumerating message schema element contents. 2010-10-22 17:58:16 +09:00
Zoltan Varga 5189834841 Fix test compilation with older glibs. 2010-10-22 09:28:47 +02:00
Atsushi Eno 85cc330c95 Don't put KnownTypeAttributes on enums. 2010-10-22 16:23:24 +09:00
Atsushi Eno 2e7af0d301 Make generated type names unique. 2010-10-22 15:49:51 +09:00
Gonzalo Paniagua Javier 656b38c2e1 Update 2010-10-22 00:24:47 -04:00
Gonzalo Paniagua Javier 46ad959976 Update zlib to version 1.2.5 2010-10-22 00:13:41 -04:00
Gonzalo Paniagua Javier 827a231ffc Remove arbitrary 1024 limit in GetProcesses
Reallocate the array of PIDs if EnumProcesses used all of it and try
	again.
2010-10-22 00:01:38 -04:00
Zoltan Varga 5d586feb86 Implement GHashTable iterators. 2010-10-22 03:00:19 +02:00
Gonzalo Paniagua Javier 7a19bf766e FromBinary does not need ToLocalTime
When converting to DateTime from a long, we don't need ToLocalTime().
	Setting the kind to Local is enough.
	Patch from Mig.

	Fixes bug #648252.
2010-10-21 16:00:56 -04:00
Zoltan Varga 92d916315a Fix building the logging profiler. 2010-10-21 21:57:03 +02:00
Miguel de Icaza 0b4e9ab8b9 Document server option to --debugger-agent 2010-10-21 14:14:33 -04:00
Zoltan Varga c64d81020c Fix an assert in the LLVM backend if a long value was passed to 'localloc'. 2010-10-21 19:01:02 +02:00
Zoltan Varga e3e5cb8415 Fix the assembly/class caching problems in the threadpool code too. 2010-10-21 18:50:33 +02:00
Marek Safar bb1590431e Update issues list 2010-10-21 16:07:48 +01:00
Marek Safar 46dd735d7f Implement closest override return type matching 2010-10-21 16:07:48 +01:00
Marek Safar 30f3fd3434 Forget to re-add this test file 2010-10-21 16:07:47 +01:00
Zoltan Varga 06bc6b0951 Add an assert to mono_class_from_name_cached () to make sure it is only called for mscorlib. 2010-10-21 16:37:48 +02:00
Zoltan Varga ec2da4e688 Avoid caching stuff in socket-io.c in static variables, since the socket assembly can be unloaded, cache them in MonoDomain instead. 2010-10-21 16:15:54 +02:00
Atsushi Eno 76af53ecff OnEndXxx() methods should not try to let void return to a local variable. 2010-10-21 20:53:00 +09:00
Atsushi Eno 21ff33fad9 Since event arg type name can be EventArgs1, do not match by type name. Check rather base type instead. 2010-10-21 20:27:48 +09:00
Atsushi Eno dec04b58f3 Void event should not have Result of type void. 2010-10-21 19:44:20 +09:00
Atsushi Eno ea6de3e520 Make generated type names unique. 2010-10-21 19:06:56 +09:00
Atsushi Eno 2886a0e567 Async end operation needs cast. 2010-10-21 18:28:02 +09:00
Atsushi Eno f7578006e6 Remove ExtensionData from moonlight proxy. 2010-10-21 16:54:19 +09:00
Gonzalo Paniagua Javier ee7711138d Replace EnumProcesses with OpenProcess
namedmutex_prewait was (partially) listing the running processes and
	then searching through them. Now we use OpenProcess to verify the owner
	of the mutex is still alive.

	Fixes bug #648133 (note that you need MONO_ENABLE_SHM for this to work)
2010-10-21 02:45:13 -04:00
Gonzalo Paniagua Javier 1387a9a93b No need to use a GArray in EnumProcesses
Use the provided array instead of creating a new one and then copying
	it to the result.
2010-10-21 02:45:13 -04:00
Gonzalo Paniagua Javier 7035bbc0e1 Fix typo
element_size is not a boolean.
2010-10-21 02:45:12 -04:00
Atsushi Eno 52f59ff363 Add some WCF types in moonlight_raw System.Xml.Serialization.dll. 2010-10-21 15:32:39 +09:00
Atsushi Eno 184e1e67e5 Add #if NET_2_1 and SupportFaults member for Silverlight SlSvcUtil proxy. 2010-10-21 15:30:23 +09:00
Gonzalo Paniagua Javier fe282179e7 Fix the collision handling code
After the fix for bug #605092, inserting timers with an equal due time
	was failing because searching in the list was also using a reference
	comparison. Now, when adding a new timer, we search using just the due
	time.
	Fixes bug #648130.
2010-10-21 00:08:54 -04:00
Marek Habersack 8aa83da53e [asp.net] ObjectStateFormatter.{De}serialize methods taking stream use a magic value to mark the stream. 2010-10-21 01:21:53 +02:00
Jb Evain f07b755ebb Polish monodocer port to cecil-light 2010-10-20 18:57:50 +02:00
Jb Evain ea14f3389a Fix tuner build 2010-10-20 18:57:33 +02:00
Jb Evain a141215525 Pass the appropriate defines for the net_4_0 profile 2010-10-20 18:00:40 +02:00
Jb Evain 0930250788 Port Mono.Cecil.Mdb to cecil-light 2010-10-20 18:00:04 +02:00
Andrew Jorgensen 3d877ae977 README.tests was deleted in d9c8bdf 2010-10-20 09:55:18 -06:00
Jb Evain 64d93fd000 Fix navigation of all types 2010-10-20 17:28:13 +02:00
Marek Safar d9c8bdff9a Clean up test files 2010-10-20 16:23:40 +01:00
Marek Safar b122bf1db7 [601801] Fixes for parsing nant documentation
Gleb Golubitsky <[email protected]>
2010-10-20 16:23:39 +01:00
Marek Safar b6b8428bd6 Check for name conflicts between parent members and child block variables 2010-10-20 16:23:39 +01:00
Marek Safar fe4774bb26 [647845] Don't skip parent types when looking for simple name 2010-10-20 16:23:38 +01:00
Jb Evain 662858c552 Fix resolving of events and properties 2010-10-20 17:05:15 +02:00
Jb Evain 08f129513b Fix MONO_PATH 2010-10-20 17:04:59 +02:00
Marek Habersack aec7b258f4 [asp.net,wcf] WCF proxies are generated using a slightly different mode of operation.
WCF proxies don't include full namespace of the contract.
2010-10-20 16:07:21 +02:00
Tak c5f606408f [Fix] Ensure correct stack pointer initialization on !POSIX
* metadata/threads.c: Ensure correct stack pointer initialization on !POSIX.
This fixes some random crashes with embedded, release-optimized binaries on windows.

License: MIT/X11
2010-10-20 15:43:30 +02:00
Marek Habersack d4bb1c86b7 [wcf] make /js and /jsdebug dispatchers work.
There were several issues here:

- The IChannelDispatcherBoundListener was defined twice, in two different namespaces, and it caused code in
  ChannelDispatcher.Attach not to set its associated listener's ChannelDispatcher property to the correct value.
  This, in turn, caused incorrect HttpListenerManagerTable operation, where it would put the "/js" and "/jsdebug"
  dispatchers in separate HttpListenerManagers, instead of in the main (base) service's one.
- After fixing the above, it turned out that SvcHttpHandler selected the manager based on the host's base address,
  when it should first try to find one whose URL matches the current request exactly.
2010-10-20 15:04:37 +02:00
Atsushi Eno 34becbfa45 Forgot #if NET_4_0. 2010-10-20 19:23:02 +09:00
Atsushi Eno 78ffa62836 Add ExtendedProtectionPolicy members. Required by .config files by .NET svcutil. 2010-10-20 18:06:02 +09:00
Atsushi Eno fec3b9c50b ExtendedProtection Configuration types are also used in WCF 4.0. 2010-10-20 17:24:51 +09:00
Marek Safar 3e86b47fd4 More work on ambiguous named arguments 2010-10-20 09:11:00 +01:00
Marek Safar 9fa1aa9f49 More optional parameter VB compatibility fixes 2010-10-20 09:10:59 +01:00
Atsushi Eno 82f4a20b24 Add System.Security.Authentication.ExtendedProtection stubs, referenced by WCF 4.0. 2010-10-20 16:26:07 +09:00
Gonzalo Paniagua Javier a171f3314b Able to read MS serialized nullable<primitive>
Handle boxed primitive types for nullable fields.
	Fixes bug #646556.
2010-10-20 01:36:46 -04:00
Rodrigo Kumpera 97fc739b1c Implement better explicit override checks.
* metadata-verify.c: Add mono_verifier_verify_methodimpl_row.

	* metadata.c (mono_class_get_overrides_full): Call in the
	verifier.

	* verify.c: Add mono_verifier_is_signature_compatible that
	does propery signature variance checking.
2010-10-20 01:44:09 -02:00
Rodrigo Kumpera 5047694e44 Merge branch 'master' of github.com:mono/mono 2010-10-20 01:39:48 -02:00
Rodrigo Kumpera b8964c415e Proper recursive vtable checking.
* class.c: Pass around a list of currently been built vtables
	to really avoid going into loop.

	* reflection.c: Adjust to extra arguments.

	* object.c: Ditto.
2010-10-20 01:25:27 -02:00
Zoltan Varga 1a6d1fc225 Avoid trying to read the gc name in the AOT runtime from older AOT images. Fixes #647918. 2010-10-20 05:09:14 +02:00
Rodrigo Kumpera 0e5ba14997 Temporarily disable iface check o generic instances 2010-10-19 16:38:19 -02:00
Zoltan Varga abaa053ecd Remove the duplicate assembly name->string code from two places, uses mono_stringify_assembly_name (). 2010-10-19 16:02:27 +02:00
Rodrigo Kumpera 4ebfe2e4b0 Add regression test for #640780 2010-10-19 11:47:03 -02:00
Rodrigo Kumpera 98a6891b5b Don't assign vtable slots to static iface methods.
* reflection.c (ensure_runtime_vtable): When recalculating
	method slots, ignore static methods.

	Fixes #640780
2010-10-19 11:47:02 -02:00
Sebastien Pouliot e10979e53a Remove dead code from BigInteger since it confuse some people
* corlib/Mono.Math/BigInteger.cs:
* Mono.Security/Mono.Math/BigInteger.cs:
	Remove Montgomery internal inner class since it's buggy, has not
	been used for years and confuse some people (seeing ghosts of
	CVE-2007-5197)
2010-10-19 08:57:38 -04:00
Zoltan Varga b8ffa9466d Avoid crashes in the assembly name->string code if aname->name is NULL. 2010-10-19 14:55:20 +02:00
Tak 9007fbdcbe Don't disconnect an unconnected socket. Fixes #606809.
* Mono.Debugger.Soft/VirtualMachineManager.cs: Don't disconnect an unconnected socket. Fixes #606809.

This patch is licensed MIT/X11.
2010-10-19 14:45:49 +02:00
Atsushi Eno ae22368d81 Add complicated dictionary state and support dictionary in XamlObjectReader. 2010-10-19 21:38:38 +09:00
Zoltan Varga b52908b969 [Fix] Turn off exception callback filtering on WoW64.
* mini/exceptions-x86.c: Turn off exception callback filtering on WoW64. This allows managed exceptions to actually work when using 32bit mono on 64bit Windows.

License: MIT/X11
2010-10-19 14:34:32 +02:00
Tak 41a0f72c4e [Fix] Ensure that exceptions are propagated when embedding
* metadata/object.c:
* mini/mini.c:
Ensure that exceptions get propagated back to the caller
when mono is being embedded.
License: MIT/X11
2010-10-19 14:17:56 +02:00
Atsushi Eno 037f21dae7 Make XamlType.GetMember() and XamlType.GetAllMembers() consistent. Return Items for Dictionary. 2010-10-19 20:08:51 +09:00
Atsushi Eno 71e2a8fbc2 Add Dictionary reader test and made some fixes towards it. 2010-10-19 18:39:02 +09:00
Marek Safar 393237d148 Restore altered arguments when overload resolution ends up in dynamic dispatch 2010-10-19 09:31:31 +01:00
Marek Safar a039eb38a0 Pass modifier when used with named argument 2010-10-19 09:31:30 +01:00
Atsushi Eno c63a9d5546 Array takes ArrayExtension shape and thus won't reach here, so remove NIE. 2010-10-19 17:20:53 +09:00
Atsushi Eno d9441e55ab Implement FactoryMethod and Arguments support in XamlObjectWriter. 2010-10-19 17:15:13 +09:00
Atsushi Eno 1df29691de Handle x:* attributes and look for standard directives in XamlXmlReader. Factory method got working. 2010-10-19 16:36:55 +09:00
Rodrigo Kumpera 1d0cba2c7b Handle cyclic interface definitions.
* class.c (collect_implemented_interfaces_aux): Fail if
	any of the collected interfaces is broken.

	* class.c (mono_class_init): Don't bother initing if the
	class is broken. Don't assert on cycles, fail the type
	instead.

	Fixes #568025
2010-10-18 21:54:31 -02:00
Marek Habersack 2a6bc369a3 [asp.net] make sure the string we pass to DecryptAssemblyResource is a valid Base64 string 2010-10-18 23:17:12 +02:00
Jonathan Pryor 9f264b8748 Don't load app.config when we're processing app.config
Fixes #605033.

'cause stack overflow is back, mkay?

  at System.Diagnostics.TraceImpl.InitOnce () <0x0005b>
  at System.Diagnostics.TraceImpl.get_IndentLevel () <0x0000b>
  at System.Diagnostics.TraceListenerCollection.InitializeListener (System.Diagnostics.TraceListener) <0x0000f>
  at System.Diagnostics.TraceListenerCollection.Add (System.Diagnostics.TraceListener) <0x00017>
  at System.Diagnostics.TraceListenerCollection..ctor (bool) <0x0007f>
  at System.Diagnostics.TraceListenerCollection..ctor () <0x00013>
  at System.Diagnostics.DiagnosticsConfigurationHandler.GetSharedListeners (System.Collections.IDictionary) <0x00083>
  at System.Diagnostics.DiagnosticsConfigurationHandler.Create (object,object,System.Xml.XmlNode) <0x003cf>
  at System.Configuration.ConfigurationSection.GetRuntimeObject () <0x0033d>
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (string) <0x00041>
  at System.Configuration.ConfigurationManager.GetSection (string) <0x00030>
  at System.Configuration.ConfigurationSettings.GetConfig (string) <0x0000f>
  at System.Diagnostics.DiagnosticsConfiguration.get_Settings () <0x00043>
  at System.Diagnostics.TraceImpl.InitOnce () <0x0005b>

Thus, when we're getting the <sharedListeners/> element, we shouldn't call
the TraceListenerCollection default constructor, as that will attempt to add
the DefaultTraceListener (which isn't needed anyway, as the
DefaultTraceListener is explicitly added by TraceImplSettings).
2010-10-18 16:57:53 -04:00
Marek Habersack bc874337c2 [wcf] ServiceHost directive can span several lines. 2010-10-18 22:26:49 +02:00
Rodrigo Kumpera 1617d260cb Constructors signatures must be hasthis.
* verify.c (do_newobj): Check if the .ctor signature is
	hasthis. Even thou this is not a string 335 requirement
	our runtime asserts otherwise.

	Fixes #568004
2010-10-18 17:50:22 -02:00
Rodrigo Kumpera c8a1007ef5 Merge branch 'master' of github.com:mono/mono 2010-10-18 17:50:19 -02:00
Marek Habersack 3942f0720e [wcf] Don't close HTTP response prematurely.
Service is invoked in the context of the System.Web pipeline and closing the response before the final
output stream flush causes the generated response not to ever reach the client. This patch makes sure
the System.Web pipeline takes care of all the response housekeeping.
2010-10-18 20:55:22 +02:00
Rodrigo Kumpera bad3a468ec When creating the vtable of generic instances, check their arguments.
* class.c (mono_class_setup_vtable): Check generic instances
	using mono_class_check_vtable_constraints.

	* class (mono_class_check_vtable_constraints): A generic
	instance can't have a vtable if one of its generic arguments
	has a broken vtable. Otherwise we'll have a realized type
	that will go broken once one of its arguments gets initialized.

	* object.c (mono_class_create_runtime_vtable): Check generic
	instance arguments since creating the rumtime vtable doesn't
	require resolving the metadata one.

	Fixes #644915
2010-10-18 15:53:17 -02:00
Zoltan Varga 9adec0b88e Fix some warnings. 2010-10-18 19:49:58 +02:00
Atsushi Eno d0160a9fe1 StaticExtension also puts PositionalParameters (not sure why, but it's like TypeExtension). 2010-10-19 01:06:00 +09:00
Marek Safar 8a80ce7646 [512754] Overload resolution with named or optional arguments has to use closest member parameters 2010-10-18 16:40:27 +01:00
Marek Habersack 2bb017f21c [runtime] Fix for bug 646075. Added support for short version string in the <supportedRuntime> element
Starting from .NET 4.0, the <supportedRuntime/> 'version' attribute accepts a shorter
runtime version string - v4.0 - in addition to the previously accepted vX.Y.Z format.
2010-10-18 14:43:19 +02:00
Atsushi Eno 3169106f3a Enable working test (that was blocked just by XmlDocument API). 2010-10-18 21:06:03 +09:00
Atsushi Eno adf9e99a21 XmlDocument.InnerText is overriden to explicitly throw IOE in 4.0. 2010-10-18 21:04:02 +09:00
Atsushi Eno 74dfff7e80 Several fixes for types that include static members. 2010-10-18 18:23:16 +09:00
Atsushi Eno f3a90a355c Take TypeConverter into consideration in XamlObjectReader. 2010-10-18 16:39:31 +09:00
Atsushi Eno 0b4af104b8 XamlXmlWriter.WriteValue() accepts only string. 2010-10-18 16:20:52 +09:00
Zoltan Varga 257a08850a Avoid calling sem_post on a uninitialized semaphore during thread attach, it works under linux, but fails under *bsd. Fixes #647248. 2010-10-18 01:55:41 +02:00
Zoltan Varga aa53562093 Enable a more specialized version of the MONO_INST_FAULT removal optimization which is safe in the face of llvm optimizations. Flush stdout before dumping llvm methods since LLVM's outs () seems to use a different fd/stream. 2010-10-17 17:33:40 +02:00
Zoltan Varga 8884362975 Implement passing of this as the first argument for ia64 correctly. 2010-10-17 15:05:18 +02:00
Andreia Gaita 987ef9dbab [Json] Add support for calling external json (de)serialization methods
On Moonlight, ScriptObject types have custom (de)serialization methods that
need to be called whenever a user object includes properties of that type.
This patch creates a TypeMap subclass (ExternalTypeMap) and exposes a method
that can be called from moon's System.Windows.Browser to register custom
serialization and deserialization methods, keyed by type. These are called
whenever a property is found with a type (or base type) that has custom
methods registered.
2010-10-16 19:58:08 +01:00
Andreia Gaita ef2049a2b6 [Json] Fix decimal type serialization 2010-10-16 19:58:08 +01:00
Zoltan Varga 6ae4dc7406 Really fix the ia64 build. 2010-10-16 20:53:38 +02:00
Atsushi Eno 5152d56447 enable one more test. 2010-10-16 19:33:26 +09:00
Atsushi Eno f40383b06b For empty collection, do not put meaningless Items member and GetObject. 2010-10-16 19:28:28 +09:00
Atsushi Eno cc4b6fc49d Write null value as NullExtension regardless of its member type. 2010-10-16 19:06:48 +09:00
Zoltan Varga f4b0930ea8 Fix a warning. 2010-10-16 00:59:57 +02:00
Zoltan Varga aa09ed4f70 Fix a regression introduced by the assembly name parsing changes. 2010-10-15 22:22:02 +02:00
Zoltan Varga 23a734a10b Enable MONO_ARCH_HAVE_TLS_GET on arm platforms that support it. 2010-10-15 21:28:20 +02:00
Marek Safar 67a6907f33 [646997] Correctly emit platform ILOnly flag 2010-10-15 19:17:42 +01:00
Marek Safar cfd260225a Extension method argument cannot exercise numeric conversion 2010-10-15 18:14:09 +01:00
Marek Safar 496484305b Add more dynamic conversion restrictions 2010-10-15 17:32:33 +01:00
Zoltan Varga 8560b5d39f Add support for assembly names with embedded and starting spaces. 2010-10-15 18:22:17 +02:00
Zoltan Varga 26bb760238 Add support for assembly names with embedded and starting spaces. 2010-10-15 18:22:17 +02:00
Marek Safar 85bebe819e Don't be too verbose when building response files 2010-10-15 15:20:26 +01:00
Marek Safar aad016fd87 Clean up few more warnings 2010-10-15 15:20:25 +01:00
Marek Safar 894b26feca Warnings cleanup 2010-10-15 15:20:25 +01:00
Ankit Jain d6093401de [xbuild] Fix bug #646941. Add explicit System.Core for >=3.5 projects.
For projects targeting TargetFrameworkVersion >= 3.5, automatically
add a reference to System.Core . This can be controlled via two
properties:

 $(AddAdditionalExplicitAssemblyReferences) and
 $(AdditionalExplicitAssemblyReferences) .

This is used only for projects built with ToolsVersion=4.0 .
2010-10-15 18:49:13 +05:30
Ankit Jain 4b9311714b [xbuild] Set default TargetFrameworkVersion=4.0 for ToolsVersion=4.0 2010-10-15 18:48:20 +05:30
Frank Wilhelm 37329cdd7c Make Validate() less restrictive for contracts with explicit UriTemplate. 2010-10-15 19:41:33 +09:00
Marek Safar be75f24eec More tweaks to dynamic overload resolution 2010-10-15 11:18:35 +01:00
Marek Safar 6327b98a8c A conditional expression with either dynamic side is always of dynamic type 2010-10-15 11:18:35 +01:00
Marek Safar a179b0e10d Don't define same parameter more than once. 2010-10-15 11:18:34 +01:00
Zoltan Varga 5147c5c590 Fix LLVM backend build with latest LLVM SVN. 2010-10-15 11:22:25 +02:00
Zoltan Varga 61b281be10 Fix warnings by defining GNU_SOURCE in eglib's configure. 2010-10-15 11:21:26 +02:00
Atsushi Eno bc8a44b6c3 Remove wrong stack push of members. 2010-10-15 18:05:44 +09:00
Atsushi Eno 5076e0858e Differentiate Instance property and internal object stack to retrieve properties. 2010-10-15 17:50:00 +09:00
Zoltan Varga 23301c75f7 Fix ia64 build. 2010-10-15 10:27:20 +02:00
Atsushi Eno d8072b2060 Support ArrayExtension Items and GetObject node in XamlObjectReader. 2010-10-15 16:31:00 +09:00
Zoltan Varga 04d9dd844b Rename find_jit_info_no_ext to simply find_jit_info (). 2010-10-15 00:02:13 +02:00
Zoltan Varga 8112493a28 Get rid of the old mono_arch_find_jit_info functions + defines as all platforms support the new API now. 2010-10-15 00:02:12 +02:00
Zoltan Varga 3aeca7d7c7 Transition s390/mips/ia64 to use mono_arch_find_jit_info_ext. 2010-10-15 00:02:12 +02:00
Rodrigo Kumpera d2339157b0 Add tests for protected finally blocks. 2010-10-14 18:24:01 -03:00
Rodrigo Kumpera c9658fe44f Implement handle guard support for amd64.
* mini-amd64.c (mono_arch_install_handler_block_guard):
	Implement this is the same fashion as of x86.

	* tramp-amd64.c (mono_arch_create_handler_block_trampoline):
	Same as x86 just taking call conv into account.

	* mini-amd64.h: Enable guard support.
2010-10-14 17:59:59 -03:00
Gonzalo Paniagua Javier 3bc08c8e84 [ThreadPool] Clear the thread state
Clear the thread state after finishing a work item. We were only
	resetting the background state.
2010-10-14 16:49:10 -04:00
Zoltan Varga 5df1798685 Transition sparc to use mono_arch_find_jit_info_ext. 2010-10-14 22:38:12 +02:00
Zoltan Varga 12a3a084ab Fix crashes in the AOT compiler when the loaded LLVM module is used. Fixes #646314. 2010-10-14 22:19:08 +02:00
Zoltan Varga 13cc875a76 Add -g to eglib cflags. 2010-10-14 22:04:02 +02:00
Geoff Norton 52d3be5b30 Fix windows build 2010-10-14 16:00:53 -04:00
Zoltan Varga 0605b9e41f Update the IMT thunk creation code on sparc to support net 4.0. 2010-10-14 21:49:48 +02:00
Zoltan Varga 9e90ada9bc Avoid a crash in g_convert () if iconv_open () fails. 2010-10-14 21:49:48 +02:00
Atsushi Eno 75343153ae fixity fix. 2010-10-15 03:51:28 +09:00
Atsushi Eno 98d9cae751 Fix 2.1 build. 2010-10-15 03:36:40 +09:00
Atsushi Eno 7f16785b14 Enable SecurityBindingElement.CanBuildChannelListener implementation again with fix. 2010-10-15 02:48:24 +09:00
Geoff Norton 09ae7f243d [android] pthread_kill cannot be used safely on android
Android's fork() function does not properly update the
pthread_internal_t->threadid variable to point to the tid of the
fork()'d thread, and instead still points to the pid of zygote.
As a result we need to track the android tid's manually since
gettid() is sane, and use an alternate to pthread_kill on android
Additionally, disable sgen support on android until the same
work has been done there

r: kumpera, vargaz
2010-10-14 13:02:11 -04:00
Rodrigo Kumpera b638992e9b Make GTD an open type too.
* class.c (mono_class_is_open_constructed_type): Treat
	generic type definition as an open type too. All code that
	checks is_open does to make sure the generic instance is
	realizable.
2010-10-14 13:47:03 -03:00
Rodrigo Kumpera 000fab3262 Fix memory corruption in the cache cast wrappers.
* marshal.c (mono_marshal_get_castclass_with_cache):
	Use the right parameter for the cache.

	* marshal.c (mono_marshal_get_isinst_with_cache): Use
	the right parameter for the cache. In the negative case
	store the obj_vtable and not the cache address.
2010-10-14 13:47:03 -03:00
Atsushi Eno d1430afd5a The previous changes somehow regressed on olive samples, so give quick fixes. 2010-10-15 01:03:18 +09:00
Atsushi Eno 34e1278179 Implement NetTcpBinding.CanBuildChannelFactory/Listener and several related stuff.
SecurityTokenParameters.InitializeSecurityTokenRequirement() needs to become
protected internal, so changed all overrides as well.

Some implementation in WindowsStreamSecurityBindingElement is needed only for
NetTcpBinding implementation.

Had to disable a test in SymmetricSecurityBindingElement that depended on
OneWay support (which is not yet done).
2010-10-15 00:41:39 +09:00
Jb Evain 444243c522 Add pretty print support for null values in JsonObjects 2010-10-14 14:00:41 +02:00
Jb Evain 9112013354 Allow null values in JsonObjects 2010-10-14 13:58:03 +02:00
Atsushi Eno 1ee253f41b Fill NetTcpBinding security implementation a bit. 2010-10-14 19:40:48 +09:00
Marek Safar 2c810c3ed9 More conversion tweaks for dynamic in using statement 2010-10-14 10:52:02 +01:00
Marek Safar 59820ba2ac [646298] Compile multiple interface event declarators 2010-10-14 10:52:02 +01:00
Marek Safar b29264cddd Use 2 phase dynamic load only for compound operations 2010-10-14 10:52:01 +01:00
Ankit Jain b8c0561d2b [xbuild] Add ResolveAssemblyReferencesDependsOn .
Add GetFrameworkPaths and PrepareForBuild as dependencies for
the ResolveAssemblyReferences target. This is required when it is
invoked directly from MD.

Patch from Michael Hutchinson ([email protected]).
2010-10-14 14:52:41 +05:30
Atsushi Eno 858ceeebe0 Add SecurityDuplexSessionChannel, and making room for duplex channel, phase 2. 2010-10-14 17:47:29 +09:00
Atsushi Eno 54b0493b62 Eliminate IReplyChannel dependency in security support and make room for (TCP) duplex channel. 2010-10-14 16:31:41 +09:00
Gonzalo Paniagua Javier 3198658937 Misc. fixes
-Fix validation of display name and email.
	-Cache user, host and ToString() values.
	-Fix Equals and GetHashCode.

	Fixes bug 645871.
2010-10-13 17:18:09 -04:00
Rodrigo Kumpera 1770d9541b Open instantiation can have a GTD as parameter.
* verify.c (is_valid_generic_instantiation): If the
	generic instantiation is open, GTDs can appear in
	mutual types.
2010-10-13 16:50:14 -03:00
Rodrigo Kumpera 63e2e94d21 Generic instances can end up extending a GTD.
* verify.c (mono_verifier_verify_class): The generic instance
	over its parent generic arguments will end up extending a GTD.
	The check against not extending a GTD is only valid for not
	generic instance types.
2010-10-13 15:53:38 -03:00
Sebastien Pouliot e8de8115ad Remove outdated MonoTODO
* SocketAsyncEventArgs.cs: Remove TODO on SocketClientAccessPolicy
Protocol property
2010-10-13 13:03:40 -04:00
Marek Safar e31741d7fa New test 2010-10-13 15:57:14 +01:00
Marek Safar 31bdc45665 HasDynamicElement became available use it when building dynamic custom attributes 2010-10-13 15:57:13 +01:00
Marek Safar d63c2b624b [645992] When importing dynamic type arguments dynamic custom attribute flag has to be checked 2010-10-13 15:57:13 +01:00
Marek Safar 3b2b574dd3 Dynamic type is never better than other types in overload resolution 2010-10-13 15:57:12 +01:00
Jb Evain 9816af42ff Add support for hoisted variables in the ET interpreter
This fixes #645765.
2010-10-13 16:36:31 +02:00
Rolf Bjarne Kvinge 840feace6d The System.Net.Sockets.Socket type lives in both System.dll and System.Net.dll for moonlight 2010-10-13 10:49:44 +02:00
Ankit Jain 148ff89e73 [xbuild] Reset cache of built targets, on a new project build.
All targets that get built are tracked by the engine, to avoid
unnecessary builds of targets. This should be reset on engine.Build,
unless it is explicitly requested *not to* reset it, via BuildFlags.
2010-10-13 04:57:57 +05:30
Ankit Jain 010fd9b807 [xbuild] Reset ConsoleLogger when a build finishes.
MSBuild hosts like monodevelop, which use the same logger
for multiple builds, get errors/warnings from older builds.
So, reset them whenever the BuildFinished event is raised.

ILogger.Shutdown () is invoked when the host is about to quit,
according to msdn, so can't use that.
2010-10-13 04:57:57 +05:30
Jonathan Pryor ac277b3917 Add preliminary HTTPS handling support for Android.
The problem is that Android only exposes Java APIs for ~everything of
consequence, including/especially X509 Certificate validation.  Since
we want Mono-based HTTPS support to use the underlying platform
certificates, this requires some amount of Java-using glue.  However,
we don't want to pull in a ton of Java glue into System.dll (bleh!),
so we'll instead place the glue into Mono.Android.dll's
Android.Runtime.AndroidEnvironment.TrustEvaluateSsl(), and instead
create a delegate which will invoke TrustEvaluateSsl() when needed.
2010-10-12 17:47:53 -04:00
Gonzalo Paniagua Javier 936c28ad16 Handle special case when disposing a socket.
When disposing a socket that has more than one asynchronous read/write
	pending, one of the callbacks could call DisposeAllOnClose() while
	another one is waiting on the lock. Once the lock is acquired,
	queue.Count will be 0 and Dequeue would fail.
	This if fixed now.

	Fixes bug #645675.
2010-10-12 17:30:34 -04:00
Gonzalo Paniagua Javier 9f62005cd1 Updated notes on using get-monolite-latest 2010-10-12 15:25:04 -04:00
Jb Evain 30fb9a866e Fix parameterless Action case 2010-10-12 19:56:37 +02:00
Marek Safar 502c2e6631 More fixes for implicit conversions of nullable types with nullable arguments 2010-10-12 18:07:59 +01:00
Jb Evain 797b9b8282 [Fix] fix the ET interpreter to deal with user defined delegates.
The Expression Tree interpreter was previously limited to
	lambda expression for either an Action or a Func delegate.
	This fix removes this limitation. Fixes #645770.
2010-10-12 18:15:14 +02:00
Sebastien Pouliot 63535df6bd Adjust System.Web.Extensions[_1.0].dll.sources wrt MachineKeySectionUtils.cs move 2010-10-12 11:38:48 -04:00
Sebastien Pouliot 21d2c6aedb A few moves/changes following previous patch review
* Makefile: Compile tests with TEST defined (to include System.Web.Util.
MachineKeySectionUtils unit tests)
* System.Web.dll.sources: Move MachineKeySectionUtils.cs from System.
Web.Configuration_2.0 to System.Web.Util
* System.Web_test.dll.sources: Move MachineKeySectionUtilsTest.cs from
System.Web.Configuration_2.0 to System.Web.Util

* System.Web.Configuration_2.0/MachineKeySection.cs: Adjust using
clauses. Uncomment some code. Fix TripleDES versus 3DES for Validation
under NET_4_0. Remove 'private' on fields/methods.
* System.Web.Handlers/AssemblyResourceLoader.cs: Adjust using clauses
* System.Web.Security/MembershipHelper.cs: Adjust using clauses
* System.Web.Security/RolePrincipal.cs: Adjust using clauses
* System.Web.SessionState_2.0/SessionId.cs: Adjust using clauses
* System.Web.UI/LosFormatter.cs: Adjust using clauses.
* System.Web.Util/MachineKeySectionUtils.cs: Moved from System.Web.
Configuration_2.0. Rename namespace and remove 'internal' on type
declaration

* Test/System.Web.Util/MachineKeySectionUtilsTest.cs: Moved from Test/
System.Web.Configuration/MachineKeySectionTest.cs. Add test case for
TripleDES versus 3DES
2010-10-12 11:38:48 -04:00
Sebastien Pouliot a22389fde2 Normalization of cryptographic uses in asp.net
* System.Web.Configuration_2.0/MachineKeyRegistryStorage.cs:
Remove key length check and generic key generation.

* System.Web.Configuration_2.0/MachineKeySection.cs: Add support for 4.0
ValidationAlgorithm and the use of custom algorithms (validation and
decryption). Allow the use of any, valid, key length (based on the
algorithm). Let each algorithm creates its own key (e.g. special needs,
default length...)

* System.Web.Configuration_2.0/MachineKeySectionUtils.cs: Remove key
generation (from random) code and 192bits key length hack (won't work
with custom algorithms). Add support for new (4.0) algorithms, including
custom ones. Provide uniform/shared code to Encrypt/Decrypt, Sign/Verify
and EncryptSign/VerifyDecrypt using MachineKeySection data.

* System.Web.Configuration_2.0/MachineKeyValidation.cs: Add new (4.0)
values.

* System.Web.Configuration_2.0/MachineKeyValidationConverter.cs: Add
support for new (4.0) algorithms.

* System.Web.Handlers/AssemblyResourceLoader.cs: Use the new common
cryptographic code and base64 the encrypted data.

* System.Web.Security/FormsAuthentication.cs: Use the new common
cryptographic code and base64 the signed and/or encrypted data.

* System.Web.Security/MembershipHelper.cs: Use the new common
cryptographic code - this should be 100% compatible with existing data.

* System.Web.Security/RolePrincipal.cs: Use the new common cryptographic
code.

* System.Web.Security/SqliteMembershipProvider.cs: Adapt code for
internal API change.

* System.Web.UI/LosFormatter.cs: Adapt code for internal API change.
Fix some small behaviro changes wrt NET_4_0

* System.Web.UI/ObjectStateFormatter.cs: Use the new common cryptographic
code.

* System.Web.UI/Page.cs: Remove code that is now unneeded (with the new
common cryptogrraphic code).

* System.Web.Configuration_2.0/MachineKeyCompatibilityMode.cs: New.

* Test/System.Web.Configuration/MachineKeyValidationConverterTest.cs:
Add more, mostly 4.0, test cases.

* Test/System.Web.Security/FormsAuthenticationTest.cs: Add test case to
ensure HashPasswordForStoringInConfigFile is not case sensitive.

* Test/System.Web.UI/LosFormatterTest.cs: Add some rountrip test cases
with the different ctors
2010-10-12 11:38:47 -04:00
Paolo Molaro 96880dc3e7 Fixed the console sigint deadlock, by queuing execution in the finalizer thread.
* console-io.h, console-null.c, console-unix.c, console-win32.c,
gc.c: instead of executing tons of managed code in signal context,
we wake up the finalizer thread and any complex console-specific
code will be handled there. This can cause a (usually small) delay,
but it's much better than deadlocking.
2010-10-12 17:08:42 +02:00
Paolo Molaro d3985be4e4 Search for dllimported shared libs in the base directory, not cwd.
* loader.c: we don't search the current directory anymore for shared
libraries referenced in DllImport attributes, as it has a slight
security risk. We search in the same directory where the referencing
image was loaded from, instead. Fixes bug# 641915.
2010-10-12 15:57:34 +02:00
Marek Habersack 6a5b23824c [asp.net] HiddenFieldPageStatePersister must not attempt to deserialize an empty/null string 2010-10-12 15:33:19 +02:00
Zoltan Varga 78ff804e06 Load vtable->max_interface_id using LDIND_U2. 2010-10-12 15:01:39 +02:00
Zoltan Varga 6c5018fd88 Move the helper signatures along with their init function to method-to-ir.c. 2010-10-12 13:01:56 +02:00
Marek Safar 76701e14b7 Keep parsing after invalid contstructor declaration 2010-10-12 11:22:56 +01:00
Marek Safar 114aeec4b5 [645572] Import more type as possible dynamic types. 2010-10-12 11:22:56 +01:00
Marek Safar d2ba33592c Do not create a constant null value for runtime types. 2010-10-12 11:22:56 +01:00
Marek Safar a8e77cf3bd Report correct error message for compound lifted binary operations 2010-10-12 11:22:55 +01:00
Marek Safar 0151f09f01 Fold duplex conversion casts into a expression to emit single convert for expression trees 2010-10-12 11:22:55 +01:00
Rodrigo Kumpera 270ca2aa12 Fail the class if its method overloads are broken.
* class.c (mono_class_setup_vtable): Fail the class if
	we fail to load its overloads.

	Fixes #562156
2010-10-12 01:23:20 -03:00
Jonathan Pryor 9e2c5d2c14 Fix IsolatedStorageFile.GetUserStoreForApplication() for MOBILE.
IsolatedStorageFile.GetUserStoreForApplication() would previously throw an
IsolatedStorageException because no ApplicationIdentity was provided by the
AppDomain.

We would like to provide this method in a workable fashion to facilitate code
portability with Windows Phone 7, which exposes only this method for saving
files to stable storage.

Thus, skip the ApplicationIdentity and code identity checks for MOBILE
(MonoDroid, MonoTouch) so that IsolatedStorage Just Works.
2010-10-11 22:30:50 -04:00
Rodrigo Kumpera ee2edbad34 Add regression test for #562150 2010-10-11 17:02:54 -03:00
Rodrigo Kumpera f6097ae7b2 Check if parent is a valid type.
* verify.c (mono_verifier_verify_class): Don't allow parent to
	be a GTD.

	Fixes #562150
2010-10-11 17:00:59 -03:00
Rodrigo Kumpera 70b37a738b Move IL verifier test to the right folder. 2010-10-11 16:19:56 -03:00
Rodrigo Kumpera f14f021c03 Add regression test for #562771 2010-10-11 16:19:04 -03:00
Rodrigo Kumpera ed4fd3983a Don't allow a GTD to be used as a generic argument.
* verify.c (is_valid_generic_instantiation): A GTD cannot
	be used as generic argument. Check for those conditions
	even if the argument has no constraints.

	Fixes #562771
2010-10-11 16:07:36 -03:00
Rodrigo Kumpera 53419ebdc8 Handle dynamic methods as managed.
* mini-exceptions.c (mono_find_jit_info): Treat
	dynamic method wrappers as managed methods.

	* DynamicMethodTest.cs: Add test for GetCurrentMethod.

	Fixes #640702
2010-10-11 14:12:32 -03:00
Rodrigo Kumpera 498bd512d0 Add regression test for #644935 2010-10-11 13:43:53 -03:00
Rodrigo Kumpera 804ca36acf Check if generic constraint are valid generic instantiations.
* verify.c (verify_generic_parameters): If a generic constraint
	is a generic instance, it must respect the constraint of that
	type too.

	Fixes #644935
2010-10-11 13:43:53 -03:00
Marek Safar 6cb9d00591 Compound assignments over reference type array cannot use ldelema 2010-10-11 17:25:51 +01:00
Gonzalo Paniagua Javier e98d5e3345 Remove warnings 2010-10-11 11:28:14 -04:00
Zoltan Varga dd81a333f0 Set the wrapper info for the virtual stelemref wrappers to a non-NULL value. 2010-10-11 11:18:21 +02:00
Zoltan Varga 02527ead60 Fix full-aot support for the stelemref wrappers. 2010-10-11 11:15:06 +02:00
Ankit Jain fa501bf746 [xbuild] Log TaskFinished even when task fails to initialize. 2010-10-11 04:32:22 +05:30
Marek Safar 14902f25c9 [645232] Implement ITypeDefinition for internal types. 2010-10-10 17:14:44 +01:00
Atsushi Eno 0440378961 Add missing file. 2010-10-09 13:53:57 +09:00
Atsushi Eno eb0a82aa6c Add couple of (not-working) object reader testcases. Add some comments and commented code on XamlObjectReader. 2010-10-09 13:52:36 +09:00
Rodrigo Kumpera 742deba434 Add fast stelem.ref for interfaces too.
* marshal.c (mono_marshal_get_virtual_stelemref): Add a custom
	wrapper for interface casts.

	This was the most frequent array kind left without a fast
	stelem.ref wrapper. During testing the only easy target
	left was arrays of arrays, but those are so rare that
	won't make a different on any workload.
2010-10-08 22:17:05 -03:00
Rodrigo Kumpera 0c29256779 Implement fast stelemref.
* class.c (mono_class_setup_vtable_general): Inject
	the array stelemref method on vectors of reference types.

	* class.c (mono_class_init): Properly handle the fact
	that arrays have different vtable sizes.

	* marshal.c (mono_marshal_get_virtual_stelemref): New
	function that returns a better tailored stelemref wrapper
	for a given array type.

	* method-to-ir.c (mono_method_to_ir): Emit a virtual
	call to the new faster stelemref wrapper.

	This schema uses 4 wrappers instead of one and puts
	it into the vtable of vectors of reference types.

	This change improves a synthetic benchmark of an
	equal mix of stores as compiling corlib by 25%.

	It improves pystones by 3-4%.
2010-10-08 22:17:04 -03:00
Sebastien Pouliot 08ce0295db Remove unneeded 'using' clauses 2010-10-08 16:09:20 -04:00
Sebastien Pouliot e46106929b Remove unneeded 'using' clauses 2010-10-08 16:09:20 -04:00
Sebastien Pouliot 3152346712 Fix ASP.NET HttpResponse not to depend on a (fixed) bug in UriBuilder
* System.Web/System.Web/HttpResponse.cs: Ensure '?' is not encoded as
%3F while redirecting (e.g. aspxerrorpath) since this can cause a loop.
i.e. not found leading to not found...

* System/System/Test/System/UriBuilderTest.cs: Add test to confirm the
right behavior of UriBuilder wrt how it was used by Mono's ASP.NET
2010-10-08 16:09:19 -04:00
Gonzalo Paniagua Javier 7912621a54 Buffer sizes
workingBlock should be the InputBlockSize and currentBlock the
	OutputBlockSize. Allocate currentBlock lazily.

	Test contributed by Bassam Tabbara.
	Fixes bug #644740.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier 8d29212331 [CryptoStream] Invalid enum in ctor
Throw on invalid enum value in the ctor.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier 1ffb522d65 Dispose calls FlushFinalBlock
Dispose calls FlushFinalBlock (even for Read mode) and this in turn
	calls either FlushFinalBlock or Flush on the underlying stream.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier ed74f971db Fix Marshal.SizeOf() for structs with explicit layout
Marshal.SizeOf is now returning the expected values for explicit layout
	in 32 and 64 bits systems.

	Fixes bug #641535.
2010-10-08 15:25:37 -04:00
Marek Safar ad115a8a26 Don't assume the system.object does not have any fields 2010-10-08 18:37:08 +01:00
Marek Safar 0fe5c11b95 [642975] Fix initializer of partially static multidimensional arrays 2010-10-08 17:26:34 +01:00
Marek Safar 6e5cb792ae [644673] Import of modules got broken 2010-10-08 17:26:34 +01:00
Gonzalo Paniagua Javier bd93ca6a5a Undo mach_dep change. 2010-10-08 11:55:51 -04:00
Jb Evain 0306c04736 Port mdoc to cecil-light 2010-10-08 16:55:31 +02:00
Marek Safar 3f2b01468b Allow imported members cache to be setup in 2 phases as compiled one is to deal with generics recursions 2010-10-08 15:48:18 +01:00
Gonzalo Paniagua Javier 5c4cdd9c3e Allow -jX when compiling libgc
Add mach_dep.c to the sources.
	Fixes bug #644933.
	Thanks to Mathias Ruediger.
2010-10-08 10:39:21 -04:00
Jb Evain 27eba6825c Add support generic arguments in ModuleBuilder.Resolve*Token icalls
For ResolveTypeToken, ResolveFieldToken and ResolveMethodToken,
	resolve definitions directly and try to instantiate only types
	that can be instantiated, such as MemberRef, MethodSpec and TypeSpec.
	Also validate the memberref token type for ResolveField and
	ResolveMethod when passing them a MemberRef token.
2010-10-08 14:22:04 +02:00
Jb Evain 5e1c4a34d2 Add tests for ModuleBuilder.ResolveMember on different kind of tokens 2010-10-08 14:22:04 +02:00
Zoltan Varga c919b7fa72 Fix a warning. 2010-10-08 11:47:37 +02:00
Atsushi Eno 0e7a3971a3 Do not reject contract from the same method, could happen by a type with multiple service contracts within the typie hierarchy.
For details, see: http://lists.ximian.com/pipermail/mono-devel-list/2010-September/035940.html
2010-10-08 15:55:12 +09:00
Kornél Pál 714812b6e5 [asp.net] Fix for bug #643763. BuildManager must not fail with BuildProviders lacking the BuildProviderAppliesTo attribute. 2010-10-08 08:41:39 +02:00
Gonzalo Paniagua Javier 97704e7322 Add support for EnableSsl in smtp config.
Ditto.
	Fixes bug #644816.
2010-10-08 00:40:18 -04:00
Zoltan Varga 0d283b6640 Fix the sparc build. 2010-10-08 05:16:01 +02:00
Rolf Bjarne Kvinge 7887b9511f eglib: Make g_malloc and friends abort in case of failure (like glib does)
* eglib/src/glib.h:
* eglib/src/gmem.c: Make g_malloc and friends abort in case of failure, like
  glib does.

* eglib/src/eglib-remap.h: Remap all allocation functions.
2010-10-07 23:16:33 +02:00
Rodrigo Kumpera 99f28ef920 Implement managed versions of the caching icalls.
* marshal.c: Add mono_marshal_get_isinst_with_cache
	and mono_marshal_get_castclass_with_cache.

        * marshal.h: Export those 2 new functions.

        * method-to-ir.c: Call those functions instead of their
        icall versions. This speeds up non gshared cases by up to 3x
        and gshared by up to 2x.

        Those wrappers are not inlined since the register allocator
        doesn't handle well so the minor speedup is not worth be
        significant bloat introduced.
2010-10-07 17:38:58 -03:00
Rodrigo Kumpera 96e48a63f6 Add gsharing support for cached casts.
* class-internals.h: Add new kind of rgctx slot.

	* method-to-ir.c (handle_castclass): Emit gsharing code
	for cast with caching.

	* method-to-ir.c (handle_isinst):

	* mini-generic-sharing.c: Implement MONO_RGCTX_INFO_CAST_CACHE
	slot type. It's a 2 word domain allocated memory block with the
	cache on the first word and the vtable on the second.

	This design does a single rgctx fetch instead of two. It's
	a bit faster and can potentialy save some slots.
2010-10-07 17:38:57 -03:00
Rodrigo Kumpera 5518da4d14 Add single entry cache to casts of types with variant generic arguments.
* jit-icall.c (mono_object_castclass_with_cache): Check
        single entry cache before calling mono_object_isinst.

        * jit-icall.c (mono_object_isinst_with_cache): Check
        single entry cache before calling mono_object_isinst.
        This uses a positive and negative cache as it is used
        for type queries quite often.

        * jit-icalls.h: Export new icalls.

        * mini.c (mini_init): Register new icalls.

        * method-to-ir.c: Call into cache aware version of type
        test ops for types with variant generic arguments.

        This patch replaces direct calls to mono_object_castclass
        mono_object_isisnt to functions that check a cache first.
        The cache is per managed code callsite so the hit ratio
        is very high.
2010-10-07 17:38:57 -03:00
Rodrigo Kumpera 21835debf9 Fast cast for some cases of generic variant types.
* method-to-ir.c: Casts to generic types with variant argument
	can use the regular fast path if all variant arguments are
	valuetypes.
2010-10-07 17:38:57 -03:00
Rodrigo Kumpera aa0c6fa806 Do the right check for arrays.
* marshal.c (mono_marshal_load_type_info): Properly check for
	array types.
2010-10-07 17:38:19 -03:00
Gonzalo Paniagua Javier 8fbfdf3790 Fix CryptoStream.Dispose
-Dispose will call TransformFinalBlock() for Read streams. Fixes bug #644648.
	-Dispose () will call Dispose (bool). Fixes bug #644654.
	-Stream.Close calls GC.SuppressFinalize(). Fixes bug #644660.
2010-10-07 14:59:52 -04:00
Marek Safar 28e9fa14f3 Fix compound event assigments with dynamic side effect 2010-10-07 19:15:52 +01:00
Jb Evain f0e9b848d8 Add tests for ModuleBuilder.ResolveMemberToken 2010-10-07 20:03:12 +02:00
Jb Evain b2c91487a7 Fix resolution of memberref tokens in the dynamic case.
mono_metadata_memberref_is_method: rename to mono_memberref_is_method
	and deal with the case where the assembly is dynamic. This prevents
	a runtime crash when calling ModuleBuilder.ResolveMemberToken with
	a MemberRef token pointing to a field.
2010-10-07 20:03:11 +02:00
Zoltan Varga 935c00d792 Add --debug=casts support for ArrayTypeMismatchException's. 2010-10-07 19:22:07 +02:00
Zoltan Varga 25d8493f58 Centralize the setting of cfg->exception_type and the branching to load_error to ease debugging. 2010-10-07 19:11:38 +02:00
Geoff Norton e1079b5e14 Expose ICredentialsByHost on NetworkCredential in the MOBILE profiles 2010-10-07 13:01:25 -04:00
Jb Evain 84ce102017 Fix test 2010-10-07 16:43:41 +02:00
Jb Evain 88a0e6946a [Test] Add test for ModuleBuilder.ResolveFieldToken on generic fields. 2010-10-07 16:40:40 +02:00
Jb Evain c4a000d3c0 [Fix] Properly compute the tokens for FieldBuilders.
mono_reflection_get_token: For FieldBuilders, now reuse the token
	computed when the FieldBuilder are instantiated, instead of
	re-creating them. This avoids registering field definitions
	as MemberRefs.
2010-10-07 16:40:39 +02:00
Jb Evain 9bf0d24072 [Fix] FieldBuilder.ctor: properly register FieldBuilder token.
We were previously relying on the runtime to register the token
	for FieldBuilders, but this has issues with fields on generics types
	as it would create a MemberRef token instead of a Field token.
2010-10-07 16:40:39 +02:00
Marek Safar d900315aeb [644507] Don't use nested type cache until declaring type is setup. 2010-10-07 15:28:04 +01:00
Atsushi Eno b0ffa90c3b Significant XamlObjectWriter rewrite for solid state transition. And now it supports Array(Extension) and other MarkupExtension types. 2010-10-07 22:43:10 +09:00
Zoltan Varga 38e92f5c27 Clear the domain before unloading assemblies in mono_domain_free (). 2010-10-07 15:28:01 +02:00
Zoltan Varga 2ebe9aa341 Fix more wrappers of dynamic methods. 2010-10-07 15:28:01 +02:00
Marek Safar ca9eb55850 Fix compound assigments with dynamic side effect 2010-10-07 13:45:30 +01:00
Zoltan Varga 27bc44578b Fix make test for corlib. 2010-10-07 13:50:34 +02:00
Zoltan Varga de97c0ec4d Re-enable the tests. 2010-10-07 13:50:21 +02:00
Zoltan Varga 990542583a Avoid clearing nursery fragments before pinning, instead place arrays at the start of each fragment which cover the whole fragment. 2010-10-07 13:43:07 +02:00
Zoltan Varga 4f80d74f0e Remove the MonoGenericContext/MonoMethod arguments from the get_this_arg () and get_unbox_trampoline () family of functions, they are no longer needed after the this parameter passing changes. 2010-10-07 12:01:24 +02:00
Gonzalo Paniagua Javier ef7aaf4ac5 Disabled test until ?mcs is fixed.
This test failed to compile (internal error). Large changes required in
	?mcs before this can be compiled.
2010-10-06 15:59:30 -04:00
Gonzalo Paniagua Javier 0240df3443 URL moved and use the raw format for certdata
The URL has been moved permanently. Use the raw format instead of
	downloading the HTML page.
2010-10-06 13:48:36 -04:00
Gonzalo Paniagua Javier ade7b804ad Avoid warning
_GNU_SOURCE was redefined
2010-10-06 11:31:08 -04:00
Gonzalo Paniagua Javier 4ea9676b39 Avoid a warning
Use MONO_TYPE_BOOLEAN instead of MONO_NATIVE_BOOLEAN. Same value,
	different enums.
2010-10-06 11:25:33 -04:00
Gonzalo Paniagua Javier 187319daef X509Chain always uses the LM store
X509Chain will now add the LM store certificates always, even when the
	CU store is selected.
2010-10-06 10:18:46 -04:00
Jb Evain c75fd9abb1 Port Mono.CodeContract to cecil-light 2010-10-06 15:37:49 +02:00
Jb Evain bc93359b36 Port corcompare to cecil-light 2010-10-06 14:38:31 +02:00
Marek Safar 4ef153d879 Fix CRLF 2010-10-06 12:09:57 +01:00
Marek Safar 9daa2e3f8c Verify type parameter constraints type parameters 2010-10-06 12:01:35 +01:00
Marek Safar d817185019 Verify type parameter constraints type parameters 2010-10-06 12:01:34 +01:00
Marek Safar 654dad1de8 Fixes allowed interface method modifiers 2010-10-06 12:01:32 +01:00
Atsushi Eno 1fb4fcf720 Add more complicated state transition to XamlXmlReader and now it can handle GetObject. 2010-10-06 19:31:02 +09:00
Atsushi Eno c3a2bb4011 Use MarkupExtension.ProvideValue() so that XamlObjectReader can return expected Result. Implement internal IXamlNameResolver for Reference resolution. 2010-10-06 16:31:18 +09:00
Atsushi Eno 595b58814f Add ContentProperty support in XamlXmlReader. Add some testcases. 2010-10-06 15:47:00 +09:00
Zoltan Varga f752b780c0 Fix a warning. 2010-10-06 01:05:37 +02:00
Marek Safar de1406f17a New test. 2010-10-05 21:07:25 +01:00
Marek Safar 315c26d779 Inflate imported nested type correctly. 2010-10-05 21:00:57 +01:00
Marek Safar 060cbffe80 Compare all type arguments for nested generic types. 2010-10-05 21:00:57 +01:00
Marek Safar bc30dd1a74 line ending 2010-10-05 21:00:57 +01:00
Geoff Norton 2b638808bf Fix the build on windows 2010-10-05 15:58:38 -04:00
Rodrigo Kumpera d8901bd4e7 The nested in type should not be inflated.
* class.c (mono_generic_class_get_class): Don't inflated
	nested_in since it's not the expected behavior from managed
	land. It's a safety issue as well since the outer type can
	have more generic arguments.

	* TypeTest.cs: Add regression test.

	Fixes #643890
2010-10-05 16:23:56 -03:00
Michael Hutchinson 1084c49a94 [io-layer] Cope with pids > 16 bits
Fixes an issue in Process where "pseudo-handles" for processes with
pids > 16 bits would overflow and start getting treated as normal
handles. This would frequently segfault MonoDevelop on MacOS.
2010-10-05 13:44:30 -04:00
Geoff Norton c0e770710b Its possible that we're calling Process_free_internal on a pseudo-handle.
When we are not using SHM we use psuedo handles to return processes from pids,
however we dont guard against pseudo-handles in CloseProcess, which could lead to
calling unref on a fake handle.
2010-10-05 13:00:42 -04:00
Ankit Jain 888e2921c4 [xbuild] Update regex to not require EndProject in a sln file.
In a solution file, a Project might not have a corresponding
EndProject. This seems to be supported by VS, so updating xbuild
to support that too. Updated the regex.
2010-10-05 22:05:45 +05:30
Rodrigo Kumpera 4219903c74 Implement asm monitor/enter exit for amd64-sgen. 2010-10-05 13:12:57 -03:00
Rodrigo Kumpera 82a95c8ee5 Implement x86 support for monitor enter/exit fastpaths under sgen 2010-10-05 13:12:57 -03:00
Rodrigo Kumpera e2a4ba52e1 Enable delegate .ctor optimization under sgen.
* method-to-ir.c (handle_delegate_ctor): Emit write barriers
	under sgen.

	* method-to-ir.c (mono_method_to_ir): Enable delegate .ctor
	optimization under sgen.
2010-10-05 13:12:57 -03:00
Jb Evain 2fc30c8cf8 Port Mono.Debugger.Soft to cecil-light 2010-10-05 17:58:15 +02:00
Jb Evain 89fc408479 Port pdb2mdb to cecil-light 2010-10-05 17:45:05 +02:00
Jb Evain 73cfdfb897 Port permview to cecil-light 2010-10-05 17:11:42 +02:00
Atsushi Eno a16debc2c7 When finding SerializationMap for resolved type, use type as the key rather than name.
Make the fixed WCF test show more specific failure details.
2010-10-05 23:59:01 +09:00
Jb Evain 2a3ffc1921 Update the tuner to cecil-light 2010-10-05 16:53:34 +02:00
Jb Evain 8562e81c87 Update the linker to cecil-light 2010-10-05 16:53:15 +02:00
Jb Evain 0c600670f0 Add Cecil 0.9.4 2010-10-05 16:48:33 +02:00
Atsushi Eno b38b69536f Do not overwrite properly configured ServiceBehaviorElement.Name. 2010-10-05 18:56:27 +09:00
Atsushi Eno 158d9db8a2 Fix DataContractResolver.ResolveName() support in deserializer. Add roundtrip test. 2010-10-05 17:43:32 +09:00
Atsushi Eno 97d273a5d5 Get List<int> working with XamlXmlReader and XamlObjectWriter.
XamlObjectWriter needs stack of content object list so that List can store items correctly with nested state.
XamlXmlReader now outputs Items, and to handle it I needed special reader states.
2010-10-05 15:37:00 +09:00
Marek Habersack 83876018b4 [asp.net] Fix for bug #643298. A typo prevented the EnableViewStateMac from being recognized in the Page directive. 2010-10-05 08:04:16 +02:00
Rodrigo Kumpera 42bb001795 Make cards_in_range more accurate 2010-10-04 23:15:40 -03:00
Rodrigo Kumpera bd0057bb7d Fix a bunch of issues with cardtable code.
* sgen-cardtable.c (sgen_card_table_is_range_marked): Use
	card_in_range here since this is used for objects that can
	start at the middle of a card.

	* sgen-cardtable.c (move_cards_to_shadow_table): Properly
	copy the tail bytes of an object that spam around the cardtable.
	Don't copy more bytes than required.

	* sgen-cardtable.c (sgen_cardtable_scan_object): Add extra_idx
	variable that tracks the card offset that we're scanning. This
	is required when we wrap around.

	* sgen-cardtable.c (sgen_cardtable_scan_object): Properly reset
	card_base when at wrap around.
2010-10-04 23:15:40 -03:00
Rodrigo Kumpera 137f604761 Kill some dead code and fix a function name 2010-10-04 23:15:40 -03:00
Rodrigo Kumpera 1d77fb52d5 Properly check the ImplMap table.
* loader.c (mono_lookup_pinvoke_call): Don't assert on bad
	row indexes.

	* metadata-verify.c (verify_implmap_table): Fix the bounds
	check for the module table.

	Fix #563956
2010-10-04 23:15:40 -03:00
Martin Baulig f05d036bf0 Fix again. 2010-10-05 02:35:35 +02:00
Martin Baulig 3d577e4060 Fix my previous commit. 2010-10-05 01:05:05 +02:00
Martin Baulig f17f424c84 Disable System.Configuration on the mobile profiles. 2010-10-05 01:01:11 +02:00
Gonzalo Paniagua Javier 512d3f295d Map SO_EXCLUSIVEADDRUSE to !SO_REUSEADDR
This will make windows app that use that property work on *nix.
	Fixes bug #643475.
2010-10-04 16:18:16 -04:00
Rodrigo Kumpera ef4cf45281 Fix #642130.
* MonoGenericClass.cs (.ctor): Only register with the runtime
	when the underlying TB is not finished.

	* MonoGenericClassTest.cs: Add regression test.

	* TypeTest.cs: Fix a test that had a broken assumption.

	Fix #642130
2010-10-04 15:58:22 -03:00
Sebastien Pouliot f9d87bdedd Fix (likely copy-paste) typo on FormsAuthPasswordFormat
* System.Web.Security/FormsAuthentication.cs: Fix typo (MD5->SHA1).
I suspect the later is not used very much by mono users

* Test/System.Web.Security/FormsAuthenticationTest.cs: Small change to
make sure the hash name is not case sensitive
2010-10-04 11:41:22 -04:00
Atsushi Eno 47fd1c3a33 Implement DataContractResolver support. At least TryResolveType in serializer should work. 2010-10-05 00:08:15 +09:00
Atsushi Eno 2e0e15d706 Adjust namespace prefix indexes as it is repeatedly used. (It could result in duplicate prefix.) 2010-10-05 00:05:37 +09:00
Marek Habersack fc73d187ab Merge branch 'bugfix'
* bugfix:
  [asp.net] Part of fix for bug #579837. AuthorizationRule.SerializeElement will not process unmodified elements.
  [configuration] Part of fix for bug #579837. CommaDelimitedStringCollection must properly note that it was modified.
2010-10-04 15:47:32 +02:00
Marek Habersack cba40249f9 [asp.net] Part of fix for bug #579837. AuthorizationRule.SerializeElement will not process unmodified elements.
* AuthorizationRule.cs: if the configuration save is not Full, SerializeElement checks whether the rule being
  serialized is modified. If it isn't, validation and serialization are not performed.
* AuthorizationRuleCollection.cs: there is no element name for the collection.
2010-10-04 15:43:54 +02:00
Marek Habersack 872c7d9a62 [configuration] Part of fix for bug #579837. CommaDelimitedStringCollection must properly note that it was modified.
When one manipulates the collection as an instance of StringCollection, the 'modified' field will not
be set (Add, Remove etc. from the underlying StringCollection type will be used). To work around it
a check has to be performed in IsModified whether the contents of the collection changed. It is done
by comparing string hash codes of the original vs current string.
CommaDelimitedStringCollectionConverter forces string hash code update on the new collection, so that IsModified
works correctly on collections converted from comma-delimited strings.
2010-10-04 15:39:29 +02:00
vvaradhan ce15f042af 2010-10-01 Veerapuram Varadhan <[email protected]>
** Fixes #582732 - Patch by Jeffrey Alvarez <[email protected]>
	* DataColumn.cs (Clone): Deep copy the ExtendedProperties
	collection.
	* XmlSchemaDataImporter.cs: Support import of extended
	properties.
	* XmlSchemaWriter.cs: Fix exception by writing the extended
	properties before simpletype element.
2010-10-04 16:44:44 +05:30
vvaradhan 029d67e3e2 Merge branch 'master' of github.com:mono/mono into masterwork 2010-10-04 15:32:49 +05:30
vvaradhan ceefad76f1 2010-10-01 Veerapuram Varadhan <[email protected]>
** Fixes #561667
	* SqlCommand.cs (Dispose): While Disposing, set connection's
	datareader to null so the connection can be reused with another datareader.
2010-10-04 15:27:52 +05:30
Atsushi Eno 759200b5b6 Handle Initialization correctly. 2010-10-04 18:30:11 +09:00
Gonzalo Paniagua Javier ce6effffda Set have_response
Set have_response to true when there's a protocol error or a previous
	exception for POST/PUT.
	Patch by Bassam Tabbara.
2010-10-04 02:44:40 -04:00
Gonzalo Paniagua Javier 3078d57a30 Check no longer needed.
The is_* function takes care of this check now.
2010-10-04 02:44:39 -04:00
Atsushi Eno dd10adfa71 Get constructor arguments (x:Arguments) working on XamlXmlWriter and XamlObjectReader. 2010-10-04 15:28:34 +09:00
Gonzalo Paniagua Javier a308e3e66b Fix line endings. 2010-10-04 00:54:47 -04:00
Zoltan Varga 15910f21ad Execute some specialized tests using the normal test infrastructure. 2010-10-04 02:32:06 +02:00
Zoltan Varga 019a36ef08 Fix the handling of varargs in g_set_error (). 2010-10-04 01:59:46 +02:00
Pablo Ruiz Garcia bcd18127a5 Fixed conding style and added license/copyright header to new files 2010-10-04 05:20:37 +08:00
Pablo Ruiz Garcia a2245c7f1b [FIX] Fixes https://bugzilla.novell.com/show_bug.cgi?id=643368 (Transaction.TransactionCompleted not firing 2010-10-04 05:20:36 +08:00
Pablo Ruiz Garcia 06fb4d387e [API] Implemented System.Transactions (tx preparation) timeout handling 2010-10-04 05:20:35 +08:00
Gonzalo Paniagua Javier 7698d421b2 Check class names in a better way
Verify image, nesting status, namespace and class for the types
	used in threadpool.c
2010-10-03 13:29:06 -04:00
Miguel de Icaza 4bf3aa7b3f Retval is not a reserved keyword, fixes 643345 2010-10-03 12:30:38 -04:00
Atsushi Eno 5d9ca64ed3 remove extraneous reference to sys.configuration. 2010-10-04 00:55:11 +09:00
Atsushi Eno a6746868f6 A couple of fixes around XamlSchemaContext.GetXamlType(XamlTypeName) and get XamlXmlReader pass with unknown type names. 2010-10-04 00:44:53 +09:00
Gonzalo Paniagua Javier 0a49cf466c The EndPoint cannot be null
The EndPoint argument in Begin/EndSendTo cannot be null.
2010-10-02 01:41:40 -04:00
Gonzalo Paniagua Javier b24939c61c Create only 1 callback instance for read/write
Read/Write were creating one callback instance per call. Now we keep
	the same delegate around for all the calls.
2010-10-02 01:41:40 -04:00
Gonzalo Paniagua Javier 2b1a3ea5b6 Handle error in BeginAcceptReceive
We were ignore possible errors when reading after a socket has been
	accepted.
2010-10-02 01:41:39 -04:00
Gonzalo Paniagua Javier 0f7fa8d0dd Schedule the user callback from unmanaged code
When possible, schedule the user callback from unmanaged code. We pass
	it from the IO pool to the regular pool after our internal callback is
	finished.
2010-10-02 01:41:39 -04:00
Zoltan Varga 195b8afd2e Check the debugger_thread_exited condition in a loop to guard against spurious wakeups. Fixes #642780. 2010-10-01 23:47:40 +02:00
Marek Safar 9a7ff1718b ref/out arguments are always of static type 2010-10-01 19:39:02 +01:00
Marek Safar 29281b99f9 Keep imported indexer parameters (they can contain non-inflated type parameters) 2010-10-01 19:39:02 +01:00
Marek Safar 76368b5259 Implement compound assignment over null value 2010-10-01 19:39:01 +01:00
Koushik Dutta c45cae8a26 Work around Android's pthread/kernel_id/fork bug to fix mono multithreading and GC_stop_world in processes that have been forked. 2010-10-01 12:33:18 -04:00
Geoff Norton 0e85792129 Fix a crash when using the embedding api
error_msg is null when passed into this function from a few places, so
lets not do a null deref here.
2010-10-01 11:58:17 -04:00
Zoltan Varga 986ee2362b Fix code buffer reallocation check for OP_SWITCH on arm. 2010-10-01 16:29:24 +02:00
vvaradhan b2285ad835 2010-09-29 Veerapuram Varadhan <[email protected]>
** Fixes failed test for smallmoney
	* Tds70.cs (WriteParameterInfo): Round money values to 4
	decimals, for smallmoney too.
2010-10-01 19:17:48 +05:30
Marek Safar a131031c43 New test 2010-10-01 14:23:59 +01:00
Marek Safar b226844cd7 Dynamic compound assignment breaks standard C# result conversion rules 2010-10-01 14:23:59 +01:00
Marek Safar c4fd3c1884 void is never of type object 2010-10-01 14:23:59 +01:00
Marek Safar 21ebed49f8 Null constant cannot be used for ref/out variables 2010-10-01 14:23:58 +01:00
Marek Safar b68e462766 Initialize both disposable and local variable for dynamic expressions. 2010-10-01 14:23:58 +01:00
Atsushi Eno 6f397f56c5 rename source file. 2010-10-01 15:33:11 +09:00
Atsushi Eno 742f259da5 Remove old code. 2010-10-01 15:30:07 +09:00
Zoltan Varga bf7e68c329 Fix a deadlock introduced by 5c2e3bf7 by using a separate low level lock to procect access to the file_share_hash hash table. Fixes #642985. 2010-10-01 04:49:02 +02:00
Atsushi Eno a2b7ad61cc [wcf] serialization member namespace was wrong when root namesp ace is given. Fixed possible infinite loop during DefaultTypeMap initialization.
MS Basic/Contract/Data/POCO sample got working fine.
2010-10-01 11:32:19 +09:00
Atsushi Eno ec2f12c8be Remove extra call to HttpResponse.Flush() which would crash. 2010-10-01 09:11:26 +09:00
Marek Habersack 0649fb4ad5 [asp.net] Handle closed responses gracefully.
If ReleaseResources or Flush (true) were called, a flag is set that causes
any subsequent Flush () calls to fail with an exception.
At the same time, ReleaseResources does not destroy the output stream completely -
it has to remain around to match .NET behavior.
2010-09-30 23:52:27 +02:00
Marek Habersack 07dd1d3790 Revert "[asp.net] Make sure output_stream is not null before using it"
This reverts commit a4ed8be697 since what we
do in ReleaseResources is not what .NET does - a better fix will follow.
2010-09-30 23:52:27 +02:00
Andreia Gaita 7cfce53c32 [Json] Fix uint type conversion when reading, should be mapped to long, not int 2010-09-30 21:03:12 +01:00
Gonzalo Paniagua Javier c1fa0ee105 Avoid a few warnings 2010-09-30 15:30:49 -04:00
Atsushi Eno 582a90e800 Add DataContractResolver stuff (dummy), and fix Id reference from inside the referenced object. 2010-09-30 20:56:00 +09:00
Marek Safar a4e77bda2c More awkward nullable binary expressions which are not lifted even though they should be 2010-09-30 10:21:38 +01:00
Marek Safar 6bf2dfac4a Implement binary user operators over nullable not lifted expressions. 2010-09-30 10:21:37 +01:00
Marek Safar 715628fe36 Dynamic compound assignment can be used as an expression as well. 2010-09-30 10:21:37 +01:00
Gonzalo Paniagua Javier 50a295ac1b Invoke the callback in separate threads
The callbacks need to be invoked in different threads to avoid clogging
	the IO pool.

	Fixes bug #639656.
2010-09-30 01:52:31 -04:00
Zoltan Varga 1443252b1c Disable the freeing of monitors again, it still crashes with sgen when running tests/async_read.exe. 2010-09-30 04:45:15 +02:00
Rodrigo Kumpera 8d9793865f Fix AOT support for delegates 2010-09-29 21:14:12 -03:00
Sebastien Pouliot 966a4e1990 Fix buffer checks on Socket.[Receive|Send]Async
* System.Net.Sockets/Socket_2_1.cs: Fix, by explicitely throwing an NRE,
the checks in [Receive|Send]Async methods - otherwise an exception would
occur later, on another thread and close the socket (leading to other,
unexpected, exceptions)

* Test/System.Net.Sockets/SocketTest.cs: Add parameter validation test
cases for both ReceiveAsync and SendAsync
2010-09-29 14:33:20 -04:00
Sebastien Pouliot 31485d3ee7 [moon] Move policy restriction / elevated trust check outside of loop
* System.Net.Sockets/SocketAsyncEventArgs.cs: Move policy restriction
and elevated trust check outside of loop since its value won't change
based on the ipaddress
2010-09-29 14:33:19 -04:00
Sebastien Pouliot 0999774377 Fix "4762b18c: Fix the moonlight build"
* System.Net.Sockets/Socket_2_1.cs: Do not #id-def out [Receive|Send]
Generic from moonlight build
2010-09-29 14:33:17 -04:00
Rodrigo Kumpera d7d6d66372 Fix arm and ppc builds 2010-09-29 14:37:20 -03:00
Gonzalo Paniagua Javier 3fcfa6d01b Handle error creating xdb.il
If creating the xdb.il file fails, disable the mono support for
	debugging in gdb. Managed symbol names won't be displayed in stack
	traces.

	Fixes bug #642625.
2010-09-29 12:26:58 -04:00
Rodrigo Kumpera 733ea88046 Remove "NotWorking" from a test that now works. 2010-09-29 12:22:56 -03:00
Rodrigo Kumpera 0c46b444fd ndle static methods with bound first arg.
* marshal.c (mono_marshal_get_delegate_invoke): Properly
	handle a static method that has it's first argument bound.

	* marshal.c (mono_marshal_free_inflated_wrappers): Free
	from the new hashtable too.

	* image.c (mono_image_close_except_pools): Free the new
	hash table.

	* metadata-internals.h (MonoImage): Add new hashtable
	to store the new kind of invoke wrappers.
2010-09-29 12:22:55 -03:00
Atsushi Eno 2ba9827975 Add missing members. 2010-09-29 23:34:49 +09:00
Jérémie Laval 8e3bbe1893 [ReaderWriterLockSlim] Fix state corruption and race in a special interleaving.
Fix possible state corruption in the case where Upgradeable wasn't reactivating its read bit after a downgrade and set events accordingly. Fix possible race where a write process wannabe could step in the middle of Upgradeable actually upgrading to write mode.
2010-09-29 14:52:20 +01:00
Atsushi Eno 7cfbbb0878 Add some missing StructLayoutAttributes. 2010-09-29 22:00:38 +09:00
Atsushi Eno e1bf67e050 [wcf-discovery] ExclusiveAddressUse won't work. AcceptChannel() should nreturn null when it is being closed. 2010-09-29 21:58:56 +09:00
Atsushi Eno 37f6746abc [wcf-discovery] Fix MessageEncoder retrieval, failure on EndReceive and ExclusiveAddressUse. 2010-09-29 20:47:10 +09:00
Atsushi Eno da0eaa1a1b [wcf discovery] Use appropriate MessageVersion defined in DiscoveryVersion. 2010-09-29 20:45:47 +09:00
Marek Habersack d718a17c96 [wcf] Make sure context exists in the dictionary getting its associated wait handle.
SvcHttpHandler maintains a mapping of HttpContext to ManualResetEvent. Entries are
removed from the cache in EndHttpRequest. The code makes sure the context exists in
the cache before attempting to access it.
2010-09-29 12:44:27 +02:00
Marek Habersack 9ddbf78ee5 Merge branch 'bugfix'
* bugfix:
  [asp.net] Make sure output_stream is not null before using it
2010-09-29 12:01:33 +02:00
Marek Habersack a4ed8be697 [asp.net] Make sure output_stream is not null before using it
It is possible that some code will still attempt to access the HttpResponse instance
after ReleaseResources got called. This patch prevents NREX in such cases.
2010-09-29 11:59:37 +02:00
Alan McGovern 08c8799a39 [System.ServiceModel] Fix a few potential exceptions in background threads
Pass the listener as it's own async state so that we avoid potential null derefs in the callback. Also wrap the BeginAccept and EndAccept calls in their own try/catches in case they throw an exception.
2010-09-29 10:37:56 +01:00
vvaradhan 2ff8ca98f1 2010-09-20 Veerapuram Varadhan <[email protected]>
* SqlDataReaderTest.cs: Add test for bug#613087
2010-09-29 14:39:01 +05:30
vvaradhan 57e6ec2bdb test fixes 2010-09-29 14:37:37 +05:30
Marek Safar 95350f424e New test. 2010-09-29 09:12:52 +01:00
Marek Safar 1499a690df [642437] Nested types have to check type arguments only and not full class 2010-09-29 09:12:52 +01:00
Marek Safar ff3a641aca New test. 2010-09-29 09:12:52 +01:00
Marek Safar 43143b0a55 Skip inaccessible nested types for member access expressions. 2010-09-29 09:12:51 +01:00
Marek Safar bd09196108 Inflate custom site container delegates correctly. 2010-09-29 09:12:51 +01:00
Marek Safar c96cc5d5e9 Optional parameters can be of a user value type 2010-09-29 09:12:50 +01:00
Marek Safar ba97300acd Ignore imported not visible internal types 2010-09-29 09:12:50 +01:00
Atsushi Eno 0c7a1a1f5c Fix the issue that callback contract often gets confused by picking unexpected contract type.
The problem is that DispatchRuntime.Type is a service implementation type
that could implement two or more contract interfaces, and it was in random
order how ServiceProxyGenerator picks up the contract type. Now it looks
for correct contract type instead of the service type by exactly looking
for the target contract in the endpoint (dispatcher).
2010-09-29 16:41:59 +09:00
Jonathan Pryor 957abaee41 Allow mono_install_assembly_preload_hook() to provide mscorlib.dll
In some embedding scenarios, mscorlib.dll may be present in a non-standard
location (outside of MONO_PATH) or with an alternate filename.

Use the installed assembly preload hooks to search for mscorlib.dll before
falling back to the default lookup strategy.
2010-09-28 22:45:41 -04:00
Zoltan Varga d9d750d79c Fix 'thread may have been prematurely finalized' warnings when a GC happens during thread attach in sgen. 2010-09-29 04:29:55 +02:00
Rolf Bjarne Kvinge 316f0fcb38 Remap more eglib symbols 2010-09-28 22:47:09 +02:00
Marek Habersack b91056243b [asp.net] Remove lock recursion in Cache.ExpireItems 2010-09-28 22:34:34 +02:00
Atsushi Eno af6fde94ef TCP channel listener: remove extra complication (threads) in the previous change. 2010-09-29 01:02:09 +09:00
vvaradhan f5d5778245 2010-09-16 Veerapuram Varadhan <[email protected]>
* SqlCommandTest.cs: Add test for bug#569543
2010-09-28 20:36:55 +05:30
vvaradhan 29db32e771 2010-09-16 Veerapuram Varadhan <[email protected]>
* SqlCommandTest.cs: Add test for bug#584833
2010-09-28 20:28:44 +05:30
Atsushi Eno 8c7cd3e190 Rework TCP listening model, and fix AcceptTcpClient() to not drop timed out requests that actually steals next requests in the air. 2010-09-28 23:05:26 +09:00
Sebastien Pouliot 6bf7db2ca6 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
2010-09-28 08:43:05 -04:00
Jérémie Laval e0d372e7bf Turn Is*LockHeld properties into thread-specific values in ReaderWriterLockSlim. Add corresponding unit tests. 2010-09-28 13:23:05 +01:00
Marek Habersack ae23776616 [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.
2010-09-28 13:29:21 +02:00
Sebastien Pouliot 03e914971d Avoid a culture-specific check for the end of an URI
* System/Uri.cs: Avoid the culture-specific String.EndsWith when
reducing an URI
2010-09-27 21:55:59 -04:00
Sebastien Pouliot 383a5e711e 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)
2010-09-27 20:20:24 -04:00
Sebastien Pouliot 7f2949053b 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.
2010-09-27 20:10:38 -04:00
Marek Habersack c64178bd59 [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.
2010-09-28 00:36:38 +02:00
Rodrigo Kumpera 6e711f08d8 Add runtime test for delegates with null target. 2010-09-27 17:13:10 -03:00
Rodrigo Kumpera 5df232cd9f Add comment on the reason of a non obvious check. 2010-09-27 17:13:10 -03:00
Rodrigo Kumpera f70bcd664e Enable test that has been fixed in the runtime. 2010-09-27 17:13:09 -03:00
Rodrigo Kumpera 5cb38aff38 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)
2010-09-27 17:13:09 -03:00
Zoltan Varga 4f5889611c Mov the jit map generation code from tramp-x86.c to mini-trampolines.c, add amd64 support. 2010-09-27 21:55:02 +02:00
Rodrigo Kumpera 61da08a4d3 Ignore all non static fields.
* icall.c (ves_icall_get_enum_info): All instance fields
	should be ignored here.

	Fixes #604218
2010-09-27 12:06:19 -03:00
Rodrigo Kumpera 2391e9355b Record all trampolines to the jitmap. 2010-09-27 12:06:19 -03:00
Jb Evain 14843e1908 Fix the net_4_0 build 2010-09-27 16:20:40 +02:00
Jb Evain 4762b18c11 Fix the moonlight build 2010-09-27 16:12:08 +02:00
Carlos Alberto Cortez cc39d7ebf1 [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.
2010-09-27 09:35:40 +02:00
Carlos Alberto Cortez b40709211a [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.
2010-09-27 09:35:40 +02:00
Marek Habersack 43f7e0c457 [wcf] System.ServiceModel.Configuration.CustomBindignCollectionElement.GetDefault returns an instance of CustomBinding 2010-09-27 13:55:17 +02:00
Gonzalo Paniagua Javier 145726835e Set LastOperation properly
SocketAsyncEventArgs.LastOperation is set when the operation is
	invoked.
	Reset the error status before each new *Async() call.
2010-09-27 00:27:04 -04:00
Jonathan Pobst 460b08fdb6 Commit some stuff I had implemented in my SVN tree. 2010-09-26 19:51:45 -05:00
Jonathan Pobst 49d488b4d6 Merge branch 'master' of github.com:mono/mono 2010-09-26 19:44:34 -05:00
Marek Habersack 238062bfe8 [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.
2010-09-27 00:31:31 +02:00
Zoltan Varga ec3c7ded81 Update the comment explaining why the small_id_table uses conservative
GC tracking.
2010-09-26 23:18:00 +02:00
Gonzalo Paniagua Javier 430b2940bd 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.
2010-09-26 01:58:38 -04:00
Miguel de Icaza 1e20a9c660 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
2010-09-25 22:44:41 -04:00
Miguel de Icaza aca5a99057 Optimize EqualityComparer for strings
This shortcut prevents the reflection system to kick into action
for compiler generated string switch statements.
2010-09-25 21:08:53 -04:00
Gonzalo Paniagua Javier 2d0c85f412 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).
2010-09-25 18:37:30 -04:00
Gonzalo Paniagua Javier 3ed061749e Added support for ArraySegment
-Removed NET_2_0
	-Implemented support for the Receive/Send overloads that take a list of
	ArraySegments.
2010-09-25 18:37:30 -04:00
Marek Habersack aea65531c0 [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.
2010-09-26 00:14:21 +02:00
Zoltan Varga 04713a947f Enable support for wrapping non Exception subclasses in RuntimeWrappedException objects, implement support for RuntimeCompatibilityAttribute. 2010-09-25 20:48:36 +02:00
Gonzalo Paniagua Javier f3463e7232 Made the moonlight profile happy.
Disabled operations not allowed under moonlight.
2010-09-25 14:08:13 -04:00
Gonzalo Paniagua Javier 3419c3ffc8 Move async IO code to Socket_2_1
Moved internal classes to Socket_2_1.
2010-09-25 12:48:55 -04:00
Gonzalo Paniagua Javier 61d0f84376 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.
2010-09-25 12:37:27 -04:00
Marek Safar 820c91d665 Implemented more combinations of nullable boolean logical operators 2010-09-25 10:48:33 +01:00
Marek Safar 35917fa067 Better error message for syntax error in namespace name 2010-09-25 10:48:33 +01:00
Miguel de Icaza 1228fd45c7 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)
2010-09-25 00:04:24 -04:00
Andreia Gaita f485bd74bd Fix UriParser.GetComponents for the PathAndQuery case
PathAndQuery should always return the path starting with /,
even when it's empty
2010-09-24 18:11:24 +01:00
Zoltan Varga a5e13730a3 Fix AOT support for OP_GC_CARD_TABLE on amd64. 2010-09-24 17:27:14 +02:00
Zoltan Varga b07a3824f4 Fix the setting of pointer type fields using reflection. Fixes #641590. 2010-09-24 16:31:48 +02:00
Rodrigo Kumpera 502b8e2603 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.
2010-09-24 11:29:48 -03:00
Atsushi Eno 31c5aeca32 Assign identical operation name for each contract version so that they don't conflict each other. 2010-09-24 21:26:53 +09:00
Atsushi Eno ce97296c9d Fix duplex proxy constructor arg names. 2010-09-24 21:26:27 +09:00
Rolf Bjarne Kvinge f7a0fde4c6 JsonSerializationWriter: handle char values 2010-09-24 12:11:36 +02:00
Atsushi Eno 9d66f85f1c Filter requests only by paths, excluding host and port. 2010-09-24 16:57:38 +09:00
Atsushi Eno a5043815da Override IsContentTypeSupported() in per-encoding-binding-element implementation to work as expected. 2010-09-24 16:26:28 +09:00
Zoltan Varga a76c652ffe Avoid making the small_id table precisely GC tracked, some runtime code can't handle MonoInternalThread's being moved. 2010-09-24 04:27:56 +02:00
Jackson Harper bb82041618 On 64bit this is turning into a 16 byte struct, this works around the issue. 2010-09-23 22:17:43 -04:00
Zoltan Varga 4dd641a3c4 Disable make_root_descr_all_refs () for now since it seems to cause crashes. 2010-09-24 03:21:36 +02:00
Zoltan Varga bd060c62c5 Use g_malloc0 in mono_gc_make_root-descr_all_refs (). 2010-09-24 01:07:12 +02:00
Zoltan Varga 81ffa155c4 Remove a debug printf. 2010-09-24 00:38:50 +02:00
Zoltan Varga 9f96b7fad1 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. 2010-09-24 00:36:51 +02:00
Zoltan Varga 1b126f73bb Disable the wrapped exception code for now, it break some of our tests. 2010-09-24 00:30:03 +02:00
Rodrigo Kumpera 5516dc79fd 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
2010-09-23 18:33:53 -03:00
Rodrigo Kumpera 488dc81eba Remove unwanted debug spew. 2010-09-23 18:33:52 -03:00
Sebastien Pouliot fcdbcb49c7 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.
2010-09-23 17:10:06 -04:00
Sebastien Pouliot c3b5cb557e 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)
2010-09-23 17:10:05 -04:00
Sebastien Pouliot 016a04eb84 [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.
2010-09-23 17:10:04 -04:00
Andrew Jorgensen c1bb43c998 move DynamicData to mvc because it depends on Extensions 2010-09-23 14:15:01 -06:00
Zoltan Varga 06bfbd5d04 Fix the default exception message of RuntimeWrapperException. 2010-09-23 21:15:34 +02:00
Zoltan Varga e4cb5aec35 Wrap thrown objects which do not derive from Exception into a RuntimeWrappedException. Fixes #640687. 2010-09-23 21:15:34 +02:00
Gonzalo Paniagua Javier 2faabf871c epoll_ctl takes an int, not IntPtr
Ditto.
2010-09-23 15:02:58 -04:00
Marek Safar a572542567 [641146] Implemented IStructuralComparable.CompareTo 2010-09-23 16:22:11 +01:00
Marek Habersack 133b340ce9 [WCF] System.Data.Services.Client must be signed with the ECMA public key 2010-09-23 14:34:01 +02:00
Marek Habersack 2da7a29fb0 [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.
2010-09-23 11:05:42 +02:00
Sebastien Pouliot d8fa9bbba0 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.
2010-09-22 21:30:00 -04:00
Sebastien Pouliot 61bf861afb 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
2010-09-22 21:29:59 -04:00
Sebastien Pouliot a4bfdabd83 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)
2010-09-22 21:29:59 -04:00
Sebastien Pouliot 46bb0b7cb8 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)
2010-09-22 21:29:59 -04:00
Zoltan Varga 0cb943ae56 Don't allow EventType.Breakpoint in vm.EnableEvents (). 2010-09-23 02:52:25 +02:00
Zoltan Varga 7e7f7589da Avoid extracting tar.gz files in the get-cygwin-deps.sh script, we download only zip files now. 2010-09-23 00:23:53 +02:00
Zoltan Varga 3259effcbe Convert ERROR_PATH_NOT_FOUND to ENOENT too. 2010-09-23 00:23:25 +02:00
Hib Eris db41480279 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
2010-09-23 00:18:08 +02:00
Zoltan Varga 4099eddfcf Set errno correctly when loading an image fails on windows. Fixes #362607. 2010-09-22 23:55:25 +02:00
Gonzalo Paniagua Javier 1adad8a875 EpollEvent size adjustment
EpollEvent has to be one uint32 plus one int64, i.e. 12 bytes long.
	Manos libres now.
2010-09-22 18:14:34 -04:00
Jonathan Pryor f8f1213656 Do not build mcs/docs if the 4.0 build is disabled. 2010-09-22 16:15:19 -04:00
Jonathan Pryor aa76a302d9 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].
2010-09-22 16:06:16 -04:00
Jonathan Pryor 86cfbf948d 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.
2010-09-22 13:50:33 -04:00
Gonzalo Paniagua Javier 884680ede3 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.
2010-09-22 12:39:07 -04:00
Gonzalo Paniagua Javier 501bf45d67 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.
2010-09-22 11:42:35 -04:00
Zoltan Varga ef3b35bb20 Call the thread cleanup at the end as it was done before, call it even if handle_remove () fails. 2010-09-22 17:01:36 +02:00
Jérémie Laval 4b844f8105 Add tidbits of documentation to ReaderWriterLockSlim. 2010-09-22 11:33:55 +01:00
Jérémie Laval 65180d590b 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.
2010-09-22 11:04:03 +01:00
Marek Habersack 132695aa93 Revert "mdoc 2.0-only profile build support, take 2!"
This reverts commit 313633fc67 because it breaks the build.
2010-09-22 11:14:26 +02:00
Jonathan Pryor 313633fc67 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.
2010-09-21 21:38:09 -04:00
Sebastien Pouliot a5e46da30c NET_4_0 fixes for System.Uri also apply to Moonlight (SL4)
* System/Uri.cs: Update some NET_4_0 to include MOONLIGHT too
2010-09-21 21:21:13 -04:00
Sebastien Pouliot fcfe00816b 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...)
2010-09-21 21:21:12 -04:00
Sebastien Pouliot 202156dfe2 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
2010-09-21 21:21:12 -04:00
Gonzalo Paniagua Javier 22b0194255 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.
2010-09-21 17:28:03 -04:00
Andrés G. Aragoneses bbd182a095 [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.
2010-09-22 03:09:17 +08:00
Rodrigo Kumpera 9f66121d0f 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.
2010-09-21 11:02:14 -03:00
Rodrigo Kumpera aa65ed7443 Add support for break on unverifiable for verifier failure.
* mini.c (mini_method_compile): Break on verification
	failure.
2010-09-21 11:02:14 -03:00
Marek Safar 5a34679f7e New tests. 2010-09-21 10:50:10 +01:00
Marek Safar 72f1e138de Don't restore unused flags 2010-09-21 10:50:10 +01:00
Marek Safar bc201ee584 [640722] Consider delegate parameters when checking member hiding 2010-09-21 10:50:09 +01:00
Marek Safar 9babecf161 [640709] Don't reuse method parameters for base proxy, they can be hoisted 2010-09-21 10:50:09 +01:00
Marek Safar 3b4f080364 [640699] Reduced compound expressions need explicit conversion too. 2010-09-21 10:50:08 +01:00
Marek Safar 6335383153 Implement postfix operations involving an implicit user operator. 2010-09-21 10:50:08 +01:00
Atsushi Eno 6dc63972bf Fix (isolate) internal namespace for Udp transport. 2010-09-21 16:46:07 +09:00
Atsushi Eno 25d38a793a Add missing Properties property. 2010-09-21 15:23:35 +09:00
Carlos Alberto Cortez dabad82cdf Implement IDesignerLoaderHost2 interface.
* IDesignerLoaderHost2.cs: New 4.0 interface.
2010-09-21 03:01:51 +02:00
Carlos Alberto Cortez b636af7f7c Add IDesignerLoaderHost2.cs to our build.
* System.dll.sources: Add IDesignerLoaderHost2.cs to our build.
2010-09-21 03:01:51 +02:00
Carlos Alberto Cortez 40702ce451 Add IDesignerHostTransactionState.cs and TypeDescriptionProviderService.cs to our build.
* System.dll.sources: Add IDesignerHostTransactionState.cs and
	TypeDescriptionProviderService.cs to our build.
2010-09-21 03:01:51 +02:00
Carlos Alberto Cortez 56422921df Implement IDesignerHostTransactionState.cs
* IDesignerHostTransactionState.cs: New 4.0 interface.
2010-09-21 03:01:51 +02:00
Carlos Alberto Cortez 697698de5c Implement TypeDescriptionProviderService.
* TypeDescriptionProviderService.cs: New class.
2010-09-21 03:01:50 +02:00
Carlos Alberto Cortez 5b9f6d2348 Implement AddProviderTransparent and RemoveProviderTransparent for TypeDescriptor.
* TypeDescriptor.cs: Implement AddProviderTransparent and
	RemoveProviderTransparent - we only call to the already existing
	AddProvider and RemoveProvider methods respectively.
2010-09-21 03:01:50 +02:00
Carsten Schlote 7e42d3474e [System.Configuration] Added check for SettingProviderAttribute on settings class
There is no checkfor the SettingProviderAttribute attached to a Settings class.
.NET uses this to replace the default LocalSettingsProvider with your
own SettingsProvider.

The patch adds this feature.

Signed-off-by: Carsten Schlote <[email protected]>
2010-09-20 20:53:45 -04:00
Carsten Schlote ee5a1d2a73 [System.Configuration] Fixed GetProductName() function
Added missing check for empty strongname. This case is now handled the
same way as a missing strongname.

GetProductName() now correctly uses _Url_ and assembly.EscapedCodeBase
for its output.

Signed-off-by: Carsten Schlote <[email protected]>
2010-09-20 20:53:45 -04:00
Carsten Schlote b26e26544c [System.Configuration] Fixed GetEvidenceHash() function to produce valid filenames
The previous implementation creates eventually invalid filenames in a
random fashion on linux, mac, windows by having '/' or '\' chars
in the base64 output. As a result you can't save or retrieve your settings
due to filesystem errors.

This patch changes the output to plain hex values. This is a bit longer
then a base64 string, but also 100% filesystem safe.

Might

Signed-off-by: Carsten Schlote <[email protected]>
2010-09-20 20:53:44 -04:00
acken f5f1f3fbbc Had an issue where the linklabel was clicked, the form was redrawn with some changes and some internal behavior called the OnGotFocus where sorted_links now was null and focused_index was 0. Don't know wheter that is wrong but solved the issue with a nullcheck 2010-09-21 07:51:46 +08:00
Andrew Jorgensen ea222251b7 put the x11 devel package back in buildrequires and a couple other spec fixes 2010-09-20 17:23:51 -06:00
Rodrigo Kumpera 16f059a763 Use new verifier function to lazily check.
* class.c: The typeref table is now lazily verified thanks
	to some awesome obfuscators that love to produce junk.
	So it has to be checked everytime before usage instead of
	at loading time.
2010-09-20 19:31:14 -03:00
Rodrigo Kumpera 8780c85f83 Add function to validate an individual row in the typeref table.
* metadata-verify.c: Add mono_verifier_verify_typeref_row
	that checks the metadata of a single row. Fix code around
	to couple with this new function.

	* verify-internals.h: Export it.
2010-09-20 19:31:13 -03:00
Sebastien Pouliot cdc8f661ab Uri.LocalPath is unescaped - even if original URI is escaped
* System/Uri.cs: Unescape LocalPath

* Test/System/UriTest2.cs: Add test case where an original URI contains
an escaped path.
2010-09-20 17:07:53 -04:00
Sebastien Pouliot ffc80ca37d Uri.OriginalString is a bit misleading since it's computed for merged URI
* System/Uri.cs: Compute the expected OriginalString when an absolute
URI is merged with a (String or Uri) relative Uri to create a new Uri
instance. Keep original fragment around for ToString

* Test/System/UriTest2.cs: Add test cases for Fragment and Query when
special characters are used. Most of them are not escaped in ToString
* Test/System/UriTest3.cs: Uncomment an Assert that is now fixed.
2010-09-20 17:07:52 -04:00
Sebastien Pouliot 03b24a9f61 Actual exception message vary wrt scheme
* System/Uri.cs: Exception message does not specify Authority when a
file:// URI is parsed
2010-09-20 17:07:52 -04:00
Sebastien Pouliot 97841ca329 Fix different between an empty Uri.UserInfo and the absence of username/password
* System/Uri.cs: An empty username/password is treated differently than
having none, i.e. the '@' character is kept present in the URI

* Test/System/UriTest2.cs: Add test case with an empty UserInfo
2010-09-20 17:07:51 -04:00
Sebastien Pouliot 7f06c7980e Only return true on Windows for Uri.IsUnc on file:// URI
* System/Uri.cs: IsUnc returns true for file:/// URI on Windows only.
This makes us closer to Mac-behavior (see NCL tests) since the other
properties, e.g. LocalPath, match this. Also fix some exception text
where the values are checked by some test cases.

* Test/System/UriTest.cs: Adjust some test cases wrt Win32
* Test/System/UriTest2.cs: Adjust a test case wrt Win32
2010-09-20 17:07:51 -04:00
Sebastien Pouliot 0d098aed04 Remove NET_2_0 and ONLY_1_1 from UriTest.cs (its already confusing enough ;-)
* Test/System/UriTest.cs: Remove NET_2_0 and ONLY_1_1
2010-09-20 17:07:50 -04:00
Sebastien Pouliot 6c8c8010fb Fix merging relative URI that looks like complete URI (e.g. scheme)
* System/Uri.cs: Fix merging URI where a relative URI contains a ':'
but no valid scheme

* Test/System/UriTest2.cs: Add test cases where some bad (if absolute)
URI are valid when merged (as relative) with an absolute URI
2010-09-20 17:07:50 -04:00
Rodrigo Kumpera 065699bb8c Report the broken type name instead of assembly's. 2010-09-20 14:53:39 -03:00
Rodrigo Kumpera a86cccf899 Use List<Exception> instead of ArrayList to make things prettier. 2010-09-20 14:44:20 -03:00
Rodrigo Kumpera e340fb6e79 Fix AssemblyBuilder::GetTypes () with unfinished types.
* AssemblyBuilder.cs (GetTypes): Raise ReflectionTypeLoadException
	if any type was not finished.

	* AssemblyBuilderTest.cs: Add test for GetTypes () and incomplete
	TypeBuilders'.

	Fixes #640288
2010-09-20 14:32:24 -03:00
Paolo Molaro 59fff042d1 First pass at profiler hooks in sgen.
* sgen-gc.c, sgen-los.c: added hooks for the important GC events.
Update some of the GC-related performance counters, too.
2010-09-20 19:05:43 +02:00
Geoff Norton 6d33469126 Include TargetFrameworkAttribute in monotouch and monodroid as well 2010-09-20 12:31:42 -04:00
Jonathan Pobst 82e945bea3 Merge branch 'master' of github.com:mono/mono 2010-09-20 11:28:39 -05:00
Marek Safar 8881d43ffd Don't check inferred dynamic type arguments against best candidate constraints. 2010-09-20 16:10:43 +01:00
Marek Safar f965a1facf More missing conversions between object and dynamic 2010-09-20 16:10:42 +01:00
Jb Evain c6cab1a6ca Ignor test since its fix has been reverted 2010-09-20 17:12:04 +02:00
Jb Evain e2a6360c09 Revert "[Fix] Fix the default binder when selecting params methods."
This reverts commit 6a7443d808.
2010-09-20 17:04:58 +02:00
Alan McGovern bab9782bb5 [monodis] Ensure we don't try to free uninitialized memory. 2010-09-20 14:05:17 +01:00
Marek Safar 1dee707951 [640285] Initialize this in current block instead of original block 2010-09-20 09:36:03 +01:00
Marek Safar de3ca24a49 Parse secondary static like expression as a non-cast 2010-09-20 09:36:02 +01:00
Rodrigo Kumpera be6cc4e4c7 Avoid a superfluous copy.
* sgen-marksweep.c (major_scan_card_table): Avoid an extra
        copy under overlapping card.
2010-09-19 16:39:09 -03:00
Rodrigo Kumpera 32a2b1c548 Cleanup definitions and clearly states what are the tunables.
* sgen-cardtable.h: Auto detect the need for
	SGEN_HAVE_OVERLAPPING_CARDS.

	* sgen-cardtable.h: Add CARD_TABLE_BITS and make CARD_COUNT_BITS
	depend on it.

	* sgen-cardtable.h: Document which and how each tunable affect
	runtime of sgen.
2010-09-19 16:39:09 -03:00
Rodrigo Kumpera 2849b865b8 Fix los scanning with overlapping cards.
* sgen-cardtable.c (sgen_cardtable_scan_object): If the
	card range overflows the cardtable, split the scanning in
	two steps.
2010-09-19 16:39:09 -03:00
Rodrigo Kumpera f4f98554b9 Use card pointer as induction variable.
* sgen-cardtable.c (sgen_cardtable_scan_object): Use
	the card pointer as the loop induction variable so
	it's easier handle overlapping cards and overflow.
2010-09-19 16:39:08 -03:00
Rodrigo Kumpera fe8ce3e209 Fix overlapping support for copy/clear functions.
* sgen-cardtable.c: The copy/clear functions may write
	into invalid memory if a block lives across the edges
	of the cardtable address range.
2010-09-19 16:39:08 -03:00
Rodrigo Kumpera 77f4b40c0a Fix OP_CARDTABLE to support overlapping cards.
* cpu-x86.md: Increase the max size of OP_CARDTABLE.

	* mini-x86.c (mono_arch_output_basic_block): If a mask
	is returned, emit code for it.
2010-09-19 16:39:08 -03:00
Rodrigo Kumpera 18b0d33170 Document some cardtable requirements and add an assert. 2010-09-19 16:39:08 -03:00
Zoltan Varga 5cd6380923 Add store_mem_imm to the x86 machine description. Fixes #640377. 2010-09-19 19:44:19 +02:00
Zoltan Varga 33c8ff1f05 Move the setting of mono_lmf, mono_lmf_addr and mono_jit_tls into separate functions to reduce the number of #ifdefs. 2010-09-18 07:50:19 +02:00
Zoltan Varga 8d2deaba77 Make MonoThreadCleanupFunc take an InternalThread instead of a Thread.
Move its definition to threads-types.h since it is not public API. Use this
to remove the workaround in thread_cleanup () so the JIT info for threads is
properly cleaned up at shutdown.
2010-09-18 07:50:01 +02:00
Sebastien Pouliot 28e93c38d0 Fix escaping on relative URI
* System/Uri.cs: While parsing only escape the path for absolute URI.
Do not unescape relative URI in ToString and avoid calling
AppendQueryAndFragment on them (relative) since both are not parsed as
such.

* Test/System/UriTest2.cs: Add test case to show that a relative URI is
NOT escaped by ToString
2010-09-17 17:25:37 -04:00
Sebastien Pouliot 6ad868a9a3 Add support for IPv6 in System.Uri.DnsSafeHost
* System/Uri.cs: Fix DnsSafeHost for IPv6 addresses, removing the []
brackets and adding, when available, the scope id

* Test/System/UriTest2.cs: Add DnsSafeHost test cases for IPv6 address,
one without scope id, another with a scope id
2010-09-17 17:25:37 -04:00
Sebastien Pouliot b3619d34a8 Fix Uri when a colon ':' is not followed by a port number
* System/Uri.cs: Fix parsing the port/host when a ':' is present without
a port number on non-file:// URI

* Test/System/UriTest2.cs: Add test cases where an URI contains a ':'
but is not followed by a port number
2010-09-17 17:25:36 -04:00
Sebastien Pouliot f75017f54f Fix typo (host vs hostName) in one of UriBuilder ctor
* System/UriBuilder.cs: Fix typo from previous change

* Test/System/UriBuilderTest.cs: Add regression test for that .ctor
2010-09-17 17:25:36 -04:00
Sebastien Pouliot 4a03d74fcd UriBuilder is more forgiving (than Uri) when parsing string uri
* System/UriBuilder.cs: Refactor constructors to share Initialization
methods. Allow a second chance to .ctor(string) to parse an URI by
assuming it's an HTTP URI

* Test/System/UriBuilderTest.cs: Add test case with string URI that do
not provide a scheme - UriBuilder will default them to http:// even if
Uri would not parse them
2010-09-17 17:25:35 -04:00
Sebastien Pouliot f8bc4bbfb8 Fix case where 'incomplete' IPv6 address are used in UriBuilder
* System/UriBuilder.cs: Fix Host property to add the missing brackets
on IPv6 address (if missing from input)

* Test/System/UriBuilderTest.cs: Add test cases with incomplete IPv6
addresses. Add test case with a relative Uri used in UriBuilder ctor
2010-09-17 17:25:35 -04:00
Sebastien Pouliot 3eef628453 Update UriBuilder.Path once the Uri has been created
* System/UriBuilder.cs: Update UriBuilder.Path once the Uri has been
created using Uri.AbsolutePath

* Test/System/UriBuilderTest.cs: Add test case with path missing the
initial / which shows the UriBuilder.Path property is being updated
after the creation of the Uri instance.
2010-09-17 17:25:34 -04:00
Andrew Jorgensen ea0b6a1b47 3.5 version of Sys.Web.Ext is gone 2010-09-17 12:21:44 -06:00
Atsushi Eno dbe6e11979 ProtocolMapping needed config section, default items and support in ServiceHostBase. 2010-09-18 00:23:37 +09:00
Gonzalo Paniagua Javier 0705817178 Revert my last patch
Not only it didn't fix anything but it broke a test.
2010-09-17 10:53:06 -04:00
Marek Safar 7759cad1dc User operators are resolved in a batch, pick up the foremost 2010-09-17 15:45:12 +01:00
Marek Safar 8291761235 Make the dynamic sites container name really unique 2010-09-17 15:41:19 +01:00
Marek Safar 0525cd57cb Fixes preference of a user-defined conversion operators over lifted conversion operators 2010-09-17 13:36:53 +01:00
Marek Safar 6f0c3ff391 Fixes cloning of a variable declarator. 2010-09-17 11:17:32 +01:00
Marek Safar af43208762 Implement predefined binary enum operators involving an implicit user conversion 2010-09-17 11:17:31 +01:00
Marek Safar b4dad08661 Recover wrong invalid character constants. 2010-09-17 11:17:31 +01:00
Marek Habersack ff6111c314 Changed mode of a few files from 755 to 644 2010-09-17 10:33:07 +02:00
Rolf Bjarne Kvinge fb722c9597 Fix typo in Makefile causing build breakage 2010-09-17 10:32:27 +02:00
Atsushi Eno fe3362a8f2 Add working .svc handler in 4.0 web.config, fix standard endpoint handling and get xsp4 working. 2010-09-17 16:00:16 +09:00
Atsushi Eno d1ef303ddd Merge branch 'master' of github.com:mono/mono 2010-09-17 12:34:58 +09:00
Andrew Jorgensen e14129134f More .spec reorgs 2010-09-16 17:12:12 -06:00
Rolf Bjarne Kvinge 767d08e56d Only build one version of libmonoruntimemoon.la (the convenience lib) 2010-09-17 00:20:41 +02:00
Rolf Bjarne Kvinge a9a74301d2 Add a configure option to disable building the shared libmono library 2010-09-17 00:20:40 +02:00
Rolf Bjarne Kvinge de7d1118de Disable assembly remapping for moonlight 2010-09-17 00:20:38 +02:00
Rolf Bjarne Kvinge 8ee8df3d1e Add configure option for disabling assembly remapping 2010-09-17 00:20:38 +02:00
Sebastien Pouliot c82563c465 Update UriBuilder.Host once the Uri has been created
* System/UriBuilder.cs: Update UriBuilder.Host once the Uri has been
created

* Test/System/UriBuilderTest.cs: Add test case with IPv6 host (address)
which shows the UriBuilder.Host property is being updated after the
creation of the Uri instance.
2010-09-16 17:32:21 -04:00
Sebastien Pouliot 81618b9d4c Fix known (NotWorking) test cases for UriBuilder and drop NET_2_0 defines
* System/Uri.cs: Add EscapeCommonHexBracketsQuery constant since ? also
needs to be escaped from UriBuilder
* System/UriBuilder.cs: Fix Equals (escaping '?') and UserInfo. Fix NRE
in ctor that was fixed in FX4. Drop NET_2_0 defines.

* Test/System/UriBuilderTest.cs: Drop NET_2_0 defines and add new ones
for NET_4_0. Add more asserts in the test cases that were failing.
2010-09-16 17:32:21 -04:00
Sebastien Pouliot 0c9bbbf34c Fix line endings
* System/UriBuilder.cs: Fix line endings
2010-09-16 17:32:20 -04:00
Sebastien Pouliot c42150e5f9 Fix path reduction when %2e are used in an URI
* System/Uri.cs (Reduce): Process %2E while reducing a path. Avoid, when
possible, the creation of StringBuilder and replace ArrayList with
generics

* Test/System/UriTest2.cs: Add test case where %2e and %2E are used
2010-09-16 17:32:20 -04:00
Sebastien Pouliot 262663d1f5 Fix (existing and) remaining NotWorking tests for System.Uri
* System/Uri.cs: Fix TryCreate overloads wrt NotWorking unit tests

* Test/System/UriTest2.cs: Remove NET_2_0 and ONLY_1_1 defines from tests
* Test/System/UriTest3.cs: Remove NET_2_0 and [Category("NotWorking")]
from tests. Merge MakeRelativeUri_Uri_Null_[MS|Mono] together since the
(reported) issue was fixed in NET_4_0
2010-09-16 17:32:19 -04:00
Sebastien Pouliot ad649a73e9 Fixes to System.Uri wrt 'file' scheme
* System/Uri.cs: Fix 'file' URI since they can't have a query

* Test/System/UriTest2.cs: Add new test case for 'file' URIs and
some asserts on "custom" URI (which do support queries)
2010-09-16 17:32:19 -04:00
Gonzalo Paniagua Javier ca4b4816fc Fix typo. It has been there for 4 years.
Why on earth this wasn't found earlier? $20 reward to whoever gives a
	plausible explanation.
2010-09-16 13:13:56 -04:00
Jonathan Pryor 461d03c07f Build monodoc before mdoc.
mdoc deps on monodoc.  Doh!
2010-09-16 13:09:56 -04:00
Jonathan Pryor dc3440293b Make mdoc a 2.0 app, not a 4.0 app.
The problem is build sanity: it's possible to disable the 4.0 profile
(--with-profile4=no) while not disabling documentation building
(--with-mcs-docs=yes is the default).  The result would be a 4.0-less
build, and thus no mdoc, and thus no mdoc to assemble the documentation,
and thus a build break as we attempted to use an app during the build
which didn't exist.

Oops.

mdoc doesn't need to be a 4.0 app anyway...
2010-09-16 12:31:11 -04:00
Miguel de Icaza c7349ea219 Reuse the same delegate for checking if the runtime is shutting down.
Instead of creating a new delegate every time that WaitAny is invoked,
reuse the same delegate.   We also keep a permanent reference to prevent
this delegate being collected.

Thsi should fix 592981
2010-09-16 11:58:45 -04:00
Atsushi Eno a78c92eb4b Add ProtocolMapping support. 2010-09-16 23:23:44 +09:00
Marek Safar b1de5e6ba5 [639603] Don't emit statements as expressions when they don't support it. 2010-09-16 12:32:16 +01:00
Marek Safar 5ec5860308 [639407] Clean up more static stuff to fix repl instances. 2010-09-16 12:32:16 +01:00
Atsushi Eno 3636f9866d Implement some additional logic around AddServiceEndpoint() to achive standard endpoint support. 2010-09-16 17:58:11 +09:00
Atsushi Eno 5aa2482e23 Return new instance. 2010-09-16 17:57:38 +09:00
Atsushi Eno be6342ff02 Contract is settable in 4.0. 2010-09-16 17:56:57 +09:00
Atsushi Eno d133ca7c6f Add the trickiest line that had me; AddElementName is not on ConfigurationProperty here. 2010-09-16 17:55:38 +09:00
Gonzalo Paniagua Javier aea9c2d57c Remove 2 extra calls to gettimeofday. 2010-09-15 23:53:04 -04:00
Mark Probst 95beb90b23 Remove weak links for monitors.
mono_runtime_cleanup() calls mono_monitor_cleanup(), which frees the
memory associated with monitors.  Some of them still have weak links
registered, which leads to a crash when calling mono_domain_free()
later on.
2010-09-16 01:42:22 +02:00
Mark Probst b800d8ef5a [sgen] Avoid doing an unnecessary gettimeofday(). 2010-09-16 01:34:42 +02:00
Andrew Jorgensen e79ba7b6e1 Add System.Net (4.0 and 2.0) to mono-core in .spec 2010-09-15 17:28:57 -06:00
Sebastien Pouliot a15378363d Fix System.Uri wrt 'ftp' scheme
* System/Uri.cs: Fix 'ftp' support, mostly same fixes as 'nntp'

* Test/System/UriTest2.cs: Add new test case for 'ftp' including
dealing with custom port and user/password data.
2010-09-15 17:31:21 -04:00
Sebastien Pouliot 37c9e1e52a Fix System.Uri wrt 'nntp://' URIs
* System/Uri.cs: Fix 'nntp' support which is close to 'news' (no query)
but still has an Host, Autority, Port...

* Test/System/UriTest2.cs: Add test cases for 'nntp://'
2010-09-15 17:31:21 -04:00
Sebastien Pouliot 15c86fc8c1 Remove more code (after shortcut) on 'news:' Uri
* System/Uri.cs: Remove condition/code wrt 'news:' that occurs after
the new "shortcut".
2010-09-15 17:31:20 -04:00
Sebastien Pouliot 89882a57f6 Multiple fixes for URI using 'news:' scheme
* System/Uri.cs: Make it easier to reuse EscapeString without adding new
boolean parameters. Shortcut parsing for 'news' since it's simpler (no
query, host, authority...) Avoid creating StringBuilder instance when
[un]escape-ing empty strings
* System/UriBuilder.cs: Adjust for EscapeString API change
* System/UriParser.cs: Fix default news port and adjust for EscapeString
API change

* Test/System/UriTest2.cs: Add test case for 'news:' showing the lack
of Query and Port (but support for Fragment) and the escape-ing
differences.
2010-09-15 17:31:20 -04:00
Sebastien Pouliot f69fac088c Fix Uri.Segments property so the internal, cached, array cannot be modified
* System/Uri.cs: Keep the cached 'segments' as a List<string> and return
a new array (ToArray) when the Segment propery is called.

* Test/System/UriTest.cs: Add test case to show that the segments cannot
be modified by accessing the elements of the Segment property.
2010-09-15 17:31:19 -04:00
Sebastien Pouliot 04cf7acf16 Fix Uri.ToString when forward slashes are used
* System/Uri.cs: Fix ToString (Unescape) to ignore '\\' and let it be
outputed as %5C
* Test/System/UriTest2.cs: Add test case for above
2010-09-15 17:31:19 -04:00
Sebastien Pouliot 6b98267cb0 Fix Uri/Segments wrt driver letters nad (forward) slashes
* System/Uri.cs: Reimplement Segment property to reduce copying and
string allocations. Fix case with slashes (separate, not single,
segments)

* Test/System/UriTest2.cs: Add test cases for segments on an URI that
contains a drive letter and (forward) slashes.
2010-09-15 17:31:19 -04:00
Miguel de Icaza 0085c16ada Revert 2010-09-15 17:18:18 -04:00
Ankit Jain ae1aee4439 [xbuild] Use files referenced by resx for dependency check.
For .resx resource files, check files referenced by the resx
file also, to determine whether to resgen it or not.

IsResgenRequired () has been taken from MonoDevelop
(main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MD1/MD1DotNetProjectHandler.cs)
2010-09-16 01:22:19 +05:30
Ankit Jain 4abf81bb05 [xbuild] Fix case sensitive environment variables for ToolTask.
Use ProcessStringDictionary in ToolTask for EnvironmentVariables,
as this retains the original case of the keys. Without this
environment vars would all be passed as lowercase!

This was removed in a previous patch by mistake.
2010-09-16 01:22:18 +05:30
Miguel de Icaza acfdccca84 Make the thread-id field be of the proper size on 64 bit machines.
This error was found by Gonzalo when he was looking at another problem
when thread IDs overflowed ints.

Currently we use gpointers in the io-layer for the threadid, but we were
only exposing the value as an int32.   The good news is that the code is
not really used right now, but could cause problems in the future as we
extend Process.
2010-09-15 14:28:23 -04:00
Ankit Jain 0a022f2c2d [xbuild] Fix references to Microsoft.Build.* assemblies for 3.5 . 2010-09-15 23:36:58 +05:30
Marek Safar 31e372f8c9 Remove copying of misplaced duplicate of System.Web.Extensions.Design.dll 2010-09-15 19:01:54 +01:00
Raja R Harinath a555eb2db5 Fix a few CRLF issues 2010-09-15 23:09:14 +05:30
Ankit Jain a4d4d765db [xbuild] Add ToolTask.EnvironmentVariables property.
* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
	(EnvironmentVariables): New.
	(ExecuteTool): Merge EnvironmentVariables with
	EnvironmentOverride
	* class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
	(Resgen.Execute): Use EnvironmentVariables to set MONO_IOMAP=drive .
2010-09-15 22:21:04 +05:30
Ankit Jain 2b3fc6859f [xbuild] Fix a race condition in ToolTask.
* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
 (ExecuteTool): When StartProcess returns, the process has already .Start()'ed
 If we subscribe to the output events after that, then for processes that
 finish executing before we can subscribe, we won't get the output/error
 events at all! So, pass the handlers to StartProcess itself, so that
 they get added before the process is started.
2010-09-15 22:21:03 +05:30
Marek Safar 274a7b097a [637935] Fixed 3.5 version of msbuild dlls to reference 3.5 version of the engine
MONO_PATH does not work for subsequent dlls, so have to workaround it by
using full path for dlls in 3.5 profile which does not have it's own
mscorlib
2010-09-15 17:42:40 +01:00
Andrew Jorgensen c3963cd3ad mono-configuration-crypto is a 4.0 assembly, not 2.0 2010-09-15 10:31:39 -06:00
Geoff Norton 2168960458 Fix the embedded mono on OSX code to support a symlinked mono into the framework.
The embedding code looks at the executable name, and builds the embedding profile
from that, however the default install has a /usr/bin/mono symlink pointing to
/Library/Frameworks/Mono.framework.  We now resolve the symlink before allowing
the embedding code to proceed.
2010-09-15 12:24:24 -04:00
Marek Safar 6473a4b53d There are actually some 3.5 only dlls, thanks to ankit for poiting out. 2010-09-15 16:26:43 +01:00
Jonathan Pryor 8de03301b5 Ensure that the GC doesn't collect the delegate we pass off to native code.
(Hopefully) Fixes #592981.

This is esoteric, with no test case, so I can only assume that the cause for
the crash reported in #592981 is that Boehm is collecting the shutting_down
delegate reference while we're still in native code (which sounds more like a
Boehm bug, as it shouldn't be collecting memory while we're in a P/Invoke).

Hopefully making the delegate more explicit and using GC.KeepAlive() will keep
the delegate from being collected by the GC during the P/Invoke call.
2010-09-15 10:40:28 -04:00
Marek Safar 796300b06a Removed class from net_3_5 subdirs 2010-09-15 15:23:18 +01:00
Paolo Molaro c4e99417cd Documentation for a few garbage collector APIs. 2010-09-15 15:25:44 +02:00
Zoltan Varga 671551a7ca UCONTEXT_REG_RCX was defined twice on OpenBSD, and RBX was missing. Fix that. 2010-09-15 15:05:08 +02:00
Rodrigo Kumpera 7d1d464e64 Fix monotouch bootstrap.
* Type.cs (GetTypeCodeImpl): If the type is a TypeBuilder
	call into specific code.

	* TypeBuilder.cs (GetTypeCodeInternal): New method that
	handles enums correctly.

	This change is required because calling into the runtime
	with incomplete TypeBuilders cause the runtime to crash.
2010-09-15 09:58:17 -03:00
Marek Safar aff57d8d8e Recover wrong embedded statement syntax 2010-09-15 13:43:36 +01:00
Marek Safar 7c1484f554 New test. 2010-09-15 13:43:04 +01:00
Marek Safar df88ece9fa Remove net_3_5 dirs to fix 4.0 dependency and not to build some dlls twice 2010-09-15 13:04:23 +01:00
Rolf Bjarne Kvinge 81be63b52c mono_trace already adds a newline to trace messages, don't add another one 2010-09-15 12:16:12 +02:00
Marek Safar 78b80bc720 [639403] Fixes the endless recursion with hacked EOF 2010-09-15 10:26:38 +01:00
Marek Safar 55bd1d4360 Encode correctly all constants into a payload 2010-09-15 10:26:38 +01:00
Chris Toshok 7de7347c3c built a separate libmonoruntime for moonlight, so we can do -DMOONLIGHT just in the moonlight lib instead of globally. 2010-09-14 22:58:25 -07:00
Chris Toshok f4295a3be5 if we're building with moonlight enabled, don't build mdb. 2010-09-14 21:48:38 -07:00
Ankit Jain 82a3f04332 [xbuild] Fix handling of tool output.
The *StreamChanged event for ProcessWrapper may get parts of
long lines, so process the complete ones that we have (for matching
error/warning), and save rest for processing when the rest of it
is received.

Also, don't ignore empty lines.

* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
2010-09-15 04:40:52 +05:30
Gonzalo Paniagua Javier 0ce58c9023 GetProcessById now works on the Mac too
Ditto.
	This should fix MD problems when SHM is disabled.
2010-09-14 18:24:49 -04:00
Sebastien Pouliot 05f6ad4301 Correctly handle the (uncommon) 4 slashes //// case in Uri
* System/Uri.cs: Handle multiple starting slash correctly
* Test/System/UriTest2.cs: Add test cases with multiple slashes
2010-09-14 17:43:09 -04:00
Sebastien Pouliot cac14bee27 Fix some (long standing) NotWorking test cases on Uri
* System/Uri.cs: Fix Segments and username/password (unsupported) on
file:// URI
* Test/System/UriTest.cs: Remove [Category("NotWorking")] from some
tests and add a few additional (helpful) asserts.
2010-09-14 17:43:09 -04:00
Sebastien Pouliot a11f9e17c4 Fix Uri Host when a drive letter is used
* System/Uri.cs: For most scheme a drive letter is converted into an
host name (minus the ':' character)

* Test/System/UriTest2.cs: Add test cases for drives versus hosts
2010-09-14 17:43:08 -04:00
Rodrigo Kumpera c8aa61eb46 Fix crash in pedump.
* pedump.c (verify_image_file): Setup the fake assembly before
	doing full metadata verification since it does type loading.

	Fixes #598228
2010-09-14 18:40:34 -03:00
Zoltan Varga 37e6ae59b1 Fix warnings caused by the profiler api changes. 2010-09-14 20:46:21 +02:00
Rodrigo Kumpera aa5cefa80c Fix 64bits build.
* sgen-cardtable.c (sgen_card_table_get_card_data): Start
        must be incremented with and without overlapping cards.
2010-09-14 15:25:56 -03:00
Atsushi Eno 6bc9abe0a7 add more NET_4_0. 2010-09-15 01:53:41 +09:00
Atsushi Eno 5eb0299fc1 Add NET_4_0. 2010-09-15 00:39:54 +09:00
Marek Safar c448d87abb Fixes mixed line ending. 2010-09-14 15:49:13 +01:00
Marek Safar 161ee3d54a Merge branch 'marek' 2010-09-14 15:43:43 +01:00
Marek Safar 6d57da0310 Recover wrong invalid initializer syntax. 2010-09-14 15:41:17 +01:00
Marek Safar 68cc37dcca Finish predefined attributes instance access to allow compile time dynamic support in repl. 2010-09-14 14:13:44 +01:00
Carlos Alberto Cortez 682e52541d In 4.0 the constructors of TypeConverter.SimplePropertyDescriptor are protected.
* TypeConverter.cs: The constructors of SimplePropertyDescriptor
	are protected in 4.0.
2010-09-14 10:14:34 +02:00
Carlos Alberto Cortez fc01f5d598 Add a new test for TypeDescriptor.InterfaceType.
* TypeDescriptorTests.cs: New test for InterfaceType.
2010-09-14 10:14:34 +02:00
Carlos Alberto Cortez 88d9cb44a1 Implement TypeDescriptor.InterfaceType.
* TypeDescriptor.cs: Implement 4.0 InterfaceType property, which
	seems to be a simple dummy and empty class in .Net, internally
	used to represent all interfaces.
2010-09-14 10:14:34 +02:00
Carlos Alberto Cortez 9c24d407cf Remove the NET_2_0 directives from TypeDescriptor.cs
* TypeDescriptor.cs: Remove the NET_2_0 directives, as we don't
	need them anymore.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez 949d7305bb Remove the NET_2_0 and ONLY_1_1 directives from TypeDescriptorTests.cs
* TypeDescriptorTests.cs: Remove the NET_2_0 and ONLY_1_1
	directives, as we don't need them anymore.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez 013a527a9a Include TypeDescriptionProviderTest.cs in our build.
* System_test.dll.sources: Include
	TypeDescriptionProviderTest.cs in our build.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez 3d382ac842 Add new TypeDescriptionProviderTest.cs test file.
* TypeDescriptionProviderTest.cs: New test file.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez 9b850f2e49 Implement IsSupportedType, GetExtenderProviders and GetRuntimeType for TypeDescriptionProvider.
* TypeDescriptionProvider.cs: Implement 4.0 IsSupportedType,
	GetExtenderProviders and GetRuntimeType methods.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez b45d1da49d Remove the NET_2_0 directive from TypeDescriptionProvider.cs
* TypeDescriptionProvider.cs: Remove the NET_2_0 directive.
2010-09-14 10:14:32 +02:00
Atsushi Eno 19fee21615 ongoing standard endpoint configuration support work. 2010-09-14 21:14:00 +09:00
Jonathan Pryor 31190e15c3 Distribute DbmlSchema.xsd so that tarball builds work. 2010-09-14 06:39:57 -04:00
Atsushi Eno 395138f132 Add new properties in 4.0. 2010-09-14 16:43:56 +09:00
Atsushi Eno 56cc46da8c Avoid crash by missing config attributes. 2010-09-14 16:43:26 +09:00
Atsushi Eno 5d5be5a6fd Remove Console.WriteLine. 2010-09-14 16:32:31 +09:00
Marek Safar 9b916b2cbb Initialize all core types 2010-09-14 08:28:57 +01:00
Rodrigo Kumpera 09240fee8e Add v4.0 beta to runtime versions list. 2010-09-13 21:44:53 -03:00
Rodrigo Kumpera 9ae35b0139 Fix fallthru of EH block check.
* verify.c (mono_method_verify): Only skip dead code
	after checking for fallthru.

	* unverifiable_fallout_of_finally_block.il: Regression
	test for fallthru on dead code.

	Fixes #597072
2010-09-13 21:35:39 -03:00
Zoltan Varga 373a2f8170 Add casts to the macros on netbsd so the caller doesn't have to reference ucontext_t which is not available on some platforms like android. 2010-09-14 02:04:37 +02:00
Geoff Norton 4e5df169a5 The tid is passed around internally as a unsigned value.
We were having a crash on OSX due to thread->tid not equalling the
passed tid due to a signedness issue.
2010-09-13 18:43:32 -04:00
Sebastien Pouliot 60d5ffbd37 Fix URi tests (and class) to be omcpatible with both 2.0 and 4.0 (and SL4)
* System/Uri.cs: Fix some "bugs" that are not part of FX4 anymore.
Change how Query/Fragment are merged to match FX4 (while keeping it
compatible with buggy FX2 under the NET_2_0 profile)

* Test/System/UriTest.cs: Adjust test cases to work with 4.0. Mark with
NotDotNet two test cases that are Mono/Unix-specific
* Test/System/UriTest2.cs: Add new test cases where a relative Uri is
merged with an absolute Uri (some changes in SL4/FX4 wrt FX2)
* Test/System/UriTest3.cs: Adjust for bugs fixed after FX 2.0.
2010-09-13 17:38:42 -04:00
Zoltan Varga dea65b0a06 Bump minor version to 2 to be compatible with the runtime. 2010-09-13 23:21:52 +02:00
Marek Safar e812865ba6 Removed confusing catch error message. 2010-09-13 20:06:33 +01:00
Geoff Norton 7c1ad825bf Rename major -> major_collector and drop unguarded usage of ucontext_t.
Android defines a variable called "major" in its headers, lets rename
major -> major_collector to work around the conflict.

Not every architecture/platform has ucontext_t, so lets not strongly
type our contexts to that and let the macros do their job.
2010-09-13 14:39:41 -04:00
Geoff Norton dedbe0a079 Fix the build when compiling without shared handle support entirely
The wapi init functions call this even when shared is compiled out,
lets just return FALSE to get into the right codepaths.
2010-09-13 14:38:39 -04:00
Marek Safar 6d92a4f988 Add a test for arrays with dynamic elements. 2010-09-13 19:25:40 +01:00
Marek Safar fd1e37289c Implement foreach over nullable values. 2010-09-13 19:02:48 +01:00
Rodrigo Kumpera 1a1ccabce6 CompiledContext is no longer needed.
* MethodBuilder.cs (GetGenericArguments): No need to
	check for compiler context. It's gone.
2010-09-13 14:51:59 -03:00
Jonathan Pryor 7d8ee77c4a [sqlmetal] Fix /code from DBML file.
sqlmetal.exe is supposed to allow generating source code from a .dbml file:

	sqlmetal /code:foo.cs foo.dbml

However, this failed because the DbmlSchema.xsd file couldn't be found (so
that the DBML file could be validated).

Embed the DbmlSchema.xsd file so that the above `sqlmetal` command works.
2010-09-13 13:34:36 -04:00
Rodrigo Kumpera a0182452a3 MethodBuilder should return null for generic arguments of non generic method.
* MethodBuilder.cs (GetGenericArguments): Return null if not
	generic.

	* MethodBuilderTest.cs: Add test for #384127.

	Fixes bug #384127.
2010-09-13 14:26:30 -03:00
Marek Safar 705cfc4639 Keep only 1 using implementation and handle all nullable and dynamic cases there. 2010-09-13 17:53:42 +01:00
Marek Safar 63af9c8471 Better error reporting for missing identifiers. 2010-09-13 17:53:41 +01:00
Michael Hutchinson fbbffbcd74 [Embedding] Make mono-dl-fallback.h public-safe 2010-09-13 11:00:26 -04:00
Zoltan Varga 09e06783e4 Fix a problem in mono_arch_get_argument_info () introduced by the last change. 2010-09-13 15:56:40 +02:00
Zoltan Varga ffefb28b9b Fix a warning. 2010-09-13 15:45:59 +02:00
Atsushi Eno 5628b49a01 implemented large parts of WCF standard endpoints and configuration support. 2010-09-13 22:36:37 +09:00
Marek Habersack 28349ded65 [asp.net] Menu 4.0 List rendering mode JavaScript fixes
This makes the new script work correctly with IE, which has a different way of
hooking up of events and cancelling of their bubling. Previously the mouse-over
handler would be called for each and every submenu causing the leaf menus not
to appear. With this fix the handler is called only once.
2010-09-13 14:34:38 +02:00
Rodrigo Kumpera eb7a494efe Fix a warning.
* glib.h: Fix propotype.
2010-09-13 08:28:15 -03:00
Rodrigo Kumpera 321d7c1bdd Fix a sgen shutdown crash.
* threads.c (mono_thread_suspend_all_other_threads): wait_data
	must not be malloc'd since it holds managed pointers. Alloc
	it on stack since the struct is about 512/1024 bytes long.

	* threads.c (mono_thread_manage): Ditto.

	* threads.c (mono_threads_request_thread_dump): Ditto.
2010-09-13 08:11:55 -03:00
Geoff Norton 2f1c4b3a6c Implement GByteArray, g_hash_table_remove_all, g_queue_foreach and some missing byteswap macros. 2010-09-11 22:39:22 -04:00
Miguel de Icaza 8be892f4fa Do not install sample header, add to EXTRA_DIST 2010-09-11 15:32:29 -04:00
Ankit Jain f940df11fc [xbuild] Fix ConsoleLogger's output, extra blank lines etc. 2010-09-12 00:50:06 +05:30
Zoltan Varga 06ffc32e73 Remove -Werror from the eglib tests too. 2010-09-11 21:16:31 +02:00
Ankit Jain c3770263e0 [xbuild] Reduce ConsoleLogger's unnecessary output.
ConsoleLogger was emitting target names, even if they didn't have
any useful output, which resulted in lots of "Target foo:" in the
output, with no other related msgs.

 Target Foo:
 Target Bar:
 Target Xyz:

Emit project/target/task headers only if they result in a message,
error or warning. This results in much cleaner output.
2010-09-11 23:50:03 +05:30
Ankit Jain 0ec2760034 [xbuild] Log default msg for TargetSkipped if @reason is null or empty. 2010-09-11 23:50:02 +05:30
joncham fe0ebcfa51 Update mono.sln for 2010 2010-09-10 22:40:13 -04:00
joncham 66146c05b5 Add vcxproj files 2010-09-10 22:40:12 -04:00
joncham 8aa83b447c Migrate vcproj files to VS2010 2010-09-10 22:40:11 -04:00
unknown a6654bd366 [windows] Update Mono.def 2010-09-10 22:00:39 -04:00
Gonzalo Paniagua Javier 6334036a56 Fix the windows build
Avoid warnings in windows.
2010-09-10 20:52:09 -04:00
Marek Safar 4896adbd35 Always compare original block for cloned versions. 2010-09-10 22:44:52 +01:00
Marek Safar 76c18678c4 Tweak few error reports 2010-09-10 22:44:51 +01:00
Zoltan Varga d884317a28 Log the clearing of nursery fragments, avoid clearing small fragments twice. 2010-09-10 23:39:15 +02:00
Rodrigo Kumpera c543ac35a8 Rework major cardtable scan to have less active vars.
* sgen-marksweep.c (major_scan_card_table): Rework the small
        object size loop to have a single induction variable.
        In adition to that, add a fast initial card skip code.
2010-09-10 18:32:03 -03:00
Rodrigo Kumpera b8375e7411 Look for marked cards while copying them.
* sgen-cardtable.c (sgen_card_table_get_card_data): Check
	if any card is marked and return it.

	* sgen-marksweep.c (major_scan_card_table): Don't waste time
	scanning a block if no card was marked.
2010-09-10 18:32:02 -03:00
Rodrigo Kumpera de60b690e5 Manually hoist card lookup out of scan loops.
* sgen-cardtable.c (sgen_cardtable_scan_object): Lookup
	the card once and then bump over it. This saves a bunch
	of stores and opens up for later improvements.

	* sgen-marksweep.c (major_scan_card_table): Ditto.

	* sgen-cardtable.h: Add new inline function to return the
	card scan pointer of a given adddress.
2010-09-10 18:32:02 -03:00
Miguel de Icaza 6df4b5ac5e [Embedded] Add new fallback API to allow hooking up to the P/Invoke lookup system
This patch allows a developer to register a fallback for P/Invoke when
embedding Mono.   Typically this is done when you statically link all of your
libraries in some embedded systems and you need to dynamically resolve symbol
names.

There is a *sample* API included (but not compiled into Mono itself) called
mono-embed.c that shows a layman use of the API.   A full implementation would
mandate sorted tables, and would use a bsearch or a hashtable instead of having
linear searches.
2010-09-10 17:01:48 -04:00
Geoff Norton 26c1eb440c Forward port this change for MonoVS 2010-09-10 16:50:26 -04:00
Geoff Norton 82b7780781 fix typo
svn path=/branches/mono-2-6/mono/; revision=148851
2010-09-10 16:50:26 -04:00
Geoff Norton 2552cb04cd 2009-12-14 Geoff Norton <[email protected]>
* debugger-agent.c: The end_runtime_invoke guard isn't working
        on AMD64 as __builtin_frame_address (1) returns NULL.  Disable the
        behaviour by default, and make it runtime configurable.

svn path=/branches/mono-2-6/mono/; revision=148421
2010-09-10 16:50:26 -04:00
Marek Safar 345097fb05 Add comments. 2010-09-10 18:25:37 +01:00
Marek Safar 67a68cb18d New test. 2010-09-10 18:25:17 +01:00
Marek Safar 009c8b81ba Converting the switch statement into normal statement (the block part). 2010-09-10 18:20:04 +01:00
Andrew Jorgensen 217032f5c2 Dist the 2.0 resource files also 2010-09-10 10:55:20 -06:00
Andrew Jorgensen 5cab581fa9 Dist sgen-cardtable.h 2010-09-10 09:51:44 -06:00
Marek Safar 0e419dbf35 Update to the latest dmcs 2010-09-10 16:45:28 +01:00
Jb Evain b420eced14 Add test for #636939 2010-09-10 16:18:47 +02:00
Jb Evain 6a7443d808 [Fix] Fix the default binder when selecting params methods.
Use full assignability check instead of type equality
when selecting methods with a params array parameter.
Fixes #636939.
2010-09-10 16:18:47 +02:00
Marek Habersack ad75c45d76 [asp.net] Onobtrusive JavaScript for the 4.0 Menu control List mode 2010-09-10 15:36:09 +02:00
Marek Habersack f1d69fd4bc [asp.net] Menu 4.0 List mode rendering 2010-09-10 15:36:08 +02:00
Marek Habersack 50d0b513c7 [asp.net] Made GetExtension static and internal, so that it can be used from code outsude Unit 2010-09-10 15:36:08 +02:00
Marek Habersack a2d4e011e0 [asp.net] Added first test for Menu list rendering in 4.0 2010-09-10 15:36:08 +02:00
Marek Habersack c5e943e845 [asp.net] Standalone runner helper method to remove WebResource.axd from HTML now uses regexps 2010-09-10 15:36:08 +02:00
Atsushi Eno 1902671e15 Remove USE_DATA_CONTRACT_IMPORTER conditional compilation flag. 2010-09-10 22:26:44 +09:00
Atsushi Eno 9058a88120 Flush ongoing WCF Discovery configuration work. 2010-09-10 22:12:44 +09:00
Rolf Bjarne Kvinge c81152a0ab XmlFormatterDeserializer: handle ReflectionTypeLoadExceptions better 2010-09-10 12:44:35 +02:00
Marek Safar 2bded0cb1e When doing member access left side lookup the arity value is actually the exact value. 2010-09-10 11:37:29 +01:00
Marek Safar 667f95b865 Reject varianly implemented interface members. 2010-09-10 11:37:29 +01:00
Atsushi Eno 549e7b416e Add missing members and implement most of it. 2010-09-10 19:28:20 +09:00
Atsushi Eno e070ecd91e Cosmetic warning cleanups. 2010-09-10 18:49:35 +09:00
Atsushi Eno 869f5a07e2 Implement discovery version converter. 2010-09-10 18:48:14 +09:00
Atsushi Eno b15ed1c600 Add lacking property initializer. 2010-09-10 18:46:46 +09:00
Atsushi Eno d654648c71 Remove unnecessary common types (as they are imported from internal-visible ones). 2010-09-10 18:44:07 +09:00
Jb Evain da3532c006 Add another stub for the compatibility with the SL SDK 2010-09-10 11:40:50 +02:00
Jb Evain 1bf14c018e Fix the moonlight build 2010-09-10 11:22:05 +02:00
Atsushi Eno 9bf818f49a Ongoing WCF discovery configuration implementation. 2010-09-10 17:54:50 +09:00
Atsushi Eno 59de000b20 Avoid holding WebRequest. This should fix part of bug #636500. 2010-09-10 17:51:30 +09:00
Marek Safar 19c25f816c Merge branch 'marek' 2010-09-10 09:25:27 +01:00
Marek Safar 51b55628c9 Try to speep up the GetLocation by a bit. 2010-09-10 09:24:24 +01:00
Carlos Alberto Cortez 06921d30c2 Add a test case for DateTimeOffsetConverter converting to InstanceDescriptor.
* DateTimeOffsetConverterTests.cs: New test for conversions to
	InstanceDescriptor.
2010-09-10 04:55:30 +02:00
Carlos Alberto Cortez c7b2a29c8b Use the DateTimeOffset .ctor that .net uses when converting it to InstanceDescriptor.
* DateTimeOffsetConverter.cs: Use the same DateTimeOffset .ctor
	that .net uses when converting to a InstanceDescriptor.
2010-09-10 04:55:29 +02:00
Jb Evain 2f05148ec7 Add FileStream.Flush(bool) to the moonlight profile 2010-09-10 08:20:48 +02:00
Miguel de Icaza 55d8fccda4 [Fix] Correct fix for the g_shell_parse_argv bug
Simplifies the code a little bit by eliminating the in_quote variable,
but also fixes the rules to follow the requirements from the
"Shell Command Language" specification on the Unix03 site:

http://opengroup.org/onlinepubs/007908775/xcu/chap2.html#tag_001_002

In particular, the interpretation of the backslash inside double quotes
is limited to a handful of characters.   Notice that this differs from
the glib implementation which is not correct either.
2010-09-10 01:00:10 -04:00
Miguel de Icaza 0c7a8bc6a8 [Fix] Allow escape characters inside quoted text, and do not let nested quote reset the quoting state
This should fix #637680
2010-09-09 19:46:25 -04:00
Zoltan Varga 8e0aca7233 Fix x86 trace support after the callconv changes. 2010-09-10 00:37:18 +02:00
Marek Safar d81b893a07 Recover from broken single parameter 2010-09-09 20:14:54 +01:00
Chris Toshok 54e37da2c0 move the call to mono_gc_base_init into mono_debug_init
mono_debug_init is a public embedding interface and calls into
mono_debugger_initialize, which registers a GC root.  driver.c calls
mono_gc_base_init before calling mono_debug_init for this reason, but
that's not an option for embedding (as mono_gc_base_init is internal.)

since mono_gc_base_init is idempotent, just add a call to
mono_debug_init (and remove the driver.c call).  Document (in sgen-gc
and sgen-gc.h) the fact that although mono_gc_base_init is idempotent,
changing LOCK_INIT to something non-idempotent will break this.
2010-09-09 11:53:50 -07:00
Marek Safar 32d7907374 Report precise error about local variable hiding 2010-09-09 19:51:26 +01:00
Marek Safar 53fb1fbdb8 Do all possible mistaken empty statement checks in the parser 2010-09-09 17:41:04 +01:00
Marek Safar 0d51dfbe9e Don't recreate top-level destructor block, it carries precious stuff 2010-09-09 17:12:21 +01:00
Andrew Jorgensen 9fac441697 Various cleanup and addition 2010-09-09 09:59:15 -06:00
Gonzalo Paniagua Javier cfd88a0277 UDP sockets allow connections to Any
UDP sockets that call Connect() to set a default address for datagrams
	sent, can call Connect() again with IPv6Any or Any to 'disconnect'.

	Fixes bug #639098.
2010-09-09 11:48:08 -04:00
Marek Safar 98bc5739ec Try to recover after each wrong statement. 2010-09-09 15:58:13 +01:00
Marek Safar 679db6e456 __arglist can be used as an expression. 2010-09-09 15:00:50 +01:00
Marek Safar 1384869c80 The first push to make flow-analysis work for complex blocks.
All blocks are now strictly hierachical which greatly simplifies many
things and fixes many subtle bugs with local names. Removing the block
cross references helps scalling when compiling deeply nested blocks or
large method bodies including linq. Prepared possible dynamic statements
to work with variable declarators.
2010-09-09 14:01:00 +01:00
Atsushi Eno 8b8025e1d8 It should not fail to generate client proxy generation for having two "IsRequest=false" messages (it is set only in ContractDescriptionGenerator). 2010-09-09 21:51:31 +09:00
Jb Evain 6a121f6a36 add mono-abi-info to gitignore 2010-09-09 10:14:40 +02:00
Jb Evain 427b5a7a2d add ignore file 2010-09-09 10:14:01 +02:00
Jb Evain a24fee31e6 Fix System.Core usage of bootstrap .sources from the normal .sources 2010-09-09 10:13:10 +02:00
Jb Evain b5b728f0a2 Fix System usage of bootstrap .sources from the normal .sources 2010-09-09 10:12:47 +02:00
Jb Evain 571ee32937 Fix corlib usage of bootstrap .sources from the normal .sources 2010-09-09 10:12:29 +02:00
Zoltan Varga 4d63fe4542 Clean the aot log file too. 2010-09-09 05:42:11 +02:00
Zoltan Varga 2f6af2eb14 Avoid freeing the allocated monitors on shutdown, it seems to cause crashes
when running with SGEN, since SGEN writes to those arrays in:

==29095==    at 0x6844E5: add_or_remove_disappearing_link (sgen-gc.c:4143)
==29095==    by 0x6845F8: mono_gc_register_disappearing_link (sgen-gc.c:4167)
==29095==    by 0x67DE35: clear_domain_process_object (sgen-gc.c:1384)
==29095==    by 0x67DEA3: clear_domain_process_major_object_callback (sgen-gc.c:1400)
==29095==    by 0x6DE2DC: major_iterate_objects (sgen-marksweep.c:692)
==29095==    by 0x67E00B: mono_gc_clear_domain (sgen-gc.c:1459)
2010-09-09 01:13:28 +02:00
Jb Evain b2b1e43507 Fix the monodroid and monotouch profile builds 2010-09-08 18:48:36 +02:00
Jb Evain 48bd806f00 Fix the monodroid profile's defines 2010-09-08 18:48:36 +02:00
Jb Evain d0e34f2a14 Factorize the System.Core monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:35 +02:00
Jb Evain aaa0bc4c2d Factorize the System.Xml monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:35 +02:00
Jb Evain bd3580ecd8 Factorize the System.Runtime.Serialization monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:35 +02:00
Jb Evain 3f52624d8f Fix the mobile_System.ServiceModel.Web include 2010-09-08 18:48:35 +02:00
Jb Evain 06a360ed49 Fix the mobile_System.Data include 2010-09-08 18:48:34 +02:00
Jb Evain 53a48d5966 Factorize the System.Web.Services monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:34 +02:00
Jb Evain db99fdfa94 Factorize the System.Data monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:34 +02:00
Jb Evain 704d43d176 Factorize the System.ServiceModel.Web monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:33 +02:00
Jb Evain ec4dc684f1 Factorize the System.ServiceModel monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:33 +02:00
Jb Evain acb6984c61 Factorize the monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:33 +02:00
Jb Evain 3dc0642ef5 Enable the mcs monodroid build from mono's configure 2010-09-08 18:48:33 +02:00
Jb Evain cd6a8e3028 Orchestrate the monodroid build bootstrap 2010-09-08 18:48:32 +02:00
Jb Evain 2d49410bb1 Factorize the monotouch build into a mobile build for monodroid and monotouch 2010-09-08 18:48:32 +02:00
Jb Evain a2a1a0ffeb Enable the Mono.Data.Sqlite build for monodroid 2010-09-08 18:48:32 +02:00
Jb Evain bd1a50d903 Enable the Mono.Security build for monodroid 2010-09-08 18:48:31 +02:00
Jb Evain 25a5844dff Enable the System.Transactions build for monodroid 2010-09-08 18:48:31 +02:00
Jb Evain 45a8df4b7b Make HttpUtility compilable on MonoDroid as well as MonoTouch 2010-09-08 18:48:31 +02:00
Jb Evain 4f87b29b20 Enable the System.Runtime.Serialization build for monodroid 2010-09-08 18:48:31 +02:00
Jb Evain df235555ea Enable the System.ServiceModel.Web build for monodroid 2010-09-08 18:48:30 +02:00
Jb Evain ab2774a74c Enable the System.ServiceModel build for monodroid 2010-09-08 18:48:30 +02:00
Jb Evain 41f67f6409 Enable the System.Web.Services build for monodroid 2010-09-08 18:48:30 +02:00
Jb Evain 432d531126 Enable the System.Data build for monodroid 2010-09-08 18:48:29 +02:00
Jb Evain 0253e041a7 Enable the System.Xml build for monodroid 2010-09-08 18:48:29 +02:00
Jb Evain 804b3d42d0 Enable the System.Core build for monodroid 2010-09-08 18:48:28 +02:00
Jb Evain 9cb87907d7 Enable the System build for monodroid 2010-09-08 18:48:28 +02:00
Jb Evain a207498c05 Enable the corlib build for monodroid 2010-09-08 18:48:28 +02:00
Jb Evain 06030bfc20 Define MOBILE for the monotouch build as a shared symbol between MonoTouch and MonoDroid 2010-09-08 18:48:28 +02:00
Jb Evain 0ce3927964 Add the monodroid profile 2010-09-08 18:48:27 +02:00
Jb Evain 256bbe90bf Remove no-op code 2010-09-08 18:48:27 +02:00
Jb Evain b49cfe438a Simplify ifdefs specifics to MOONLIGHT 2010-09-08 18:48:27 +02:00
Jonathan Pryor b9e2cdf84c [mdoc-update] Delegate types should get <returns/>, not <value/>.
Oops, that's a long-standing bug...  Found by Joel Marcey from ECMA.
2010-09-08 08:21:54 -04:00
Gonzalo Paniagua Javier f70b5e18f9 Add tests for g_strdupv
Add test for g_strdupv and check for NULL in g_strdupv.
2010-09-07 18:30:53 -04:00
Zoltan Varga dcf27c2572 Add a few more remaps. 2010-09-07 23:42:57 +02:00
Zoltan Varga 4522b4f11b Remap g_strdupv too. 2010-09-07 23:26:56 +02:00
Marek Habersack 8fd3e7fae6 [asp.net] Fix for bug #636709. ClientID must be reset when ID is assigned. 2010-09-07 23:20:28 +02:00
Marek Habersack b7643fc22d [asp.net] Fix for bug #636475. A typo caused ads not to be matched in ChooseAd
The second loop over the ads hashtable must not reject an app if the keyword filter is empty.
2010-09-07 22:09:48 +02:00
Gonzalo Paniagua Javier dcdf9083e1 Add wsdl help generator to the 4.0 files
Ditto.

	Fixes bug #636841.
2010-09-07 14:20:31 -04:00
Miguel de Icaza 1fdf1789e0 Add profile docs 2010-09-07 11:07:58 -04:00
Jonathan Pobst 92f60fbffa Merge branch 'master' of github.com:mono/mono 2010-09-06 21:59:48 -05:00
Jonathan Pobst 59717d2292 Normalize line endings. 2010-09-06 21:59:26 -05:00
Carlos Alberto Cortez f2c30f6de9 Add DateTimeOffsetConverter.cs and DateTimeOffsetConverterTests.cs to our build.
* System.dll.sources: Add DateTimeOffsetConverter.cs.
	* System_test.dll.sources: Add DateTimeOffsetConverterTests.cs.
2010-09-07 04:48:40 +02:00
Carlos Alberto Cortez 9fdb1b7f73 Add new DateTimeOffsetConverterTests.cs test file.
* DateTimeOffsetConverterTests.cs: New file.
2010-09-07 04:48:40 +02:00
Carlos Alberto Cortez f14136e50f Implement System.ComponentModel.DateTimeOffsetConverter.
* DateTimeOffsetConverter.cs: Implement new 4.0 class.
2010-09-07 04:48:39 +02:00
Atsushi Eno 3a7d8b3a72 Avoid crash for use of deprecated InstallTrackingHandler in Snow Leopard. 2010-09-07 12:25:14 +09:00
Rodrigo Kumpera 224ad766ef Fix build.
* bug-348522.2.cs: gmcs now complains about a thinko here.
2010-09-06 18:16:32 -03:00
Rodrigo Kumpera 78d5597e11 Fix 64bits builds.
* sgen-cardtable.h (sgen_card_table_get_card_address): This
	needs marking under SGEN_HAVE_OVERLAPPING_CARDS too.
2010-09-06 18:16:32 -03:00
Rodrigo Kumpera e73810916c Check for a parent extending a generic instantiation of the child.
* class.c (mono_class_create_from_typedef): If if any parent
	doesn't extend the generic instantiation.

	Fixes #604270
2010-09-06 18:16:31 -03:00
Jonathan Pryor 768588fb43 [mdoc-update] Clean up System.Object craziness in ILAsm generation.
The problem: ILAsm has 'object' as a keyword alias for System.Object, and
99.99% of the time should use 'object'...except in 'extends' declarations,
where it remains System.Object and not 'object'.

The solution: Have an ILFullMemberFormatter.WithinExtends "flag" which
controls whether we generate System.Object or object.

The problem: this is flaky as hell, and results 'class A:List<object>'
generating:

	.class public auto ansi beforefieldinit MyList
	extends System.Collections.Generic.List`1<System.Object>

This is wrong, as it should be List`1<object>, not List`1<System.Object>.
(At least, monodis(1) produces List`1<object>...)

So, instead of the craziness that is WithinExtends, just check check for
System.Object as the base type immediately after the 'extends' generation.  If
it's System.Object, keep it, otherwise call full.GetName() (and remove the
leading "class " that's generated from GetName).
2010-09-06 16:19:26 -04:00
Rodrigo Kumpera 7c3cf50014 Add regression test for #633248 2010-09-06 15:41:15 -03:00
Rodrigo Kumpera 5f11e71627 Properly handle stack merges of leave.
* verify.c (do_leave): Set the target of leave.

	* verify.c (mono_method_verify): Merge the resulting empty
	stack of a leave instruction with it's target.

	Fixes #633248
2010-09-06 14:58:08 -03:00
Atsushi Eno ecd96c968a Fix NetworkInterface marshaling size on OSX and avoid crash. 2010-09-06 16:29:26 +09:00
Zoltan Varga 2ee94eab15 Fix the build. 2010-09-05 20:29:01 +02:00
Carlos Alberto Cortez 39cd458ad6 New test for CultureInfoConverter.GetCultureName.
* CultureInfoConverterTest.cs: New test for GetCultureName.
2010-09-05 05:53:24 +02:00
Carlos Alberto Cortez 59b6afce3c Implement CultureInfoConverter.GetCultureName.
* CultureInfoConverter.cs: Implement GetCultureName.
2010-09-05 05:53:24 +02:00
Carlos Alberto Cortez 9c69bf0aa1 Remove the NET_2_0 directives from CultureInfoConverter.cs
* CultureInfoConverter.cs: Remove the NET_2_0 directive.
2010-09-05 05:53:23 +02:00
Carlos Alberto Cortez a9897bfc49 Add AttributeCollectionTest.cs to System_test.dll.sources.
* System_test.dll.sources: Add AttributeCollectionTest.cs.
2010-09-05 05:53:23 +02:00
Carlos Alberto Cortez ea47a54561 Add new AttributeCollectionTest file.
* AttributeCollectionTest.cs: New test file.
2010-09-05 05:53:23 +02:00
Carlos Alberto Cortez a600dc6c0a Add 4.0 Attributes property and protected ctor to AttributeCollection.
* AttributeCollection.cs: Add 4.0 Attributes property as well
	as a new parameterless ctor.
2010-09-05 05:53:23 +02:00
Carlos Alberto Cortez 3b072eb567 Remove the NET_2_0 directives from AttributeCollection.cs.
* AttributeCollection.cs: Remove the NET_2_0 directives, as well
	as the else case for it (we are always NET_2_0 now).
2010-09-05 05:53:23 +02:00
Rodrigo Kumpera ddf6f6d9af Merge branch 'sgen_cardtable_optimization_work' 2010-09-04 17:33:39 -03:00
Rodrigo Kumpera 8d3625a3a6 Fix a race condition in barriers using cardtable.
* sgen-gc.c: Introduce dummy_use function that forces
	the compiler to keep a given value alive until the call
	to it.

	* sgen-gc.c (mono_gc_wbarrier_set_field): Use dummy_use to
	avoid race condition between the store and the barrier.

	* sgen-gc.c (mono_gc_wbarrier_set_arrayref): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_generic_store): Ditto.

	This pattern of usage is the same we do with managed code
	write barrier. The race condition is extremely race and
	requires the thread to be interrupted in between the store
	and the barrier, which is a very tiny narrow window.
2010-09-04 17:30:45 -03:00
Rodrigo Kumpera 6830982e46 Optimize cardtable unmanaged array copy.
* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Avoid locking
	if using cardtables. Even thou the new code looks slower
	than a plain memmove, it has the advantage of not taking
	locks, which means it's much more scalable.

	Array copy under sgen/cardtables was 1.6x slower than with
	boehm. With this patch it reduces to 1.54x. The serial
	performance speedup is nice, but it is much more helpfull
	in multi-threaded workloads.
2010-09-04 17:30:45 -03:00
Rodrigo Kumpera a1457334c9 Fix a warning 2010-09-04 17:30:45 -03:00
Rodrigo Kumpera 6bff775ab3 Optimize the cardtable path a bit more.
* sgen-gc.c: Avoid taking locks for single pointer barriers.
2010-09-04 17:30:45 -03:00
Rodrigo Kumpera f78711ab87 Optimize major cardtable scanning by about 15%.
* sgen-cardtable.c: Move a bunch of stuff to new header.

	* sgen-cardtable.h: New header with functions meant to
	be inlined.

	* sgen-gc.c: Use new header.

	* sgen-marksweep.c (major_scan_card_table): Introduce fast
	version of some macros that avoid a few indirections.
2010-09-04 17:30:44 -03:00
Rodrigo Kumpera 60ce316b34 Better cardtable stats gathering codebase. 2010-09-04 17:30:44 -03:00
Rodrigo Kumpera 21153e5e10 Add notes when to use cardtable and remset. 2010-09-04 17:30:44 -03:00
Rodrigo Kumpera 37da7a177a Use los scanning function for big objects on major heap.
* sgen-cardtable.c (sgen_cardtable_scan_object): The
	source of the cardtable can now be supplied, this is needed
	since major blocks can't use regular card checking code here.

	* sgen-los.c (los_scan_card_table): Adjust to signature
	change in sgen_cardtable_scan_object.

	* sgen-marksweep.c (major_scan_card_table): If the block
	size is larger than a card it makes more sense to loop
	around objects and not cards since objects might be scanned
	twice since a card can be shared between two of them.

	In such case the cards of a block must be copied to a side
	buffer since we are no longer looping one by one. This ia
	a problem when two objects share a marked card as the first
	can cause it to be left cleared and not have the second one
	scanned.

	Another advantage of this patch is that it enables partial
	scanning of larger array in the major heap.
2010-09-04 17:30:44 -03:00
Rodrigo Kumpera 1d4a9f72df Move core of los scanning into cardtable codebase.
* sgen-los.c (los_scan_card_table): Move meat of
	this function into a separate one.

	* sgen-cardtable.c: New function sgen_cardtable_scan_object.

	* sgen-gc.h: Add sgen_cardtable_scan_object.
2010-09-04 17:30:43 -03:00
Rodrigo Kumpera 926f446479 Micro optimize cardtable scanning
* sgen-marksweep.c (major_scan_card_table): Don't load
	some fields if the block has no references.
2010-09-04 17:30:43 -03:00
Rodrigo Kumpera 7b3c9df864 Add stats for cardtable processing time 2010-09-04 17:30:43 -03:00
Gonzalo Paniagua Javier 25681a9374 Fix return value of items_read
items_read was not being initialized and it was not being set in the
	fast common case of g_utf8_to_utf16().
2010-09-04 14:24:54 -04:00
Gonzalo Paniagua Javier a40645b6af Fixed GetLogicalDriveString
When calling GetLogicalDriveString, icall.c was passing the
	length in the wrong units.

	GetLogicalDriveString now translates any octal sequence found
	into its corresponding byte. Use the UTF16 length
	('items_written') instead of the UTF8 input string length
	('items_read') when computing the total size.
2010-09-04 14:02:17 -04:00
Jonathan Pryor 64091c3d00 [mdoc-update] Properly map System.IntPtr to 'native int' for ILAsm.
Similarly, System.UIntPtr maps to 'native unsigned int'.
2010-09-04 12:57:42 -04:00
Jonathan Pryor ea3a42ff30 [mdoc-update] Add support ILAsm language output. 2010-09-03 22:03:33 -04:00
Jonathan Pryor f39388d78d [mdoc-update] Add support for multiple languages in type/member signatures.
We're planning on adding IL signature support for <TypeSignature/> and
<MemberSignature/>, so having arrays of MemberFormatters instead of having
single instances of them will make supporting IL output easier.
2010-09-03 22:03:32 -04:00
Gonzalo Paniagua Javier 46bd5cc8b4 Use UTF8 instead of ASCII when reading mount info
This allows for mount points with UTF8 characters in them.
2010-09-03 17:27:08 -04:00
Gonzalo Paniagua Javier cdf1247873 Linux /proc/mounts might have escaped characters
Translate escaped characters in mount paths.

	Fixes bug #637078.
2010-09-03 16:01:42 -04:00
Gonzalo Paniagua Javier ecb03f01e1 Allow ordinal entry points in windows.
Windows allows entry point names like "#10" which refer to the Nth
	function (n > 1 and less than the highest ordinal value in the .def
	file).

	Fixes bug #636966.
2010-09-03 14:58:50 -04:00
Zoltan Varga 87531b4eb2 Fix a crash when the signature of the Main method could not be loaded. Fixes #636794. 2010-09-03 19:18:25 +02:00
Atsushi Eno 24ec8bb6e3 Ongoing Discovery duplex (UDP) implementation (not working yet). 2010-09-03 18:45:15 +09:00
Jb Evain 5e32d42531 Remove workaround for moonlight now that System.dll's WebExceptionStatus is properly compiled 2010-09-03 11:31:17 +02:00
Jb Evain 89691c3243 Fix the visiblity of WebExceptionStatus for moonlight in the same way as WebException 2010-09-03 11:31:17 +02:00
Atsushi Eno 9adb6a368d Fix another non-null RemoteAddress dependency. 2010-09-03 16:18:59 +09:00
Atsushi Eno 3905366d74 Add some argument check. RemoteAddress could be null for callback client runtime channel. 2010-09-03 15:14:32 +09:00
Carlos Alberto Cortez 000bfb7c67 [fix] #512136: Invalidate the selection border in ListBox when scrolling.
* ListBox.cs: Invalidate the selection border when horizontally
	scrolling - the call to ScrollWindow is not enough, so we need
	to update by ourselves the new margin of the selection border by
	a quite small offset.
	Fixes #512136.
2010-09-03 01:50:22 +02:00
Carlos Alberto Cortez 8a9f3a108d [fix] #581287: Use menu color to paint the background of NotifyIcon.
* NotifyIcon.cs: Use SystemColors.Menu to paint the background
	of the control, since at least in gnome the menu and the panel
	share the back color (unfortunately we can't just leave the rectangle
	transparent, as some window managers use a default white).
	Fixes #581287.
2010-09-03 01:50:21 +02:00
Tom Hindle 364cfd0502 [fix] #624915: Check the valid range of the value of the vertical scroll in TreeView.
* TreeView.cs: Create a new method to check that the new valid
	for the vertical scroll is in the valid range - this is
	specially important when the size of the TreeView can show less
	than one element.
	Fixes #624915.
2010-09-03 01:50:21 +02:00
Atsushi Eno a5442470a2 Cosmetic exception type change and suppress test failures. 2010-09-03 10:12:13 +09:00
Jonathan Pryor 4ea7003915 [mdoc-update-ecma-xml] Assembly [CLSCompliant] shouldn't replace Type version.
If a type has e.g. [CLSCompliant(false)], then the Assembly's
[CLSCompliant(true)] shouldn't replace it.
2010-09-02 18:27:15 -04:00
Jonathan Pryor fe28f4ceef [mdoc-export-ecma-xml] Generate [CLSCompliant] attribute on types.
If the assembly has [CLSCompliant], then "forward" that to the type.
2010-09-02 18:27:14 -04:00
Jonathan Pryor 51d8575e72 [mdoc-update] Generate an index.xml file when --type is used.
(Yet another "Let's help ECMA!" fix...)

For performance reasons, I want to use this workflow:

	mdoc x-msitomsx -o slashdocs msidocs --type=A
	mdoc update -o docs -i slashdocs/mscorlib.xml mscorlib.dll --type=A
	mdoc update-ecma-xml -o CLILibraryTypes.xml --type=A

That is, have a consistent set of --type=TYPEs that are passed between the
three apps.  I want to do this because otherwise 'mdoc update' takes
12 minutes to process the assemblies I need; with this approach, it takes
12 seconds.

Unfortunately, 'mdoc update-ecma-xml' needs an index.xml so it can obtain
assembly-level custom attributes, and 'mdoc update --type...' wasn't creating
an index.xml file.

Doh!

Fix: IFF docs/index.xml is NOT present, create a docs/index.xml file which
contains ONLY the types & namespaces that were encountered.

If docs/index.xml IS present, it's unchanged.

This fix allows the above workflow to Just Work, while maintaining the other
"I know this type has been updated, let's not process the entire assembly"
workflow that --type allows.
2010-09-02 18:27:14 -04:00
Jonathan Pryor d1e12be746 [mdoc-update] Add -fignore-missing-types option.
This prevents an error if you specify a --type=TYPE and TYPE wasn't found
within the assembly you're updating.

I'm adding this so that I can have a single unified types.response file for
all types we're adding for ECMA (which contains types from several assemblies)
without getting an error when running 'mdoc update' against the source
assemblies.
2010-09-02 18:27:14 -04:00
Jonathan Pryor 49311d49fb [mdoc-update] Add --help text for --exceptions=added. 2010-09-02 18:27:13 -04:00
Jonathan Pryor d9eece9b5b [mdoc-x-msitomsx] Ignore <platformNotes/>, <sections/>, etc.
With this, we convert the mscorlib types that we care about w/o validation
errors.  Hurrah!
2010-09-02 18:27:13 -04:00
Jonathan Pryor 2bf7dabcea [mdoc-x-msitomsx] Support legacy and external links.
<externalLink/> is mapped to an HTML <a/> (and thus a
<format type="text/html"/> wrapper), while <legacyLink/> is just italicized.
2010-09-02 18:27:11 -04:00
Jonathan Pryor a691f85775 Fix <embeddedLabel/>, add <i/> as a valid <para/> child.
<embeddedLabel/> was skipping the content, resulting in <i>:</i>.  Oops.

And since <embeddedLabel/> generates <i/>, validation was failing within
<para/>, so add it.
2010-09-02 18:27:11 -04:00
Jonathan Pryor 17970c9ce4 [mdoc-x-msitomsx] Additional <token/> replacement values. 2010-09-02 18:27:11 -04:00
Jonathan Pryor 834097329c [mdoc-x-msitomsx] Support <embeddedLabel/>, additional <token/> values. 2010-09-02 18:27:10 -04:00
Jonathan Pryor 151a1e40ca [mdoc-x-msitomsx] Convert <notesForInheritors/> elements into <block/>s. 2010-09-02 18:27:10 -04:00
Jonathan Pryor 496a5503fb [mdoc-x-msitomsx] Improve <example/> generation so it validates.
We were getting a <description/> element which should be skipped.
2010-09-02 18:27:10 -04:00
Jonathan Pryor 0af725fe76 Place ignored elements together for consistency. 2010-09-02 18:27:08 -04:00
Jonathan Pryor 672de41476 [mdoc-x-msitomsx] Ignore <internalOnly/>. 2010-09-02 18:27:08 -04:00
Jonathan Pryor 382b69b281 [mdoc] Generate <threadsafe/> from <threadSafety/>.
We also need to update monodoc-ecma.xsd so that multiple <para/>s are valid
within <threadsafe/>; otherwise, we report validation errors on the
'mdoc x-msitomsx' output.
2010-09-02 18:27:08 -04:00
Jonathan Pryor e225e5e0e3 [mdoc-x-msitomsx] Add support for converting <list/>s. 2010-09-02 18:27:07 -04:00
Jonathan Pryor 426585a2a3 [mdoc-x-msitomsx] Import <notesForImplementers/> and <notesForCallers/>.
In the original XML, these are sibling elements to <remarks/>, but they need
to be imported as children of <remarks/> as <block/> is the closest matching
element, and <block/> is a child of <remarks/>.
2010-09-02 18:27:07 -04:00
Jonathan Pryor cd7101c438 [mdoc-x-msitomsx] Ignore <clsCompliantAlternative/> elements. 2010-09-02 18:27:06 -04:00
Jonathan Pryor d1e78d8c67 [mdoc-x-msitomsx] Replace <token/> with literal text. 2010-09-02 18:27:06 -04:00
Jonathan Pryor 75453711dc [mdoc-x-msitomsx] Mutate <permission/> elements. 2010-09-02 18:27:05 -04:00
Jonathan Pryor 32429153d6 [mdoc-x-msitomsx] Generate <block/> from <alert/>. 2010-09-02 18:27:05 -04:00
Jonathan Pryor 0f8d82d41f [mdoc-x-msitomsx] Generate <typeparam/> from <genericParameters/>. 2010-09-02 18:27:05 -04:00
Jonathan Pryor 998afc69c7 Make sure that Resources/msitomsx.xsl is distributed. 2010-09-02 18:27:04 -04:00
Jonathan Pryor 4e4d793c59 [mdoc-validate] Add support for validating 'csc /doc' XML.
This will help in determining which elements I'm not converting within
'mdoc x-msitomsx'.
2010-09-02 18:27:04 -04:00
Jonathan Pryor de25ba54d4 [mdoc-x-msitomsx] Ignore <changeHistory/>, <relatedTopics/>. 2010-09-02 18:27:03 -04:00
Jonathan Pryor a3e3360ae0 [mdoc-x-msitomsx] Map <codeInline/> to <c/>, <codeReference/> to <code/>. 2010-09-02 18:27:03 -04:00
Jonathan Pryor d063905058 [mdoc-x-msitomsx] Generate <seealso/> from <equivalentCodeEntity/>. 2010-09-02 18:27:03 -04:00
Jonathan Pryor 2500f6d343 [mdoc-x-msitomsx] Add <table/> conversion support. 2010-09-02 18:27:02 -04:00
Jonathan Pryor b835ae0dad [mdoc-x-msitomsx] Generate a /doc/assembly/name attribute.
This is so our generated XML files more closely match 'csc /doc' format.
2010-09-02 18:27:02 -04:00
Jonathan Pryor 5dd9d52ef3 [mdoc-update] Add --library=VALUE option.
This is so that we can share response files between 'mdoc x-msitomsx',
'mdoc update', and 'mdoc update-ecma-xml', thus ensuring that only
the types we care about are imported and processed.
2010-09-02 18:27:00 -04:00
Jonathan Pryor e5342b866a [mdoc-x-msitomsx] Flush --help documentation. 2010-09-02 18:26:59 -04:00
Jonathan Pryor 59e6e461df [mdoc] Add "internal" 'mdoc x-msitomsx' command.
The 'mdoc x-msitomsx' command converts a Microsoft internal XML dialect into
Microsoft XML Documentation format (e.g. what 'mdoc export-msxdoc' generates).

The 'mdoc x-msitomsx' command is internal, i.e. 'mdoc help' won't list it,
as this format is completely internal to Microsoft (and likely subject to
change without notice); this command only exists to help facilitate the ECMA
standardization process, converting Microsoft's existing (internal)
documentation into a format usable by the ECMA committee.
2010-09-02 18:26:59 -04:00
Jonathan Pryor ef782c2adb [mdoc-update] Refactor out Microsoft XML Documentation import.
Another side effect of having the DocumentationImporter abstraction is that
we're no longer limited to importing from either ECMA XML, Microsoft XML, or
both; we can now import from arbitrarily many Microsoft XML sources.

(Arbitrarily many ECMA XML sources likely won't work, at present, since the
ECMA XML file controls type + member enumeration, but I don't think this will
be needed any time soon...)
2010-09-02 18:26:58 -04:00
Jonathan Pryor 90a8e96476 [mdoc-update] Refactor out ECMA XML import into EcmaDocumentationImporter.
Victory for less spaghetti code...
2010-09-02 18:26:58 -04:00
Gonzalo Paniagua Javier d6a8c61a19 Return IPv6 addresses
We were not returning IPv6 addresses if there was no IPv6 configured
	interface. Now we will return those addresses if ipv6 is enabled by
	configuration.

	Fixes bug #636517.
2010-09-02 17:26:18 -04:00
Sebastien Pouliot dc669b3572 Ensure OnUploadProgressChanged is called on the right thread
* mcs/class/System.Net/System.Net/WebClient_2_1.cs: Use sync_context to
post the call to OnUploadProgressChanged
2010-09-02 16:18:40 -04:00
Rodrigo Kumpera 60b795f713 During inlining, verify the method before producing locals.
* method-to-ir.c (inline_method): We verify the inlined method
	before variables are created for locals since this can assert.
	Some check on locals are only done by the IL verifier so it's
	not enough to just check if the header decoded fine.

	* mini.c (mini_method_verify): Add parameter telling if we
	should fail the compile or not.

	* mini.c (mono_compile_is_broken): Pass the method explicitly
	as it now can be diferent than cfg->method.

	* mini.h: Export mono_compile_is_broken instead of
	mini_method_verify.

	Fixes #560200
2010-09-02 15:32:16 -03:00
Rodrigo Kumpera 9d4a7883fd Verify locals when checking a method header.
* metadata-verify.c (mono_verifier_verify_method_header): If
	the header has a locals token, verify the corresponding row
	in the standalonesig table.
2010-09-02 15:32:16 -03:00
Atsushi Eno e97fb3666b Repeat UDP message sending, and do not process duplicate messages received. Makes UDP transmit robust. 2010-09-03 01:48:27 +09:00
Sebastien Pouliot 56a925b467 Do not set the exception to NotSupportedException for denied headers
* mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs: Do not
throw a NotSupportedException here since it regress some DRT (like 656).
The (hopefully) correct fix (for DRT3001) will be committed inside moon
2010-09-02 11:13:38 -04:00
Jb Evain 85c0976c3d [Fix] fix regression in Delegate.CreateDelegate
2ec0ab59fe caused a regression in
Create.Delegate where the overload which doesn't take a firstArgument
could be used to create closed over null delegates while this
overload doesn't allow it.
2010-09-02 15:59:58 +02:00
Jb Evain 591252c45b Add a test for the regression to Delegate.CreateDelegate triggered by 2ec0ab59fe 2010-09-02 15:58:20 +02:00
Atsushi Eno 65e5d6381c moonlight build workaround: smcs somehow rejects to compile this code. 2010-09-02 21:53:09 +09:00
Zoltan Varga 195519fcb9 Add some comments about the current state of the precise stack scanning code. 2010-09-02 14:06:39 +02:00
Jérémie Laval 840fed03fc [Plinq] Force strict parallelism in all PLinq unit tests 2010-09-02 11:11:50 +01:00
Jérémie Laval b83e58a461 [PLinq] Check ExecutionMode before executing sequentially 2010-09-02 11:11:26 +01:00
Jérémie Laval 19950d68d1 [PLinq] Add automatic sequential processing of query 2010-09-02 10:35:45 +01:00
Jérémie Laval f724808a29 [PLinq] Add the plumbery for checking source data size when possible and setting ShouldBeSequential appropriately 2010-09-02 10:35:45 +01:00
Jérémie Laval eae326c71c [PLinq] Sanitize QueryOptions to use property everywhere and add ShouldBeSequential option. 2010-09-02 10:35:45 +01:00
Jérémie Laval 4dfbfdc566 Revert "[PLinq] Honor WithDegreeOfParallelism if present"
This reverts commit 59260b1df7.

The degree of parallelism value was actually already registered somewhere else.
2010-09-02 10:35:45 +01:00
Atsushi Eno 270ab972e8 Close AnnouncementService in the test cases. Assert that relevant ports become available. 2010-09-02 18:24:51 +09:00
Atsushi Eno 271213c255 Throw EndpointNotFoundException when it cannot connect to the remote server. 2010-09-02 12:04:29 +09:00
Zoltan Varga ca900084e3 Enable system aot by default only on x86/amd64 linux. 2010-09-02 00:43:20 +02:00
Gonzalo Paniagua Javier 8823d1c040 Remove Content-Length header when not needed
If we are redirecting to a GET from a POST, the Content-Length header
	might have stale data and it will be sent. Some servers, instead of
	ignoring it, keep waiting for the data to be sent (for a GET!).

	Fixes bug #636219.
2010-09-01 17:57:55 -04:00
Ankit Jain 95b4fc30c6 [xbuild] Update man page to add "/tv:" option.
Add option to specify toolsversion from the command line,
to the man page.
2010-09-02 02:49:44 +05:30
Gonzalo Paniagua Javier 4e9d28b405 Add missing DT format
The datetime format having a numeric timezone after the milliseconds
	was missing.
	Fixes bug #479061.
2010-09-01 16:31:11 -04:00
Gonzalo Paniagua Javier f832b99535 Avoid sending data in the challenge phase of NTLM
If there's a POST/PUT request that gets a NTLM 401, we save the data
	and don't send it again until after the challenge phase. Ie, instead of
	sending all the data 3 times, we only send it at most twice.
2010-09-01 15:52:09 -04:00
Gonzalo Paniagua Javier 1b439c7286 Use the request itself as the key for the cache.
We were usign teh URL, but that might not be unique among several
	requests that need to be authenticated using NTLM. This led to
	different requests sharing the same authentication session which fails
	miserably.

	Bug #631315 fixed.
2010-09-01 15:52:09 -04:00
Ankit Jain 265900fd17 [xbuild] Unsubscribe events on ConsoleLogger.Shutdown ()
Reported by Lluis Sanchez.
2010-09-02 00:01:52 +05:30
Geoff Norton 5f090dd06e Fix build of mono-basic on ppc64
OP_BREAK can take up to 40 bytes on ppc64
2010-09-01 14:09:38 -04:00
Atsushi Eno 7542c0442b Fill Duration value. Got managed mode use case working. 2010-09-02 02:22:04 +09:00
Atsushi Eno 4e30498f34 Fix parameter order for TempAsyncResult. 2010-09-02 02:21:00 +09:00
Jb Evain 45e56c76c3 Add NotWorking test for bugs #635349 and #605936 2010-09-01 18:27:50 +02:00
Jonathan Pryor 28fe6a934a [mdoc-update] Only check for duplicate elements, not duplicate nodes.
The duplicate-element checking algorithm wasn't restricted to just elements;
consequently, an 'invalid token' exception was generated from XPath because we
were trying to call XmlNode.SelectNodes("#text"), and '#' isn't valid.  Oops.

Fixes building gendarme from mono-tools.
2010-09-01 11:07:31 -04:00
Jonathan Pryor 0d48c3ea1d [mdoc-update] Refactor type+member traversal algorithm.
ECMA wants to import some Microsoft documentation for use in the next version
of the ECMA standard (hence mdoc-update-ecma-xml).

Unfortunately, Microsoft doesn't use the Microsoft XML Documentation format
for their internal class library documentation.  They use some other XML
dialect (which looks similar yet different from "msxdoc").

So to make life easier for ECMA, mdoc-update of needs to support yet another
import format.  Yay?

Unfortunately:

  - The current import logic uses no abstractions; we have "separate" code
    paths when importing msxdoc's vs. ECMA docs.  We need a sane abstraction
    if we're going to add a third import format.

  - Additionally, the ECMA doc import logic is a mass of spaghetti code, as
    ECMA import also controls type+member enumeration order.

Start trying to bring some sanity to this by adding a DocumentationEnumerator
abstraction so that some of the XmlReader maintenance for importing/processing
ECMA documentation can be split out.
2010-09-01 11:07:31 -04:00
Atsushi Eno af4d3c847d Couple of fixes in FindCriteria and relevant contract types for Find operation. 2010-09-02 00:03:24 +09:00
Atsushi Eno ecd1386cf1 Add another roundtrip case. 2010-09-02 00:01:00 +09:00
Atsushi Eno 9fb2421ccf Use CollectionDataContractAttribute.ItemName for collection item serialization. 2010-09-01 23:59:50 +09:00
Atsushi Eno 140dd51ff4 Allow empty element in ReadElementContent*() e.g. for empty list. 2010-09-01 23:56:57 +09:00
Jb Evain 23b15a3d27 Fix the NET_2_1 build of System.Json 2010-09-01 15:58:39 +02:00
Jb Evain 469f62a378 Fix the System.Core build for the monotouch profile 2010-09-01 15:58:39 +02:00
Jb Evain d779566b1e Fix the monotouch build 2010-09-01 15:58:39 +02:00
Jérémie Laval 5c52755ffd Allow recursive Write + n * Read lock pattern for ReaderWriterLockSlim and add corresponding unit test 2010-09-01 14:26:42 +01:00
Jérémie Laval 68d6de4134 Check Recursive counts for ReaderWriterLockSlim in unit tests 2010-09-01 13:58:58 +01:00
Jérémie Laval c70d5fff59 Generalize ThreadLockState to include recursive count informations and update them accordingly in the different Enter/Exit methods 2010-09-01 13:56:11 +01:00
Jérémie Laval 59260b1df7 [PLinq] Honor WithDegreeOfParallelism if present 2010-09-01 12:05:00 +01:00
Jérémie Laval ac4bd81b23 Change the key of the inner dictionary to an int id instead of the instance itself
It prevents object references to the rwlslim to be kept and thus not GC'ed
2010-09-01 11:10:09 +01:00
Jérémie Laval 3f65781d83 Split ReaderWriterLockSlim helper classes into their own files 2010-09-01 11:10:09 +01:00
Atsushi Eno bdbef85d50 Add a bunch of missing configuration members etc. based on corcompare results. 2010-09-01 18:55:11 +09:00
Atsushi Eno 09a52387d8 Add IdentityElement implementation and some supplemental extension methods for discovery. 2010-09-01 18:53:46 +09:00
Marek Safar b3ac12b635 Add ctor block to field initializers to avoid member lookup at wrong block 2010-09-01 10:34:12 +01:00
Gonzalo Paniagua Javier bda0eeb5ca Handle WAIT_IO_TIMEOUT in WaitAny call
WaitForMultipleObjectsEx might return WAIT_IO_COMPLETION if an APC is queued.
	Fixes bug #549807.
2010-08-31 19:59:27 -04:00
5928 changed files with 358451 additions and 176823 deletions

No files matched your search

+2
View File
@@ -6,6 +6,7 @@ configure.in crlf=input
*.h crlf
*.cs crlf
*.sh crlf
*.il crlf
.gitattributes crlf
ChangeLog crlf
@@ -16,6 +17,7 @@ ChangeLog crlf
*.bat -crlf
*.sln -crlf
*.*proj* -crlf
*.xml -crlf
# CRLF Handling
# -------------
+1
View File
@@ -35,3 +35,4 @@
/ltsugar.m4
/lt~obsolete.m4
/ltversion.m4
*~
-3093
View File
File diff suppressed because it is too large. Load diff
+7 -1
View File
@@ -11,7 +11,13 @@ The Boehm licensing information is in the libgc directory
The SGen Garbage Collector is under the terms of the MIT X11
license
The class libraries under mono/mcs are unless otherwise stated
under the MIT X11 license.
Open source Microsoft code is licensed under the original terms
which is either MS-PL for older components, or dual licensed
MS-PL/Apache2 licensed.
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
+10 -3
View File
@@ -2,7 +2,7 @@
Mono is made up of many pieces of code, all of them open source, but
different pieces of Mono use different licensing terms.
For comments, corrections and updates, please contact mono@novell.com
For comments, corrections and updates, please contact mono@xamarin.com
* Dual Licensing
@@ -22,7 +22,7 @@ For comments, corrections and updates, please contact [email protected]
Contributions for other modules should be under the same license
terms as the rest of the module, or under MIT X11 terms.
If you need further information, please contact mono@novell.com
If you need further information, please contact mono@xamarin.com
* The Modules
@@ -45,7 +45,7 @@ For comments, corrections and updates, please contact [email protected]
on the distribution and access to the code, a phone platform
that prevents end users from upgrading Moonlight).
Contact mono@novell.com for details on obtaining the Mono
Contact mono@xamarin.com for details on obtaining the Mono
runtime under other terms.
** mono/eglib: Mono's X11 glib implementation
@@ -98,6 +98,13 @@ For comments, corrections and updates, please contact [email protected]
ICSharpCode.SharpZipLib, GPL with exceptions.
See: mcs/class/ICSharpCode.SharpZipLib/README
** mcs/class/System.Core/System/TimeZoneInfo.Android.cs
This is a port of Apache 2.0-licensed Android code, and thus is
licensed under the Apache 2.0 license:
http://www.apache.org/licenses/LICENSE-2.0
** mcs/tools
+32 -13
View File
@@ -1,25 +1,34 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
MOONLIGHT_SUBDIRS = $(libgc_dir) eglib mono $(ikvm_native_dir) data
MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
if CROSS_COMPILING
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples web msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = po libgc eglib mono ikvm-native data runtime scripts man samples web tools msvc docs
DIST_SUBDIRS = po libgc eglib mono ikvm-native data runtime scripts man samples tools msvc docs
else
if ONLY_MOONLIGHT
SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
else
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples web msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples web tools msvc docs
DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
endif
endif
EXTRA_DIST= nls.m4 po.m4 progtest.m4 mono-uninstalled.pc.in build-mingw32.sh LICENSE mkinstalldirs autogen.sh
EXTRA_DIST= \
LICENSE \
autogen.sh \
build-mingw32.sh \
mkinstalldirs \
mono-uninstalled.pc.in \
nls.m4 \
po.m4 \
progtest.m4 \
winconfig.h
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
@@ -37,7 +46,8 @@ DISTCLEANFILES= mono-uninstalled.pc
# building with monolite
mcslib = $(mcs_topdir)/class/lib
monolite = $(mcslib)/monolite
monolite_url = http://mono.ximian.com/daily/monolite-latest.tar.gz
mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
monolite_url = http://mono.ximian.com/daily/monolite-$(mono_corlib_version)-latest.tar.gz
.PHONY: get-monolite-latest
get-monolite-latest:
-rm -fr $(mcslib)/monolite-*
@@ -72,17 +82,26 @@ bootstrap-world: compiler-tests
if MOONLIGHT
moon-do-build: config.h
@list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
echo "Making all in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) all); \
case "x$$subdir" in \
xmono ) target="moon-do-build";; \
* ) target="all";; \
esac; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw all
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)
moon-do-clean:
@list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
echo "Making clean in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean); \
case "x$$subdir" in \
xmono ) target="moon-do-clean";; \
* ) target="clean";; \
esac; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw clean
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)
endif
win32getdeps:
+40 -22
View File
@@ -11,16 +11,6 @@ This is Mono.
a. Build Requirements
---------------------
To build Mono, you will need the following components:
* pkg-config
Available from: http://www.freedesktop.org/Software/pkgconfig
* glib 2.4
Available from: http://www.gtk.org/
On Itanium, you must obtain libunwind:
http://www.hpl.hp.com/research/linux/libunwind/download.php4
@@ -35,7 +25,15 @@ This is Mono.
* libgdiplus
If you want to get support for System.Drawing, you will need to get
Libgdiplus.
Libgdiplus. This library in turn requires glib and pkg-config:
* pkg-config
Available from: http://www.freedesktop.org/Software/pkgconfig
* glib 2.4
Available from: http://www.gtk.org/
* libzlib
@@ -74,15 +72,18 @@ This is Mono.
make V=1
c. Building the software from SVN
c. Building the software from GIT
---------------------------------
If you are building the software from SVN, make sure that you
If you are building the software from GIT, make sure that you
have up-to-date mcs and mono sources:
svn co svn+ssh://[email protected]/source/trunk/mono
svn co svn+ssh://[email protected]/source/trunk/mcs
If you are an anonymous user:
git clone git://github.com/mono/mono.git
If you are a Mono contributors with read/write privileges:
git clone [email protected]:mono/mono.git
Then, go into the mono directory, and configure:
@@ -129,16 +130,16 @@ This is Mono.
distribution, which contains just enough to run the 'mcs'
compiler. You do this with:
# Run the following line after ./autogen.sh
make get-monolite-latest
This will download and automatically gunzip and untar the
tarball, and place the files appropriately so that you can then
just run:
make
make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe
To ensure that you're using the 'monolite' distribution, you can
also try passing EXTERNAL_MCS=false on the make command-line.
And that will use the files downloaded by 'make get-monolite-latest.
Testing and Installation
------------------------
@@ -164,10 +165,13 @@ This is Mono.
make install
You can verify your installation by using the mono-test-install
script, it can diagnose some common problems with Mono's install.
Failure to follow these steps may result in a broken installation.
d. Common Configuration Options
-------------------------------
d. Configuration Options
------------------------
The following are the configuration options that someone
building Mono might want to use:
@@ -301,6 +305,21 @@ This is Mono.
System.dll, System.Code.dll and System.Xml.Core.dll) and turn
on the LINQ extensions for the compiler.
--with-moon-gc=boehm,sgen
Select the GC to use for Moonlight.
boehm:
Selects the Boehm Garbage Collector, with the same flags
as the regular Mono build. This is the default.
sgen:
Selects the new SGen Garbage Collector, which provides
Generational GC support, using the same flags as the
mono-sgen build.
This defaults to `boehm'.
--with-libgdiplus=installed,sibling,<path>
This is used to configure where should Mono look for
@@ -567,4 +586,3 @@ This is Mono.
same prefix than this module gets.
+104 -41
View File
@@ -2,7 +2,7 @@
CURDIR="`pwd`"
MINGW=i386-mingw32msvc
CROSS_DIR=/opt/cross/$MINGW
COPY_DLLS="libgio*.dll libglib*.dll libgmodule*.dll libgthread*.dll libgobject*.dll"
EXTRA_CROSS_DIR=
INSTALL_DESTDIR="$CURDIR/mono-win32"
PROFILES="default net_2_0 net_3_5 net_4_0 moonlight"
TEMPORARY_PKG_CONFIG_DIR=/tmp/$RANDOM-pkg-config-$RANDOM
@@ -17,62 +17,119 @@ function cleanup ()
fi
}
function check_pkg_config_dir ()
{
local DIR="$1"
local DIR_PREFIX="$2"
if [ ! -d "$DIR" ]; then
return
fi
install -d -m 755 "$TEMPORARY_PKG_CONFIG_DIR"
for pc in "$DIR"/*.pc; do
if [ -f $pc ]; then
pcname="`basename $pc`"
sed -e "s;^prefix=.*;prefix=$DIR_PREFIX;g" < $pc > "$TEMPORARY_PKG_CONFIG_DIR"/$pcname
fi;
done
if [ -z "$CROSS_PKG_CONFIG_DIR" ]; then
CROSS_PKG_CONFIG_DIR="$TEMPORARY_PKG_CONFIG_DIR"
fi
}
function show_build_info ()
{
cat <<EOF
Installation prefix: $MONO_PREFIX
CPPFLAGS: ${CPPFLAGS:=not set}
LDFLAGS: ${LDFLAGS:=not set}
MONO_PATH: ${MONO_PATH:=not set}
EOF
}
function setup ()
{
local pcname
CROSS_BIN_DIR="$CROSS_DIR/bin"
CROSS_DLL_DIR="$CROSS_DIR/bin"
CROSS_PKG_CONFIG_DIR=$CROSS_DIR/lib/pkgconfig
PATH=$CROSS_BIN_DIR:$PATH
export PATH
if [ -d ./.git/svn ]; then
SVN_INFO='git svn info'
elif [ -d ./.svn ]; then
SVN_INFO='svn info'
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'|tr -d '\('`
if [ -d ./.git ]; then
MONO_GIT_COMMIT="`git log -1 --format=format:%t`"
MONO_GIT_BRANCH="`git branch|grep '\*'|cut -d ' ' -f 2|tr -d '\)'|tr -d '\('`"
MONO_RELEASE="$MONO_VERSION-$MONO_GIT_BRANCH-$MONO_GIT_COMMIT"
else
SVN_INFO=""
MONO_RELEASE="$MONO_VERSION"
fi
if [ -n "$SVN_INFO" ]; then
MONO_SVN_REVISION=`$SVN_INFO | grep Revision | sed 's/.*: //'`
MONO_BRANCH=`$SVN_INFO | grep URL | sed -e 's;.*source/;;g' -e 's;/mono;;g'`
else
MONO_SVN_REVISION="rUNKNOWN"
MONO_BRANCH="tarball"
fi
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'`
MONO_RELEASE="$MONO_VERSION-$MONO_BRANCH-r$MONO_SVN_REVISION"
MONO_PREFIX="/mono-$MONO_RELEASE"
MONO_PREFIX="$MONO_PREFIX/mono-$MONO_RELEASE"
NOCONFIGURE=yes
export NOCONFIGURE
if [ -d "$CROSS_PKG_CONFIG_DIR" ]; then
install -d -m 755 "$TEMPORARY_PKG_CONFIG_DIR"
for pc in "$CROSS_PKG_CONFIG_DIR"/*.pc; do
pcname="`basename $pc`"
sed -e "s;^prefix=.*;prefix=$CROSS_DIR;g" < $pc > "$TEMPORARY_PKG_CONFIG_DIR"/$pcname
done
CROSS_PKG_CONFIG_DIR="$TEMPORARY_PKG_CONFIG_DIR"
fi
check_pkg_config_dir "$CROSS_DIR/lib/pkgconfig" "$CROSS_DIR"
echo Mono Win32 installation prefix: $MONO_PREFIX
if [ -n "$EXTRA_CROSS_DIR" -a -d "$EXTRA_CROSS_DIR" ]; then
if [ -d "$EXTRA_CROSS_DIR/bin" ]; then
PATH="$EXTRA_CROSS_DIR/bin":$PATH
fi
check_pkg_config_dir "$EXTRA_CROSS_DIR/lib/pkgconfig" "$EXTRA_CROSS_DIR"
if [ -d "$EXTRA_CROSS_DIR/include" ]; then
if [ -z "$CPPFLAGS" ]; then
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\""
else
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\" $CFLAGS"
fi
fi
if [ -d "$EXTRA_CROSS_DIR/lib" ]; then
if [ -z "$LDFLAGS" ]; then
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\""
else
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\" $LDFLAGS"
fi
fi
if [ -d "$EXTRA_CROSS_DIR/share/aclocal" ]; then
if [ -z "$MONO_PATH" ]; then
MONO_PATH="\"$EXTRA_CROSS_DIR\""
else
MONO_PATH="\"$EXTRA_CROSS_DIR\":$MONO_PATH"
fi
fi
fi
export PATH MONO_PATH CPPFLAGS
show_build_info
}
function build ()
{
if [ -f ./Makefile ]; then
make distclean
fi
if [ -d ./autom4te.cache ]; then
rm -rf ./autom4te.cache
fi
if [ -f ./config.status ]; then
for f in `find -name config.status -type f`; do
rm $f
done
fi
./autogen.sh
BUILD="`./config.guess`"
if [ -f ./Makefile ]; then
make distclean
rm -rf autom4te.cache
fi
if [ ! -d "$CURDIR/build-cross-windows" ]; then
mkdir "$CURDIR/build-cross-windows"
fi
@@ -105,27 +162,28 @@ function doinstall ()
cd "$CURDIR/build-cross-windows"
make DESTDIR="$INSTALL_DESTDIR" USE_BATCH_FILES=yes install
cd "$CURDIR/../mcs/mcs"
if test -d $CURDIR/mcs; then
mcsdir=$CURDIR/mcs
else
mcsdir=$CURDIR/../mcs
fi
cd "$mcsdir/mcs"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "mcs profile $p installation failed"
done
cd "$CURDIR/../mcs/class"
cd "$mcsdir/class"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "class library profile $p installation failed"
done
cd "$CURDIR/../mcs/tools"
cd "$mcsdir/tools"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "tools profile $p installation failed"
done
cd "$CURDIR/mono-win32"
for dll in $COPY_DLLS; do
cp -ap "$CROSS_DLL_DIR"/$dll "$INSTALL_DESTDIR/$MONO_PREFIX/bin"
done
rm -f "$CURDIR/mono-win32-$MONO_RELEASE".zip
zip -9r "$CURDIR/mono-win32-$MONO_RELEASE".zip .
@@ -139,7 +197,9 @@ Usage: build-mingw32.sh [OPTIONS]
where OPTIONS are:
-d DIR Sets the location of directory where MINGW is installed [$CROSS_DIR]
-e DIR Sets the location of directory where additional cross develoment packages are installed [${EXTRA_CROSS_DIR:=none}]
-m MINGW Sets the MINGW target name to be passed to configure [$MINGW]
-p PREFIX Prefix at which Mono is to be installed. Build will append the 'mono-X.Y' string to that path
EOF
exit 1
@@ -149,10 +209,12 @@ trap cleanup 0
pushd . > /dev/null
while getopts "d:m:h" opt; do
while getopts "d:m:e:p:" opt; do
case "$opt" in
d) CROSS_DIR="$OPTARG" ;;
m) MINGW="$OPTARG" ;;
e) EXTRA_CROSS_DIR="$OPTARG" ;;
p) MONO_PREFIX="$OPTARG" ;;
*) usage ;;
esac
done
@@ -160,5 +222,6 @@ done
setup
build
doinstall
show_build_info
popd > /dev/null
+257 -67
View File
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,2.8.1)
AM_INIT_AUTOMAKE(mono,2.10.10)
AM_MAINTAINER_MODE
API_VER=2.0
@@ -78,6 +78,7 @@ esac
host_win32=no
target_win32=no
platform_android=no
case "$host" in
*-mingw*|*-*-cygwin*)
AC_DEFINE(HOST_WIN32,1,[Host Platform is Win32])
@@ -86,7 +87,7 @@ case "$host" in
host_win32=yes
if test "x$cross_compiling" = "xno"; then
target_win32=yes
if test "x$host" == "x$target"; then
if test "x$host" == "x$build"; then
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
fi
CC="gcc -mno-cygwin -g"
@@ -94,6 +95,7 @@ case "$host" in
# So libgc configure gets -mno-cygwin
export CC
export CXX
CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB -mno-cygwin"
else
target_win32=yes
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
@@ -171,6 +173,41 @@ case "$host" in
with_sigaltstack=no
use_sigposix=yes
;;
*-*-linux-android*)
host_win32=no
platform_android=yes
AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
AC_DEFINE(TARGET_ANDROID,1,[Targeting the Android platform])
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
if test "x$disable_munmap" != "xyes"; then
CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
fi
libmono_cflags="-D_REENTRANT"
libdl="-ldl"
libgc_threads=pthreads
use_sigposix=yes
with_tls=pthread
with_sigaltstack=no
with_static_mono=no
# Android doesn't support boehm, as it's missing <link.h>
support_boehm=no
with_gc=sgen
# isinf(3) requires -lm; see isinf check below
LDFLAGS="$LDFLAGS -lm"
# Bionic's <pthread.h> sets PTHREAD_STACK_MIN=2*PAGE_SIZE; doesn't define
# PAGE_SIZE; breaks mono/io-layer/collection.c
# Bionic doesn't provide S_IWRITE; breaks io-layer/io.c
CFLAGS="$CFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
CXXFLAGS="$CXXFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
# to bypass the underscore linker check, can't work when cross-compiling
mono_cv_uscore=yes
;;
*-*-linux*)
host_win32=no
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
@@ -180,7 +217,6 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
libdl="-ldl"
libgc_threads=pthreads
AOT_SUPPORTED="yes"
use_sigposix=yes
;;
*-*-nacl*)
@@ -192,11 +228,11 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
libdl=
libgc_threads=pthreads
AOT_SUPPORTED="yes"
gc_default=boehm
use_sigposix=yes
ikvm_native=no
AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
;;
*-*-hpux*)
host_win32=no
@@ -248,12 +284,12 @@ case "$host" in
if test "x$cross_compiling" = "xyes"; then
has_broken_apple_cpp=yes
fi
dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin10.0.0, but
dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin*, but
dnl its gcc defaults to 64-bit mode. They have also deprecated the usage of ucontext
dnl we need to set some flags to build our 32-bit binaries on 10.6 properly
case "$host" in
dnl Snow Leopard config.guess reports as this
i*86-*-darwin10*)
dnl Snow Leopard and newer config.guess reports as this
i*86-*-darwin*)
BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE -mmacosx-version-min=10.5"
CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_FLAGS"
CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS"
@@ -294,6 +330,7 @@ AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
@@ -379,15 +416,15 @@ AC_CHECK_HEADERS(sys/user.h, [], [],
AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
if test x$have_zlib = xyes; then
AC_TRY_COMPILE([#include <zlib.h>], [
void main () {
#if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
}
return 0;
#else
#error No good zlib found
#endif
],[
AC_MSG_RESULT(Using system zlib)
zlib_msg="system zlib"
AC_DEFINE(HAVE_SYS_ZLIB,1,[Have system zlib])
],[
AC_MSG_RESULT(Using embedded zlib)
have_zlib=no
@@ -443,6 +480,20 @@ if test x"$GCC" = xyes; then
AC_MSG_RESULT(no)
CFLAGS=$ORIG_CFLAGS
])
ORIG_CFLAGS=$CFLAGS
# Check for the normal version, since gcc ignores unknown -Wno options
CFLAGS="$CFLAGS -Wunused-but-set-variable"
AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc)
AC_TRY_COMPILE([], [
void main () { }
], [
AC_MSG_RESULT(yes)
CFLAGS="$ORIG_CFLAGS -Wno-unused-but-set-variable"
], [
AC_MSG_RESULT(no)
CFLAGS=$ORIG_CFLAGS
])
else
# The Sun Forte compiler complains about inline functions that access static variables
# so disable all inlining.
@@ -591,27 +642,6 @@ AC_SUBST(GMODULE_LIBS)
AC_SUBST(BUILD_GLIB_CFLAGS)
AC_SUBST(BUILD_GLIB_LIBS)
if test x$cross_compiling$host_win32 = xnoyes; then
AC_MSG_CHECKING(for cygwin glib2-dev package)
if [ cygcheck --f /usr/lib/libglib-2.0.dll.a | grep -q glib2-devel ]; then
AC_MSG_RESULT(found)
AC_MSG_ERROR([Mono cannot be built with the cygwin glib2-devel package installed, because that package doesn't work with -mno-cygwin. Please uninstall it then re-run configure.])
else
AC_MSG_RESULT(not found, ok)
fi
AC_MSG_CHECKING(for broken gwin32.h)
glib_include=`$PKG_CONFIG --cflags-only-I glib-2.0 | sed -e 's/ -I.*//g' | sed -e 's/-I//g'`
if test -f $glib_include/glib/gwin32.h; then
if [ grep ftruncate $glib_include/glib/gwin32.h | grep -q define ]; then
AC_MSG_RESULT(failed)
hashmark='#'
AC_MSG_ERROR([Your version of gwin32.h is broken and will cause compilation errors when building mono. Please fix it by deleting the line: '$hashmark define ftruncate...' from '$glib_include/glib/gwin32.h' then re-run configure.])
fi
fi
AC_MSG_RESULT(ok)
fi
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[gc=$with_gc],[gc=$gc_default])
# Enable support for fast thread-local storage
@@ -623,17 +653,27 @@ AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage i
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack (defaults to yes)],[],[with_sigaltstack=yes])
AC_ARG_WITH(static_mono, [ --with-static_mono=yes,no link mono statically to libmono (faster) (defaults to yes)],[],[with_static_mono=yes])
AC_ARG_WITH(shared_mono, [ --with-shared_mono=yes,no build a shared libmono library (defaults to yes)],[],[with_shared_mono=yes])
if test "x$enable_static" = "xno"; then
with_static_mono=no
fi
if test "x$enable_shared" = "xno"; then
with_shared_mono=no
fi
case $host in
*nacl* ) with_shared_mono=yes;;
esac
if test "x$host_win32" = "xyes"; then
# Boehm GC requires the runtime to be in its own dll
with_static_mono=no
fi
AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
AM_CONDITIONAL(SHARED_MONO, test x$with_shared_mono != xno)
AC_ARG_ENABLE(mcs-build, [ --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes)
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes])
@@ -662,23 +702,19 @@ if test x$enable_small_config = xyes; then
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DSMALL_CONFIG"
fi
if test x$AOT_SUPPORTED != xyes; then
AOT_SUPPORTED=no
fi
AC_ARG_ENABLE(system-aot, [ --enable-system-aot Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=$AOT_SUPPORTED)
AC_ARG_ENABLE(system-aot, [ --enable-system-aot Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=default)
DISABLED_FEATURES=none
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, normalization.],
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, normalization, assembly_remapping, shared_perfcounters.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
done
DISABLED_FEATURES=$enable_minimal
disabled="Disabled: $enable_minimal"
disabled="Disabled: $enable_minimal"
],[])
AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
@@ -792,6 +828,16 @@ if test "x$mono_feature_disable_normalization" = "xyes"; then
AC_MSG_NOTICE([Disabled String normalization support.])
fi
if test "x$mono_feature_disable_assembly_remapping" = "xyes"; then
AC_DEFINE(DISABLE_ASSEMBLY_REMAPPING, 1, [Disable assembly remapping.])
AC_MSG_NOTICE([Disabled Assembly remapping.])
fi
if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then
AC_DEFINE(DISABLE_SHARED_PERFCOUNTERS, 1, [Disable shared perfcounters.])
AC_MSG_NOTICE([Disabled Shared perfcounters.])
fi
AC_MSG_CHECKING(for visibility __attribute__)
AC_TRY_COMPILE([], [
void __attribute__ ((visibility ("hidden"))) doit (void) {}
@@ -823,6 +869,9 @@ if test x$enable_parallel_mark = xyes; then
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
fi
AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
dnl
dnl Boehm GC configuration
dnl
@@ -861,6 +910,14 @@ case "x$gc" in
if test "x$found_gc_enable" = "xyes"; then
BOEHM_DEFINES="-DHAVE_GC_ENABLE $BOEHM_DEFINES"
fi
# check whether we need to explicitly allow
# thread registering
AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
if test "x$found_allow_register_threads" = "xyes"; then
AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
fi
;;
xincluded)
@@ -999,9 +1056,11 @@ if test x$target_win32 = xno; then
AC_CHECK_FUNCS(getpriority)
AC_CHECK_FUNCS(setpriority)
AC_CHECK_FUNCS(dl_iterate_phdr)
AC_CHECK_FUNCS(dladdr)
AC_CHECK_FUNCS(sysconf)
AC_CHECK_FUNCS(sched_setaffinity)
AC_CHECK_FUNCS(sched_getcpu)
dnl ****************************************************************
dnl *** Check for sched_setaffinity from glibc versions before ***
@@ -1040,19 +1099,18 @@ if test x$target_win32 = xno; then
AC_DEFUN([LARGE_FILES], [
large_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $1"
AC_TRY_RUN([
AC_TRY_COMPILE([
#include <sys/types.h>
#include <limits.h>
], [
/* Lifted this compile time assert method from: http://www.jaggersoft.com/pubs/CVu11_3.html */
#define COMPILE_TIME_ASSERT(pred) \
switch(0){case 0:case pred:;}
#define BIG_OFF_T (((off_t)1<<62)-1+((off_t)1<<62))
int main(void) {
int big_off_t=((BIG_OFF_T%2147483629==721) &&
(BIG_OFF_T%2147483647==1));
if(big_off_t) {
exit(0);
} else {
exit(1);
}
int main(void)
{
COMPILE_TIME_ASSERT(sizeof(off_t) * CHAR_BIT == 64);
return 0;
}
], [
AC_MSG_RESULT(ok)
@@ -1061,7 +1119,7 @@ if test x$target_win32 = xno; then
large_offt=yes
], [
AC_MSG_RESULT(no)
], "")
])
CPPFLAGS=$large_CPPFLAGS
])
@@ -1560,6 +1618,12 @@ if test x$target_win32 = xno; then
AC_DEFINE(HAVE_EPOLL, 1, [epoll supported])
fi
havekqueue=no
AC_CHECK_FUNCS(kqueue, , AC_MSG_CHECKING(for kqueue in sys/event.h)
AC_TRY_LINK([#include <sys/event.h>],
[ kqueue(); ],
AC_DEFINE(HAVE_KQUEUE, 1, [Have kqueue]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)))
dnl ******************************
dnl *** Checks for SIOCGIFCONF ***
dnl ******************************
@@ -1754,6 +1818,11 @@ if test x$target_win32 = xno; then
dnl * on xp+
AC_DEFINE(HAVE_GETPROCESSID, 1, [Define if GetProcessId is available])
else
dnl *********************************
dnl *** Checks for Windows compilation ***
dnl *********************************
AC_CHECK_HEADERS(winternl.h)
jdk_headers_found=no
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
@@ -1837,6 +1906,7 @@ fi
AC_CHECK_FUNCS(round)
AC_CHECK_FUNCS(rint)
AC_CHECK_FUNCS(execvp)
dnl ****************************
dnl *** Look for /dev/random ***
@@ -1849,7 +1919,7 @@ try_dev_random=$enableval, try_dev_random=yes)
AC_MSG_RESULT($try_dev_random)
case "{$target}" in
case "{$build}" in
*-openbsd*)
NAME_DEV_RANDOM="/dev/srandom"
;;
@@ -1992,6 +2062,7 @@ dnl *** NaCl ***
dnl **************
AC_ARG_ENABLE(nacl_codegen, [ --enable-nacl-codegen Enable Native Client code generation], enable_nacl_codegen=$enableval, enable_nacl_codegen=no)
AC_ARG_ENABLE(nacl_gc, [ --enable-nacl-gc Enable Native Client garbage collection], enable_nacl_gc=$enableval, enable_nacl_gc=no)
AM_CONDITIONAL(NACL_CODEGEN, test x$enable_nacl_codegen != xno)
if test "x$enable_nacl_codegen" = "xyes"; then
@@ -2000,6 +2071,10 @@ if test "x$enable_nacl_codegen" = "xyes"; then
AC_DEFINE(TARGET_NACL, 1, [...])
else
MONO_NACL_ALIGN_MASK_OFF=0
CPPFLAGS="$CPPFLAGS -D__default_codegen__"
fi
if test "x$enable_nacl_gc" = "xyes"; then
CPPFLAGS="$CPPFLAGS -finstrument-for-thread-suspension -D__native_client_gc__"
fi
AC_SUBST(MONO_NACL_ALIGN_MASK_OFF)
@@ -2007,7 +2082,7 @@ dnl **************
dnl *** LLVM ***
dnl **************
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the experimental LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
AC_ARG_ENABLE(loadedllvm,[ --enable-loadedllvm Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no)
if test "x$enable_llvm" = "xyes"; then
@@ -2029,9 +2104,13 @@ if test "x$enable_llvm" = "xyes"; then
llvm_version=`$LLVM_CONFIG --version`
major_version=`echo $llvm_version | cut -c 1`
minor_version=`echo $llvm_version | cut -c 3`
AC_MSG_CHECKING(LLVM version)
AC_MSG_RESULT($llvm_version)
if echo $llvm_version | grep -q 'mono'; then
AC_DEFINE(LLVM_MONO_BRANCH, 1, [Whenever we are using the mono branch of LLVM])
LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_MONO_BRANCH"
else
AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
fi
AC_DEFINE_UNQUOTED(LLVM_MAJOR_VERSION, $major_version, [Major version of LLVM libraries])
@@ -2129,7 +2208,11 @@ case "$host" in
haiku*)
LIBC=libroot.so
;;
linux*|darwin*|openbsd*)
linux*)
sgen_supported=true
AOT_SUPPORTED="yes"
;;
darwin*|openbsd*|freebsd*)
sgen_supported=true
;;
esac
@@ -2140,10 +2223,20 @@ case "$host" in
JIT_SUPPORTED=yes
jit_wanted=true
case $host_os in
linux*|darwin*|openbsd*)
linux*)
sgen_supported=true
AOT_SUPPORTED="yes"
;;
darwin*|openbsd*|freebsd*)
sgen_supported=true
;;
esac
case "$host" in
x86_64-*-nacl*)
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
;;
esac
;;
ia64-*-*)
TARGET=IA64
@@ -2237,8 +2330,10 @@ case "$host" in
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -DARM_FPU_NONE=1"
CPPFLAGS="$CPPFLAGS -DARM_FPU_VFP=1 -D__ARM_EABI__ -DHAVE_ARMV6=1"
jit_wanted=true
# libgc's gc_locks.h depends on this
NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6"
sgen_supported=true
;;
arm*-linux*)
@@ -2271,12 +2366,12 @@ case "$host" in
esac
if test "x$host" != "x$target"; then
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
case "$target" in
powerpc64-ps3-linux-gnu)
TARGET=POWERPC64
arch_target=powerpc64
AC_DEFINE(TARGET_PS3, 1, [...])
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
# It would be better to just use TARGET_POWERPC64, but lots of code already
# uses this define
AC_DEFINE(__mono_ppc64__, 1, [...])
@@ -2289,14 +2384,58 @@ if test "x$host" != "x$target"; then
TARGET=POWERPC64
arch_target=powerpc64
AC_DEFINE(TARGET_XBOX360, 1, [...])
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
# It would be better to just use TARGET_POWERPC64, but lots of code already
# uses this define
sizeof_register=8
target_byte_order=G_BIG_ENDIAN
;;
x86_64-*-nacl)
TARGET=AMD64
arch_target=amd64
AC_DEFINE(TARGET_AMD64, 1, [...])
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
;;
armv7l-unknown-linux-gnueabi*)
# TEGRA
TARGET=ARM;
arch_target=arm;
AC_DEFINE(TARGET_ARM, 1, [...])
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -DARM_FPU_VFP=1 -D__ARM_EABI__"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
;;
armv5tel-unknown-linux-gnueabi*)
TARGET=ARM;
arch_target=arm;
AC_DEFINE(TARGET_ARM, 1, [...])
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
;;
armv5-*-linux-androideabi*)
TARGET=ARM;
arch_target=arm;
AC_DEFINE(TARGET_ARM, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__ -DARM_FPU_NONE=1"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offset
# in mono-compiler.h
with_tls=pthread
;;
*)
AC_MSG_WARN([Cross compiling is only supported for targets matching 'powerpc64-{ps3,xbox360}-linux-gnu'])
AC_MSG_ERROR([Cross compiling is not supported for target $target])
esac
fi
@@ -2347,8 +2486,13 @@ fi
dnl
dnl Simple Generational checks (sgen)
dnl
if $sgen_supported; then
build_sgen_default=yes
else
build_sgen_default=no
fi
SGEN_DEFINES=
AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=yes])
AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=$build_sgen_default])
if test x$buildsgen = xyes; then
if $sgen_supported; then
SGEN_DEFINES="-DHAVE_SGEN_GC -DHAVE_MOVING_COLLECTOR -DHAVE_WRITE_BARRIERS"
@@ -2483,6 +2627,14 @@ if test "x$try_mono_debugger" = "xyes"; then
fi
fi
# disable the debugger entirely when building with moonlight
if test "x$with_moonlight" != "xno"; then
mono_debugger_supported=no
fi
# mdb support for sgen is broken, disable it until further notice.
mono_debugger_supported=no
AC_MSG_CHECKING(if the Mono Debugger is supported on this platform)
if test "x$mono_debugger_supported" = "xyes"; then
BOEHM_DEFINES="$BOEHM_DEFINES -DMONO_DEBUGGER_SUPPORTED"
@@ -2518,6 +2670,18 @@ if test ${TARGET} = ARM && test x$cross_compiling = xno && test x$enable_mcs_bui
AC_MSG_RESULT($fpu)
CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1"
unset fpu
AC_MSG_CHECKING(for ARMV6)
AC_TRY_RUN([
int main () { __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory"); return 0; }
], armv6=yes, armv6=no)
AC_MSG_RESULT($armv6)
if test ${armv6} = yes; then
AC_DEFINE(HAVE_ARMV6, 1, "Host supports ARMV6 instructions")
# libgc's gc_locks.h depends on this
NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6"
fi
fi
if test ${TARGET} = unknown; then
@@ -2542,6 +2706,10 @@ case "x$gc" in
if test x$TARGET = xSPARC -o x$TARGET = xSPARC64; then
LIBGC_CPPFLAGS=`echo $LIBGC_CPPFLAGS | sed -e 's/-D_FILE_OFFSET_BITS=64//g'`
fi
# Don't pass -finstrument-for-thread-suspension in,
# if these are instrumented it will be very bad news
# (infinite recursion, undefined parking behavior, etc)
LIBGC_CPPFLAGS=`echo $LIBGC_CPPFLAGS | sed -e 's/-finstrument-for-thread-suspension//g'`
ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$LIBGC_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\""
AC_CONFIG_SUBDIRS(libgc)
;;
@@ -2549,7 +2717,8 @@ esac
#AC_ARG_WITH(profile2, [ --with-profile2=yes,no If you want to install the 2.0 FX (defaults to yes)], [], [with_profile2=yes])
AC_ARG_WITH(profile4, [ --with-profile4=yes,no If you want to install the 4.0 FX (defaults to yes)], [], [with_profile4=yes])
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the raw MonoTouch 2.1 assemblies (defaults to no)], [], [with_monotouch=no])
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid 2.1 assemblies (defaults to no)], [], [with_monodroid=no])
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the MonoTouch 2.1 assemblies (defaults to no)], [], [with_monotouch=no])
OPROFILE=no
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to no)],[
@@ -2580,16 +2749,23 @@ AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the
DISABLE_MCS_DOCS=yes
fi
])
if test x$with_profile4 != xyes; then
DISABLE_MCS_DOCS=yes
fi
MOONLIGHT_DEFINES=
AC_ARG_WITH(moonlight, [ --with-moonlight=yes|no|only If you want to build Mono for Moonlight (defaults to no)],[
if test "x$with_moonlight" = "xyes"; then
AC_DEFINE(MOONLIGHT,1,[Building for Moonlight])
elif test "x$with_moonlight" = "xonly"; then
AC_DEFINE(MOONLIGHT,1,[Building for Moonlight])
if test x$with_moonlight != xno; then
MOONLIGHT_DEFINES="-DMOONLIGHT -DDISABLE_ASSEMBLY_REMAPPING "
fi
], [with_moonlight=no])
AC_SUBST(MOONLIGHT_DEFINES)
AC_ARG_WITH(moon_gc, [ --with-moon-gc=boehm,sgen Select the gc to use with Moonlight (defaults to boehm)],[
if test "x$with_moon_gc" != "xsgen"; then
with_moon_gc=boehm
fi
], [with_moon_gc=boehm])
AC_CHECK_HEADER([malloc.h],
[AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1],
@@ -2617,7 +2793,11 @@ libmono_ldflags="$libmono_ldflags $LIBS"
AM_CONDITIONAL(MOONLIGHT, [test "x$with_moonlight" != "xno"])
AM_CONDITIONAL(ONLY_MOONLIGHT, [test "x$with_moonlight" = "xonly"])
AM_CONDITIONAL(MOONLIGHT_BOEHM, [test "x$with_moon_gc" = "xboehm"])
AM_CONDITIONAL(MOONLIGHT_SGEN, [test "x$with_moon_gc" = "xsgen"])
AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" = xyes])
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" = xyes])
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
@@ -2823,7 +3003,6 @@ mono/profiler/Makefile
ikvm-native/Makefile
scripts/Makefile
man/Makefile
web/Makefile
docs/Makefile
data/Makefile
data/net_2_0/Makefile
@@ -2831,6 +3010,7 @@ data/net_4_0/Makefile
data/net_2_0/Browsers/Makefile
data/mint.pc
data/mono-2.pc
data/monosgen-2.pc
data/mono.pc
data/mono-cairo.pc
data/mono-nunit.pc
@@ -2914,7 +3094,16 @@ fi
echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
fi
if test x$host_win32 = xno -a x$platform_darwin != xyes -a "x$AOT_SUPPORTED" = "xyes" -a x$enable_system_aot = xyes; then
if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then
enable_system_aot=yes
fi
if test "x$enable_loadedllvm" = "xyes"; then
# This seems to fail on the x86 buildbots
enable_system_aot=no
fi
if test x$host_win32 = xno -a x$platform_darwin != xyes -a x$enable_system_aot = xyes; then
echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make
fi
@@ -2965,7 +3154,8 @@ echo "
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
Libraries:
Moon Profile: $with_moonlight
Moon Profile: $with_moonlight ($with_moon_gc)
MonoDroid: $with_monodroid
MonoTouch: $with_monotouch
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
+2
View File
@@ -3,3 +3,5 @@
/config
/.cvsignore
/*.pc
/gdb/mono-sgen-gdb.py
/mono-sgen-gdb.py
+17 -5
View File
@@ -9,7 +9,7 @@ monodir = $(sysconfdir)/mono
EXTRA_DIST = \
config.in \
browscap.ini mono.supp mono.d README ChangeLog \
mono.pc.in mono-2.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \
mono.pc.in mono-2.pc.in monosgen-2.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \
mono-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in \
mono-lineeditor.pc.in system.web.extensions_1.0.pc.in system.web.extensions.design_1.0.pc.in\
dtrace-prelink.sh mono.web.pc.in system.web.mvc.pc.in system.web.mvc2.pc.in \
@@ -19,24 +19,36 @@ EXTRA_DIST = \
pkgconfigdir = $(libdir)/pkgconfig
if SUPPORT_SGEN
SGENPCFILE=monosgen-2.pc
SGENGDBFILE=mono-sgen-gdb.py
else
SGENPCFILE=
SGENGDBFILE=
endif
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= mono.pc mono-2.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc $(SGENPCFILE)
else
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc $(SGENPCFILE)
endif
else
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
endif
DISTCLEANFILES= mono-2.pc mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc monosgen-2.pc mono-sgen-gdb.py
mono_DATA = config \
browscap.ini
gdbdir = $(bindir)
gdb_DATA = gdb/mono-gdb.py
mono-sgen-gdb.py: gdb/mono-gdb.py
cp $< $@
gdb_DATA = gdb/mono-gdb.py $(SGENGDBFILE)
+1 -1
View File
@@ -1,5 +1,5 @@
assemblies_dir=@prefix@/lib/mono
Libraries=${assemblies_dir}/gac/Mono.Cecil/0.6.9.0__0738eb9f132ed756/Mono.Cecil.dll
Libraries=${assemblies_dir}/gac/Mono.Cecil/0.9.4.0__0738eb9f132ed756/Mono.Cecil.dll
Name: Mono Internal -- Do not use.
Description: Mono Internal Libraries -- Do not use
+4
View File
@@ -17,11 +17,15 @@
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
<dllmap dll="libX11" target="@X11@" os="!windows" />
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
<dllmap dll="libcups" target="libcups.dylib" os="osx"/>
<dllmap dll="i:kernel32.dll">
<dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/>
<dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory"/>
<dllentry dll="__Internal" name="MoveMemory" target="mono_win32_compat_MoveMemory"/>
<dllentry dll="__Internal" name="ZeroMemory" target="mono_win32_compat_ZeroMemory"/>
</dllmap>
<dllmap dll="gdiplus" target="@prefix@/lib/libgdiplus@libsuffix@" />
<dllmap dll="gdiplus.dll" target="@prefix@/lib/libgdiplus@libsuffix@" />
</configuration>
+2
View File
@@ -288,6 +288,8 @@ def lookup_pretty_printer(val):
return ObjectPrinter (val)
if t == "string":
return StringPrinter (val)
if t == "MonoString *":
return StringPrinter (val)
if t == "MonoMethod *":
return MonoMethodPrinter (val)
if t == "MonoClass *":
+1 -1
View File
@@ -4,4 +4,4 @@ Sources=${assemblies_dir}/Options.cs
Name: Mono.Options
Description: Command Line Parsing Library
Version: 0.2.1
Version: 0.2.2
+11
View File
@@ -0,0 +1,11 @@
prefix=${pcfiledir}/../..
exec_prefix=${pcfiledir}/../..
libdir=${prefix}/@reloc_libdir@
includedir=${prefix}/include/mono-@API_VER@
sysconfdir=@sysconfdir@
Name: Mono
Description: Mono Runtime
Version: @VERSION@
Libs: -L${libdir} @export_ldflags@ -lmonosgen-@API_VER@ @libmono_ldflags@
Cflags: -I${includedir} @libmono_cflags@
+6 -1
View File
@@ -474,10 +474,15 @@ private CodeDomProvider GetProvider(string langId)
//
// Document generation
//
class UTF8StringWriter : StringWriter {
public override Encoding Encoding {
get { return Encoding.UTF8; }
}
}
string GenerateDocument ()
{
StringWriter sw = new StringWriter ();
UTF8StringWriter sw = new UTF8StringWriter ();
if (CurrentDocType == "wsdl")
descriptions [CurrentDocInd].Write (sw);
+4
View File
@@ -84,6 +84,10 @@
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<sectionGroup name="system.transactions" type="System.Transactions.Configuration.TransactionsSectionGroup, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null">
<section name="defaultSettings" type="System.Transactions.Configuration.DefaultSettingsSection, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null"/>
<section name="machineSettings" type="System.Transactions.Configuration.MachineSettingsSection, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
</sectionGroup>
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
File diff suppressed because it is too large. Load diff
+2
View File
@@ -4,9 +4,11 @@ monodir = $(sysconfdir)/mono/4.0
EXTRA_DIST = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx \
settings.map
mono_DATA = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx \
settings.map
+27
View File
@@ -62,6 +62,17 @@
</sectionGroup>
<section name="monoSettings" type="System.Web.Configuration.MonoSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</sectionGroup>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
<sectionGroup name="system.net" type="System.Net.Configuration.NetSectionGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="authenticationModules" type="System.Net.Configuration.AuthenticationModulesSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="connectionManagement" type="System.Net.Configuration.ConnectionManagementSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -83,6 +94,13 @@
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="standardEndpoints" type="System.ServiceModel.Configuration.StandardEndpointsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="routing" type="System.ServiceModel.Routing.Configuration.RoutingSection, System.ServiceModel.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<section name="protocolMapping" type="System.ServiceModel.Configuration.ProtocolMappingSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>
<sectionGroup name="system.transactions" type="System.Transactions.Configuration.TransactionsSectionGroup, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null">
<section name="defaultSettings" type="System.Transactions.Configuration.DefaultSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null"/>
<section name="machineSettings" type="System.Transactions.Configuration.MachineSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
</sectionGroup>
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="uri" type="System.Configuration.UriSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -272,6 +290,15 @@
<bindingExtensions>
<add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingExtensions>
<endpointExtensions>
<add name="dynamicEndpoint" type="System.ServiceModel.Discovery.Configuration.DynamicEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="discoveryEndpoint" type="System.ServiceModel.Discovery.Configuration.DiscoveryEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="udpDiscoveryEndpoint" type="System.ServiceModel.Discovery.Configuration.UdpDiscoveryEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="announcementEndpoint" type="System.ServiceModel.Discovery.Configuration.AnnouncementEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="udpAnnouncementEndpoint" type="System.ServiceModel.Discovery.Configuration.UdpAnnouncementEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttpEndpoint" type="System.ServiceModel.Configuration.WebHttpEndpointCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webScriptEndpoint" type="System.ServiceModel.Configuration.WebScriptEndpointCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</endpointExtensions>
</extensions>
</system.serviceModel>
</configuration>
+1
View File
@@ -76,6 +76,7 @@
<!--
<add path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="False"/>
-->
<add verb="*" path="*.svc" type="System.ServiceModel.Channels.SvcHttpHandlerFactory, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add path="*.rules" verb="*" type="System.Web.HttpForbiddenHandler" validate="True"/>
<!--
<add path="*.xoml" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="False"/>
+1
View File
@@ -19,3 +19,4 @@
/config.h
/config.status
/INSTALL
dolt*
-8
View File
@@ -1,8 +0,0 @@
set(SUBDIRS src test)
autoheader("config.h" null)
foreach(subdir ${SUBDIRS})
add_subdirectory(${subdir})
endforeach()
+5 -1
View File
@@ -1,12 +1,16 @@
if HOST_WIN32
SUBDIRS = src
else
if PLATFORM_DARWIN
SUBDIRS = src
else
if CROSS_COMPILING
SUBDIRS = src
else
SUBDIRS = src test
endif
endif
endif
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog winconfig.h
+181
View File
@@ -0,0 +1,181 @@
dnl dolt, a replacement for libtool
dnl Copyright © 2007-2008 Josh Triplett <[email protected]>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
dnl
dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
dnl installed when running autoconf on your project.
AC_DEFUN([DOLT], [
AC_REQUIRE([AC_CANONICAL_HOST])
# dolt, a replacement for libtool
# Josh Triplett <[email protected]>
AC_PATH_PROG(DOLT_BASH, bash)
AC_MSG_CHECKING([if dolt supports this host])
dolt_supported=yes
if test x$DOLT_BASH = x; then
dolt_supported=no
fi
if test x$GCC != xyes; then
dolt_supported=no
fi
case $host in
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
*)
dolt_supported=no
;;
esac
if test x$dolt_supported = xno ; then
AC_MSG_RESULT([no, falling back to libtool])
LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
else
AC_MSG_RESULT([yes, replacing libtool])
dnl Start writing out doltcompile.
cat <<__DOLTCOMPILE__EOF__ >doltcompile
#!$DOLT_BASH
__DOLTCOMPILE__EOF__
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
args=("$[]@")
for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
if test x"${args@<:@$arg@:>@}" = x-o ; then
objarg=$((arg+1))
break
fi
done
if test x$objarg = x ; then
echo 'Error: no -o on compiler command line' 1>&2
exit 1
fi
lo="${args@<:@$objarg@:>@}"
obj="${lo%.lo}"
if test x"$lo" = x"$obj" ; then
echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
exit 1
fi
objbase="${obj##*/}"
__DOLTCOMPILE__EOF__
dnl Write out shared compilation code.
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
libobjdir="${obj%$objbase}.libs"
if test ! -d "$libobjdir" ; then
mkdir_out="$(mkdir "$libobjdir" 2>&1)"
mkdir_ret=$?
if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
echo "$mkdir_out" 1>&2
exit $mkdir_ret
fi
fi
pic_object="$libobjdir/$objbase.o"
args@<:@$objarg@:>@="$pic_object"
__DOLTCOMPILE__EOF__
cat <<__DOLTCOMPILE__EOF__ >>doltcompile
"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
__DOLTCOMPILE__EOF__
fi
dnl Write out static compilation code.
dnl Avoid duplicate compiler output if also building shared objects.
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
non_pic_object="$obj.o"
args@<:@$objarg@:>@="$non_pic_object"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" || exit $?
__DOLTCOMPILE__EOF__
fi
fi
dnl Write out the code to write the .lo file.
dnl The second line of the .lo file must match "^# Generated by .*libtool"
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
{
echo "# $lo - a libtool object file"
echo "# Generated by doltcompile, not libtool"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "pic_object='.libs/${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo pic_object=none
__DOLTCOMPILE__EOF__
fi
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "non_pic_object='${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo non_pic_object=none
__DOLTCOMPILE__EOF__
fi
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
} > "$lo"
__DOLTCOMPILE__EOF__
dnl Done writing out doltcompile; substitute it for libtool compilation.
chmod +x doltcompile
LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
dnl a target, so write out a libtool wrapper to handle that case.
dnl Note that doltlibtool does not handle inferred tags or option arguments
dnl without '=', because automake does not use them.
cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
#!$DOLT_BASH
__DOLTLIBTOOL__EOF__
cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
top_builddir_slash="${0%%doltlibtool}"
: ${top_builddir_slash:=./}
args=()
modeok=false
tagok=false
for arg in "$[]@"; do
case "$arg" in
--mode=compile) modeok=true ;;
--tag=CC|--tag=CXX) tagok=true ;;
--quiet) ;;
*) args@<:@${#args[@]}@:>@="$arg" ;;
esac
done
if $modeok && $tagok ; then
. ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
else
exec ${top_builddir_slash}libtool "$[]@"
fi
__DOLTLIBTOOL__EOF__
dnl Done writing out doltlibtool; substitute it for libtool.
chmod +x doltlibtool
LIBTOOL='$(top_builddir)/doltlibtool'
fi
AC_SUBST(LTCOMPILE)
AC_SUBST(LTCXXCOMPILE)
# end dolt
])
+60 -15
View File
@@ -7,16 +7,17 @@ AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LIBTOOL
CFLAGS="$CFLAGS -g -O0 -D_GNU_SOURCE"
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
DOLT
CFLAGS="$CFLAGS -O0"
GNUC_PRETTY=
GNUC_UNUSED=
BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END"
if test x$GCC = xyes; then
GNUC_UNUSED='__attribute__((__unused__))'
GNUC_NORETURN='__attribute__((__noreturn__))'
echo target_cpu=$target_cpu
case $target_cpu in
i*86) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
case $host_cpu in
i*86|x86_64) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
esac
fi
AC_SUBST(GNUC_PRETTY)
@@ -33,19 +34,41 @@ if test "x$CFLAGS_FOR_EGLIB" != "x"; then
CFLAGS=$CFLAGS_FOR_EGLIB
fi
CFLAGS="$CFLAGS -g -D_GNU_SOURCE"
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
platform_darwin=no
platform_android=no
case $host in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
PATHSEP='\\'
SEARCHSEP=';'
OS="WIN32"
PIDTYPE='void *'
;;
*-*darwin*)
platform_darwin=yes
PATHSEP='/'
SEARCHSEP=':'
OS="UNIX"
PIDTYPE='int'
;;
*-*-linux-android*)
platform_android=yes
AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
PATHSEP='/'
SEARCHSEP=':'
OS="UNIX"
PIDTYPE='int'
;;
*)
PATHSEP='/'
SEARCHSEP=':'
OS="UNIX"
PIDTYPE='int'
;;
esac
@@ -73,15 +96,24 @@ AC_SUBST(CFLAGS)
AC_SUBST(PATHSEP)
AC_SUBST(SEARCHSEP)
AC_SUBST(OS)
AC_SUBST(PIDTYPE)
AM_CONDITIONAL(HOST_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(strndup strlcpy getpwuid_r strtok_r rewinddir vasprintf)
AM_CONDITIONAL(NEED_VASPRINTF, test x$have_vasprintf = x )
AC_CHECK_LIB(iconv, iconv_open, LIBS="$LIBS -liconv")
AC_CHECK_LIB(iconv, libiconv_open, LIBS="$LIBS -liconv")
AC_CHECK_LIB(iconv, iconv_open, ICONV_LIBS="-liconv")
AC_CHECK_LIB(iconv, libiconv_open, ICONV_LIBS="-liconv")
AC_SUBST(ICONV_LIBS)
LIBS="$LIBS $ICONV_LIBS"
AC_SEARCH_LIBS(sqrtf, m)
# nanosleep may not be part of libc, also search it in other libraries
@@ -110,18 +142,11 @@ if test "x$have_iso_varargs" = "xyes"; then
fi
AC_SUBST(G_HAVE_ISO_VARARGS)
AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h)
AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h)
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
AC_SUBST(HAVE_ALLOCA_H)
if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then
GPOINTER_TO_INT="((gint)(long) (ptr))"
GPOINTER_TO_UINT="((guint)(long) (ptr))"
GINT_TO_POINTER="((gpointer)(glong) (v))"
GUINT_TO_POINTER="((gpointer)(gulong) (v))"
GSIZE="long"
GSIZE_FORMAT='"lu"'
G_GUINT64_FORMAT='"lu"'
G_GINT64_FORMAT='"ld"'
else
if test $ac_cv_sizeof_void_p = $ac_cv_sizeof_int; then
GPOINTER_TO_INT="((gint) (ptr))"
GPOINTER_TO_UINT="((guint) (ptr))"
GINT_TO_POINTER="((gpointer) (v))"
@@ -130,6 +155,26 @@ else
GSIZE_FORMAT='"u"'
G_GUINT64_FORMAT='"llu"'
G_GINT64_FORMAT='"lld"'
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
GPOINTER_TO_INT="((gint)(long) (ptr))"
GPOINTER_TO_UINT="((guint)(long) (ptr))"
GINT_TO_POINTER="((gpointer)(glong) (v))"
GUINT_TO_POINTER="((gpointer)(gulong) (v))"
GSIZE="long"
GSIZE_FORMAT='"lu"'
G_GUINT64_FORMAT='"lu"'
G_GINT64_FORMAT='"ld"'
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
GPOINTER_TO_INT="((gint)(long long) (ptr))"
GPOINTER_TO_UINT="((guint)(unsigned long long) (ptr))"
GINT_TO_POINTER="((gpointer)(long long) (v))"
GUINT_TO_POINTER="((gpointer)(unsigned long long) (v))"
GSIZE="long long"
GSIZE_FORMAT='"I64u"'
G_GUINT64_FORMAT='"I64u"'
G_GINT64_FORMAT='"I64i"'
else
AC_MSG_ERROR([unsupported pointer size])
fi
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-49
View File
@@ -1,49 +0,0 @@
set(win_files
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c
gmodule-win32.c gtimer-win32.c)
set(unix_files
gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c
gmodule-unix.c gtimer-unix.c)
if (MSVC)
set(os_files ${win_files})
else(MSVC)
set(os_files ${unix_files})
endif(MSVC)
set(libeglib_la_SOURCES
${os_files}
eglib-config.h
sort.frag.h
glib.h
garray.c
gerror.c
ghashtable.c
gmem.c
gmodule.h
goutput.c
gstr.c
gslist.c
gstring.c
gptrarray.c
glist.c
gqueue.c
gpath.c
gshell.c
gspawn.c
gfile.c
gfile-posix.c
gpattern.c
gmarkup.c
gutf8.c
gunicode.c
unicode-data.h)
set(EXTRA_DIST eglib-config.h.in eglib-config.hw ${win_files} ${unix_files})
INCLUDE_DIRECTORIES(../ ${CMAKE_CURRENT_SOURCE_DIR})
ADD_DEFINITIONS(${CFLAGS} -D_FORTIFY_SOURCE=2)
ADD_LIBRARY(eglib-static STATIC ${libeglib_la_SOURCES})
ADD_LIBRARY(eglib SHARED ${libeglib_la_SOURCES})
+8 -3
View File
@@ -1,6 +1,7 @@
noinst_LTLIBRARIES = libeglib.la libeglib-static.la
win_files = \
eglib-config.hw \
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
gmodule-win32.c gtimer-win32.c
@@ -23,11 +24,11 @@ os_files = $(unix_files)
endif
libeglib_la_SOURCES = \
eglib-config.h \
eglib-remap.h \
sort.frag.h \
glib.h \
garray.c \
gbytearray.c \
gerror.c \
ghashtable.c \
gmem.c \
@@ -52,14 +53,18 @@ libeglib_la_SOURCES = \
$(os_files) \
$(vasprintf_files)
libeglib_la_CFLAGS = -Wall -D_FORTIFY_SOURCE=2
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
libeglib_static_la_SOURCES=$(libeglib_la_SOURCES)
libeglib_static_la_CFLAGS = $(libeglib_la_CFLAGS)
INCLUDES = -I$(srcdir)
if HOST_WIN32
libeglib_la_LIBADD = -lm -liconv -lpsapi
libeglib_la_LIBADD = -lm $(ICONV_LIBS) -lpsapi
else
if PLATFORM_ANDROID
libeglib_la_LIBADD = -llog
endif
endif
libeglib_static_la_LIBADD = $(libeglib_la_LIBADD)
+6
View File
@@ -19,6 +19,10 @@
#define GINT_TO_POINTER(v) @GINT_TO_POINTER@
#define GUINT_TO_POINTER(v) @GUINT_TO_POINTER@
#if @HAVE_ALLOCA_H@ == 1
#define G_HAVE_ALLOCA_H
#endif
typedef unsigned @GSIZE@ gsize;
typedef signed @GSIZE@ gssize;
@@ -38,4 +42,6 @@ typedef signed @GSIZE@ gssize;
#define G_BREAKPOINT()
#endif
typedef @PIDTYPE@ GPid;
#endif
+2 -3
View File
@@ -62,8 +62,6 @@ typedef int pid_t;
#undef G_HAVE_STRNDUP
#define G_HAVE_GETOPT_H 1
int vasprintf(char **ret, const char *fmt, va_list ap);
/* disable the following warnings
* C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored.
* C4127: conditional expression is constant
@@ -71,4 +69,5 @@ int vasprintf(char **ret, const char *fmt, va_list ap);
#pragma warning(disable:4100 4127)
#endif
#endif
typedef void * GPid;
#endif
+13
View File
@@ -1,3 +1,4 @@
#define g_array_append monoeg_g_array_append
#define g_array_append_vals monoeg_g_array_append_vals
#define g_array_free monoeg_g_array_free
#define g_array_insert_vals monoeg_g_array_insert_vals
@@ -20,6 +21,7 @@
#define g_direct_hash monoeg_g_direct_hash
#define g_error_free monoeg_g_error_free
#define g_error_new monoeg_g_error_new
#define g_error_vnew monoeg_g_error_vnew
#define g_file_error_from_errno monoeg_g_file_error_from_errno
#define g_file_get_contents monoeg_g_file_get_contents
#define g_file_open_tmp monoeg_g_file_open_tmp
@@ -50,6 +52,10 @@
#define g_hash_table_new_full monoeg_g_hash_table_new_full
#define g_hash_table_remove monoeg_g_hash_table_remove
#define g_hash_table_size monoeg_g_hash_table_size
#define g_hash_table_print_stats monoeg_g_hash_table_print_stats
#define g_hash_table_remove_all monoeg_g_hash_table_remove_all
#define g_hash_table_iter_init monoeg_g_hash_table_iter_init
#define g_hash_table_iter_next monoeg_g_hash_table_iter_next
#define g_int_equal monoeg_g_int_equal
#define g_int_hash monoeg_g_int_hash
#define g_list_alloc monoeg_g_list_alloc
@@ -99,6 +105,7 @@
#define g_pattern_spec_new monoeg_g_pattern_spec_new
#define g_print monoeg_g_print
#define g_printf monoeg_g_printf
#define g_printerr monoeg_g_printerr
#define g_propagate_error monoeg_g_propagate_error
#define g_ptr_array_add monoeg_g_ptr_array_add
#define g_ptr_array_foreach monoeg_g_ptr_array_foreach
@@ -114,6 +121,7 @@
#define g_ptr_array_sort_with_data monoeg_g_ptr_array_sort_with_data
#define g_queue_free monoeg_g_queue_free
#define g_queue_is_empty monoeg_g_queue_is_empty
#define g_queue_foreach monoeg_g_queue_foreach
#define g_queue_new monoeg_g_queue_new
#define g_queue_pop_head monoeg_g_queue_pop_head
#define g_queue_push_head monoeg_g_queue_push_head
@@ -166,6 +174,7 @@
#define g_strerror monoeg_g_strerror
#define g_strescape monoeg_g_strescape
#define g_strfreev monoeg_g_strfreev
#define g_strdupv monoeg_g_strdupv
#define g_string_append monoeg_g_string_append
#define g_string_append_c monoeg_g_string_append_c
#define g_string_append_len monoeg_g_string_append_len
@@ -216,7 +225,11 @@
#define g_malloc0 monoeg_malloc0
#define g_ptr_array_grow monoeg_ptr_array_grow
#define g_realloc monoeg_realloc
#define g_try_malloc monoeg_try_malloc
#define g_try_realloc monoeg_try_realloc
#define g_strdup monoeg_strdup
#define g_ucs4_to_utf16_len monoeg_ucs4_to_utf16_len
#define g_utf16_to_ucs4_len monoeg_utf16_to_ucs4_len
#define g_byte_array_free monoeg_g_byte_array_free
#define g_byte_array_new monoeg_g_byte_array_new
+1 -1
View File
@@ -37,7 +37,7 @@
typedef struct {
GArray array;
gboolean clear_;
gboolean element_size;
guint element_size;
gboolean zero_terminated;
gint capacity;
} GArrayPriv;
+95
View File
@@ -0,0 +1,95 @@
/*
* Arrays
*
* Author:
* Geoff Norton ([email protected])
*
* (C) 2010 Novell, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdlib.h>
#include <glib.h>
#define INITIAL_CAPACITY 16
static void
ensure_capacity (GByteArray *array,
int capacity)
{
int new_capacity = MAX (array->len, INITIAL_CAPACITY);
if (capacity < array->len)
return;
while (new_capacity < capacity) {
new_capacity <<= 1;
}
capacity = new_capacity;
array->data = (guint8*) g_realloc (array->data, capacity);
memset (array->data + array->len, 0, capacity - array->len);
array->len = capacity;
}
GByteArray *
g_byte_array_new ()
{
GByteArray *rv = g_new0 (GByteArray, 1);
ensure_capacity (rv, INITIAL_CAPACITY);
return rv;
}
guint8*
g_byte_array_free (GByteArray *array,
gboolean free_segment)
{
guint8* rv = NULL;
g_return_val_if_fail (array != NULL, NULL);
if (free_segment)
g_free (array->data);
else
rv = array->data;
g_free (array);
return rv;
}
GByteArray *
g_array_append (GByteArray *array,
guint8 *data,
guint len)
{
g_return_val_if_fail (array != NULL, NULL);
ensure_capacity (array, array->len + len);
memmove (array->data + array->len, data, len);
array->len += len;
return array;
}
+14 -20
View File
@@ -47,57 +47,51 @@ g_dir_open (const gchar *path, guint flags, GError **error)
GDir *dir;
gunichar2* path_utf16;
gunichar2* path_utf16_search;
WIN32_FIND_DATA find_data;
WIN32_FIND_DATAW find_data;
g_return_val_if_fail (path != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
dir = g_new0 (GDir, 1);
path_utf16 = u8to16 (path);
path_utf16_search = g_malloc ((wcslen((wchar_t *) path_utf16) + 3)*sizeof(gunichar2));
wcscpy (path_utf16_search, path_utf16);
wcscat (path_utf16_search, L"\\*");
dir->handle = FindFirstFile (path_utf16, &find_data);
dir->handle = FindFirstFileW (path_utf16_search, &find_data);
if (dir->handle == INVALID_HANDLE_VALUE) {
if (error) {
gint err = errno;
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
}
g_free (dir);
g_free (path_utf16_search);
g_free (path_utf16);
g_free (dir);
return NULL;
}
/* now get files */
FindClose (dir->handle);
path_utf16_search = g_malloc ((wcslen(path_utf16) + 3)*sizeof(gunichar2));
wcscpy (path_utf16_search, path_utf16);
wcscat (path_utf16_search, L"\\*");
dir->handle = FindFirstFile (path_utf16_search, &find_data);
g_free (path_utf16_search);
g_free (path_utf16);
while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0)) {
if (!FindNextFile (dir->handle, &find_data)) {
while ((wcscmp ((wchar_t *) find_data.cFileName, L".") == 0) || (wcscmp ((wchar_t *) find_data.cFileName, L"..") == 0)) {
if (!FindNextFileW (dir->handle, &find_data)) {
if (error) {
gint err = errno;
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
}
g_free (dir);
g_free (path_utf16);
return NULL;
}
}
dir->current = NULL;
dir->next = u16to8 (find_data.cFileName);
g_free (path_utf16);
return dir;
}
const gchar *
g_dir_read_name (GDir *dir)
{
WIN32_FIND_DATA find_data;
WIN32_FIND_DATAW find_data;
g_return_val_if_fail (dir != NULL && dir->handle != 0, NULL);
@@ -113,11 +107,11 @@ g_dir_read_name (GDir *dir)
dir->next = NULL;
do {
if (!FindNextFile (dir->handle, &find_data)) {
if (!FindNextFileW (dir->handle, &find_data)) {
dir->next = NULL;
return dir->current;
}
} while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0));
} while ((wcscmp ((wchar_t *) find_data.cFileName, L".") == 0) || (wcscmp ((wchar_t *) find_data.cFileName, L"..") == 0));
dir->next = u16to8 (find_data.cFileName);
return dir->current;
+15 -1
View File
@@ -47,6 +47,20 @@ g_error_new (gpointer domain, gint code, const char *format, ...)
return err;
}
static GError *
g_error_vnew (gpointer domain, gint code, const char *format, va_list ap)
{
GError *err = g_new (GError, 1);
err->domain = domain;
err->code = code;
if (vasprintf (&err->message, format, ap) == -1)
err->message = g_strdup_printf ("internal: invalid format string %s", format);
return err;
}
void
g_clear_error (GError **error)
{
@@ -72,7 +86,7 @@ g_set_error (GError **err, gpointer domain, gint code, const gchar *format, ...)
if (err) {
va_start (args, format);
*err = g_error_new (domain, code, format, args);
*err = g_error_vnew (domain, code, format, args);
va_end (args);
}
}
+5
View File
@@ -33,9 +33,14 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef _MSC_VER
#include <direct.h>
#endif
#ifdef G_OS_WIN32
int mkstemp (char *tmp_template);
#endif
+4
View File
@@ -39,9 +39,13 @@
#ifdef G_OS_WIN32
#include <io.h>
#define open _open
#ifndef S_ISREG
#define S_ISREG(x) ((x & _S_IFMT) == _S_IFREG)
#endif
#ifndef S_ISDIR
#define S_ISDIR(x) ((x & _S_IFMT) == _S_IFDIR)
#endif
#endif
int mkstemp (char *tmp_template)
{
+66 -2
View File
@@ -51,6 +51,12 @@ struct _GHashTable {
GDestroyNotify value_destroy_func, key_destroy_func;
};
typedef struct {
GHashTable *ht;
int slot_index;
Slot *slot;
} Iter;
static const guint prime_tbl[] = {
11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237,
1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627,
@@ -334,6 +340,23 @@ g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data)
return NULL;
}
void
g_hash_table_remove_all (GHashTable *hash)
{
int i;
g_return_if_fail (hash != NULL);
for (i = 0; i < hash->table_size; i++){
Slot *s;
while (hash->table [i]) {
s = hash->table [i];
g_hash_table_remove (hash, s->key);
}
}
}
gboolean
g_hash_table_remove (GHashTable *hash, gconstpointer key)
{
@@ -500,6 +523,47 @@ g_hash_table_print_stats (GHashTable *table)
printf ("Size: %d Table Size: %d Max Chain Length: %d at %d\n", table->in_use, table->table_size, max_chain_size, max_chain_index);
}
void
g_hash_table_iter_init (GHashTableIter *it, GHashTable *hash_table)
{
Iter *iter = (Iter*)it;
memset (iter, 0, sizeof (Iter));
iter->ht = hash_table;
iter->slot_index = -1;
}
gboolean g_hash_table_iter_next (GHashTableIter *it, gpointer *key, gpointer *value)
{
Iter *iter = (Iter*)it;
GHashTable *hash = iter->ht;
g_assert (iter->slot_index != -2);
g_assert (sizeof (Iter) <= sizeof (GHashTableIter));
if (!iter->slot) {
while (TRUE) {
iter->slot_index ++;
if (iter->slot_index >= hash->table_size) {
iter->slot_index = -2;
return FALSE;
}
if (hash->table [iter->slot_index])
break;
}
iter->slot = hash->table [iter->slot_index];
}
if (key)
*key = iter->slot->key;
if (value)
*value = iter->slot->value;
iter->slot = iter->slot->next;
return TRUE;
}
gboolean
g_direct_equal (gconstpointer v1, gconstpointer v2)
{
@@ -515,13 +579,13 @@ g_direct_hash (gconstpointer v1)
gboolean
g_int_equal (gconstpointer v1, gconstpointer v2)
{
return GPOINTER_TO_INT (v1) == GPOINTER_TO_INT (v2);
return *(gint *)v1 == *(gint *)v2;
}
guint
g_int_hash (gconstpointer v1)
{
return GPOINTER_TO_UINT(v1);
return *(guint *)v1;
}
gboolean
+61 -13
View File
@@ -13,10 +13,6 @@
#pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
#else
#include <stdint.h>
/* For pid_t */
#ifndef WIN32
#include <unistd.h>
#endif
#endif
#include <eglib-config.h>
@@ -24,6 +20,10 @@
#include <eglib-remap.h>
#endif
#ifdef G_HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifndef offsetof
# define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name)
#endif
@@ -40,6 +40,12 @@
G_BEGIN_DECLS
#ifdef G_OS_WIN32
/* MSC and Cross-compilatin will use this */
int vasprintf (char **strp, const char *fmt, va_list ap);
#endif
/*
* Basic data types
*/
@@ -85,7 +91,6 @@ typedef int32_t gboolean;
#endif
#endif
/*
* Macros
*/
@@ -109,7 +114,9 @@ typedef int32_t gboolean;
#define G_USEC_PER_SEC 1000000
#ifndef ABS
#define ABS(a) ((a) > 0 ? (a) : -(a))
#endif
#define G_STRUCT_OFFSET(p_type,field) offsetof(p_type,field)
@@ -123,11 +130,11 @@ typedef int32_t gboolean;
* Allocation
*/
void g_free (void *ptr);
static inline gpointer g_realloc (gpointer obj, gsize size) { if (!size) {g_free (obj); return 0;} return realloc (obj, size);}
static inline gpointer g_malloc (gsize x) {if (x) return malloc (x); else return 0;}
static inline gpointer g_malloc0 (gsize x) {if (x) return calloc(1,x); else return 0;}
#define g_try_malloc(x) g_malloc(x)
#define g_try_realloc(obj,size) g_realloc((obj),(size))
gpointer g_realloc (gpointer obj, gsize size);
gpointer g_malloc (gsize x);
gpointer g_malloc0 (gsize x);
gpointer g_try_malloc (gsize x);
gpointer g_try_realloc (gpointer obj, gsize size);
#define g_new(type,size) ((type *) g_malloc (sizeof (type) * (size)))
#define g_new0(type,size) ((type *) g_malloc0 (sizeof (type)* (size)))
@@ -178,6 +185,14 @@ gchar* g_win32_getlocale(void);
* Hashtables
*/
typedef struct _GHashTable GHashTable;
typedef struct _GHashTableIter GHashTableIter;
/* Private, but needed for stack allocation */
struct _GHashTableIter
{
gpointer dummy [8];
};
typedef void (*GFunc) (gpointer data, gpointer user_data);
typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b);
typedef gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data);
@@ -198,11 +213,15 @@ gboolean g_hash_table_lookup_extended (GHashTable *hash, gconstpointer ke
void g_hash_table_foreach (GHashTable *hash, GHFunc func, gpointer user_data);
gpointer g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data);
gboolean g_hash_table_remove (GHashTable *hash, gconstpointer key);
void g_hash_table_remove_all (GHashTable *hash);
guint g_hash_table_foreach_remove (GHashTable *hash, GHRFunc func, gpointer user_data);
guint g_hash_table_foreach_steal (GHashTable *hash, GHRFunc func, gpointer user_data);
void g_hash_table_destroy (GHashTable *hash);
void g_hash_table_print_stats (GHashTable *table);
void g_hash_table_iter_init (GHashTableIter *iter, GHashTable *hash_table);
gboolean g_hash_table_iter_next (GHashTableIter *iter, gpointer *key, gpointer *value);
guint g_spaced_primes_closest (guint x);
#define g_hash_table_insert(h,k,v) g_hash_table_insert_replace ((h),(k),(v),FALSE)
@@ -434,6 +453,20 @@ GList *g_list_insert_before (GList *list,
GList *g_list_sort (GList *sort,
GCompareFunc func);
/*
* ByteArray
*/
typedef struct _GByteArray GByteArray;
struct _GByteArray {
guint8 *data;
gint len;
};
GByteArray *g_byte_array_new (void);
GByteArray* g_byte_array_append (GByteArray *array, const guint8 *data, guint len);
guint8* g_byte_array_free (GByteArray *array, gboolean free_segment);
/*
* Array
*/
@@ -496,6 +529,7 @@ void g_queue_push_tail (GQueue *queue,
gboolean g_queue_is_empty (GQueue *queue);
GQueue *g_queue_new (void);
void g_queue_free (GQueue *queue);
void g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data);
/*
* Messages
@@ -542,6 +576,8 @@ void g_assertion_message (const gchar *format, ...) G_GNUC_NORETURN
#endif /* ndef HAVE_C99_SUPPORT */
#define g_log_set_handler(a,b,c,d)
#define G_GNUC_INTERNAL
/*
* Conversions
*/
@@ -641,7 +677,7 @@ gunichar *g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read,
#define u8to16(str) g_utf8_to_utf16(str, (glong)strlen(str), NULL, NULL, NULL)
#ifdef G_OS_WIN32
#define u16to8(str) g_utf16_to_utf8(str, (glong)wcslen(str), NULL, NULL, NULL)
#define u16to8(str) g_utf16_to_utf8((gunichar2 *) (str), (glong)wcslen((wchar_t *) (str)), NULL, NULL, NULL)
#else
#define u16to8(str) g_utf16_to_utf8(str, (glong)strlen(str), NULL, NULL, NULL)
#endif
@@ -684,8 +720,6 @@ typedef enum {
G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6
} GSpawnFlags;
typedef pid_t GPid;
typedef void (*GSpawnChildSetupFunc) (gpointer user_data);
gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_output, gchar **standard_error, gint *exit_status, GError **error);
@@ -891,16 +925,30 @@ glong g_utf8_strlen (const gchar *str, gssize max);
# define GUINT16_TO_LE(x) (x)
# define GUINT_TO_LE(x) (x)
# define GUINT32_TO_BE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT16_FROM_BE(x) GUINT16_SWAP_LE_BE(x)
# define GUINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT64_FROM_BE(x) GUINT64_SWAP_LE_BE(x)
# define GINT16_FROM_BE(x) GUINT16_SWAP_LE_BE(x)
# define GINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x)
# define GINT64_FROM_BE(x) GUINT64_SWAP_LE_BE(x)
#else
# define GUINT32_TO_LE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT64_TO_LE(x) GUINT64_SWAP_LE_BE(x)
# define GUINT16_TO_LE(x) GUINT16_SWAP_LE_BE(x)
# define GUINT_TO_LE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT32_TO_BE(x) (x)
# define GUINT16_FROM_BE(x) (x)
# define GUINT32_FROM_BE(x) (x)
# define GUINT64_FROM_BE(x) (x)
# define GINT16_FROM_BE(x) (x)
# define GINT32_FROM_BE(x) (x)
# define GINT64_FROM_BE(x) (x)
#endif
#define GINT64_FROM_LE(x) (GUINT64_TO_LE (x))
#define GINT32_FROM_LE(x) (GUINT32_TO_LE (x))
#define GINT16_FROM_LE(x) (GUINT16_TO_LE (x))
#define GUINT32_FROM_LE(x) (GUINT32_TO_LE (x))
#define GUINT64_FROM_LE(x) (GUINT64_TO_LE (x))
#define GUINT16_FROM_LE(x) (GUINT16_TO_LE (x))
+52
View File
@@ -51,3 +51,55 @@ g_memdup (gconstpointer mem, guint byte_size)
return ptr;
}
gpointer g_realloc (gpointer obj, gsize size)
{
gpointer ptr;
if (!size) {
g_free (obj);
return 0;
}
ptr = realloc (obj, size);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", size);
}
gpointer
g_malloc (gsize x)
{
gpointer ptr;
if (!x)
return 0;
ptr = malloc (x);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", x);
}
gpointer g_malloc0 (gsize x)
{
gpointer ptr;
if (!x)
return 0;
ptr = calloc(1,x);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", x);
}
gpointer g_try_malloc (gsize x)
{
if (x)
return malloc (x);
return 0;
}
gpointer g_try_realloc (gpointer obj, gsize size)
{
if (!size) {
g_free (obj);
return 0;
}
return realloc (obj, size);
}
+39 -21
View File
@@ -72,39 +72,57 @@ g_path_is_absolute (const char *filename)
return (*filename == '/');
}
static pthread_mutex_t home_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t pw_lock = PTHREAD_MUTEX_INITIALIZER;
static const gchar *home_dir;
static const gchar *user_name;
static void
get_pw_data (void)
{
#ifdef HAVE_GETPWUID_R
struct passwd pw;
struct passwd *result;
char buf [4096];
#endif
if (user_name != NULL)
return;
pthread_mutex_lock (&pw_lock);
if (user_name != NULL) {
pthread_mutex_unlock (&pw_lock);
return;
}
#ifdef HAVE_GETPWUID_R
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) {
home_dir = g_strdup (pw.pw_dir);
user_name = g_strdup (pw.pw_name);
}
#endif
if (home_dir == NULL)
home_dir = g_getenv ("HOME");
if (user_name == NULL) {
user_name = g_getenv ("USER");
if (user_name == NULL)
user_name = "somebody";
}
pthread_mutex_unlock (&pw_lock);
}
/* Give preference to /etc/passwd than HOME */
const gchar *
g_get_home_dir (void)
{
if (home_dir == NULL){
pthread_mutex_lock (&home_lock);
if (home_dir == NULL){
#ifdef HAVE_GETPWUID_R
struct passwd pw;
struct passwd *result;
char buf [4096];
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0)
home_dir = g_strdup (pw.pw_dir);
#endif
if (home_dir == NULL)
home_dir = g_getenv ("HOME");
}
pthread_mutex_unlock (&home_lock);
}
get_pw_data ();
return home_dir;
}
const char *
g_get_user_name (void)
{
const char *retName = g_getenv ("USER");
if (!retName)
retName = "somebody";
return retName;
get_pw_data ();
return user_name;
}
static const char *tmp_dir;
+4 -3
View File
@@ -80,7 +80,7 @@ g_unsetenv(const gchar *variable)
{
gunichar2 *var;
var = u8to16(variable);
SetEnvironmentVariableW(var, TEXT(""));
SetEnvironmentVariableW(var, L"");
g_free(var);
}
@@ -98,14 +98,15 @@ g_path_is_absolute (const char *filename)
{
g_return_val_if_fail (filename != NULL, FALSE);
if (filename[0] != '\0' && filename[1] != '\0')
if (filename[1] == ':' && filename[2] != '\0' &&
if (filename[0] != '\0' && filename[1] != '\0') {
if (filename[1] == ':' && filename[2] != '\0' &&
(filename[2] == '\\' || filename[2] == '/'))
return TRUE;
/* UNC paths */
else if (filename[0] == '\\' && filename[1] == '\\' &&
filename[2] != '\0')
return TRUE;
}
return FALSE;
}
+1 -1
View File
@@ -53,7 +53,7 @@ g_module_open (const gchar *file, GModuleFlags flags)
gunichar2 *file16;
file16 = u8to16(file);
module->main_module = FALSE;
module->handle = LoadLibrary (file16);
module->handle = LoadLibraryW (file16);
g_free(file16);
if (!module->handle) {
g_free (module);
+9 -10
View File
@@ -24,6 +24,7 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
@@ -111,28 +112,26 @@ g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask)
void
g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args)
{
#if PLATFORM_ANDROID
__android_log_vprint (to_android_priority (log_level), log_domain, format, args);
#else
char *msg;
vasprintf (&msg, format, args);
#if PLATFORM_ANDROID
__android_log_print (to_android_priority (log_level),
/* TODO: provide a proper app name */
"mono", "%s%s%s",
log_domain != NULL ? log_domain : "",
log_domain != NULL ? ": " : "",
msg);
#else
printf ("%s%s%s\n",
log_domain != NULL ? log_domain : "",
log_domain != NULL ? ": " : "",
msg);
#endif
free (msg);
if (log_level & fatal){
fflush (stdout);
fflush (stderr);
abort ();
}
#endif
if (log_level & fatal){
abort ();
}
}
void
@@ -153,6 +152,6 @@ g_assertion_message (const gchar *format, ...)
va_start (args, format);
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
va_end (args);
g_assert_not_reached ();
abort ();
}
+3 -1
View File
@@ -68,7 +68,9 @@ g_build_path (const gchar *separator, const gchar *first_element, ...)
g_string_append_len (result, s, p - s);
if (next && *next){
if (strncmp (separator, result->str + strlen (result->str) - slen, slen))
int reslen = strlen (result->str);
if (reslen >= slen && strncmp (separator, result->str + reslen - slen, slen))
g_string_append (result, separator);
for (; strncmp (next, separator, slen) == 0; )
+6
View File
@@ -105,3 +105,9 @@ g_queue_free (GQueue *queue)
g_list_free (queue->head);
g_free (queue);
}
void
g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data)
{
g_list_foreach (queue->head, func, user_data);
}
+25 -14
View File
@@ -33,8 +33,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
{
gchar *ptr;
gchar c;
gboolean in_quote = FALSE;
gboolean escaped = FALSE;
gboolean escaped = FALSE, fresh = TRUE;
gchar quote_char = '\0';
GString *str;
@@ -42,18 +41,30 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
ptr = (gchar *) cmdline;
while ((c = *ptr++) != '\0') {
if (escaped) {
escaped = FALSE;
if (!g_ascii_isspace (c))
/*
* \CHAR is only special inside a double quote if CHAR is
* one of: $`"\ and newline
*/
if (quote_char == '\"'){
if (!(c == '$' || c == '`' || c == '"' || c == '\\'))
g_string_append_c (str, '\\');
g_string_append_c (str, c);
} else if (in_quote) {
if (c == quote_char) {
in_quote = FALSE;
quote_char = '\0';
g_ptr_array_add (array, g_string_free (str, FALSE));
str = g_string_new ("");
} else {
g_string_append_c (str, c);
if (!g_ascii_isspace (c))
g_string_append_c (str, c);
}
escaped = FALSE;
} else if (quote_char) {
if (c == quote_char) {
quote_char = '\0';
if (fresh && (g_ascii_isspace (*ptr) || *ptr == '\0')){
g_ptr_array_add (array, g_string_free (str, FALSE));
str = g_string_new ("");
}
} else if (c == '\\'){
escaped = TRUE;
} else
g_string_append_c (str, c);
} else if (g_ascii_isspace (c)) {
if (str->len > 0) {
g_ptr_array_add (array, g_string_free (str, FALSE));
@@ -62,7 +73,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
} else if (c == '\\') {
escaped = TRUE;
} else if (c == '\'' || c == '"') {
in_quote = TRUE;
fresh = str->len == 0;
quote_char = c;
} else {
g_string_append_c (str, c);
@@ -76,7 +87,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
return -1;
}
if (in_quote) {
if (quote_char) {
if (error)
*error = g_error_new (G_LOG_DOMAIN, 0, "Unfinished quote.");
g_string_free (str, TRUE);
@@ -214,7 +225,7 @@ g_shell_unquote (const gchar *quoted_string, GError **error)
}
} else if (*p == '\\'){
char c = *(++p);
if (!(c == '$' || c == '"' || c == '\\' || c == '`' || c == 0))
if (!(c == '$' || c == '"' || c == '\\' || c == '`' || c == '\'' || c == 0 ))
g_string_append_c (result, '\\');
if (c == 0)
break;
+2 -1
View File
@@ -79,6 +79,7 @@ gchar ***_NSGetEnviron();
extern char **environ;
#endif
#ifndef G_OS_WIN32
static int
safe_read (int fd, gchar *buffer, gint count, GError **error)
{
@@ -185,7 +186,7 @@ create_pipe (int *fds, GError **error)
}
return TRUE;
}
#endif /* G_OS_WIN32 */
gboolean
g_spawn_command_line_sync (const gchar *command_line,
gchar **standard_output,
+7
View File
@@ -69,6 +69,10 @@ g_strdupv (gchar **str_array)
guint length;
gchar **ret;
guint i;
if (!str_array)
return NULL;
length = g_strv_length(str_array);
ret = g_new0(gchar *, length + 1);
for (i = 0; str_array[i]; i++) {
@@ -354,6 +358,9 @@ g_strreverse (gchar *str)
if (str == NULL)
return NULL;
if (*str == 0)
return str;
len = strlen (str);
half = len / 2;
len--;
+16 -9
View File
@@ -53,6 +53,9 @@
# ifdef HAVE_ICONV_H
# include <iconv.h>
# endif
# ifdef HAVE_LOCALCHARSET_H
# include <localcharset.h>
# endif
#endif
static char *my_charset;
@@ -217,8 +220,10 @@ g_convert (const gchar *str, gssize len,
convertor = iconv_open (to_codeset, from_codeset);
if (convertor == (iconv_t) -1){
*bytes_written = 0;
*bytes_read = 0;
if (bytes_written)
*bytes_written = 0;
if (bytes_read)
*bytes_read = 0;
return NULL;
}
@@ -295,26 +300,28 @@ g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gs
gboolean
g_get_charset (G_CONST_RETURN char **charset)
{
if (my_charset == NULL) {
#ifdef G_OS_WIN32
static char buf[14];
sprintf (buf, "CP%u", GetACP ());
*charset = buf;
is_utf8 = FALSE;
static char buf [14];
sprintf (buf, "CP%u", GetACP ());
my_charset = buf;
is_utf8 = FALSE;
#else
if (my_charset == NULL){
/* These shouldn't be heap allocated */
#if HAVE_LANGINFO_H
#if HAVE_LOCALCHARSET_H
my_charset = locale_charset ();
#elif defined(HAVE_LANGINFO_H)
my_charset = nl_langinfo (CODESET);
#else
my_charset = "UTF-8";
#endif
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
#endif
}
if (charset != NULL)
*charset = my_charset;
#endif
return is_utf8;
}
+13 -4
View File
@@ -65,17 +65,20 @@ utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **erro
glong in_pos, ret;
if (len < 0)
len = strlen (str);
len = (glong) strlen (str);
in_pos = 0;
ret = 0;
/* Common case */
for (in_pos = 0; in_pos < len && str [in_pos] < 0x80; in_pos++)
for (in_pos = 0; in_pos < len && (guchar) str [in_pos] < 0x80; in_pos++)
ret ++;
if (in_pos == len)
if (in_pos == len) {
if (items_read)
*items_read = in_pos;
return ret;
}
mb_size = 0;
mb_remain = 0;
@@ -212,8 +215,10 @@ g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_wr
*error = NULL;
if (len < 0)
len = strlen (str);
len = (glong) strlen (str);
if (items_read)
*items_read = 0;
if (items_written)
*items_written = 0;
utf16_len = utf8_to_utf16_len (str, len, items_read, error);
@@ -311,6 +316,8 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
out_pos = 0;
surrogate = FALSE;
if (items_read)
*items_read = 0;
if (items_written)
*items_written = 0;
utf8_len = utf16_to_utf8_len (str, len, items_read, error);
@@ -331,6 +338,7 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
} else {
surrogate = 0;
/* invalid surrogate pair */
++in_pos;
continue;
}
} else {
@@ -347,6 +355,7 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
else if (ch >= 0xD800 && ch <= 0xDBFF)
surrogate = ch;
else if (ch >= 0xDC00 && ch <= 0xDFFF) {
++in_pos;
/* invalid surrogate pair */
continue;
}
+3 -2
View File
@@ -9,7 +9,7 @@ int vasprintf(char **ret, const char *fmt, va_list ap)
size_t buflen;
va_list ap2;
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
ap2 = ap;
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
#else
@@ -17,7 +17,7 @@ int vasprintf(char **ret, const char *fmt, va_list ap)
len = vsnprintf(NULL, 0, fmt, ap2);
#endif
if (len > 0 && (buf = malloc((buflen = (size_t) (len + 1)))) != NULL) {
if (len >= 0 && (buf = malloc ((buflen = (size_t) (len + 1)))) != NULL) {
len = vsnprintf(buf, buflen, fmt, ap);
*ret = buf;
} else {
@@ -28,3 +28,4 @@ int vasprintf(char **ret, const char *fmt, va_list ap)
va_end(ap2);
return len;
}
+1 -1
View File
@@ -29,7 +29,7 @@ SOURCES = \
test_eglib_SOURCES = $(SOURCES)
test_eglib_CFLAGS = -Wall -Werror -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\"
test_eglib_CFLAGS = -Wall -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\"
test_eglib_LDADD = ../src/libeglib.la
run-eglib: all
+33
View File
@@ -131,12 +131,45 @@ RESULT hash_grow (void)
return NULL;
}
RESULT hash_iter (void)
{
#if !defined(GLIB_MAJOR_VERSION) || GLIB_CHECK_VERSION(2, 16, 0)
GHashTable *hash = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
GHashTableIter iter;
int i, sum, keys_sum, values_sum;
gpointer key, value;
sum = 0;
for (i = 0; i < 1000; i++) {
sum += i;
g_hash_table_insert (hash, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i));
}
keys_sum = values_sum = 0;
g_hash_table_iter_init (&iter, hash);
while (g_hash_table_iter_next (&iter, &key, &value)) {
if (key != value)
return FAILED ("key != value");
keys_sum += GPOINTER_TO_UINT (key);
values_sum += GPOINTER_TO_UINT (value);
}
if (keys_sum != sum || values_sum != sum)
return FAILED ("Did not find all key-value pairs");
g_hash_table_destroy (hash);
return NULL;
#else
/* GHashTableIter was added in glib 2.16 */
return NULL;
#endif
}
static Test hashtable_tests [] = {
{"t1", hash_t1},
{"t2", hash_t2},
{"grow", hash_grow},
{"default", hash_default},
{"null_lookup", hash_null_lookup},
{"iter", hash_iter},
{NULL, NULL}
};
+12
View File
@@ -20,6 +20,8 @@ RESULT
test_buildpath ()
{
char *s;
char *buffer = "var/private";
char *dir = "/";
s = g_build_path ("/", "hola///", "//mundo", NULL);
if (strcmp (s, "hola/mundo") != 0)
@@ -99,6 +101,16 @@ test_buildpath ()
return FAILED ("must get a non-NULL return");
if (s [0] != 0)
return FAILED ("must get an empty string");
// This is to test the regression introduced by Levi for the Windows support
// that code errouneously read below the allowed area (in this case dir [-1]).
// and caused all kinds of random errors.
dir = "//";
dir++;
s = g_build_filename (dir, buffer, NULL);
if (s [0] != '/')
return FAILED ("Must have a '/' at the start");
g_free (s);
return OK;
}
+91 -12
View File
@@ -55,7 +55,7 @@ test_shell_argv1 ()
if (!ret)
return FAILED ("11. It should return TRUE");
if (argc != 2)
return FAILED ("12. argc was %d", argc);
return FAILED ("12. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("13. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
@@ -72,7 +72,7 @@ test_shell_argv1 ()
if (!ret)
return FAILED ("16. It should return TRUE");
if (argc != 3)
return FAILED ("17. argc was %d", argc);
return FAILED ("17. argc was %d expected 3", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], ""))
@@ -85,6 +85,19 @@ test_shell_argv1 ()
g_strfreev (argv);
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv ("hola'' bola", &argc, &argv, &error);
if (!ret)
return FAILED ("21. It should return TRUE");
if (argc != 2)
return FAILED ("22. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("23. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
return FAILED ("24. argv[2] was %s", argv [1]);
if (error != NULL)
return FAILED ("25. error is not null");
return OK;
}
@@ -103,7 +116,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 2)
return FAILED ("2. argc was %d", argc);
return FAILED ("2. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("3. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
@@ -119,7 +132,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("6. It should return TRUE");
if (argc != 3)
return FAILED ("7. argc was %d", argc);
return FAILED ("7. argc was %d expected 3", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("8. argv[0] was %s", argv [0]);
if (strcmp (argv [1], ""))
@@ -137,7 +150,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("10. It should return TRUE");
if (argc != 3)
return FAILED ("11. argc was %d", argc);
return FAILED ("11. argc was %d expected 3", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("12. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\t"))
@@ -155,7 +168,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("16. It should return TRUE");
if (argc != 3)
return FAILED ("17. argc was %d", argc);
return FAILED ("17. argc was %d expected 3", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\t"))
@@ -184,7 +197,7 @@ test_shell_argv3 ()
if (ret)
return FAILED ("1. It should return FALSE");
if (argc != 0)
return FAILED ("2. argc was %d", argc);
return FAILED ("2. argc was %d expected 0", argc);
if (argv != NULL)
return FAILED ("3. argv[0] was %s", argv [0]);
if (error == NULL)
@@ -197,7 +210,7 @@ test_shell_argv3 ()
if (!ret)
return FAILED ("5. It should return TRUE");
if (argc != 2)
return FAILED ("6. argc was %d", argc);
return FAILED ("6. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\"bola"))
@@ -212,7 +225,7 @@ test_shell_argv3 ()
if (!ret)
return FAILED ("9. It should return TRUE. %s", error->message);
if (argc != 2)
return FAILED ("10. argc was %d", argc);
return FAILED ("10. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("11. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\n\\'bola"))
@@ -226,6 +239,70 @@ test_shell_argv3 ()
return OK;
}
// This was the 2.8 showstopper error
RESULT
test_shell_argv4 ()
{
GError *error;
gint argc;
gchar **argv;
gboolean ret;
char *str = "'/usr/bin/gnome-terminal' -e \"bash -c 'read -p \\\"Press any key to continue...\\\" -n1;'\"";
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv (str, &argc, &argv, &error);
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 3)
return FAILED ("2. argc was %d expected 3", argc);
if (argv == NULL)
return FAILED ("3. argv[0] was NULL");
if (error != NULL)
return FAILED ("4. error was set");
if (strcmp (argv [0], "/usr/bin/gnome-terminal"))
return FAILED ("5. Expected /usr/bin/gnome-terminal got %s", argv [0]);
if (strcmp (argv [1], "-e"))
return FAILED ("6. Expected -e, got: %s", argv [1]);
if (strcmp (argv [2], "bash -c 'read -p \"Press any key to continue...\" -n1;'"))
return FAILED ("7. Got unexpected result: %s\n", argv [2]);
return OK;
}
// This is https://bugzilla.novell.com/show_bug.cgi?id=655896
RESULT
test_shell_argv5 ()
{
GError *error;
gint argc;
gchar **argv;
gboolean ret;
char *str = "echo \"foo\",\"bar\"";
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv (str, &argc, &argv, &error);
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 2)
return FAILED ("2. argc was %d expected 2", argc);
if (argv == NULL)
return FAILED ("3. argv[0] was NULL");
if (error != NULL)
return FAILED ("4. error was set");
if (strcmp (argv [0], "echo"))
return FAILED ("5. Expected echo got %s", argv [0]);
if (strcmp (argv [1], "foo,bar"))
return FAILED ("6. Expected foo,bar, got: %s", argv [1]);
return OK;
}
RESULT
test_quote ()
{
@@ -241,9 +318,11 @@ test_quote ()
}
static Test shell_tests [] = {
{"g_shell_parse_argv1", test_shell_argv1},
{"g_shell_parse_argv2", test_shell_argv2},
{"g_shell_parse_argv3", test_shell_argv3},
{"test_shell_argv1", test_shell_argv1},
{"test_shell_argv2", test_shell_argv2},
{"test_shell_argv3", test_shell_argv3},
{"test_shell_argv4", test_shell_argv4},
{"test_shell_argv5", test_shell_argv5},
{"g_shell_quote", test_quote},
{NULL, NULL}
};
+42 -7
View File
@@ -296,27 +296,37 @@ test_split_set ()
RESULT
test_strreverse ()
{
RESULT res = OK;
gchar *a = g_strdup ("onetwothree");
gchar *a_target = "eerhtowteno";
gchar *b = g_strdup ("onetwothre");
gchar *b_target = "erhtowteno";
gchar *c = g_strdup ("");
gchar *c_target = "";
g_strreverse (a);
if (strcmp (a, a_target)) {
g_free (b);
g_free (a);
return FAILED("strreverse failed. Expecting: '%s' and got '%s'\n", a, a_target);
res = FAILED("strreverse failed. Expecting: '%s' and got '%s'\n", a, a_target);
goto cleanup;
}
g_strreverse (b);
if (strcmp (b, b_target)) {
g_free (b);
g_free (a);
return FAILED("strreverse failed. Expecting: '%s' and got '%s'\n", b, b_target);
res = FAILED("strreverse failed. Expecting: '%s' and got '%s'\n", b, b_target);
goto cleanup;
}
g_strreverse (c);
if (strcmp (c, c_target)) {
res = FAILED("strreverse failed. Expecting: '%s' and got '%s'\n", b, b_target);
goto cleanup;
}
cleanup:
g_free (c);
g_free (b);
g_free (a);
return OK;
return res;
}
RESULT
@@ -621,6 +631,30 @@ test_ascii_strdown ()
return OK;
}
RESULT
test_strdupv ()
{
gchar **one;
gchar **two;
gint len;
one = g_strdupv (NULL);
if (one)
return FAILED ("Should have been NULL");
one = g_malloc (sizeof (gchar *));
*one = NULL;
two = g_strdupv (one);
if (!two)
FAILED ("Should have been not NULL");
len = g_strv_length (two);
if (len)
FAILED ("Should have been 0");
g_strfreev (two);
g_strfreev (one);
return NULL;
}
static Test strutil_tests [] = {
{"g_strfreev", test_strfreev},
{"g_strconcat", test_concat},
@@ -639,6 +673,7 @@ static Test strutil_tests [] = {
{"g_strescape", test_strescape},
{"g_ascii_strncasecmp", test_ascii_strncasecmp },
{"g_ascii_strdown", test_ascii_strdown },
{"g_strdupv", test_strdupv },
{NULL, NULL}
};
-4
View File
@@ -1,4 +0,0 @@
ADD_DEFINITIONS(${GMODULE_CFLAGS})
ADD_LIBRARY(ikvm_native SHARED jni.c os.c jni.h)
TARGET_LINK_LIBRARIES(ikvm_native ${GMODULE_LIBS})
+1
View File
@@ -22,3 +22,4 @@
/autom4te.cache
/libgc-mono.pc
/libgc-mono-*.tar.gz
dolt*
-196
View File
@@ -1,196 +0,0 @@
# based on configure.in/Makefile.am, which is:
# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
#
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
#
# Permission is hereby granted to use or copy this program
# for any purpose, provided the above notices are retained on all copies.
# Permission to modify the code and to distribute modified code is granted,
# provided the above notices are retained, and a notice that the code was
# modified is included with the above copyright notice.
#
# Original author: Tom Tromey
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
# This is in sync with the configure.in/Makefile.am at r135583
#
# This is a cmake build file for libgc
# Only the functionality needed by mono is supported
#
# FIXME:
add_definitions("-g -O2")
set(THREADS ${libgc_threads})
set(THREADDLLIBS "")
if (THREADS STREQUAL "no" OR THREADS STREQUAL "none" OR THREADS STREQUAL "single")
set(THREADS none)
endif()
if (THREADS STREQUAL "posix" OR THREADS STREQUAL "pthreads")
set(THREADS posix)
set(THREADDLLIBS "-lpthread")
if (${host} MATCHES "x86-.*-linux.*|ia64-.*-linux.*|i386-.*-linux.*|i486-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha.*-.*-linux.*|s390.*-.*-linux.*|sparc.*-.*-linux.*|powerpc-.*-linux.*")
add_definitions(-DGC_LINUX_THREADS -D_REENTRANT)
set(parallel_mark_supported yes)
add_definitions(-DTHREAD_LOCAL_ALLOC)
elseif(${host} MATCHES ".*-linux.*")
add_definitions(-DGC_LINUX_THREADS -D_REENTRANT)
elseif(${host} MATCHES ".*-aix.*")
add_definitions(-DGC_AIX_THREADS -D_REENTRANT)
elseif(${host} MATCHES ".*-hpux.*")
message("Only HP/UX 11 threads are supported.")
add_definitions(-DGC_HPUX_THREADS -D_REENTRANT -D_POSIX_C_SOURCE=199506L)
add_definitions(-DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
set(THREADDLLIBS "-lpthread -lrt")
elseif(${host} ".*-.*-freebsd.*")
add_definitions(-DGC_FREEBSD_THREADS)
message(FATAL_ERROR "todo")
### if test "x$PTHREAD_CFLAGS" != "x"; then
### INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
### fi
### if test "x$PTHREAD_LIBS" = "x"; then
### THREADDLLIBS=-pthread
### else
### THREADDLLIBS="$PTHREAD_LIBS"
### fi
elseif(${host} ".*-.*-freebsd.*")
add_definitions(-DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS)
elseif(${host} ".*-.*-irix.*")
add_definitions(-DGC_IRIX_THREADS)
elseif(${host} ".*-.*-cygwin.*")
add_definitons(-DGC_WIN32_THREADS)
elseif(${host} ".*-.*-darwin.*")
add_definitons(-DGC_DARWIN_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
elseif(${host} ".*-.*-netbsd.*")
add_definitions(-DGC_NETBSD_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
elseif(${host} ".*-.*-osf.*")
add_definitions(GC_OSF1_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
add_definitions(-pthread)
set(THREADDLLIBS "-lpthread -lrt")
else()
message(FATAL_ERROR "Pthreads not supported by the GC on this platform.")
endif()
endif()
if(THREADS STREQUAL "win32")
add_definitions(GC_WIN32_THREADS)
# Wine getenv may not return NULL for missing entry
add_definitions(NO_GETENV)
if (enable_win32_dllmain)
add_definitions(gc_inside_dll)
endif()
endif()
if(${host} MATCHES "powerpc-.*-darwin.*")
set(powerpc_darwin yes)
endif()
if(parallel_mark_supported AND enable_parallel_mark)
add_definitions("-DPARALLEL_MARK")
endif()
# Configuration of machine-dependent code
ac_msg_checking("which machine-dependent code should be used")
###AC_MSG_CHECKING(
###machdep=
###case "$host" in
### alpha-*-openbsd*)
### machdep="alpha_mach_dep.lo"
### if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
### AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
### fi
### ;;
### alpha*-*-linux*)
### machdep="alpha_mach_dep.lo"
### ;;
### i?86-*-solaris2.[[89]]|i?86-*-solaris2.1?)
### AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
### ;;
### mipstx39-*-elf*)
### machdep="mips_ultrix_mach_dep.lo"
### AC_DEFINE(STACKBASE, __stackbase)
### AC_DEFINE(DATASTART_IS_ETEXT)
### ;;
### mips-dec-ultrix*)
### machdep="mips_ultrix_mach-dep.lo"
### ;;
### mips-nec-sysv*|mips-unknown-sysv*)
### ;;
### mips*-*-linux*)
### ;;
### mips-*-*)
### machdep="mips_sgi_mach_dep.lo"
### AC_DEFINE(NO_EXECUTE_PERMISSION)
### ;;
### sparc-*-netbsd*)
### machdep="sparc_netbsd_mach_dep.lo"
### ;;
### sparc-sun-solaris2.3)
### machdep="sparc_mach_dep.lo"
### AC_DEFINE(SUNOS53_SHARED_LIB)
### ;;
### sparc*-sun-solaris2.*)
### machdep="sparc_mach_dep.lo"
### ;;
### ia64-*-*)
### machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
### ;;
###esac
if(NOT machdep)
set(machdep "mach_dep.c")
endif()
ac_msg_result("${machdep}")
ac_msg_checking("for threads package to use")
ac_msg_result("${THREADS}")
# Include defines that have become de facto standard.
# ALL_INTERIOR_POINTERS can be overridden in startup code.
add_definitions(-DSILENT -DNO_SIGNALS -DNO_EXECUTE_PERMISSION)
# AC_DEFINE(ALL_INTERIOR_POINTERS)
# By default, make the library as general as possible.
add_definitions(-DJAVA_FINALIZATION -DGC_GCJ_SUPPORT -DATOMIC_UNCOLLECTABLE)
add_definitions(-D_IN_LIBGC)
set(SUBDIRS include doc)
foreach(dir ${SUBDIRS})
add_subdirectory(${dir})
endforeach()
set(top_srcdir ../)
# .. is needed for mono/utils/mono-compiler.h
INCLUDE_DIRECTORIES(. .. include)
add_definitions(${CPPFLAGS})
if(powerpc_darwin)
set(asm_libgc_sources powerpc_darwin_mach_dep.s)
endif()
set(libmonogc_la_SOURCES
allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c
backgraph.c win32_threads.c
pthread_support.c pthread_stop_world.c darwin_stop_world.c
${asm_libgc_sources} ${machdep})
add_library(monogc-static STATIC ${libmonogc_la_SOURCES})
target_link_libraries (${THREADDLLIBS} ${UNWINDLIBS})
+9 -7
View File
@@ -36,8 +36,10 @@ EXTRA_DIST =
if POWERPC_DARWIN
asm_libgc_sources = powerpc_darwin_mach_dep.s
else
asm_libgc_sources =
endif
if TARGET_IA64
asm_libgc_sources = ia64_save_regs_in_stack.s
endif
libmonogc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
@@ -47,12 +49,12 @@ obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
backgraph.c win32_threads.c \
pthread_support.c pthread_stop_world.c darwin_stop_world.c \
$(asm_libgc_sources)
openbsd_stop_world.c mach_dep.c $(asm_libgc_sources)
# Include THREADDLLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked:
libmonogc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
libmonogc_la_DEPENDENCIES = @addobjs@
libmonogc_la_LIBADD = $(THREADDLLIBS) $(UNWINDLIBS)
libmonogc_la_DEPENDENCIES =
libmonogc_la_LDFLAGS = -version-info 1:2:0
EXTRA_libmonogc_la_SOURCES = alpha_mach_dep.S \
@@ -93,7 +95,7 @@ endif
#TESTS = gctest $(extra_checks)
## FIXME: relies on internal code generated by automake.
all_objs = @addobjs@ $(libgc_la_OBJECTS)
all_objs = $(libgc_la_OBJECTS)
$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
@@ -113,7 +115,7 @@ endif
## We have our own definition of LTCOMPILE because we want to use our
## CFLAGS, not those passed in from the top level make.
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(INCLUDES) \
-I$(top_srcdir)/include $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
+177 -43
View File
@@ -1,47 +1,181 @@
#
#
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
#
# Permission is hereby granted to use or copy this program
# for any purpose, provided the above notices are retained on all copies.
# Permission to modify the code and to distribute modified code is granted,
# provided the above notices are retained, and a notice that the code was
# modified is included with the above copyright notice.
#
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
dnl dolt, a replacement for libtool
dnl Copyright © 2007-2008 Josh Triplett <[email protected]>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
dnl
dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
dnl installed when running autoconf on your project.
# GC_SET_VERSION
# sets and AC_DEFINEs GC_VERSION_MAJOR, GC_VERSION_MINOR and GC_ALPHA_VERSION
# based on the contents of PACKAGE_VERSION; PACKAGE_VERSION must conform to
# [0-9]+[.][0-9]+(alpha[0.9]+)?
# in lex syntax; if there is no alpha number, GC_ALPHA_VERSION is empty
#
AC_DEFUN(GC_SET_VERSION, [
AC_MSG_CHECKING(GC version numbers)
GC_VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]][[0-9]]*\)[[.]].*$/\1/g'`
GC_VERSION_MINOR=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]]\([[0-9]][[0-9]]*\).*$/\1/g'`
GC_ALPHA_VERSION=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]][[0-9]]*//'`
AC_DEFUN([DOLT], [
AC_REQUIRE([AC_CANONICAL_HOST])
# dolt, a replacement for libtool
# Josh Triplett <[email protected]>
AC_PATH_PROG(DOLT_BASH, bash)
AC_MSG_CHECKING([if dolt supports this host])
dolt_supported=yes
if test x$DOLT_BASH = x; then
dolt_supported=no
fi
if test x$GCC != xyes; then
dolt_supported=no
fi
case $host in
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
*)
dolt_supported=no
;;
esac
if test x$dolt_supported = xno ; then
AC_MSG_RESULT([no, falling back to libtool])
LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
else
AC_MSG_RESULT([yes, replacing libtool])
case "$GC_ALPHA_VERSION" in
alpha*)
GC_ALPHA_VERSION=`echo $GC_ALPHA_VERSION \
| sed 's/alpha\([[0-9]][[0-9]]*\)/\1/'` ;;
*) GC_ALPHA_MAJOR='' ;;
esac
dnl Start writing out doltcompile.
cat <<__DOLTCOMPILE__EOF__ >doltcompile
#!$DOLT_BASH
__DOLTCOMPILE__EOF__
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
args=("$[]@")
for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
if test x"${args@<:@$arg@:>@}" = x-o ; then
objarg=$((arg+1))
break
fi
done
if test x$objarg = x ; then
echo 'Error: no -o on compiler command line' 1>&2
exit 1
fi
lo="${args@<:@$objarg@:>@}"
obj="${lo%.lo}"
if test x"$lo" = x"$obj" ; then
echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
exit 1
fi
objbase="${obj##*/}"
__DOLTCOMPILE__EOF__
if test :$GC_VERSION_MAJOR: = :: \
-o :$GC_VERSION_MINOR: = :: ;
then
AC_MSG_RESULT(invalid)
AC_MSG_ERROR([nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'])
fi
AC_DEFINE_UNQUOTED(GC_VERSION_MAJOR, $GC_VERSION_MAJOR)
AC_DEFINE_UNQUOTED(GC_VERSION_MINOR, $GC_VERSION_MINOR)
if test :$GC_ALPHA_VERSION: != :: ; then
AC_DEFINE_UNQUOTED(GC_ALPHA_VERSION, $GC_ALPHA_VERSION)
fi
AC_MSG_RESULT(major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION)
dnl Write out shared compilation code.
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
libobjdir="${obj%$objbase}.libs"
if test ! -d "$libobjdir" ; then
mkdir_out="$(mkdir "$libobjdir" 2>&1)"
mkdir_ret=$?
if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
echo "$mkdir_out" 1>&2
exit $mkdir_ret
fi
fi
pic_object="$libobjdir/$objbase.o"
args@<:@$objarg@:>@="$pic_object"
__DOLTCOMPILE__EOF__
cat <<__DOLTCOMPILE__EOF__ >>doltcompile
"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
__DOLTCOMPILE__EOF__
fi
dnl Write out static compilation code.
dnl Avoid duplicate compiler output if also building shared objects.
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
non_pic_object="$obj.o"
args@<:@$objarg@:>@="$non_pic_object"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" || exit $?
__DOLTCOMPILE__EOF__
fi
fi
dnl Write out the code to write the .lo file.
dnl The second line of the .lo file must match "^# Generated by .*libtool"
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
{
echo "# $lo - a libtool object file"
echo "# Generated by doltcompile, not libtool"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "pic_object='.libs/${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo pic_object=none
__DOLTCOMPILE__EOF__
fi
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "non_pic_object='${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo non_pic_object=none
__DOLTCOMPILE__EOF__
fi
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
} > "$lo"
__DOLTCOMPILE__EOF__
dnl Done writing out doltcompile; substitute it for libtool compilation.
chmod +x doltcompile
LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
dnl a target, so write out a libtool wrapper to handle that case.
dnl Note that doltlibtool does not handle inferred tags or option arguments
dnl without '=', because automake does not use them.
cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
#!$DOLT_BASH
__DOLTLIBTOOL__EOF__
cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
top_builddir_slash="${0%%doltlibtool}"
: ${top_builddir_slash:=./}
args=()
modeok=false
tagok=false
for arg in "$[]@"; do
case "$arg" in
--mode=compile) modeok=true ;;
--tag=CC|--tag=CXX) tagok=true ;;
--quiet) ;;
*) args@<:@${#args[@]}@:>@="$arg" ;;
esac
done
if $modeok && $tagok ; then
. ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
else
exec ${top_builddir_slash}libtool "$[]@"
fi
__DOLTLIBTOOL__EOF__
dnl Done writing out doltlibtool; substitute it for libtool.
chmod +x doltlibtool
LIBTOOL='$(top_builddir)/doltlibtool'
fi
AC_SUBST(LTCOMPILE)
AC_SUBST(LTCXXCOMPILE)
# end dolt
])
+23 -3
View File
@@ -94,7 +94,7 @@ case "$THREADS" in
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-linux*)
*-*-linux* | *-*-nacl*)
AC_DEFINE(GC_LINUX_THREADS)
AC_DEFINE(_REENTRANT)
;;
@@ -147,6 +147,13 @@ case "$THREADS" in
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-openbsd*)
AC_DEFINE(GC_OPENBSD_THREADS)
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-osf*)
AC_DEFINE(GC_OSF1_THREADS)
if test "${enable_parallel_mark}" = yes; then
@@ -330,7 +337,11 @@ case "$host" in
machdep="sparc_mach_dep.lo"
;;
ia64-*-*)
machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
target_ia64=true
;;
*-*-nacl*)
AC_DEFINE(NO_EXECUTE_PERMISSION)
;;
esac
if test x"$machdep" = x; then
@@ -338,12 +349,21 @@ AC_MSG_RESULT($machdep)
machdep="mach_dep.lo"
fi
addobjs="$addobjs $machdep"
AC_SUBST(addobjs)
#
# Adding object files directly to _LIBADD breaks -j builds, so we need to add the sources
# instead, but _SOURCES can't contain autoconf substitutions, so add them using automake
# conditionals.
#
#AC_SUBST(addobjs)
AC_SUBST(addincludes)
AC_SUBST(addlibs)
AC_SUBST(addtests)
AM_CONDITIONAL(TARGET_IA64,test x$target_ia64 = xtrue)
AC_PROG_LIBTOOL
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
DOLT
#
# Check for AViiON Machines running DGUX
+13
View File
@@ -569,6 +569,9 @@ void GC_stop_world()
thread_act_array_t act_list, prev_list;
mach_msg_type_number_t listcount, prevcount;
if (GC_notify_event)
GC_notify_event (GC_EVENT_PRE_STOP_WORLD);
# if DEBUG_THREADS
GC_printf1("Stopping the world from 0x%lx\n", mach_thread_self());
# endif
@@ -639,6 +642,9 @@ void GC_stop_world()
#endif
mach_port_deallocate(my_task, my_thread);
if (GC_notify_event)
GC_notify_event (GC_EVENT_POST_STOP_WORLD);
}
/* Caller holds allocation lock, and has held it continuously since */
@@ -654,6 +660,9 @@ void GC_start_world()
mach_msg_type_number_t listcount;
struct thread_basic_info info;
mach_msg_type_number_t outCount = THREAD_INFO_MAX;
if (GC_notify_event)
GC_notify_event (GC_EVENT_PRE_START_WORLD);
# if DEBUG_THREADS
GC_printf0("World starting\n");
@@ -700,6 +709,10 @@ void GC_start_world()
vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * listcount);
mach_port_deallocate(my_task, my_thread);
if (GC_notify_event)
GC_notify_event (GC_EVENT_POST_START_WORLD);
# if DEBUG_THREADS
GC_printf0("World started\n");
# endif
+8 -1
View File
@@ -57,6 +57,7 @@
!defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
!defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
!(defined(FREEBSD) && defined(__ELF__)) && \
!(defined(OPENBSD) && (defined(__ELF__) || defined(M68K))) && \
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
!defined(DARWIN)
--> We only know how to find data segments of dynamic libraries for the
@@ -92,9 +93,12 @@
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
# include <stddef.h>
# if !defined(OPENBSD)
# include <elf.h>
# endif
# include <link.h>
#endif
@@ -295,6 +299,7 @@ void GC_register_dynamic_libraries()
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
@@ -473,8 +478,10 @@ GC_bool GC_register_main_static_data()
/* This doesn't necessarily work in all cases, e.g. with preloaded
* dynamic libraries. */
#if defined(NETBSD)
#if defined(NETBSD) || defined(OPENBSD)
# if !defined(OPENBSD)
# include <sys/exec_elf.h>
# endif
/* for compatibility with 1.4.x */
# ifndef DT_DEBUG
# define DT_DEBUG 21
+1 -1
View File
@@ -25,7 +25,7 @@
#include "private/gc_priv.h"
# if (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) \
# if defined(DYNAMIC_LOADING) && (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) \
|| defined(GC_SOLARIS_THREADS)
# if defined(dlopen) && !defined(GC_USE_LD_WRAP)
+5
View File
@@ -57,6 +57,7 @@
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
defined(GC_OPENBSD_THREADS) || \
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
# define GC_PTHREADS
# endif
@@ -87,6 +88,10 @@
# define GC_DARWIN_THREADS
# define GC_PTHREADS
# endif
# if !defined(GC_PTHREADS) && defined(__OpenBSD__)
# define GC_OPENBSD_THREADS
# define GC_PTHREADS
# endif
# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
# define GC_FREEBSD_THREADS
# define GC_PTHREADS
+5
View File
@@ -59,6 +59,11 @@
#endif
int GC_pthread_join(pthread_t thread, void **retval);
int GC_pthread_detach(pthread_t thread);
#if defined(__native_client__) || defined(NACL)
void GC_pthread_exit(void *status);
# undef pthread_exit
# define pthread_exit GC_pthread_exit
#endif
#if defined(GC_OSF1_THREADS) \
&& defined(_PTHREAD_USE_MANGLED_NAMES_) && !defined(_PTHREAD_USE_PTDNAM_)
+8
View File
@@ -250,6 +250,14 @@
#endif
}
# define GC_TEST_AND_SET_DEFINED
inline static void GC_clear(volatile unsigned int *addr) {
#ifdef HAVE_ARMV6
/* Memory barrier */
__asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory");
#endif
*(addr) = 0;
}
# define GC_CLEAR_DEFINED
# endif /* ARM32 */
# ifdef CRIS
inline static int GC_test_and_set(volatile unsigned int *addr) {
+4
View File
@@ -371,6 +371,8 @@ void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
# define GC_MACH_THREAD_STATE_FLAVOR PPC_THREAD_STATE
# elif defined(I386)
# define GC_MACH_THREAD_STATE_FLAVOR i386_THREAD_STATE
# elif defined(X86_64)
# define GC_MACH_THREAD_STATE_FLAVOR x86_THREAD_STATE64
# else
# define GC_MACH_THREAD_STATE_FLAVOR MACHINE_THREAD_STATE
# endif
@@ -1962,6 +1964,8 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
/* SPARC/Linux doesn't properly define SIGPWR in <signal.h>.
* It is aliased to SIGLOST in asm/signal.h, though. */
# define SIG_SUSPEND SIGLOST
# elif defined(NACL)
# define SIG_SUSPEND 0
# else
/* Linuxthreads itself uses SIGUSR1 and SIGUSR2. */
# define SIG_SUSPEND SIGPWR
+76 -8
View File
@@ -65,6 +65,11 @@
# endif
/* Determine the machine type: */
# if defined(__native_client__)
# define NACL
# define I386
# define mach_type_known
# endif
# if defined(__arm__) || defined(__thumb__)
# define ARM32
# if !defined(LINUX) && !defined(NETBSD) && !defined(DARWIN)
@@ -231,6 +236,10 @@
# define I386
# define mach_type_known
# endif
# if defined(OPENBSD) && defined(__amd64__)
# define X86_64
# define mach_type_known
# endif
# if defined(LINUX) && defined(__x86_64__)
# define X86_64
# define mach_type_known
@@ -316,7 +325,7 @@
These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
# define DATAEND ((ptr_t) get_end())
# define STACKBOTTOM ((ptr_t) 0xc0000000)
# define STACKBOTTOM ((ptr_t) pthread_get_stackaddr_np(pthread_self()))
# define USE_MMAP
# define USE_MMAP_ANON
# define USE_ASM_PUSH_REGS
@@ -1082,13 +1091,19 @@
# endif
# ifdef I386
# define MACH_TYPE "I386"
# if defined(__LP64__) || defined(_WIN64)
# define CPP_WORDSZ 64
# define ALIGNMENT 8
# else
# if defined( NACL )
# define MACH_TYPE "NACL"
# define CPP_WORDSZ 32
# define ALIGNMENT 4
# else
# define MACH_TYPE "I386"
# if defined(__LP64__) || defined(_WIN64)
# define CPP_WORDSZ 64
# define ALIGNMENT 8
# else
# define CPP_WORDSZ 32
# define ALIGNMENT 4
# endif
/* Appears to hold for all "32 bit" compilers */
/* except Borland. The -a4 option fixes */
/* Borland. */
@@ -1184,7 +1199,32 @@
# define HEAP_START DATAEND
# endif /* USE_MMAP */
# endif /* DGUX */
# ifdef NACL
# define OS_TYPE "NACL"
extern int etext[];
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
extern int _end[];
# define DATAEND (_end)
# ifdef STACK_GRAN
# undef STACK_GRAN
# endif /* STACK_GRAN */
# define STACK_GRAN 0x10000
# define HEURISTIC1
# ifdef USE_MMAP
# undef USE_MMAP
# endif
# ifdef USE_MUNMAP
# undef USE_MUNMAP
# endif
# ifdef USE_MMAP_ANON
# undef USE_MMAP_ANON
# endif
# ifdef USE_MMAP_FIXED
# undef USE_MMAP_FIXED
# endif
# define GETPAGESIZE() 65536
# define MAX_NACL_GC_THREADS 1024
# endif
# ifdef LINUX
# ifndef __GNUC__
/* The Intel compiler doesn't like inline assembly */
@@ -1304,6 +1344,18 @@
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# ifdef GC_OPENBSD_THREADS
# define UTHREAD_SP_OFFSET 192
# else
# include <sys/param.h>
# include <uvm/uvm_extern.h>
# define STACKBOTTOM USRSTACK
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
extern char _end[];
# define DATAEND ((ptr_t)(&_end))
# define DYNAMIC_LOADING
# endif
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
@@ -2086,6 +2138,22 @@
extern char etext[];
# define SEARCH_FOR_DATA_START
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# define ELF_CLASS ELFCLASS64
# ifdef GC_OPENBSD_THREADS
# define UTHREAD_SP_OFFSET 400
# else
# include <sys/param.h>
# include <uvm/uvm_extern.h>
# define STACKBOTTOM USRSTACK
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
extern char _end[];
# define DATAEND ((ptr_t)(&_end))
# define DYNAMIC_LOADING
# endif
# endif
#if defined(LINUX) && defined(USE_MMAP)
@@ -2239,7 +2307,7 @@
# if defined(GC_IRIX_THREADS) && !defined(IRIX5)
--> inconsistent configuration
# endif
# if defined(GC_LINUX_THREADS) && !defined(LINUX)
# if defined(GC_LINUX_THREADS) && !(defined(LINUX) || defined(NACL))
--> inconsistent configuration
# endif
# if defined(GC_SOLARIS_THREADS) && !defined(SUNOS5)
@@ -0,0 +1,12 @@
#ifndef GC_OPENBSD_STOP_WORLD_H
#define GC_OPENBSD_STOP_WORLD_H
#if !defined(GC_OPENBSD_THREADS)
#error openbsd_stop_world.h included without GC_OPENBSD_THREADS defined
#endif
struct thread_stop_info {
ptr_t stack_ptr; /* Valid only when stopped. */
};
#endif
@@ -7,6 +7,15 @@ struct thread_stop_info {
/* last successfully handled a suspend */
/* signal. */
ptr_t stack_ptr; /* Valid only when stopped. */
#ifdef NACL
/* Grab NACL_GC_REG_STORAGE_SIZE pointers off the stack when going into */
/* a syscall. 20 is more than we need, but it's an overestimate in case*/
/* the instrumented function uses any callee saved registers, they may */
/* be pushed to the stack much earlier. Also, on amd64 'push' puts 8 */
/* bytes on the stack even though our pointers are 4 bytes. */
#define NACL_GC_REG_STORAGE_SIZE 20
ptr_t reg_storage[NACL_GC_REG_STORAGE_SIZE];
#endif
};
#endif
+8
View File
@@ -8,6 +8,8 @@
#if defined(GC_DARWIN_THREADS)
# include "private/darwin_stop_world.h"
#elif defined(GC_OPENBSD_THREADS)
# include "private/openbsd_stop_world.h"
#else
# include "private/pthread_stop_world.h"
#endif
@@ -26,6 +28,9 @@ typedef struct GC_Thread_Rep {
/* guaranteed to be dead, but we may */
/* not yet have registered the join.) */
pthread_t id;
#ifdef PLATFORM_ANDROID
pid_t kernel_id;
#endif
/* Extra bookkeeping information the stopping code uses */
struct thread_stop_info stop_info;
@@ -87,6 +92,9 @@ typedef struct GC_Thread_Rep {
# define THREAD_TABLE_SZ 128 /* Must be power of 2 */
extern volatile GC_thread GC_threads[THREAD_TABLE_SZ];
#ifdef NACL
extern __thread GC_thread gc_thread_self;
#endif
extern GC_bool GC_thr_initialized;
+1 -1
View File
@@ -492,7 +492,7 @@ ptr_t cold_gc_frame;
/* the stack. Return sp. */
# ifdef SPARC
asm(" .seg \"text\"");
# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD)
# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD)
asm(" .globl GC_save_regs_in_stack");
asm("GC_save_regs_in_stack:");
asm(" .type GC_save_regs_in_stack,#function");
+2 -2
View File
@@ -473,7 +473,7 @@ size_t GC_get_total_bytes GC_PROTO(())
int GC_get_suspend_signal GC_PROTO(())
{
#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS)
#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) && !defined(GC_OPENBSD_THREADS)
return SIG_SUSPEND;
#else
return -1;
@@ -684,7 +684,7 @@ void GC_init_inner()
# if defined(SEARCH_FOR_DATA_START)
GC_init_linux_data_start();
# endif
# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
# if defined(NETBSD) && defined(__ELF__)
GC_init_netbsd_elf();
# endif
# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \
+161
View File
@@ -0,0 +1,161 @@
#include "private/pthread_support.h"
/* derived from pthread_stop_world.c */
# if defined(GC_OPENBSD_THREADS)
#define THREAD_EQUAL(id1, id2) pthread_equal(id1, id2)
/* We hold allocation lock. Should do exactly the right thing if the */
/* world is stopped. Should not fail if it isn't. */
void GC_push_all_stacks()
{
GC_bool found_me = FALSE;
size_t nthreads = 0;
int i;
GC_thread p;
ptr_t lo, hi;
pthread_t me = pthread_self();
if (!GC_thr_initialized) GC_thr_init();
# if DEBUG_THREADS
GC_printf("Pushing stacks from thread 0x%x\n", (unsigned) me);
# endif
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (p -> flags & FINISHED) continue;
++nthreads;
if (THREAD_EQUAL(p -> id, me)) {
# ifdef SPARC
lo = (ptr_t)GC_save_regs_in_stack();
# else
lo = GC_approx_sp();
# endif
found_me = TRUE;
} else {
lo = p -> stop_info.stack_ptr;
}
if ((p -> flags & MAIN_THREAD) == 0) {
hi = p -> stack_end;
} else {
/* The original stack. */
hi = GC_stackbottom;
}
# if DEBUG_THREADS
GC_printf("Stack for thread 0x%x = [%p,%p)\n",
(unsigned)(p -> id), lo, hi);
# endif
if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
# ifdef STACK_GROWS_UP
/* We got them backwards! */
GC_push_all_stack(hi, lo);
# else
GC_push_all_stack(lo, hi);
# endif
}
}
if (!found_me && !GC_in_thread_creation)
ABORT("Collecting from unknown thread.");
}
/* We hold the allocation lock. Suspend all threads that might */
/* still be running. */
void GC_suspend_all()
{
int i;
GC_thread p;
int result;
pthread_t my_thread = pthread_self();
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (!THREAD_EQUAL(p -> id, my_thread)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) /* Will wait */ continue;
# if DEBUG_THREADS
GC_printf("Suspending thread 0x%x\n",
(unsigned)(p -> id));
# endif
if (pthread_suspend_np(p -> id) != 0)
ABORT("pthread_suspend_np failed");
/*
* This will only work for userland pthreads. It will
* fail badly on rthreads. Perhaps we should consider
* a pthread_sp_np() function that returns the stack
* pointer for a suspended thread and implement in
* both pthreads and rthreads.
*/
p -> stop_info.stack_ptr = *(ptr_t*)((char *)p -> id + UTHREAD_SP_OFFSET);
}
}
}
}
void GC_stop_world()
{
int i;
GC_ASSERT(I_HOLD_LOCK());
# if DEBUG_THREADS
GC_printf("Stopping the world from 0x%x\n", (unsigned)pthread_self());
# endif
/* Make sure all free list construction has stopped before we start. */
/* No new construction can start, since free list construction is */
/* required to acquire and release the GC lock before it starts, */
/* and we have the lock. */
# ifdef PARALLEL_MARK
GC_acquire_mark_lock();
GC_ASSERT(GC_fl_builder_count == 0);
/* We should have previously waited for it to become zero. */
# endif /* PARALLEL_MARK */
GC_suspend_all();
# ifdef PARALLEL_MARK
GC_release_mark_lock();
# endif
#if DEBUG_THREADS
GC_printf("World stopped from 0x%x\n", (unsigned)pthread_self());
#endif
}
/* Caller holds allocation lock, and has held it continuously since */
/* the world stopped. */
void GC_start_world()
{
pthread_t my_thread = pthread_self();
register int i;
register GC_thread p;
register int result;
# if DEBUG_THREADS
GC_printf("World starting\n");
# endif
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (!THREAD_EQUAL(p -> id, my_thread)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) continue;
#if DEBUG_THREADS
GC_printf("Resuming thread 0x%x\n",
(unsigned)(p -> id));
#endif
if (pthread_resume_np(p -> id) != 0)
ABORT("pthread_kill failed");
}
}
}
# if DEBUG_THREADS
GC_printf("World started\n");
# endif
}
void GC_stop_init() {
}
#endif
+172 -4
View File
@@ -133,7 +133,7 @@
# include <errno.h>
#endif
#ifdef UNIX_LIKE
#if defined( UNIX_LIKE ) || defined(NACL)
# include <fcntl.h>
#endif
@@ -392,7 +392,7 @@ static void *tiny_sbrk(ptrdiff_t increment)
#define sbrk tiny_sbrk
# endif /* ECOS */
#if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
#if defined(NETBSD) && defined(__ELF__)
ptr_t GC_data_start;
void GC_init_netbsd_elf()
@@ -405,6 +405,102 @@ static void *tiny_sbrk(ptrdiff_t increment)
}
#endif
#if defined(OPENBSD)
static struct sigaction old_segv_act;
sigjmp_buf GC_jmp_buf_openbsd;
# if defined(GC_OPENBSD_THREADS)
# include <sys/syscall.h>
sigset_t __syscall(quad_t, ...);
# endif
/*
* Dont use GC_find_limit() because siglongjmp out of the
* signal handler by-passes our userland pthreads lib, leaving
* SIGSEGV and SIGPROF masked. Instead use this custom one
* that works-around the issues.
*/
/*ARGSUSED*/
void GC_fault_handler_openbsd(int sig)
{
siglongjmp(GC_jmp_buf_openbsd, 1);
}
/* Return the first nonaddressible location > p or bound */
/* Requires allocation lock. */
ptr_t GC_find_limit_openbsd(ptr_t p, ptr_t bound)
{
static volatile ptr_t result;
/* Safer if static, since otherwise it may not be */
/* preserved across the longjmp. Can safely be */
/* static since it's only called with the */
/* allocation lock held. */
struct sigaction act;
size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
GC_ASSERT(I_HOLD_LOCK());
act.sa_handler = GC_fault_handler_openbsd;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_NODEFER | SA_RESTART;
sigaction(SIGSEGV, &act, &old_segv_act);
if (sigsetjmp(GC_jmp_buf_openbsd, 1) == 0) {
result = (ptr_t)(((word)(p)) & ~(pgsz-1));
for (;;) {
result += pgsz;
if (result >= bound) {
result = bound;
break;
}
GC_noop1((word)(*result));
}
}
# if defined(GC_OPENBSD_THREADS)
/* due to the siglongjump we need to manually unmask SIGPROF */
__syscall(SYS_sigprocmask, SIG_UNBLOCK, sigmask(SIGPROF));
# endif
sigaction(SIGSEGV, &old_segv_act, 0);
return(result);
}
/* Return first addressable location > p or bound */
/* Requires allocation lock. */
ptr_t GC_skip_hole_openbsd(ptr_t p, ptr_t bound)
{
static volatile ptr_t result;
struct sigaction act;
size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
static volatile int firstpass;
GC_ASSERT(I_HOLD_LOCK());
act.sa_handler = GC_fault_handler_openbsd;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_NODEFER | SA_RESTART;
sigaction(SIGSEGV, &act, &old_segv_act);
firstpass = 1;
result = (ptr_t)(((word)(p)) & ~(pgsz-1));
if (sigsetjmp(GC_jmp_buf_openbsd, 1) != 0 || firstpass) {
firstpass = 0;
result += pgsz;
if (result >= bound) {
result = bound;
} else
GC_noop1((word)(*result));
}
sigaction(SIGSEGV, &old_segv_act, 0);
return(result);
}
#endif
# ifdef OS2
# include <stddef.h>
@@ -522,6 +618,12 @@ void GC_enable_signals(void)
/* longjmp implementations. Most systems appear not to have */
/* a signal 32. */
# define SIGSETMASK(old, new) (old) = sigsetmask(new)
# elif defined(NACL)
/* We don't use signals in NaCl. */
# define SIGSET_T int
# define SIG_DEL(set, signal)
# define SIG_FILL(set)
# define SIGSETMASK(old, new)
# else
/* Use POSIX/SYSV interface */
# define SIGSET_T sigset_t
@@ -1021,7 +1123,8 @@ void *GC_set_stackbottom = NULL;
#endif /* FREEBSD_STACKBOTTOM */
#if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS)
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
&& !defined(GC_OPENBSD_THREADS)
ptr_t GC_get_stack_base()
{
@@ -1081,6 +1184,25 @@ ptr_t GC_get_stack_base()
# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */
#if defined(GC_OPENBSD_THREADS)
/* Find the stack using pthread_stackseg_np() */
# include <sys/signal.h>
# include <pthread.h>
# include <pthread_np.h>
#define HAVE_GET_STACK_BASE
ptr_t GC_get_stack_base()
{
stack_t stack;
pthread_stackseg_np(pthread_self(), &stack);
return stack.ss_sp;
}
#endif /* GC_OPENBSD_THREADS */
/*
* Register static data segment(s) as roots.
* If more data segments are added later then they need to be registered
@@ -1445,6 +1567,31 @@ int * etext_addr;
#else /* !OS2 && !Windows && !AMIGA */
#if defined(OPENBSD)
/*
* Depending on arch alignment there can be multiple holes
* between DATASTART & DATAEND. Scan from DATASTART - DATAEND
* and register each region.
*/
void GC_register_data_segments(void)
{
ptr_t region_start, region_end;
region_start = DATASTART;
for(;;) {
region_end = GC_find_limit_openbsd(region_start, DATAEND);
GC_add_roots_inner(region_start, region_end, FALSE);
if (region_end < DATAEND)
region_start = GC_skip_hole_openbsd(region_end, DATAEND);
else
break;
}
}
# else /* !OS2 && !Windows && !AMIGA && !OPENBSD */
void GC_register_data_segments()
{
# if !defined(PCR) && !defined(SRC_M3) && !defined(MACOS)
@@ -1504,6 +1651,7 @@ void GC_register_data_segments()
/* change. */
}
# endif /* ! OPENBSD */
# endif /* ! AMIGA */
# endif /* ! MSWIN32 && ! MSWINCE*/
# endif /* ! OS2 */
@@ -1925,8 +2073,21 @@ void GC_remap(ptr_t start, word bytes)
int result;
if (0 == start_addr) return;
#ifdef NACL
{
/* NaCl doesn't expose mprotect, but mmap should work fine */
void * mmap_result;
mmap_result = mmap(start_addr, len, PROT_READ | PROT_WRITE | OPT_PROT_EXEC,
MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
zero_fd, 0/* offset */);
if (mmap_result != (void *)start_addr) ABORT("mmap as mprotect failed");
/* Fake the return value as if mprotect succeeded. */
result = 0;
}
#else /* NACL */
result = mprotect(start_addr, len,
PROT_READ | PROT_WRITE | OPT_PROT_EXEC);
#endif /* NACL */
if (result != 0) {
GC_err_printf3(
"Mprotect failed at 0x%lx (length %ld) with errno %ld\n",
@@ -1970,7 +2131,14 @@ void GC_unmap_gap(ptr_t start1, word bytes1, ptr_t start2, word bytes2)
len -= free_len;
}
# else
if (len != 0 && munmap(start_addr, len) != 0) ABORT("munmap failed");
if (len != 0) {
/* Immediately remap as above. */
void * result;
result = mmap(start_addr, len, PROT_NONE,
MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
zero_fd, 0/* offset */);
if (result != (void *)start_addr) ABORT("mmap(...PROT_NONE...) failed");
}
GC_unmapped_bytes += len;
# endif
}
+186 -4
View File
@@ -2,12 +2,14 @@
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS)
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS) \
&& !defined(GC_OPENBSD_THREADS)
#include <signal.h>
#include <semaphore.h>
#include <errno.h>
#include <unistd.h>
#include <sys/time.h>
/* work around a dlopen issue (bug #75390), undefs to avoid warnings with redefinitions */
#undef PACKAGE_BUGREPORT
@@ -21,6 +23,19 @@
#include "include/libgc-mono-debugger.h"
#endif
#ifdef NACL
int nacl_park_threads_now = 0;
pthread_t nacl_thread_parker = -1;
int nacl_thread_parked[MAX_NACL_GC_THREADS];
int nacl_thread_used[MAX_NACL_GC_THREADS];
int nacl_thread_parking_inited = 0;
int nacl_num_gc_threads = 0;
pthread_mutex_t nacl_thread_alloc_lock = PTHREAD_MUTEX_INITIALIZER;
__thread int nacl_thread_idx = -1;
__thread GC_thread nacl_gc_thread_self = NULL;
#endif
#if DEBUG_THREADS
#ifndef NSIG
@@ -35,6 +50,7 @@
# endif
#endif
#ifndef NACL
void GC_print_sig_mask()
{
sigset_t blocked;
@@ -48,7 +64,7 @@ void GC_print_sig_mask()
}
GC_printf0("\n");
}
#endif /* NACL */
#endif
/* Remove the signals that we want to allow in thread stopping */
@@ -115,6 +131,7 @@ sem_t GC_suspend_ack_sem;
static void _GC_suspend_handler(int sig)
{
#ifndef NACL
int dummy;
pthread_t my_thread = pthread_self();
GC_thread me;
@@ -184,6 +201,8 @@ static void _GC_suspend_handler(int sig)
#if DEBUG_THREADS
GC_printf1("Continuing 0x%lx\n", my_thread);
#endif
#endif /* NACL */
}
void GC_suspend_handler(int sig)
@@ -277,6 +296,10 @@ static void pthread_push_all_stacks()
# else
GC_push_all_stack(lo, hi);
# endif
# ifdef NACL
/* Push reg_storage as roots, this will cover the reg context */
GC_push_all_stack(p -> stop_info.reg_storage, p -> stop_info.reg_storage + NACL_GC_REG_STORAGE_SIZE);
# endif
# ifdef IA64
# if DEBUG_THREADS
GC_printf3("Reg stack for thread 0x%lx = [%lx,%lx)\n",
@@ -314,11 +337,29 @@ void GC_push_all_stacks()
pthread_t GC_stopping_thread;
int GC_stopping_pid;
#ifdef PLATFORM_ANDROID
static
int android_thread_kill(pid_t tid, int sig)
{
int ret;
int old_errno = errno;
ret = tkill(tid, sig);
if (ret < 0) {
ret = errno;
errno = old_errno;
}
return ret;
}
#endif
/* We hold the allocation lock. Suspend all threads that might */
/* still be running. Return the number of suspend signals that */
/* were sent. */
int GC_suspend_all()
{
#ifndef NACL
int n_live_threads = 0;
int i;
GC_thread p;
@@ -337,8 +378,12 @@ int GC_suspend_all()
#if DEBUG_THREADS
GC_printf1("Sending suspend signal to 0x%lx\n", p -> id);
#endif
#ifndef PLATFORM_ANDROID
result = pthread_kill(p -> id, SIG_SUSPEND);
#else
result = android_thread_kill(p -> kernel_id, SIG_SUSPEND);
#endif
switch(result) {
case ESRCH:
/* Not really there anymore. Possible? */
@@ -353,11 +398,15 @@ int GC_suspend_all()
}
}
return n_live_threads;
#else /* NACL */
return 0;
#endif
}
/* Caller holds allocation lock. */
static void pthread_stop_world()
{
#ifndef NACL
int i;
int n_live_threads;
int code;
@@ -409,8 +458,128 @@ static void pthread_stop_world()
GC_printf1("World stopped from 0x%lx\n", pthread_self());
#endif
GC_stopping_thread = 0; /* debugging only */
#else /* NACL */
GC_thread p;
int i;
#if DEBUG_THREADS
GC_printf1("pthread_stop_world: num_threads %d\n", nacl_num_gc_threads - 1);
#endif
nacl_thread_parker = pthread_self();
nacl_park_threads_now = 1;
while (1) {
#define NACL_PARK_WAIT_NANOSECONDS 100000
int num_threads_parked = 0;
struct timespec ts;
int num_used = 0;
/* Check the 'parked' flag for each thread the GC knows about */
for (i = 0; i < MAX_NACL_GC_THREADS && num_used < nacl_num_gc_threads; i++) {
if (nacl_thread_used[i] == 1) {
num_used++;
if (nacl_thread_parked[i] == 1) {
num_threads_parked++;
}
}
}
/* -1 for the current thread */
if (num_threads_parked >= nacl_num_gc_threads - 1)
break;
ts.tv_sec = 0;
ts.tv_nsec = NACL_PARK_WAIT_NANOSECONDS;
#if DEBUG_THREADS
GC_printf1("sleeping waiting for %d threads to park...\n", nacl_num_gc_threads - num_threads_parked - 1);
#endif
nanosleep(&ts, 0);
}
#endif /* NACL */
}
#ifdef NACL
#if __x86_64__
#define NACL_STORE_REGS() \
do { \
asm("push %rbx");\
asm("push %rbp");\
asm("push %r12");\
asm("push %r13");\
asm("push %r14");\
asm("push %r15");\
asm("mov %%esp, %0" : "=m" (nacl_gc_thread_self->stop_info.stack_ptr));\
memcpy(nacl_gc_thread_self->stop_info.reg_storage, nacl_gc_thread_self->stop_info.stack_ptr, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));\
asm("add $48, %esp");\
asm("add %r15, %rsp");\
} while (0)
#elif __i386__
#define NACL_STORE_REGS() \
do { \
asm("push %ebx");\
asm("push %ebp");\
asm("push %esi");\
asm("push %edi");\
asm("mov %%esp, %0" : "=m" (nacl_gc_thread_self->stop_info.stack_ptr));\
memcpy(nacl_gc_thread_self->stop_info.reg_storage, nacl_gc_thread_self->stop_info.stack_ptr, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));\
asm("add $16, %esp");\
} while (0)
#endif
void nacl_pre_syscall_hook()
{
int local_dummy = 0;
if (nacl_thread_idx != -1) {
NACL_STORE_REGS();
nacl_gc_thread_self->stop_info.stack_ptr = (ptr_t)(&local_dummy);
nacl_thread_parked[nacl_thread_idx] = 1;
}
}
void nacl_post_syscall_hook()
{
/* Calling __nacl_suspend_thread_if_needed() right away should guarantee we don't mutate the GC set. */
__nacl_suspend_thread_if_needed();
if (nacl_thread_idx != -1) {
nacl_thread_parked[nacl_thread_idx] = 0;
}
}
void __nacl_suspend_thread_if_needed() {
if (nacl_park_threads_now) {
pthread_t self = pthread_self();
int local_dummy = 0;
/* Don't try to park the thread parker. */
if (nacl_thread_parker == self)
return;
/* This can happen when a thread is created */
/* outside of the GC system (wthread mostly). */
if (nacl_thread_idx < 0)
return;
/* If it was already 'parked', we're returning from a syscall, */
/* so don't bother storing registers again, the GC has a set. */
if (!nacl_thread_parked[nacl_thread_idx]) {
NACL_STORE_REGS();
nacl_gc_thread_self->stop_info.stack_ptr = (ptr_t)(&local_dummy);
}
nacl_thread_parked[nacl_thread_idx] = 1;
while (nacl_park_threads_now)
; /* spin */
nacl_thread_parked[nacl_thread_idx] = 0;
/* Clear out the reg storage for next suspend. */
memset(nacl_gc_thread_self->stop_info.reg_storage, 0, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));
}
}
#endif /* NACL */
/* Caller holds allocation lock. */
void GC_stop_world()
{
@@ -443,6 +612,7 @@ void GC_stop_world()
/* the world stopped. */
static void pthread_start_world()
{
#ifndef NACL
pthread_t my_thread = pthread_self();
register int i;
register GC_thread p;
@@ -465,8 +635,12 @@ static void pthread_start_world()
#if DEBUG_THREADS
GC_printf1("Sending restart signal to 0x%lx\n", p -> id);
#endif
#ifndef PLATFORM_ANDROID
result = pthread_kill(p -> id, SIG_THR_RESTART);
#else
result = android_thread_kill(p -> kernel_id, SIG_THR_RESTART);
#endif
switch(result) {
case ESRCH:
/* Not really there anymore. Possible? */
@@ -499,6 +673,12 @@ static void pthread_start_world()
#if DEBUG_THREADS
GC_printf0("World started\n");
#endif
#else /* NACL */
# if DEBUG_THREADS
GC_printf0("World starting\n");
# endif
nacl_park_threads_now = 0;
#endif /* NACL */
}
void GC_start_world()
@@ -512,6 +692,7 @@ void GC_start_world()
}
static void pthread_stop_init() {
#ifndef NACL
struct sigaction act;
if (sem_init(&GC_suspend_ack_sem, 0, 0) != 0)
@@ -552,6 +733,7 @@ static void pthread_stop_init() {
GC_printf0("Will retry suspend signal if necessary.\n");
}
# endif
#endif /* NACL */
}
/* We hold the allocation lock. */
+85 -9
View File
@@ -68,7 +68,8 @@
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \
defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC)
defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC) || \
defined(GC_OPENBSD_THREADS)
# define USE_PTHREAD_SPECIFIC
# endif
@@ -129,7 +130,7 @@
# include <sys/sysctl.h>
#endif /* GC_DARWIN_THREADS */
#if defined(GC_NETBSD_THREADS)
#if defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS)
# include <sys/param.h>
# include <sys/sysctl.h>
#endif
@@ -163,6 +164,9 @@
# endif
# undef pthread_join
# undef pthread_detach
# if defined(NACL)
# undef pthread_exit
# endif
# if defined(GC_OSF1_THREADS) && defined(_PTHREAD_USE_MANGLED_NAMES_) \
&& !defined(_PTHREAD_USE_PTDNAM_)
/* Restore the original mangled names on Tru64 UNIX. */
@@ -675,11 +679,57 @@ void GC_mark_thread_local_free_lists(void)
static struct GC_Thread_Rep first_thread;
#ifdef NACL
extern int nacl_thread_parked[MAX_NACL_GC_THREADS];
extern int nacl_thread_used[MAX_NACL_GC_THREADS];
extern int nacl_thread_parking_inited;
extern int nacl_num_gc_threads;
extern pthread_mutex_t nacl_thread_alloc_lock;
extern __thread int nacl_thread_idx;
extern __thread GC_thread nacl_gc_thread_self;
void nacl_initialize_gc_thread()
{
int i;
pthread_mutex_lock(&nacl_thread_alloc_lock);
if (!nacl_thread_parking_inited)
{
for (i = 0; i < MAX_NACL_GC_THREADS; i++) {
nacl_thread_used[i] = 0;
nacl_thread_parked[i] = 0;
}
nacl_thread_parking_inited = 1;
}
GC_ASSERT(nacl_num_gc_threads <= MAX_NACL_GC_THREADS);
for (i = 0; i < MAX_NACL_GC_THREADS; i++) {
if (nacl_thread_used[i] == 0) {
nacl_thread_used[i] = 1;
nacl_thread_idx = i;
nacl_num_gc_threads++;
break;
}
}
pthread_mutex_unlock(&nacl_thread_alloc_lock);
}
void nacl_shutdown_gc_thread()
{
pthread_mutex_lock(&nacl_thread_alloc_lock);
GC_ASSERT(nacl_thread_idx >= 0 && nacl_thread_idx < MAX_NACL_GC_THREADS);
GC_ASSERT(nacl_thread_used[nacl_thread_idx] != 0);
nacl_thread_used[nacl_thread_idx] = 0;
nacl_thread_idx = -1;
nacl_num_gc_threads--;
pthread_mutex_unlock(&nacl_thread_alloc_lock);
}
#endif /* NACL */
/* Add a thread to GC_threads. We assume it wasn't already there. */
/* Caller holds allocation lock. */
GC_thread GC_new_thread(pthread_t id)
{
int hv = ((word)id) % THREAD_TABLE_SZ;
int hv = ((unsigned long)id) % THREAD_TABLE_SZ;
GC_thread result;
static GC_bool first_thread_used = FALSE;
@@ -692,8 +742,15 @@ GC_thread GC_new_thread(pthread_t id)
}
if (result == 0) return(0);
result -> id = id;
#ifdef PLATFORM_ANDROID
result -> kernel_id = gettid();
#endif
result -> next = GC_threads[hv];
GC_threads[hv] = result;
#ifdef NACL
nacl_gc_thread_self = result;
nacl_initialize_gc_thread();
#endif
GC_ASSERT(result -> flags == 0 && result -> thread_blocked == 0);
return(result);
}
@@ -703,10 +760,15 @@ GC_thread GC_new_thread(pthread_t id)
/* Caller holds allocation lock. */
void GC_delete_thread(pthread_t id)
{
int hv = ((word)id) % THREAD_TABLE_SZ;
int hv = ((unsigned long)id) % THREAD_TABLE_SZ;
register GC_thread p = GC_threads[hv];
register GC_thread prev = 0;
#ifdef NACL
nacl_shutdown_gc_thread();
nacl_gc_thread_self = NULL;
#endif
while (!pthread_equal(p -> id, id)) {
prev = p;
p = p -> next;
@@ -734,7 +796,7 @@ void GC_delete_thread(pthread_t id)
/* This is OK, but we need a way to delete a specific one. */
void GC_delete_gc_thread(pthread_t id, GC_thread gc_id)
{
int hv = ((word)id) % THREAD_TABLE_SZ;
int hv = ((unsigned long)id) % THREAD_TABLE_SZ;
register GC_thread p = GC_threads[hv];
register GC_thread prev = 0;
@@ -763,7 +825,7 @@ void GC_delete_gc_thread(pthread_t id, GC_thread gc_id)
/* return the most recent one. */
GC_thread GC_lookup_thread(pthread_t id)
{
int hv = ((word)id) % THREAD_TABLE_SZ;
int hv = ((unsigned long)id) % THREAD_TABLE_SZ;
register GC_thread p = GC_threads[hv];
while (p != 0 && !pthread_equal(p -> id, id)) p = p -> next;
@@ -1037,7 +1099,7 @@ void GC_thr_init()
GC_nprocs = sysconf(_SC_NPROC_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS)
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS)
int ncpus = 1;
size_t len = sizeof(ncpus);
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
@@ -1113,7 +1175,8 @@ void GC_init_parallel()
}
#if !defined(GC_DARWIN_THREADS)
#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
#ifndef NACL
int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
{
sigset_t fudged_set;
@@ -1125,6 +1188,7 @@ int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
}
return(REAL_FUNC(pthread_sigmask)(how, set, oset));
}
#endif
#endif /* !GC_DARWIN_THREADS */
/* Wrappers for functions that are likely to block for an appreciable */
@@ -1255,6 +1319,17 @@ int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval)
return result;
}
#ifdef NACL
/* Native Client doesn't support pthread cleanup functions, */
/* so wrap pthread_exit and manually cleanup the thread. */
void
WRAP_FUNC(pthread_exit)(void *status)
{
GC_thread_exit_proc(0);
REAL_FUNC(pthread_exit)(status);
}
#endif
int
WRAP_FUNC(pthread_detach)(pthread_t thread)
{
@@ -1341,7 +1416,8 @@ void * GC_start_routine_head(void * arg, void *base_addr,
if (start) *start = si -> start_routine;
if (start_arg) *start_arg = si -> arg;
sem_post(&(si -> registered)); /* Last action on si. */
if (!(si->flags & FOREIGN_THREAD))
sem_post(&(si -> registered)); /* Last action on si. */
/* OK to deallocate. */
# if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
LOCK();
+1 -1
View File
@@ -15,7 +15,7 @@ int main()
|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
printf("-lpthread\n");
# endif
# if defined(GC_FREEBSD_THREADS)
# if defined(GC_FREEBSD_THREADS) || defined(GC_OPENBSD_THREADS)
# if (__FREEBSD_version >= 500000)
printf("-lpthread\n");
# else
+1
View File
@@ -27,6 +27,7 @@ man_MANS = \
mdvalidater.1 \
mkbundle.1 \
mono.1 \
mprof-report.1 \
mono-cil-strip.1 \
mono-config.5 \
monodocer.1 \
+18 -1
View File
@@ -1,8 +1,10 @@
.\"
.\" certmgr manual page.
.\" Copyright 2004-2005 Novell
.\" Copyright 2010 Pablo Ruiz
.\" Author:
.\" Sebastien Pouliot <[email protected]>
.\" Pablo Ruiz Garcia <[email protected]>
.\"
.TH Mono "certmgr"
.SH NAME
@@ -24,7 +26,9 @@ server certificates.
List the certificates, CTL or CTL in the specified store.
.TP
.I "-add"
Add a certificate, CRL or CTL to specified store.
Add a certificate, CRL or CTL to specified store. If filename it's a pkcs12
or pfx file, and it contains a private key, it will be imported to local key
pair container.
.TP
.I "-del"
Remove a certificate, CRL or CTL from specified store. You must specify the
@@ -44,6 +48,11 @@ This action assume an certificate (-c) object type and will import the
certificates in appropriate stores (i.e. server certificate in the
OtherPeople store, the root certificate in the Trust store, any other
intermediate certificates in the IntermediateCA store).
.TP
.I "-importKey"
Allows importing a private key from a pkcs12 file into a local key pair
store. (Usefull when you already have the key's corresponding certificate
installed at the specific store.)
.SH OBJECT TYPES
.TP
@@ -66,6 +75,9 @@ Use the machine's certificate stores (instead of the default user's stores).
.I "-v"
More details displayed on the console.
.TP
.I "-p password"
Use the specify password when accessing a pkcs12 file.
.TP
.I "-help", "-h", "-?", "/?"
Display help about this tool.
@@ -88,6 +100,9 @@ The filenames either starts with
(subject key identifier).
.TP
The rest of the filename is the base64-encoded value (tbp or ski).
.TP
Private key data is stored under
.I ~/.config/.mono/keypairs/
.SH EXAMPLES
.TP
@@ -140,6 +155,8 @@ element of your machine.config file.
.SH AUTHOR
Written by Sebastien Pouliot
Minor additions by Pablo Ruiz García
.SH COPYRIGHT
Copyright (C) 2004-2005 Novell.
.SH MAILING LISTS
+19 -1
View File
@@ -6,7 +6,7 @@
.SH NAME
csharp, gsharp \- Interactive C# Shell
.SH SYNOPSIS
.B csharp [--attach PID] [file1 [file2]]
.B csharp [--attach PID] [-e EXPRESSION] [file1 [file2]]
[options]
.P
.B gsharp [file1 [file2]]
@@ -29,7 +29,22 @@ target process.
.PP
Files specified in the command line will be loaded and executed as
scripts.
.PP
Starting with Mono 2.10, the
.I csharp
command can be used as an interpreter executed by executables flagged
with the Unix execute attribute. To do this, make the first line of
your C# source code look like this:
.nf
"#!/usr/bin/csharp"
Console.WriteLine ("Hello, World");
.fi
.SH OPTIONS
The commands accept all of the commands that are available to the
.I mcs
command, so you can reference assemblies, specify paths, language
level and so on from the command line. In addition, the following
command line options are supported:
.TP
.I "\-\-attach"
This is an advanced option and should only be used if you have a deep
@@ -42,6 +57,9 @@ special measures to avoid crashing the target application while using
it. For example, you might have to take the proper locks before
issuing any commands that might affect the target process state, or
sending commands through a method dispatcher.
.TP
.I "\-e" EXPRESSION
This will evaluate the specified C# EXPRESSION and exit
.SH OPERATION
Once you launch the csharp command, you will be greeted with the
interactive prompt:
+5
View File
@@ -351,6 +351,11 @@ shell will perform globbing, so you might want to use it like this:
$ mcs -recurse:'*.cs'
.fi
.TP
.I \-sdk:VERSION
Used to specify the version of Base Class Library assemblies. The possible
values are: 2 (default), 4. The version number means which .NET version
should the produced assembly be compatible with.
.TP
.I \-\-shell
Starts up the compiler in interactive mode, providing a C# shell for
statements and expressions. A shortcut is to use the
+2
View File
@@ -603,6 +603,8 @@ Describes the return value of a method:
.fi
The \fIreturns\fR element can contain the following elements:
\fIc\fR,
\fIformat\fR,
\fIlist\fR,
\fIpara\fR,
\fIparamref\fR,
+125 -407
View File
@@ -175,6 +175,36 @@ extern void *mono_aot_module_hello_info;
mono_aot_register_module (mono_aot_module_hello_info);
.fi
.ne
.TP
.I mtriple=<TRIPLE>
Use the GNU style target triple <TRIPLE> to determine some code generation options, i.e.
--mtriple=armv7-linux-gnueabi will generate code that targets ARMv7. This is currently
only supported by the ARM backend. In LLVM mode, this triple is passed on to the LLVM
llc compiler.
.TP
.I tool-prefix=<PREFIX>
Prepends <PREFIX> to the name of tools ran by the AOT compiler, i.e. 'as'/'ld'. For
example, --tool=prefix=arm-linux-gnueabi- will make the AOT compiler run
'arm-linux-gnueabi-as' instead of 'as'.
.TP
.I llvm-path=<PREFIX>
Same for the llvm tools 'opt' and 'llc'.
.TP
.I stats
Print various stats collected during AOT compilation.
.TP
.I readonly-value=namespace.typename.fieldname=type/value
Override the value of a static readonly field. Usually, during JIT
compilation, the static constructor is ran eagerly, so the value of
a static readonly field is known at compilation time and the compiler
can do a number of optimizations based on it. During AOT, instead, the static
constructor can't be ran, so this option can be used to set the value of such
a field and enable the same set of optimizations.
Type can be any of i1, i2, i4 for integers of the respective sizes (in bytes).
Note that signed/unsigned numbers do not matter here, just the storage size.
This option can be specified multiple times and it doesn't prevent the static
constructor for the type defining the field to execute with the usual rules
at runtime (hence possibly computing a different value for the field).
.PP
For more information about AOT, see: http://www.mono-project.com/AOT
@@ -220,6 +250,13 @@ Specifies the diagnostics log level for
.Sp
Used to specify the file where the log will be stored, it defaults to
standard output.
.TP
.I server=[y/n]
Defaults to no, with the default option Mono will actively connect to the
host/port configured with the \fBaddress\fR option. If you set it to 'y', it
instructs the Mono runtime to start debugging in server mode, where Mono
actively waits for the debugger front end to connect to the Mono process.
Mono will print out to stdout the IP address and port where it is listening.
.ne
.RE
.TP
@@ -415,6 +452,10 @@ Turns on profiling. For more information about profiling applications
and code coverage see the sections "PROFILING" and "CODE COVERAGE"
below.
.TP
This option can be used multiple times, each time will load an
additional profiler. This allows developers to use modules that
extend the JIT through the Mono profiling interface.
.TP
\fB--trace[=expression]\fR
Shows method names as they are invoked. By default all methods are
traced.
@@ -627,412 +668,22 @@ Note that the statistical profiler has a very low overhead and should
be the preferred profiler to use (for better output use the full path
to the mono binary when running and make sure you have installed the
addr2line utility that comes from the binutils package).
.SH LOGGING PROFILER
.SH LOG PROFILER
This is the most advanced profiler.
.PP
The
.I logging profiler
is a general purpose profiler that can track many different kinds of
events and logs those into a file as the program executes. This is
different than previous profilers in Mono that kept the information in
memory and rendered a summary of the results when the program shut
down.
The Mono \f[I]log\f[] profiler can be used to collect a lot of
information about a program running in the Mono runtime.
This data can be used (both while the process is running and later)
to do analyses of the program behaviour, determine resource usage,
performance issues or even look for particular execution patterns.
.PP
Using the logging profiler means that useful information can be
gathered for long-running applications, applications that terminate
abormally (crashes, segfaults, complicated tear down processes) or
when no data about the shutdown is required.
This is accomplished by logging the events provided by the Mono
runtime through the profiling interface and periodically writing
them to a file which can be later inspected with the mprof-report(1)
tool.
.PP
The data collected by the running threads is kept independent of each
other to minimize the runtime overhead and the information dumped into
the log at regular intervals.
.PP
A sample use is very simple:
.nf
$ mono --profile=logging program.exe
$ mprof-decoder program.mprof
.fi
.PP
In the above example the logging profiler is used in its default mode
that merely records GC statistics for the execution of program.exe.
The profiling data collected is stored in the file program.mprof. The
mprof-decoder tool is then used to analyze the data.
.PP
You can instruct the logging profiler to record different one or more
sets of events. These are the modes supported:
.IP
.I Statistical Profiling (stat)
the program instruction pointer is periodically sampled to determine
where the program is spending most of its time. Statistical
profiling has a very low impact on a running application and it is
very useful to get a general picture of where time is being spent on a
program.
.IP
If call chains are requested, for each sample the profiler gets a
partial stack trace (limited by the specified depth) so that
caller-callee information is available.
.IP
.I Instrumenting:
each method enter and exit is logged with a timestamp; further processing of
the data can show the methods that took the longer to execute, with complete
accounting for callers and callees. However, this way of profiling is rather
intrusive and slows down the application significantly.
.IP
.I Allocation:
each allocation is logged.
.IP
.I Allocation summary:
shows, for each collection, a summary of the heap contents broken down by
class (for each class the number of allocated and released objects is
given, together with their aggregated size in bytes).
.IP
.I Heap snapshot mode:
dumps the whole heap contents at every collection (or at user specified
collections). It is also possible to request a collection and snapshot dump
with a signal.
.PP
Moreover, other events can be logged and analyzed, like jit time for each
method, load and unload for assemblies, modules and and individual classes,
and appdomain and thread creation and destruction.
.PP
This profiler is activated passing the \fB--profile=logging\fR option to
the mono runtime, and is controlled attaching further options, like
\fB--profile=logging:statistical\fR for doing statistical profiling (multiple
options are separated by commas).
.PP
As a quick primer, here are a few examples of the most common usage modes:
.PP
To perform statistical profiling:
.nf
mono --profile=logging:stat program.exe
.fi
.PP
To perform statistical profiling, inspecting call chains up to depth 8:
.nf
mono --profile=logging:stat=8 program.exe
.fi
.PP
To profile allocations (by default the call stack will be analized for
each allocation, producing detailed caller method attribution infornation):
.nf
mono --profile=logging:allocations program.exe
.fi
.PP
To profile garbage collection activity at a high level (collection time and objects freed
at each collection for each class are reported, but heap snapshots are not saved to disk):
.nf
mono --profile=logging:allocations-summary program.exe
.fi
.PP
To perform heap profiling taking heap snapshots:
.nf
mono --profile=logging:heap=all program.exe
.fi
.PP
To write the resulting data to a different file:
.nf
mono --profile=logging:output=mydata.mprof program.exe
.fi
.PP
Then you would need to invoke the decoder \fImprof-decoder(1)\fR
on the output file to see the profiling results, or to examine heap
snapshots and allocations in detail \fImprof-heap-viewer(1)\fR.
.PP
The operating modes described above are the default ones, and are sufficient
to use the profiler.
.PP
To further customize the profiler behavior there are more options, described
below.
.PP
These options can be individually enabled and disabled prefixing them
with an (optional) '+' character or a '-' character. For instance,
the "allocations" option by default records also the full call stack
at each allocation. If only the caller is wanted, one should use
"allocations,-save-allocation-stack", or to disable call tracking
completely (making the profiler less intrusive)
"allocations,-save-allocation-caller,-save-allocation-stack". In
practice the "allocation" option by default behaves like
"allocations,save-allocation-caller,save-allocation-stack", but the
user can tune this to his needs.
.PP
These are all the available options, organized by category:
.PP
\fBExecution profiling modes\fR
.RS
.ne 8
.TP
\fIstatistical\fR, \fIstat\fR or \fIs\fR
Performs statistical profiling. This is a lightweight profiling
mechanism and it has a much lower overhead than the \fIenter-leave\fR
profiling as it works by sampling where the program is spending its
time by using a timer.
If specified with \fIs=<number>\fR, also inspect call chains up to level
<number>.
.TP
\fIenter-leave\fR, \fIcalls\fR or \fIc\fR
Measure the time spent inside each method call, this is done by
logging the time when a method enters and when the method leaves.
This can be a time consuming operation.
.TP
\fIjit\fR, \fIj\fR
Collect information about time spent by the JIT engine compiling
methods.
.ne
.RE
.PP
\fBAllocation profiling modes\fR
.RS
.ne 8
.TP
\fIallocations\fR, \fIalloc\fR or \fIa\fR
Collect information about each allocation (object class and size).
By default this also implies "+save-allocation-caller" and
"+save-allocation-stack".
.TP
\fIsave-allocation-caller\fR, \fIsac\fR
Save the direct caller of each allocation. The profiler filters out wrapper
methods, and also recognizes if the allocation has been performed by the
runtime while jitting a method.
.TP
\fIsave-allocation-stack\fR, \fIsas\fR
Save the full managed execution stack at each allocation.
While the "sac" option saves the direct caller, this one records the whole
stack trace.
Note that in the call stack the wrapper methods are not filtered out.
Anyway the "sac" and "sas" options can be combined, and the decoder will
attribute the allocation to the correct method even if the wrapper is at the
top of the stack trace.
.TP
\fIallocations-summary\fR or \fIas\fR
At each collection dump a summary
of the heap contents (for each class, the number and collective size of all
live and freed heap objects). This very lightweight compared to full heap
snapshots.
.TP
\fIunreachable\fR, \fIfree\fR or \fIf\fR
Performs a lightweight profile of the garbage collector. On each
collection performed by the GC, the list of unreachable objects is
recorded, and for each object the class and size is provided. This
information can be used to compute the heap size broken down by class
(combined with "a" can give the same information of "as", but the log
file contains info about each individual object, while in "as" the
processing is done directly at runtime and the log file contains only
the summarized data broken down by class).
.TP
\fIgc\fR or \fIg\fR
Measure the time spent in each collection, and also trace heap resizes.
.TP
\fIheap-shot[=ARG]\fR, \fIheap[=ARG]\fR or \fIh[=ARH]\fR
Performs full heap profiling. In this case on each
collection a full heap snapshot is recorded to disk.
Inside the snapshots, each object reference is still represented so
that it's possible to investigate who is responsible for keeping objects
alive.
.PP
If the value of ARG is
.B all,
a heap snapshot is taken at each collection.
.PP
If the value is an integer
.B n,
a snapshot will be taken at the first
.B n
collections (like setting
.B gcd=n
);
.PP
If no additional argument is given to the heap option, the only way to take
heap snapshots is to requeste them using the runtime socket based command
interface described below (see "Profiler activity control").
.PP
Heap profiling also enables full allocation profiling (with call
stacks), and each allocation can be related to its corresponding
object in the snapshots, enabling investigations like "find all
objects of a given class allocated by a given method and still live at
a given collection, and then find all objects referencing them".
.PP
This kind of heap snapshot analysis is performed using the mprof-heap-viewer(1)
application.
.PP
The number of heap snapshots taken (and the moment in which they are taken)
can be further customized with the following options:
.TP
\fIgc-dumps=N\fR, \fIgc-d=N\fR, \fIgcd=N\fR
states the number of snapshots that must be dumped (since the application
starts). Zero means no dumps at all, -1 means dump at all collections.
.TP
These options exist because it can happen that the user wants to investigate
what happens during collections but without forcing a collection using the
command interface, because forcing a collection alters the program behavior.
Of course it is possible to simply take a snapshot at every collection, but
in some workloads this is could not be feasible (too much data).
So we have this "garbage collection dumps" counter to control how many
snapshots to take.
.ne
.RE
.PP
\fBProfiler activity control\fR
.RS
.ne 8
.TP
\fIoutput=FILE\fR, \fIout=FILE\fR or \fIo=FILE\fR
Use this option to provide the output file name for the profile log.
If this option is not specified, it will default to "<program-name>.mprof".
.TP
\fIoutput-suffix=SUFFIX\fR, \fIsuffix=SUFFIX\fR or \fIos=SUFFIX\fR: makes
the output file name equals to "<program-name>-SUFFIX.mprof".
.TP
\fIstart-enabled\fR or \fIse\fR: start with the profiler active
(which is the default).
.TP
\fIstart-disabled\fR or \fIsd\fR: start with the profiler inactive.
.TP
\fIforce-accurate-timer\fR (or \fIfac\fR): the profiler by default uses
rtdsc to acquire timestamps for frequent events, but this can be imprecise;
using this option you force the use of "gettimeofday" at every event, which
is more accurate but much slower.
.TP
\fIcommand-port=port\fR or \fIcp=port\fR (where port is an integer between
1024 nd 65535):
Choose a TCP port where the profiler will listen for user commands.
The protocol is ASCII based and line oriented (one line per command), and the
profiler answers with one line containing either "OK" or "ERROR" to each
received command.
.PP
The user can telnet to this port and give commands manually, or a GUI can
use this facility to control the profiler at runtime.
.PP
The available commands are:
.TP
\fIenable\fR: Enables the profiler.
.TP
\fIdisable\fR: Disables the profiler.
.TP
\fIheap-snapshot\fR: Takes a heap snapshot now (forces a full garbage collection).
.TP
\fIheap-snapshot-counter=arg\fR: Set the counter of the next heap snapshots
that must be taken, where arg can be "all" (take a snapshot at every
collection), "none" (do not take snapshots), or an integer "n" (take a heap
snapshot for the next "n" collections).
.ne
.RE
.PP
\fBInternal buffer sizes\fR
.RS
.ne 8
.TP
\fIper-thread-buffer-size=N\fR, \fItbs=N\fR
Use to specify the number of events that a thread buffer
can hold. When the thread buffer is full, a log block is
written to disk.
.Sp
This defaults to tbs=10000.
.TP
\fIstatistical-thread-buffer-size=N\fR, \fIsbs=N\fR
The number of statistical samples that
are held in memory before they are dumped to disk (the system does
double-buffering and the statistical samples are written by a helper
thread, so the statistical profiler never stops and is able to profile
the profiler itself).
.Sp
This defaults to sbs=10000.
.TP
\fIwrite-buffer-size\fR, \fIwbs\fR
Specifies the size in bytes of the internal write buffers.
.Sp
This defaults to wbs=1024.
.ne
.RE
.PP
In its current state, this profiler can also perform heap analysis
like the HeapShot profiler, but there is no UI to process this
information.
.PP
Another known issue is that if the timer is not strictly monotonic (like
rtdsc), differences between times can underflow (they are handled as
unsigned integers) and weird numbers can show up in the logs.
.PP
Finally, it can happen that when exceptions are thrown the profiler temporarily
loses track of the execution stack and misattributes the caller for a few
allocations (and method execution time).
.PP
The output file contains compressed events, to process the data you should
use tools like the "Mono.Profiler" tool provided on the Mono SVN
repository.
.PP
More explanations are provided here: "http://www.mono-project.com/LoggingProfiler".
.SH EXTERNAL PROFILERS
There are a number of external profilers that have been developed for
Mono, we will update this section to contain the profilers.
.PP
The heap Shot profiler can track all live objects, and references to
these objects, and includes a GUI tool, this is our recommended
profiler.
To install you must download the profiler
from Mono's SVN:
.nf
svn co svn://anonsvn.mono-project.com/source/trunk/heap-shot
cd heap-shot
./autogen
make
make install
.fi
.PP
See the included documentation for details on using it.
.PP
The Live Type profiler shows at every GC iteration all of the live
objects of a given type. To install you must download the profiler
from Mono's SVN:
.nf
svn co svn://anonsvn.mono-project.com/source/trunk/heap-prof
cd heap-prof
./autogen
make
make install
.fi
.PP
To use the profiler, execute:
.nf
mono --profile=desc-heap program.exe
.fi
.PP
The output of this profiler looks like this:
.nf
Checkpoint at 102 for heap-resize
System.MonoType : 708
System.Threading.Thread : 352
System.String : 3230
System.String[] : 104
Gnome.ModuleInfo : 112
System.Object[] : 160
System.Collections.Hashtable : 96
System.Int32[] : 212
System.Collections.Hashtable+Slot[] : 296
System.Globalization.CultureInfo : 108
System.Globalization.NumberFormatInfo : 144
.fi
.PP
The first line describes the iteration number for the GC, in this case
checkpoint 102.
.PP
Then on each line the type is displayed as well as the number of bytes
that are being consumed by live instances of this object.
.PP
The AOT profiler is used to feed back information to the AOT compiler
about how to order code based on the access patterns for pages. To
use it, use:
.nf
mono --profile=aot program.exe
.fi
The output of this profile can be fed back into Mono's AOT compiler to
order the functions on the disk to produce precompiled images that
have methods in sequential pages.
More information about how to use the log profiler is available on the
mprof-report(1) page.
.SH CUSTOM PROFILERS
Mono provides a mechanism for loading other profiling modules which in
the form of shared libraries. These profiling modules can hook up to
@@ -1377,11 +1028,44 @@ for the fixed-heap Mark&Sweep collector (i.e. `marksweep-fixed' and
`k', `m' and `g' to specify kilo-, mega- and gigabytes, respectively.
The default is 512 megabytes.
.TP
\fBsoft-heap-limit=\fIsize\fR
Once the heap size gets larger than this size, ignore what the default
major collection trigger metric says and only allow four nursery size's
of major heap growth between major collections.
.TP
\fBwbarrier=\fIwbarrier\fR
Specifies which write barrier to use. Options are `cardtable' and
`remset'. The card table barrier is faster but less precise, and only
supported for the Mark&Sweep major collector on 32 bit platforms. The
default is `cardtable' if it is supported, otherwise `remset'.
default is `cardtable' if it is supported, otherwise `remset'. The cardtable
write barrier is faster and has a more stable and usually smaller
memory footprint. If the program causes too much pinning during
thread scan, it might be faster to enable remset.
.TP
\fBevacuation-threshold=\fIthreshold\fR
Sets the evacuation threshold in percent. This option is only available
on the Mark&Sweep major collectors. The value must be an
integer in the range 0 to 100. The default is 66. If the sweep phase of
the collection finds that the occupancy of a specific heap block type is
less than this percentage, it will do a copying collection for that block
type in the next major collection, thereby restoring occupancy to close
to 100 percent. A value of 0 turns evacuation off.
.TP
\fB(no-)concurrent-sweep\fR
Enables or disables concurrent sweep for the Mark&Sweep collector. If
enabled, the sweep phase of the garbage collection is done in a thread
concurrently with the application. Concurrent sweep is disabled by
default.
.TP
\fBstack-mark=\fImark-mode\fR
Specifies how application threads should be scanned. Options are
`precise` and `conservative`. Precise marking allow the collector
to know what values on stack are references and what are not.
Conservative marking threats all values as potentially references
and leave them untouched. Precise marking reduces floating garbage
and can speed up nursery collection and allocation rate, it has
the downside of requiring a significant extra memory per compiled
method. The right option, unfortunately, requires experimentation.
.ne
.RE
.TP
@@ -1389,7 +1073,7 @@ default is `cardtable' if it is supported, otherwise `remset'.
When using Mono with the SGen garbage collector this environment
variable can be used to turn on various debugging features of the
collector. The value of this variable is a comma separated list of
words.
words. Do not use these options in production.
.RS
.ne 8
.TP
@@ -1414,6 +1098,13 @@ This clears the nursery at GC time instead of doing it when the thread
local allocation buffer (TLAB) is created. The default is to clear
the nursery at TLAB creation time.
.TP
\fBdisable-minor\fR
Don't do minor collections. If the nursery is full, a major collection
is triggered instead, unless it, too, is disabled.
.TP
\fBdisable-major\fR
Don't do major collections.
.TP
\fBconservative-stack-mark\fR
Forces the GC to scan the stack conservatively, even if precise
scanning is available.
@@ -1654,11 +1345,36 @@ trading off the small leaks for the increased performance
unload the application domains on production systems, it is worth
using this feature).
.TP
\fBdyn-runtime-invoke\fR
Instructs the runtime to try to use a generic runtime-invoke wrapper
instead of creating one invoke wrapper.
.TP
\fBgdb\fR
Equivalent to setting the \fBMONO_XDEBUG\fR variable, this emits
symbols into a shared library as the code is JITed that can be loaded
into GDB to inspect symbols.
.TP
\fBgen-seq-points\fR
Automatically generates sequence points where the
IL stack is empty. These are places where the debugger can set a
breakpoint.
.TP
\fBexplicit-null-checks\fR
Makes the JIT generate an explicit NULL check on variable dereferences
instead of depending on the operating system to raise a SIGSEGV or
another form of trap event when an invalid memory location is
accessed.
.TP
\fBhandle-sigint\fR
Captures the interrupt signal (Control-C) and displays a stack trace
when pressed. Useful to find out where the program is executing at a
given point. This only displays the stack trace of a single thread.
.TP
\fBinit-stacks\FR
Instructs the runtime to initialize the stack with
some known values (0x2a on x86-64) at the start of a method to assist
in debuggin the JIT engine.
.TP
\fBkeep-delegates\fR
This option will leak delegate trampolines that are no longer
referenced as to present the user with more information about a
@@ -1682,7 +1398,6 @@ This option will disable the GDB backtrace emitted by the runtime
after a SIGSEGV or SIGABRT in unmanaged code.
.TP
\fBsuspend-on-sigsegv\fR
This option will suspend the program when a native SIGSEGV is received.
This is useful for debugging crashes which do not happen under gdb,
since a live process contains more information than a core file.
@@ -1730,6 +1445,9 @@ be used when writing messages like this: Console.Error:MyProgramName.
See the System.Diagnostics.DefaultTraceListener documentation for more
information.
.TP
\fBMONO_WCF_TRACE\fR
This eases WCF diagnostics functionality by simply outputs all log messages from WCF engine to "stdout", "stderr" or any file passed to this environment variable. The log format is the same as usual diagnostic output.
.TP
\fBMONO_XEXCEPTIONS\fR
This throws an exception when a X11 error is encountered; by default a
message is displayed but execution continues
@@ -1777,7 +1495,7 @@ Mono JIT by default turns this on.
\fBMONO_XDEBUG\fR
When the the MONO_XDEBUG env var is set, debugging info for JITted
code is emitted into a shared library, loadable into gdb. This enables,
for example, to see managed frame names on gdb backtraces.
for example, to see managed frame names on gdb backtraces.
.TP
\fBMONO_VERBOSE_METHOD\fR
Enables the maximum JIT verbosity for the specified method. This is
+524
View File
@@ -0,0 +1,524 @@
.TH mprof-report 1 ""
.SH The Mono log profiler
.PP
The Mono \f[I]log\f[] profiler can be used to collect a lot of
information about a program running in the Mono runtime.
This data can be used (both while the process is running and later)
to do analyses of the program behaviour, determine resource usage,
performance issues or even look for particular execution patterns.
.PP
This is accomplished by logging the events provided by the Mono
runtime through the profiling interface and periodically writing
them to a file which can be later inspected with the command line
\f[I]mprof-report\f[] program or with a GUI (not developed yet).
.PP
The events collected include (among others):
.IP \[bu] 2
method enter and leave
.IP \[bu] 2
object allocation
.IP \[bu] 2
garbage collection
.IP \[bu] 2
JIT compilation
.IP \[bu] 2
metadata loading
.IP \[bu] 2
lock contention
.IP \[bu] 2
exceptions
.PP
In addition, the profiler can periodically collect info about all
the objects present in the heap at the end of a garbage collection
(this is called heap shot and currently implemented only for the
sgen garbage collector).
Another available profiler mode is the \f[I]sampling\f[] or
\f[I]statistical\f[] mode: periodically the program is sampled and
the information about what the program was busy with is saved.
This allows to get information about the program behaviour without
degrading its performance too much (usually less than 10%).
.SS Basic profiler usage
.PP
The simpler way to use the profiler is the following:
.PP
\f[B]mono\ --profile=log\ program.exe\f[]
.PP
At the end of the execution the file \f[I]output.mlpd\f[] will be
found in the current directory.
A summary report of the data can be printed by running:
.PP
\f[B]mprof-report\ output.mlpd\f[]
.PP
With this invocation a huge amount of data is collected about the
program execution and collecting and saving this data can
significantly slow down program execution.
If saving the profiling data is not needed, a report can be
generated directly with:
.PP
\f[B]mono\ --profile=log:report\ program.exe\f[]
.PP
If the information about allocations is not of interest, it can be
excluded:
.PP
\f[B]mono\ --profile=log:noalloc\ program.exe\f[]
.PP
On the other hand, if method call timing is not important, while
allocations are, the needed info can be gathered with:
.PP
\f[B]mono\ --profile=log:nocalls\ program.exe\f[]
.PP
You will still be able to inspect information about the sequence of
calls that lead to each allocation because at each object
allocation a stack trace is collected if full enter/leave
information is not available.
.PP
To periodically collect heap shots (and exclude method and
allocation events) use the following options (making sure you run
with the sgen garbage collector):
.PP
\f[B]mono\ --gc=sgen\ --profile=log:heapshot\ program.exe\f[]
.PP
To perform a sampling profiler run, use the \f[I]sample\f[] option:
.PP
\f[B]mono\ --profile=log:sample\ program.exe\f[]
.SS Profiler option documentation
.PP
By default the \f[I]log\f[] profiler will gather all the events
provided by the Mono runtime and write them to a file named
\f[I]output.mlpd\f[].
When no option is specified, it is equivalent to using:
.PP
\f[B]--profile=log:calls,alloc,output=output.mlpd,maxframes=8,calldepth=100\f[]
.PP
The following options can be used to modify this default behaviour.
Each option is separated from the next by a \f[B],\f[] character,
with no spaces and all the options are included after the
\f[I]log:\f[] profile module specifier.
.IP \[bu] 2
\f[I]help\f[]: display concise help info about each available
option
.IP \[bu] 2
\f[I][no]alloc\f[]: \f[I]noalloc\f[] disables collecting object
allocation info, \f[I]alloc\f[] enables it if it was disabled by
another option like \f[I]heapshot\f[].
.IP \[bu] 2
\f[I][no]calls\f[]: \f[I]nocalls\f[] disables collecting method
enter and leave events.
When this option is used at each object allocation and at some
other events (like lock contentions and exception throws) a stack
trace is collected by default.
See the \f[I]maxframes\f[] option to control this behaviour.
\f[I]calls\f[] enables method enter/leave events if they were
disabled by another option like \f[I]heapshot\f[].
.IP \[bu] 2
\f[I]heapshot[=MODE]\f[]: collect heap shot data at each major
collection.
The frequency of the heap shots can be changed with the
\f[I]MODE\f[] parameter.
When this option is used allocation events and method enter/leave
events are not recorded by default: if they are needed, they need
to be enabled explicitly.
The optional parameter \f[I]MODE\f[] can modify the default heap
shot frequency.
heapshot can be used multiple times with different modes: in that
case a heap shot is taken if either of the conditions are met.
MODE can be one of:
.RS 2
.IP \[bu] 2
\f[I]NUM\f[]ms: perform a heap shot if at least \f[I]NUM\f[]
milliseconds passed since the last one.
.IP \[bu] 2
\f[I]NUM\f[]gc: perform a heap shot every \f[I]NUM\f[] major
garbage collections
.IP \[bu] 2
\f[I]ondemand\f[]: perform a heap shot when such a command is sent
to the control port
.RE
.IP \[bu] 2
\f[I]sample[=TYPE[/FREQ]]\f[]: collect statistical samples of the
program behaviour.
The default is to collect a 1000 times per second the instruction
pointer.
This is equivalent to the value \[lq]cycles/1000\[rq] for
\f[I]TYPE\f[].
On some systems, like with recent Linux kernels, it is possible to
cause the sampling to happen for other events provided by the
performance counters of the cpu.
In this case, \f[I]TYPE\f[] can be one of:
.RS 2
.IP \[bu] 2
\f[I]cycles\f[]: processor cycles
.IP \[bu] 2
\f[I]instr\f[]: executed instructions
.IP \[bu] 2
\f[I]cacherefs\f[]: cache references
.IP \[bu] 2
\f[I]cachemiss\f[]: cache misses
.IP \[bu] 2
\f[I]branches\f[]: executed branches
.IP \[bu] 2
\f[I]branchmiss\f[]: mispredicted branches
.RE
.IP \[bu] 2
\f[I]time=TIMER\f[]: use the TIMER timestamp mode.
TIMER can have the following values:
.RS 2
.IP \[bu] 2
\f[I]fast\f[]: a usually faster but possibly more inaccurate timer
.RE
.IP \[bu] 2
\f[I]maxframes=NUM\f[]: when a stack trace needs to be performed,
collect \f[I]NUM\f[] frames at the most.
The default is 8.
.IP \[bu] 2
\f[I]calldepth=NUM\f[]: ignore method enter/leave events when the
call chain depth is bigger than NUM.
.IP \[bu] 2
\f[I]zip\f[]: automatically compress the output data in gzip
format.
.IP \[bu] 2
\f[I]output=OUTSPEC\f[]: instead of writing the profiling data to
the output.mlpd file, substitute \f[I]%p\f[] in \f[I]OUTSPEC\f[]
with the current process id and \f[I]%t\f[] with the current date
and time, then do according to \f[I]OUTSPEC\f[]:
.RS 2
.IP \[bu] 2
if \f[I]OUTSPEC\f[] begins with a \f[I]|\f[] character, execute the
rest as a program and feed the data to its standard input
.IP \[bu] 2
if \f[I]OUTSPEC\f[] begins with a \f[I]-\f[] character, use the
rest of OUTSPEC as the filename, but force overwrite any existing
file by that name
.IP \[bu] 2
otherwise write the data the the named file: note that is a file by
that name already exists, a warning is issued and profiling is
disabled.
.RE
.IP \[bu] 2
\f[I]report\f[]: the profiling data is sent to mprof-report, which
will print a summary report.
This is equivalent to the option: \f[B]output=mprof-report\ -\f[].
If the \f[I]output\f[] option is specified as well, the report will
be written to the output file instead of the console.
.IP \[bu] 2
\f[I]port=PORT\f[]: specify the tcp/ip port to use for the
listening command server.
Currently not available for windows.
This server is started for example when heapshot=ondemand is used:
it will read commands line by line.
The following commands are available:
.RS 2
.IP \[bu] 2
\f[I]heapshot\f[]: perform a heapshot as soon as possible
.RE
.SS Analyzing the profile data
.PP
Currently there is a command line program (\f[I]mprof-report\f[])
to analyze the data produced by the profiler.
This is ran automatically when the \f[I]report\f[] profiler option
is used.
Simply run:
.PP
\f[B]mprof-report\ output.mlpd\f[]
.PP
to see a summary report of the data included in the file.
.SS Trace information for events
.PP
Often it is important for some events, like allocations, lock
contention and exception throws to know where they happened.
Or we may want to see what sequence of calls leads to a particular
method invocation.
To see this info invoke mprof-report as follows:
.PP
\f[B]mprof-report\ --traces\ output.mlpd\f[]
.PP
The maximum number of methods in each stack trace can be specified
with the \f[I]\[em]maxframes=NUM\f[] option:
.PP
\f[B]mprof-report\ --traces\ --maxframes=4\ output.mlpd\f[]
.PP
The stack trace info will be available if method enter/leave events
have been recorded or if stack trace collection wasn't explicitly
disabled with the \f[I]maxframes=0\f[] profiler option.
Note that the profiler will collect up to 8 frames by default at
specific events when the \f[I]nocalls\f[] option is used, so in
that case, if more stack frames are required in mprof-report, a
bigger value for maxframes when profiling must be used, too.
.PP
The \f[I]\[em]traces\f[] option also controls the reverse reference
feature in the heapshot report: for each class it reports how many
references to objects of that class come from other classes.
.SS Sort order for methods and allocations
.PP
When a list of methods is printed the default sort order is based
on the total time spent in the method.
This time is wall clock time (that is, it includes the time spent,
for example, in a sleep call, even if actual cpu time would be
basically 0).
Also, if the method has been ran on different threads, the time
will be a sum of the time used in each thread.
.PP
To change the sort order, use the option:
.PP
\f[B]--method-sort=MODE\f[]
.PP
where \f[I]MODE\f[] can be:
.IP \[bu] 2
\f[I]self\f[]: amount of time spent in the method itself and not in
its callees
.IP \[bu] 2
\f[I]calls\f[]: the number of method invocations
.IP \[bu] 2
\f[I]total\f[]: the total time spent in the method.
.PP
Object allocation lists are sorted by default depending on the
total amount of bytes used by each type.
.PP
To change the sort order of object allocations, use the option:
.PP
\f[B]--alloc-sort=MODE\f[]
.PP
where \f[I]MODE\f[] can be:
.IP \[bu] 2
\f[I]count\f[]: the number of allocated objects of the given type
.IP \[bu] 2
\f[I]bytes\f[]: the total number of bytes used by objects of the
given type
.SS Selecting what data to report
.PP
The profiler by default collects data about many runtime subsystems
and mprof-report prints a summary of all the subsystems that are
found in the data file.
It is possible to tell mprof-report to only show information about
some of them with the following option:
.PP
\f[B]--reports=R1[,R2...]\f[]
.PP
where the report names R1, R2 etc.
can be:
.IP \[bu] 2
\f[I]header\f[]: information about program startup and profiler
version
.IP \[bu] 2
\f[I]jit\f[]: JIT compiler information
.IP \[bu] 2
\f[I]sample\f[]: statistical sampling information
.IP \[bu] 2
\f[I]gc\f[]: garbage collection information
.IP \[bu] 2
\f[I]alloc\f[]: object allocation information
.IP \[bu] 2
\f[I]call\f[]: method profiling information
.IP \[bu] 2
\f[I]metadata\f[]: metadata events like image loads
.IP \[bu] 2
\f[I]exception\f[]: exception throw and handling information
.IP \[bu] 2
\f[I]monitor\f[]: lock contention information
.IP \[bu] 2
\f[I]thread\f[]: thread information
.IP \[bu] 2
\f[I]heapshot\f[]: live heap usage at heap shots
.PP
It is possible to limit some of the data displayed to a timeframe
of the program execution with the option:
.PP
\f[B]--time=FROM-TO\f[]
.PP
where \f[I]FROM\f[] and \f[I]TO\f[] are seconds since application
startup (they can be floating point numbers).
.PP
Another interesting option is to consider only events happening on
a particular thread with the following option:
.PP
\f[B]--thread=THREADID\f[]
.PP
where \f[I]THREADID\f[] is one of the numbers listed in the thread
summary report (or a thread name when present).
.PP
By default long lists of methods or other information like object
allocations are limited to the most important data.
To increase the amount of information printed you can use the
option:
.PP
\f[B]--verbose\f[]
.SS Track individual objects
.PP
Instead of printing the usual reports from the profiler data, it is
possible to track some interesting information about some specific
object addresses.
The objects are selected based on their address with the
\f[I]\[em]track\f[] option as follows:
.PP
\f[B]--track=0xaddr1[,0xaddr2,...]\f[]
.PP
The reported info (if available in the data file), will be class
name, size, creation time, stack trace of creation (with the
\f[I]\[em]traces\f[] option), etc.
If heapshot data is available it will be possible to also track
what other objects reference one of the listed addresses.
.PP
The object addresses can be gathered either from the profiler
report in some cases (like in the monitor lock report), from the
live application or they can be selected with the
\f[I]\[em]find=FINDSPEC\f[] option.
FINDSPEC can be one of the following:
.IP \[bu] 2
\f[I]S:SIZE\f[]: where the object is selected if it's size is at
least \f[I]SIZE\f[]
.IP \[bu] 2
\f[I]T:NAME\f[]: where the object is selected if \f[I]NAME\f[]
partially matches its class name
.PP
This option can be specified multiple times with one of the
different kinds of FINDSPEC.
For example, the following:
.PP
\f[B]--find=S:10000\ --find=T:Byte[]\f[]
.PP
will find all the byte arrays that are at least 10000 bytes in
size.
.PP
Note that with a moving garbage collector the object address can
change, so you may need to track the changed address manually.
It can also happen that multiple objects are allocated at the same
address, so the output from this option can become large.
.SS Saving a profiler report
.PP
By default mprof-report will print the summary data to the console.
To print it to a file, instead, use the option:
.PP
\f[B]--out=FILENAME\f[]
.SS Dealing with profiler slowness
.PP
If the profiler needs to collect lots of data, the execution of the
program will slow down significantly, usually 10 to 20 times
slower.
There are several ways to reduce the impact of the profiler on the
program execution.
.SS Use the statistical sampling mode
.PP
Statistical sampling allows executing a program under the profiler
with minimal performance overhead (usually less than 10%).
This mode allows checking where the program is spending most of
it's execution time without significantly perturbing its behaviour.
.SS Collect less data
.PP
Collecting method enter/leave events can be very expensive,
especially in programs that perform many millions of tiny calls.
The profiler option \f[I]nocalls\f[] can be used to avoid
collecting this data or it can be limited to only a few call levels
with the \f[I]calldepth\f[] option.
.PP
Object allocation information is expensive as well, though much
less than method enter/leave events.
If it's not needed, it can be skipped with the \f[I]noalloc\f[]
profiler option.
Note that when method enter/leave events are discarded, by default
stack traces are collected at each allocation and this can be
expensive as well.
The impact of stack trace information can be reduced by setting a
low value with the \f[I]maxframes\f[] option or by eliminating them
completely, by setting it to 0.
.PP
The other major source of data is the heapshot profiler option:
especially if the managed heap is big, since every object needs to
be inspected.
The \f[I]MODE\f[] parameter of the \f[I]heapshot\f[] option can be
used to reduce the frequency of the heap shots.
.SS Reduce the timestamp overhead
.PP
On many operating systems or architectures what actually slows down
profiling is the function provided by the system to get timestamp
information.
The \f[I]time=fast\f[] profiler option can be usually used to speed
up this operation, but, depending on the system, time accounting
may have some level of approximation (though statistically the data
should be still fairly valuable).
.SS Dealing with the size of the data files
.PP
When collecting a lot of information about a profiled program, huge
data files can be generated.
There are a few ways to minimize the amount of data, for example by
not collecting some of the more space-consuming information or by
compressing the information on the fly or by just generating a
summary report.
.SS Reducing the amount of data
.PP
Method enter/leave events can be excluded completely with the
\f[I]nocalls\f[] option or they can be limited to just a few levels
of calls with the \f[I]calldepth\f[] option.
For example, the option:
.PP
\f[B]calldepth=10\f[]
.PP
will ignore the method events when there are more than 10 managed
stack frames.
This is very useful for programs that have deep recursion or for
programs that perform many millions of tiny calls deep enough in
the call stack.
The optimal number for the calldepth option depends on the program
and it needs to be balanced between providing enough profiling
information and allowing fast execution speed.
.PP
Note that by default, if method events are not recorded at all, the
profiler will collect stack trace information at events like
allocations.
To avoid gathering this data, use the \f[I]maxframes=0\f[] profiler
option.
.PP
Allocation events can be eliminated with the \f[I]noalloc\f[]
option.
.PP
Heap shot data can also be huge: by default it is collected at each
major collection.
To reduce the frequency, you can specify a heapshot mode: for
example to collect every 5 collections (including major and minor):
.PP
\f[B]heapshot=5gc\f[]
.PP
or when at least 5 seconds passed since the last heap shot:
.PP
\f[B]heapshot=5000ms\f[]
.SS Compressing the data
.PP
To reduce the amout of disk space used by the data, the data can be
compressed either after it has been generated with the gzip
command:
.PP
\f[B]gzip\ -9\ output.mlpd\f[]
.PP
or it can be compressed automatically by using the \f[I]zip\f[]
profiler option.
Note that in this case there could be a significant slowdown of the
profiled program.
.PP
The mprof-report program will tranparently deal with either
compressed or uncompressed data files.
.SS Generating only a summary report
.PP
Often it's enough to look at the profiler summary report to
diagnose an issue and in this case it's possible to avoid saving
the profiler data file to disk.
This can be accomplished with the \f[I]report\f[] profiler option,
which will basically send the data to the mprof-report program for
display.
.PP
To have more control of what summary information is reported (or to
use a completely different program to decode the profiler data),
the \f[I]output\f[] profiler option can be used, with \f[B]|\f[] as
the first character: the rest of the output name will be executed
as a program with the data fed in on the standard input.
.PP
For example, to print only the Monitor summary with stack trace
information, you could use it like this:
.PP
\f[B]output=|mprof-report\ --reports=monitor\ --traces\ -\f[]
.SH WEB SITE
http://www.mono-project.com/Profiler
.SH SEE ALSO
.PP
mono(1)
.SH AUTHORS
Paolo Molaro.
+86 -5
View File
@@ -23,6 +23,15 @@ Set or override project properties
.B \//logger:<logger>
Custom logger to log build events
.TP
.B \//toolsversion:version , /tv:version
Specify the toolset version to use.
Eg. /tv:4.0
This would cause 4.0 version of the Microsoft.Common.targets (among others) to be used. This overrides
the value specified in a project file.
Valid values: 2.0, 3.0, 3.5 and 4.0
.TP
.B \//verbosity:<level>
Logger verbosity level : quiet, minimal, normal, detailed, diagnostic
.TP
@@ -32,8 +41,32 @@ Validate the project file against the schema
.B \//validate:<schema>
Validate the project file against the specified schema
.TP
.B \//consoleloggerparameters:<params>
Parameters for the console logger : PerfomanceSummary, NoSummary, NoItemAndPropertyList
.B \//consoleloggerparameters:<params> , /clp:<params>
Parameters for the console logger : PerfomanceSummary, Summary, NoSummary, NoItemAndPropertyList, Verbosity
.TP
.B \//filelogger[n] , /fl[n]
Logs the output to a file, named 'msbuild.log' by default. If the optional number 'n' is
specified, then it logs to 'msbuild[n].log' . Parameters for this logger, including
the log file name can be specified via a corresponding /flp[n] option. Default verbosity
for file loggers is 'detailed. 'n' can be between 1-9.
.TP
.B \//fileloggerparameters[n]:<params> , /flp[n]:<params>
Parameters for a file logger. This implies a corresponding /fl[n]. 'n' can be between
1-9, and is used to add upto 10 file loggers. Parameters can be, besides the ones available
for console logger:
.RS
.TP
.I LogFile=<file>
File to which the build log will be written.
.TP
.I Append
If this is used, then the log file is appended to, else a new one will be created.
.TP
.I Encoding=<encoding>
Encoding to use for the log file, eg. UTF-8, ASCII.
.TP
Eg: xbuild foo.csproj /flp:Verbosity=normal "/flp1:LogFile=build.log;Append;Encoding=ASCII"
.RE
.TP
.B \//nologo
Don't show the initial xbuild banner
@@ -65,13 +98,57 @@ to $prefix/lib/mono/xbuild . When used in Import, like:
xbuild tries various values for the msbuild property $(MSBuildExtensionsPath), in order:
1. Paths specified in the environment variable $MSBuildExtensionsPath.
2. $XDG_CONFIG_HOME/xbuild/tasks (or Environment.SpecialFolder.ApplicationData)
3. $prefix/lib/mono/xbuild (default location)
2. /Library/Frameworks/Mono.framework/External/xbuild on Mac OSX.
3. $XDG_CONFIG_HOME/xbuild/tasks (or Environment.SpecialFolder.ApplicationData)
4. $prefix/lib/mono/xbuild (default location)
Anywhere else in the project files, $(MSBuildExtensionsPath) will always resolve to the default
location. This is a xbuild-only feature.
This is also applicable for the properties $(MSBuildExtensionsPath32) and $(MSBuildExtensionsPath64),
and the environment variables have the corresponding names - MSBuildExtensionsPath32/64 .
.TP
.I "XBUILD_FRAMEWORK_FOLDERS_PATH"
With ToolsVersion 4.0, projects can target arbitrary frameworks referenced by TargetFrameworkMoniker,
which is of the format:
Identifier,Version=<version>[,Profile=<profile>]
Eg. ".NETFramework,Version=v4.0"
The 3 parts of the moniker are given by the msbuild properties:
$(TargetFrameworkIdentifier), $(TargetFrameworkVersion) and $(TargetFrameworkProfile)
This moniker maps to a framework description file on disk:
<framework_root>/Identifier/Version/[Profile]/RedistList/FrameworkList.xml
This file is used to determine the path where to find the framework assemblies for this particular framework.
Framework root here is configurable and is resolved in the following order:
.nf
1. Paths specified in the environment variable $XBUILD_FRAMEWORK_FOLDERS_PATH
2. /Library/Frameworks/Mono.framework/External/xbuild-frameworks on Mac OSX.
3. MSBuild property $(TargetFrameworkRoot)
4. $prefix/lib/mono/xbuild-frameworks (default location)
.fi
XBuild tries the paths given above, in order, till it finds a FrameworkList.xml for the moniker.
Running with /v:detailed or higher verbosity will show the various paths that it tries.
The FrameworkList.xml itself just has a root element like:
<FileList Name=".NET Framework 3.5" TargetFrameworkDirectory="..\\..\\..\\..\\3.5" IncludeFramework="v3.0">
</FileList>
Here the TargetFrameworkDirectory attribute specifies the directory where the assemblies for
this particular framework can be found. If this is not set, then the parent of the folder
containing the xml file is taken as the framework directory.
IncludeFramework attribute specifies the version of a framework (under the *same* $(TargetFrameworkIdentifier))
which should be included in the final list of Target framework directories.
.TP
.I "XBUILD_COLORS"
If this variable is set, it contains a string of the form
@@ -102,10 +179,14 @@ For example, you could set this variable from your shell:
You can disable the built-in color scheme by setting this variable to
"disable".
.SH NOTES
On Mac OSX, for locating pkg-config (.pc) files, xbuild additionally
looks in "/Library/Frameworks/Mono.framework/External/pkgconfig" .
.SH SEE ALSO
.BR mono(1), mcs(1)
.SH COPYRIGHT
Copyright (C) 2009 Novell, Inc (http://www.novell.com)
Copyright (C) 2011 Novell, Inc (http://www.novell.com)
.SH MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
.SH WEB SITE
+1 -2
View File
@@ -13,9 +13,8 @@ tests/?mcs.log
tests/gtest-*.dll
tests/test-*.dll
tests/xml-*.xml
tests/?xml-*.xml
tests/test-*.netmodule
tests/gxml-*.xml
tests/test-*.xml
tests/data.xml
class/Mono.Data.Sqlite/test.db
class/Mono.CSharp/Mono.CSharp.dll.sources
+13 -20
View File
@@ -3,16 +3,13 @@ thisdir := .
SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
basic_SUBDIRS := build jay mcs class tools
net_2_0_bootstrap_SUBDIRS := build tools
net_2_0_SUBDIRS := build mcs class nunit24 ilasm tools tests errors
moonlight_bootstrap_SUBDIRS := build mcs class
moonlight_raw_SUBDIRS := build mcs class tools
moonlight_SUBDIRS := tools tests errors
monotouch_SUBDIRS := build mcs class
monotouch_bootstrap_SUBDIRS := build mcs class
net_2_0_SUBDIRS := build class nunit24 ilasm tools tests errors mcs
moonlight_raw_SUBDIRS := build class tools mcs
moonlight_SUBDIRS := tools
monodroid_SUBDIRS := build class mcs
monotouch_SUBDIRS := build class mcs
net_3_5_SUBDIRS := build class tools/xbuild
net_4_0_bootstrap_SUBDIRS := build mcs class tools
net_4_0_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
net_4_0_SUBDIRS := build class nunit24 ilasm tools tests errors mcs docs
# List of test subdirs that should pass 100%
centum_tests := \
@@ -103,16 +100,13 @@ profiles-do--run-test:
# Orchestrate the bootstrap here.
_boot_ = all clean install
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--net_4_0_bootstrap--%
$(_boot_:%=profile-do--net_4_0_bootstrap--%): profile-do--net_4_0_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--basic--%
$(_boot_:%=profile-do--net_3_5--%): profile-do--net_3_5--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--moonlight--%): profile-do--moonlight--%: profile-do--moonlight_raw--%
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--monotouch_bootstrap--%
$(_boot_:%=profile-do--monotouch_bootstrap--%): profile-do--monotouch_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--moonlight_raw--%): profile-do--moonlight_raw--%: profile-do--moonlight_bootstrap--%
$(_boot_:%=profile-do--moonlight_bootstrap--%): profile-do--moonlight_bootstrap--%: profile-do--basic--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--net_2_0_bootstrap--%
$(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--basic--%
$(_boot_:%=profile-do--moonlight--%): profile-do--moonlight--%: profile-do--moonlight_raw--%
$(_boot_:%=profile-do--monodroid--%): profile-do--monodroid--%: profile-do--basic--%
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--basic--%
$(_boot_:%=profile-do--moonlight_raw--%): profile-do--moonlight_raw--%: profile-do--basic--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--basic--%
testcorlib:
@cd class/corlib && $(MAKE) test run-test
@@ -138,8 +132,7 @@ DISTFILES = \
MonoIcon.png \
README \
ScalableMonoIcon.svg \
winexe.in \
nunit.key
winexe.in
dist-local: dist-default
-3
View File
@@ -17,13 +17,10 @@ common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
PLATFORMS = darwin linux win32
PROFILES = \
basic \
net_2_0_bootstrap \
net_2_0 \
moonlight_bootstrap \
moonlight_raw \
moonlight \
net_3_5 \
net_4_0_bootstrap \
net_4_0
COMMON_SRCS = \
+3 -5
View File
@@ -39,7 +39,7 @@ static class Consts
public const string MonoProduct = "MONO Common language infrastructure";
public const string MonoCopyright = "(c) various MONO Authors";
#if NET_4_0 || BOOTSTRAP_NET_4_0
#if NET_4_0
public const string FxVersion = "4.0.0.0";
public const string FxFileVersion = "4.0.30319.1";
@@ -62,7 +62,7 @@ static class Consts
public const string VsVersion = "9.0.0.0"; // unused, but needed for compilation
public const string FxFileVersion = "4.0.50524.0";
public const string VsFileVersion = "9.0.50727.42"; // unused, but needed for compilation
#elif NET_2_0 || BOOTSTRAP_NET_2_0
#elif NET_2_0
// Versions of .NET Framework 2.0 RTM
public const string FxVersion = "2.0.0.0";
public const string VsVersion = "8.0.0.0";
@@ -82,9 +82,7 @@ static class Consts
public const string AssemblyI18N = "I18N, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
#if NET_2_0
public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
#endif
public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblyMono_Http = "Mono.Http, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
public const string AssemblyMono_Posix = "Mono.Posix, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
@@ -102,7 +100,7 @@ static class Consts
public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Web = "System.Web, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
#if NET_4_0 || BOOTSTRAP_NET_4_0
#if NET_4_0
public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
+2 -1
View File
@@ -33,7 +33,7 @@
//
namespace System {
#pragma warning disable 436
[AttributeUsage (AttributeTargets.All, AllowMultiple=true)]
internal class MonoTODOAttribute : Attribute {
@@ -97,4 +97,5 @@ namespace System {
{
}
}
#pragma warning restore 436
}
+4 -2
View File
@@ -233,6 +233,8 @@ $(the_lib): $(build_lib)
$(Q) test ! -f $(build_lib:.dll=.pdb) || mv $(build_lib:.dll=.pdb) $(the_lib:.dll=.pdb)
endif
library_CLEAN_FILES += $(PROFILE)_aot.log
ifdef PLATFORM_AOT_SUFFIX
Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
$(the_lib)$(PLATFORM_AOT_SUFFIX): $(the_lib)
@@ -250,7 +252,7 @@ endif
makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY).makefrag
library_CLEAN_FILES += $(makefrag)
$(makefrag): $(sourcefile)
@echo Creating $@ ...
# @echo Creating $@ ...
@sed 's,^,$(build_lib): ,' $< >$@
@if test ! -f $(sourcefile).makefrag; then :; else \
cat $(sourcefile).makefrag >> $@ ; \
@@ -268,7 +270,7 @@ $(response): $(sourcefile)
@echo Converting $(sourcefile) to $@ ...
@cat $(sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
endif
endif
-include $(makefrag)
+2
View File
@@ -26,6 +26,8 @@ PLATFORM_MAKE_CORLIB_CMP = yes
PLATFORM_CHANGE_SEPARATOR_CMD=tr '/' '\\\\'
PLATFORM_PATH_SEPARATOR = ;
override CURDIR:=$(shell cygpath -m $(CURDIR))
## not so simple :-)
#PLATFORM_AOT_SUFFIX = .dll
+2 -2
View File
@@ -8,7 +8,7 @@ use_monolite := $(wildcard $(monolite_flag))
ifdef use_monolite
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/monolite/gmcs.exe
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/monolite/mcs.exe
else
PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
BOOTSTRAP_MCS = $(EXTERNAL_MCS)
@@ -60,7 +60,7 @@ do-profile-check: $(depsdir)/.stamp
$(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
if $$ok; then :; else \
if test -f $(topdir)/class/lib/monolite/gmcs.exe; then \
if test -f $(topdir)/class/lib/monolite/mcs.exe; then \
$(MAKE) -s do-profile-check-monolite ; \
else \
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
+17
View File
@@ -0,0 +1,17 @@
#! -*- makefile -*-
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOBILE -d:MONODROID -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
+5 -7
View File
@@ -1,17 +1,15 @@
#! -*- makefile -*-
my_runtime = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack
INTERNAL_SMCS = $(my_runtime) $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_PROFILE = monotouch_bootstrap
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(my_runtime) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/smcs.exe
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MONOTOUCH
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOBILE -d:MONOTOUCH -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
Loaded 100 of 5928 files, more files were not shown because too many files have changed in this diff. Show more