diff --git a/Makefile.in b/Makefile.in index 322c2eb5a6..9c57bec974 100644 --- a/Makefile.in +++ b/Makefile.in @@ -84,8 +84,8 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in mkinstalldirs \ $(srcdir)/mono-uninstalled.pc.in COPYING.LIB ChangeLog NEWS \ - compile config.guess config.rpath config.sub install-sh \ - missing ltmain.sh + compile config.guess config.rpath config.sub depcomp \ + install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ diff --git a/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs b/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs index 395ea08409..dbb3f686c2 100644 --- a/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs +++ b/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs @@ -48,7 +48,7 @@ namespace System.Runtime.ExceptionServices { if (count != 0) Array.Copy (exception.captured_traces, 0, stack_traces, 0, count); - stack_traces [count] = new System.Diagnostics.StackTrace (exception, 0, true, true); + stack_traces [count] = new System.Diagnostics.StackTrace (exception, 0, true); m_stackTrace = stack_traces; #else m_remoteStackTrace = exception.RemoteStackTrace; diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 02ae6814cb..a35e49d0b4 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -417,7 +417,7 @@ namespace Mono.Debugger.Soft * with newer runtimes, and vice versa. */ internal const int MAJOR_VERSION = 2; - internal const int MINOR_VERSION = 40; + internal const int MINOR_VERSION = 41; enum WPSuspendPolicy { NONE = 0, @@ -801,6 +801,13 @@ namespace Mono.Debugger.Soft return res; } + public string ReadUTF16String () { + int len = decode_int (packet, ref offset); + string res = new String (Encoding.Unicode.GetChars (packet, offset, len)); + offset += len; + return res; + } + public ValueImpl ReadValue () { ElementType etype = (ElementType)ReadByte (); @@ -2418,7 +2425,16 @@ namespace Mono.Debugger.Soft * STRINGS */ internal string String_GetValue (long id) { - return SendReceive (CommandSet.STRING_REF, (int)CmdStringRef.GET_VALUE, new PacketWriter ().WriteId (id)).ReadString (); + var r = SendReceive (CommandSet.STRING_REF, (int)CmdStringRef.GET_VALUE, new PacketWriter ().WriteId (id)); + + bool is_utf16 = false; + if (Version.AtLeast (2, 41)) + is_utf16 = r.ReadByte () == 1; + + if (is_utf16) + return r.ReadUTF16String (); + else + return r.ReadString (); } internal int String_GetLength (long id) { diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs index d922e9e0e6..645329ee98 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs @@ -598,7 +598,7 @@ public class Tests : TestsBase, ITest2 public static void arguments () { arg1 (SByte.MaxValue - 5, Byte.MaxValue - 5, true, Int16.MaxValue - 5, UInt16.MaxValue - 5, 'F', Int32.MaxValue - 5, UInt32.MaxValue - 5, Int64.MaxValue - 5, UInt64.MaxValue - 5, 1.2345f, 6.78910, new IntPtr (Int32.MaxValue - 5), new UIntPtr (UInt32.MaxValue - 5)); int i = 42; - arg2 ("FOO", null, "BLA", ref i, new GClass { field = 42 }, new object ()); + arg2 ("FOO", null, "BLA", ref i, new GClass { field = 42 }, new object (), '\0'.ToString () + "A"); Tests t = new Tests () { field_i = 42, field_s = "S" }; t.arg3 ("BLA"); } @@ -609,7 +609,7 @@ public class Tests : TestsBase, ITest2 } [MethodImplAttribute (MethodImplOptions.NoInlining)] - public static string arg2 (string s, string s3, object o, ref int i, GClass gc, object o2) { + public static string arg2 (string s, string s3, object o, ref int i, GClass gc, object o2, string s4) { return s + (s3 != null ? "" : "") + o + i + gc.field + o2; } @@ -908,6 +908,10 @@ public class Tests : TestsBase, ITest2 public void invoke2 () { } + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public void invoke3 () { + } + [MethodImplAttribute (MethodImplOptions.NoInlining)] public void invoke_ex () { invoke_ex_inner (); diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id index 0f187287e2..c8c77d0e89 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id @@ -1 +1 @@ -641fefd2afe9c647385e3ad22f0e18a355ee6f2e \ No newline at end of file +3c62a78ee4f20b1751753ce79842028dd874ffad \ No newline at end of file diff --git a/mcs/class/Mono.Posix/Test/Mono.Unix/UnixSignalTest.cs b/mcs/class/Mono.Posix/Test/Mono.Unix/UnixSignalTest.cs index f88defeaff..8d4c63c656 100644 --- a/mcs/class/Mono.Posix/Test/Mono.Unix/UnixSignalTest.cs +++ b/mcs/class/Mono.Posix/Test/Mono.Unix/UnixSignalTest.cs @@ -118,6 +118,7 @@ namespace MonoTests.Mono.Unix { } [Test] + [Category ("AndroidNotWorking")] // Crashes (silently) the runtime in similar fashion to real-time signals public void TestSignumProperty () { UnixSignal signal1 = new UnixSignal (Signum.SIGSEGV); diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs index 354d4c8b41..36ea57b5b9 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs @@ -461,8 +461,6 @@ namespace System.ServiceModel.MonoInternal if (p == parameters) return retval; - if (p.Length != parameters.Length) - throw new InvalidOperationException (); Array.Copy (p, parameters, p.Length); return retval; } diff --git a/mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources b/mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources index deb325709e..0cde2c9bde 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources +++ b/mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources @@ -128,6 +128,7 @@ System.ServiceModel.Description/WsdlImporterTest.cs System.ServiceModel.Dispatcher/ActionFilterTest.cs System.ServiceModel.Dispatcher/Bug652331Test.cs System.ServiceModel.Dispatcher/Bug652331_2Test.cs +System.ServiceModel.Dispatcher/Bug32886Test.cs System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs System.ServiceModel.Dispatcher/DispatchOperationTest.cs System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/Bug32886Test.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/Bug32886Test.cs new file mode 100644 index 0000000000..1562ba1ba9 --- /dev/null +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/Bug32886Test.cs @@ -0,0 +1,706 @@ +// +// Author: +// Martin Baulig +// +// Copyright (c) 2015 Xamarin, 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. +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.ServiceModel; +using System.ServiceModel.Description; +using System.Threading; +using NUnit.Framework; + +using WebServiceMoonlightTest.ServiceReference1; + +using MonoTests.Helpers; + +namespace MonoTests.System.ServiceModel.Dispatcher +{ + [TestFixture] + public class Bug32886 + { + [Test] + public void Bug32886_Test () // test in one of the comment + { + // Init service + int port = NetworkHelpers.FindFreePort (); + ServiceHost serviceHost = new ServiceHost (typeof (TempConvertSoapImpl), new Uri ("http://localhost:" + port + "/TempConvertSoap")); + serviceHost.AddServiceEndpoint (typeof (TempConvertSoap), new BasicHttpBinding (), string.Empty); + + // Enable metadata exchange (WSDL publishing) + var mexBehavior = new ServiceMetadataBehavior (); + mexBehavior.HttpGetEnabled = true; + serviceHost.Description.Behaviors.Add (mexBehavior); + serviceHost.AddServiceEndpoint (typeof (IMetadataExchange), MetadataExchangeBindings.CreateMexHttpBinding (), "mex"); + + serviceHost.Open (); + + try { + // client + var binding = new BasicHttpBinding (); + var remoteAddress = new EndpointAddress ("http://localhost:" + port + "/TempConvertSoap"); + var client = new TempConvertSoapClient (binding, remoteAddress); + + var wait = new ManualResetEvent (false); + client.CelsiusToFahrenheitCompleted += delegate (object o, CelsiusToFahrenheitCompletedEventArgs e) { + if (e.Error != null) + throw e.Error; + Assert.AreEqual ("76.1", e.Result, "#1"); + wait.Set (); + }; + + client.CelsiusToFahrenheitAsync ("24.5"); + if (!wait.WaitOne (TimeSpan.FromSeconds (20))) + Assert.Fail ("timeout"); + } finally { + serviceHost.Close (); + } + } + + class TempConvertSoapImpl : TempConvertSoap + { + public FahrenheitToCelsiusResponse FarenheitToCelsius (FahrenheitToCelsiusRequest request) + { + var farenheit = double.Parse (request.Body.Fahrenheit); + var celsius = ((farenheit - 32) / 9) * 5; + return new FahrenheitToCelsiusResponse (new FahrenheitToCelsiusResponseBody (celsius.ToString ())); + } + + public CelsiusToFahrenheitResponse CelsiusToFarenheit (CelsiusToFahrenheitRequest request) + { + var celsius = double.Parse (request.Body.Celsius); + var farenheit = ((celsius * 9) / 5) + 32; + return new CelsiusToFahrenheitResponse (new CelsiusToFahrenheitResponseBody (farenheit.ToString ())); + } + + Func farenheitToCelsius; + Func celsiusToFarenheit; + + public IAsyncResult BeginFahrenheitToCelsius (FahrenheitToCelsiusRequest request, AsyncCallback callback, object asyncState) + { + if (farenheitToCelsius == null) + farenheitToCelsius = new Func (FarenheitToCelsius); + return farenheitToCelsius.BeginInvoke (request, callback, asyncState); + } + + public FahrenheitToCelsiusResponse EndFahrenheitToCelsius (IAsyncResult result) + { + return farenheitToCelsius.EndInvoke (result); + } + + public IAsyncResult BeginCelsiusToFahrenheit (CelsiusToFahrenheitRequest request, AsyncCallback callback, object asyncState) + { + if (celsiusToFarenheit == null) + celsiusToFarenheit = new Func (CelsiusToFarenheit); + return celsiusToFarenheit.BeginInvoke (request, callback, asyncState); + } + + public CelsiusToFahrenheitResponse EndCelsiusToFahrenheit (IAsyncResult result) + { + return celsiusToFarenheit.EndInvoke (result); + } + } + } +} + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34003 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This code was auto-generated by SlSvcUtil, version 5.0.61118.0 +// + + +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ServiceModel.ServiceContractAttribute (Namespace = "http://www.w3schools.com/webservices/", ConfigurationName = "TempConvertSoap")] +public interface TempConvertSoap +{ + + [System.ServiceModel.OperationContractAttribute (AsyncPattern = true, Action = "http://www.w3schools.com/webservices/FahrenheitToCelsius", ReplyAction = "*")] + System.IAsyncResult BeginFahrenheitToCelsius (FahrenheitToCelsiusRequest request, System.AsyncCallback callback, object asyncState); + + FahrenheitToCelsiusResponse EndFahrenheitToCelsius (System.IAsyncResult result); + + [System.ServiceModel.OperationContractAttribute (AsyncPattern = true, Action = "http://www.w3schools.com/webservices/CelsiusToFahrenheit", ReplyAction = "*")] + System.IAsyncResult BeginCelsiusToFahrenheit (CelsiusToFahrenheitRequest request, System.AsyncCallback callback, object asyncState); + + CelsiusToFahrenheitResponse EndCelsiusToFahrenheit (System.IAsyncResult result); +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] +[System.ServiceModel.MessageContractAttribute (IsWrapped = false)] +public partial class FahrenheitToCelsiusRequest +{ + + [System.ServiceModel.MessageBodyMemberAttribute (Name = "FahrenheitToCelsius", Namespace = "http://www.w3schools.com/webservices/", Order = 0)] + public FahrenheitToCelsiusRequestBody Body; + + public FahrenheitToCelsiusRequest () + { + } + + public FahrenheitToCelsiusRequest (FahrenheitToCelsiusRequestBody Body) + { + this.Body = Body; + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] +[System.Runtime.Serialization.DataContractAttribute (Namespace = "http://www.w3schools.com/webservices/")] +public partial class FahrenheitToCelsiusRequestBody +{ + + [System.Runtime.Serialization.DataMemberAttribute (EmitDefaultValue = false, Order = 0)] + public string Fahrenheit; + + public FahrenheitToCelsiusRequestBody () + { + } + + public FahrenheitToCelsiusRequestBody (string Fahrenheit) + { + this.Fahrenheit = Fahrenheit; + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] +[System.ServiceModel.MessageContractAttribute (IsWrapped = false)] +public partial class FahrenheitToCelsiusResponse +{ + + [System.ServiceModel.MessageBodyMemberAttribute (Name = "FahrenheitToCelsiusResponse", Namespace = "http://www.w3schools.com/webservices/", Order = 0)] + public FahrenheitToCelsiusResponseBody Body; + + public FahrenheitToCelsiusResponse () + { + } + + public FahrenheitToCelsiusResponse (FahrenheitToCelsiusResponseBody Body) + { + this.Body = Body; + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] +[System.Runtime.Serialization.DataContractAttribute (Namespace = "http://www.w3schools.com/webservices/")] +public partial class FahrenheitToCelsiusResponseBody +{ + + [System.Runtime.Serialization.DataMemberAttribute (EmitDefaultValue = false, Order = 0)] + public string FahrenheitToCelsiusResult; + + public FahrenheitToCelsiusResponseBody () + { + } + + public FahrenheitToCelsiusResponseBody (string FahrenheitToCelsiusResult) + { + this.FahrenheitToCelsiusResult = FahrenheitToCelsiusResult; + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] +[System.ServiceModel.MessageContractAttribute (IsWrapped = false)] +public partial class CelsiusToFahrenheitRequest +{ + + [System.ServiceModel.MessageBodyMemberAttribute (Name = "CelsiusToFahrenheit", Namespace = "http://www.w3schools.com/webservices/", Order = 0)] + public CelsiusToFahrenheitRequestBody Body; + + public CelsiusToFahrenheitRequest () + { + } + + public CelsiusToFahrenheitRequest (CelsiusToFahrenheitRequestBody Body) + { + this.Body = Body; + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] +[System.Runtime.Serialization.DataContractAttribute (Namespace = "http://www.w3schools.com/webservices/")] +public partial class CelsiusToFahrenheitRequestBody +{ + + [System.Runtime.Serialization.DataMemberAttribute (EmitDefaultValue = false, Order = 0)] + public string Celsius; + + public CelsiusToFahrenheitRequestBody () + { + } + + public CelsiusToFahrenheitRequestBody (string Celsius) + { + this.Celsius = Celsius; + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] +[System.ServiceModel.MessageContractAttribute (IsWrapped = false)] +public partial class CelsiusToFahrenheitResponse +{ + + [System.ServiceModel.MessageBodyMemberAttribute (Name = "CelsiusToFahrenheitResponse", Namespace = "http://www.w3schools.com/webservices/", Order = 0)] + public CelsiusToFahrenheitResponseBody Body; + + public CelsiusToFahrenheitResponse () + { + } + + public CelsiusToFahrenheitResponse (CelsiusToFahrenheitResponseBody Body) + { + this.Body = Body; + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +[System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] +[System.Runtime.Serialization.DataContractAttribute (Namespace = "http://www.w3schools.com/webservices/")] +public partial class CelsiusToFahrenheitResponseBody +{ + + [System.Runtime.Serialization.DataMemberAttribute (EmitDefaultValue = false, Order = 0)] + public string CelsiusToFahrenheitResult; + + public CelsiusToFahrenheitResponseBody () + { + } + + public CelsiusToFahrenheitResponseBody (string CelsiusToFahrenheitResult) + { + this.CelsiusToFahrenheitResult = CelsiusToFahrenheitResult; + } +} + +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +public interface TempConvertSoapChannel : TempConvertSoap, System.ServiceModel.IClientChannel +{ +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +public partial class FahrenheitToCelsiusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs +{ + + private object[] results; + + public FahrenheitToCelsiusCompletedEventArgs (object[] results, System.Exception exception, bool cancelled, object userState) : + base (exception, cancelled, userState) + { + this.results = results; + } + + public string Result { + get { + base.RaiseExceptionIfNecessary (); + return ((string)(this.results [0])); + } + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +public partial class CelsiusToFahrenheitCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs +{ + + private object[] results; + + public CelsiusToFahrenheitCompletedEventArgs (object[] results, System.Exception exception, bool cancelled, object userState) : + base (exception, cancelled, userState) + { + this.results = results; + } + + public string Result { + get { + base.RaiseExceptionIfNecessary (); + return ((string)(this.results [0])); + } + } +} + +[System.Diagnostics.DebuggerStepThroughAttribute ()] +[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0")] +public partial class TempConvertSoapClient : System.ServiceModel.ClientBase, TempConvertSoap +{ + + private BeginOperationDelegate onBeginFahrenheitToCelsiusDelegate; + + private EndOperationDelegate onEndFahrenheitToCelsiusDelegate; + + private System.Threading.SendOrPostCallback onFahrenheitToCelsiusCompletedDelegate; + + private BeginOperationDelegate onBeginCelsiusToFahrenheitDelegate; + + private EndOperationDelegate onEndCelsiusToFahrenheitDelegate; + + private System.Threading.SendOrPostCallback onCelsiusToFahrenheitCompletedDelegate; + + private BeginOperationDelegate onBeginOpenDelegate; + + private EndOperationDelegate onEndOpenDelegate; + + private System.Threading.SendOrPostCallback onOpenCompletedDelegate; + + private BeginOperationDelegate onBeginCloseDelegate; + + private EndOperationDelegate onEndCloseDelegate; + + private System.Threading.SendOrPostCallback onCloseCompletedDelegate; + + public TempConvertSoapClient () + { + } + + public TempConvertSoapClient (string endpointConfigurationName) : + base (endpointConfigurationName) + { + } + + public TempConvertSoapClient (string endpointConfigurationName, string remoteAddress) : + base (endpointConfigurationName, remoteAddress) + { + } + + public TempConvertSoapClient (string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : + base (endpointConfigurationName, remoteAddress) + { + } + + public TempConvertSoapClient (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base (binding, remoteAddress) + { + } + + public System.Net.CookieContainer CookieContainer { + get { + System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty (); + if ((httpCookieContainerManager != null)) { + return httpCookieContainerManager.CookieContainer; + } else { + return null; + } + } + set { + System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty (); + if ((httpCookieContainerManager != null)) { + httpCookieContainerManager.CookieContainer = value; + } else { + throw new System.InvalidOperationException ("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" + + "ookieContainerBindingElement."); + } + } + } + + public event System.EventHandler FahrenheitToCelsiusCompleted; + + public event System.EventHandler CelsiusToFahrenheitCompleted; + + public event System.EventHandler OpenCompleted; + + public event System.EventHandler CloseCompleted; + + [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] + System.IAsyncResult TempConvertSoap.BeginFahrenheitToCelsius (FahrenheitToCelsiusRequest request, System.AsyncCallback callback, object asyncState) + { + return base.Channel.BeginFahrenheitToCelsius (request, callback, asyncState); + } + + [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] + private System.IAsyncResult BeginFahrenheitToCelsius (string Fahrenheit, System.AsyncCallback callback, object asyncState) + { + FahrenheitToCelsiusRequest inValue = new FahrenheitToCelsiusRequest (); + inValue.Body = new FahrenheitToCelsiusRequestBody (); + inValue.Body.Fahrenheit = Fahrenheit; + return ((TempConvertSoap)(this)).BeginFahrenheitToCelsius (inValue, callback, asyncState); + } + + [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] + FahrenheitToCelsiusResponse TempConvertSoap.EndFahrenheitToCelsius (System.IAsyncResult result) + { + return base.Channel.EndFahrenheitToCelsius (result); + } + + [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] + private string EndFahrenheitToCelsius (System.IAsyncResult result) + { + FahrenheitToCelsiusResponse retVal = ((TempConvertSoap)(this)).EndFahrenheitToCelsius (result); + return retVal.Body.FahrenheitToCelsiusResult; + } + + private System.IAsyncResult OnBeginFahrenheitToCelsius (object[] inValues, System.AsyncCallback callback, object asyncState) + { + string Fahrenheit = ((string)(inValues [0])); + return this.BeginFahrenheitToCelsius (Fahrenheit, callback, asyncState); + } + + private object[] OnEndFahrenheitToCelsius (System.IAsyncResult result) + { + string retVal = this.EndFahrenheitToCelsius (result); + return new object[] { + retVal + }; + } + + private void OnFahrenheitToCelsiusCompleted (object state) + { + if ((this.FahrenheitToCelsiusCompleted != null)) { + InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); + this.FahrenheitToCelsiusCompleted (this, new FahrenheitToCelsiusCompletedEventArgs (e.Results, e.Error, e.Cancelled, e.UserState)); + } + } + + public void FahrenheitToCelsiusAsync (string Fahrenheit) + { + this.FahrenheitToCelsiusAsync (Fahrenheit, null); + } + + public void FahrenheitToCelsiusAsync (string Fahrenheit, object userState) + { + if ((this.onBeginFahrenheitToCelsiusDelegate == null)) { + this.onBeginFahrenheitToCelsiusDelegate = new BeginOperationDelegate (this.OnBeginFahrenheitToCelsius); + } + if ((this.onEndFahrenheitToCelsiusDelegate == null)) { + this.onEndFahrenheitToCelsiusDelegate = new EndOperationDelegate (this.OnEndFahrenheitToCelsius); + } + if ((this.onFahrenheitToCelsiusCompletedDelegate == null)) { + this.onFahrenheitToCelsiusCompletedDelegate = new System.Threading.SendOrPostCallback (this.OnFahrenheitToCelsiusCompleted); + } + base.InvokeAsync (this.onBeginFahrenheitToCelsiusDelegate, new object[] { + Fahrenheit + }, this.onEndFahrenheitToCelsiusDelegate, this.onFahrenheitToCelsiusCompletedDelegate, userState); + } + + [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] + System.IAsyncResult TempConvertSoap.BeginCelsiusToFahrenheit (CelsiusToFahrenheitRequest request, System.AsyncCallback callback, object asyncState) + { + return base.Channel.BeginCelsiusToFahrenheit (request, callback, asyncState); + } + + [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] + private System.IAsyncResult BeginCelsiusToFahrenheit (string Celsius, System.AsyncCallback callback, object asyncState) + { + CelsiusToFahrenheitRequest inValue = new CelsiusToFahrenheitRequest (); + inValue.Body = new CelsiusToFahrenheitRequestBody (); + inValue.Body.Celsius = Celsius; + return ((TempConvertSoap)(this)).BeginCelsiusToFahrenheit (inValue, callback, asyncState); + } + + [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] + CelsiusToFahrenheitResponse TempConvertSoap.EndCelsiusToFahrenheit (System.IAsyncResult result) + { + return base.Channel.EndCelsiusToFahrenheit (result); + } + + [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)] + private string EndCelsiusToFahrenheit (System.IAsyncResult result) + { + CelsiusToFahrenheitResponse retVal = ((TempConvertSoap)(this)).EndCelsiusToFahrenheit (result); + return retVal.Body.CelsiusToFahrenheitResult; + } + + private System.IAsyncResult OnBeginCelsiusToFahrenheit (object[] inValues, System.AsyncCallback callback, object asyncState) + { + string Celsius = ((string)(inValues [0])); + return this.BeginCelsiusToFahrenheit (Celsius, callback, asyncState); + } + + private object[] OnEndCelsiusToFahrenheit (System.IAsyncResult result) + { + string retVal = this.EndCelsiusToFahrenheit (result); + return new object[] { + retVal + }; + } + + private void OnCelsiusToFahrenheitCompleted (object state) + { + if ((this.CelsiusToFahrenheitCompleted != null)) { + InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); + this.CelsiusToFahrenheitCompleted (this, new CelsiusToFahrenheitCompletedEventArgs (e.Results, e.Error, e.Cancelled, e.UserState)); + } + } + + public void CelsiusToFahrenheitAsync (string Celsius) + { + this.CelsiusToFahrenheitAsync (Celsius, null); + } + + public void CelsiusToFahrenheitAsync (string Celsius, object userState) + { + if ((this.onBeginCelsiusToFahrenheitDelegate == null)) { + this.onBeginCelsiusToFahrenheitDelegate = new BeginOperationDelegate (this.OnBeginCelsiusToFahrenheit); + } + if ((this.onEndCelsiusToFahrenheitDelegate == null)) { + this.onEndCelsiusToFahrenheitDelegate = new EndOperationDelegate (this.OnEndCelsiusToFahrenheit); + } + if ((this.onCelsiusToFahrenheitCompletedDelegate == null)) { + this.onCelsiusToFahrenheitCompletedDelegate = new System.Threading.SendOrPostCallback (this.OnCelsiusToFahrenheitCompleted); + } + base.InvokeAsync (this.onBeginCelsiusToFahrenheitDelegate, new object[] { + Celsius + }, this.onEndCelsiusToFahrenheitDelegate, this.onCelsiusToFahrenheitCompletedDelegate, userState); + } + + private System.IAsyncResult OnBeginOpen (object[] inValues, System.AsyncCallback callback, object asyncState) + { + return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen (callback, asyncState); + } + + private object[] OnEndOpen (System.IAsyncResult result) + { + ((System.ServiceModel.ICommunicationObject)(this)).EndOpen (result); + return null; + } + + private void OnOpenCompleted (object state) + { + if ((this.OpenCompleted != null)) { + InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); + this.OpenCompleted (this, new System.ComponentModel.AsyncCompletedEventArgs (e.Error, e.Cancelled, e.UserState)); + } + } + + public void OpenAsync () + { + this.OpenAsync (null); + } + + public void OpenAsync (object userState) + { + if ((this.onBeginOpenDelegate == null)) { + this.onBeginOpenDelegate = new BeginOperationDelegate (this.OnBeginOpen); + } + if ((this.onEndOpenDelegate == null)) { + this.onEndOpenDelegate = new EndOperationDelegate (this.OnEndOpen); + } + if ((this.onOpenCompletedDelegate == null)) { + this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback (this.OnOpenCompleted); + } + base.InvokeAsync (this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState); + } + + private System.IAsyncResult OnBeginClose (object[] inValues, System.AsyncCallback callback, object asyncState) + { + return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose (callback, asyncState); + } + + private object[] OnEndClose (System.IAsyncResult result) + { + ((System.ServiceModel.ICommunicationObject)(this)).EndClose (result); + return null; + } + + private void OnCloseCompleted (object state) + { + if ((this.CloseCompleted != null)) { + InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); + this.CloseCompleted (this, new System.ComponentModel.AsyncCompletedEventArgs (e.Error, e.Cancelled, e.UserState)); + } + } + + public void CloseAsync () + { + this.CloseAsync (null); + } + + public void CloseAsync (object userState) + { + if ((this.onBeginCloseDelegate == null)) { + this.onBeginCloseDelegate = new BeginOperationDelegate (this.OnBeginClose); + } + if ((this.onEndCloseDelegate == null)) { + this.onEndCloseDelegate = new EndOperationDelegate (this.OnEndClose); + } + if ((this.onCloseCompletedDelegate == null)) { + this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback (this.OnCloseCompleted); + } + base.InvokeAsync (this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState); + } + + protected override TempConvertSoap CreateChannel () + { + return new TempConvertSoapClientChannel (this); + } + + private class TempConvertSoapClientChannel : ChannelBase, TempConvertSoap + { + + public TempConvertSoapClientChannel (System.ServiceModel.ClientBase client) : + base (client) + { + } + + public System.IAsyncResult BeginFahrenheitToCelsius (FahrenheitToCelsiusRequest request, System.AsyncCallback callback, object asyncState) + { + object[] _args = new object[1]; + _args [0] = request; + System.IAsyncResult _result = base.BeginInvoke ("FahrenheitToCelsius", _args, callback, asyncState); + return _result; + } + + public FahrenheitToCelsiusResponse EndFahrenheitToCelsius (System.IAsyncResult result) + { + object[] _args = new object[0]; + FahrenheitToCelsiusResponse _result = ((FahrenheitToCelsiusResponse)(base.EndInvoke ("FahrenheitToCelsius", _args, result))); + return _result; + } + + public System.IAsyncResult BeginCelsiusToFahrenheit (CelsiusToFahrenheitRequest request, System.AsyncCallback callback, object asyncState) + { + object[] _args = new object[1]; + _args [0] = request; + System.IAsyncResult _result = base.BeginInvoke ("CelsiusToFahrenheit", _args, callback, asyncState); + return _result; + } + + public CelsiusToFahrenheitResponse EndCelsiusToFahrenheit (System.IAsyncResult result) + { + object[] _args = new object[0]; + CelsiusToFahrenheitResponse _result = ((CelsiusToFahrenheitResponse)(base.EndInvoke ("CelsiusToFahrenheit", _args, result))); + return _result; + } + } +} diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs index a1417e9952..be05c6dfc7 100644 --- a/mcs/class/System/System/Uri.cs +++ b/mcs/class/System/System/Uri.cs @@ -170,9 +170,16 @@ namespace System { } } + // When used instead of UriKind.RelativeOrAbsolute paths such as "/foo" are assumed relative. + const UriKind DotNetRelativeOrAbsolute = (UriKind) 300; + public Uri (string uriString, UriKind uriKind) { source = uriString; + + if (uriString != null && uriKind == DotNetRelativeOrAbsolute) + uriKind = (uriString.StartsWith ("/", StringComparison.Ordinal))? UriKind.Relative : UriKind.RelativeOrAbsolute; + ParseUri (uriKind); switch (uriKind) { @@ -205,6 +212,9 @@ namespace System { return; } + if (uriKind == DotNetRelativeOrAbsolute) + uriKind = (uriString.StartsWith ("/", StringComparison.Ordinal))? UriKind.Relative : UriKind.RelativeOrAbsolute; + if (uriKind != UriKind.RelativeOrAbsolute && uriKind != UriKind.Absolute && uriKind != UriKind.Relative) { diff --git a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs index 7422a1f269..715c748d1f 100644 --- a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs +++ b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs @@ -48,7 +48,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void ServerHandshakeReturnCrapStatusCodeTest () { // On purpose, @@ -65,7 +65,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void ServerHandshakeReturnWrongUpgradeHeader () { #pragma warning disable 4014 @@ -84,7 +84,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void ServerHandshakeReturnWrongConnectionHeader () { #pragma warning disable 4014 @@ -105,7 +105,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // The test hangs when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // The test hangs when ran as part of the entire BCL test suite. Works when only this fixture is ran public void EchoTest () { const string Payload = "This is a websocket test"; @@ -130,7 +130,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void CloseOutputAsyncTest () { Assert.IsTrue (socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000)); @@ -147,7 +147,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void CloseAsyncTest () { Assert.IsTrue (socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000)); @@ -164,7 +164,7 @@ namespace MonoTests.System.Net.WebSockets } [Test, ExpectedException (typeof (ArgumentNullException))] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void SendAsyncArgTest_NoArray () { Assert.IsTrue (socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000)); @@ -178,7 +178,7 @@ namespace MonoTests.System.Net.WebSockets } [Test, ExpectedException (typeof (ArgumentNullException))] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void ReceiveAsyncArgTest_NoArray () { Assert.IsTrue (socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000)); @@ -186,7 +186,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void ReceiveAsyncWrongState_Closed () { try { @@ -201,7 +201,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void SendAsyncWrongState_Closed () { try { @@ -216,7 +216,7 @@ namespace MonoTests.System.Net.WebSockets } [Test] - [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran + [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void SendAsyncWrongState_CloseSent () { try { diff --git a/mcs/class/System/Test/System/UriTest.cs b/mcs/class/System/Test/System/UriTest.cs index e9a92244f6..33484e5326 100644 --- a/mcs/class/System/Test/System/UriTest.cs +++ b/mcs/class/System/Test/System/UriTest.cs @@ -1940,6 +1940,20 @@ namespace MonoTests.System Assert.AreEqual ("id=1%262&sort=asc", escaped, "UriEscaped"); } + // When used, paths such as "/foo" are assumed relative. + static UriKind DotNetRelativeOrAbsolute = (Type.GetType ("Mono.Runtime") == null)? UriKind.RelativeOrAbsolute : (UriKind) 300; + + [Test] + public void DotNetRelativeOrAbsoluteTest () + { + var uri1 = new Uri ("/foo", DotNetRelativeOrAbsolute); + Assert.IsFalse (uri1.IsAbsoluteUri); + + Uri uri2; + Uri.TryCreate("/foo", DotNetRelativeOrAbsolute, out uri2); + Assert.IsFalse (uri2.IsAbsoluteUri); + } + [Test] // Bug #12631 public void LocalPathWithBaseUrl () diff --git a/mcs/class/corlib/System.Diagnostics/StackTrace.cs b/mcs/class/corlib/System.Diagnostics/StackTrace.cs index 721c38ef78..e66221766c 100644 --- a/mcs/class/corlib/System.Diagnostics/StackTrace.cs +++ b/mcs/class/corlib/System.Diagnostics/StackTrace.cs @@ -120,11 +120,6 @@ namespace System.Diagnostics { } public StackTrace (Exception e, int skipFrames, bool fNeedFileInfo) - : this (e, skipFrames, fNeedFileInfo, false) - { - } - - internal StackTrace (Exception e, int skipFrames, bool fNeedFileInfo, bool returnNativeFrames) { if (e == null) throw new ArgumentNullException ("e"); @@ -133,23 +128,6 @@ namespace System.Diagnostics { frames = get_trace (e, skipFrames, fNeedFileInfo); - if (!returnNativeFrames) { - bool resize = false; - for (int i = 0; i < frames.Length; ++i) - if (frames [i].GetMethod () == null) - resize = true; - - if (resize) { - var l = new List (); - - for (int i = 0; i < frames.Length; ++i) - if (frames [i].GetMethod () != null) - l.Add (frames [i]); - - frames = l.ToArray (); - } - } - captured_traces = e.captured_traces; } diff --git a/mcs/class/corlib/System/Exception.cs b/mcs/class/corlib/System/Exception.cs index 19833f0f85..7e99b97ca2 100644 --- a/mcs/class/corlib/System/Exception.cs +++ b/mcs/class/corlib/System/Exception.cs @@ -199,7 +199,7 @@ namespace System /* Not thrown yet */ return null; - StackTrace st = new StackTrace (this, 0, true, true); + StackTrace st = new StackTrace (this, 0, true); return stack_trace = st.ToString (); } } @@ -298,6 +298,7 @@ namespace System { captured_traces = (StackTrace[]) exceptionDispatchInfo.BinaryStackTraceArray; trace_ips = null; + stack_trace = null; } // diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs index 949c7365b9..c9a0048118 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs @@ -12,6 +12,8 @@ using System.Reflection; using System.Reflection.Emit; using System.Runtime.InteropServices; using System.Text; +using System.Diagnostics; +using System.Runtime.ExceptionServices; using NUnit.Framework; @@ -477,6 +479,104 @@ namespace MonoTests.System.Reflection.Emit public string Name; } + class ExceptionHandling_Test_Support + { + public static Exception Caught; + public static string CaughtStackTrace; + + public static void ThrowMe () + { + Caught = null; + CaughtStackTrace = null; + throw new Exception("test"); + } + + public static void Handler (Exception e) + { + Caught = e; + CaughtStackTrace = e.StackTrace.ToString (); + } + } + + [Test] + public void ExceptionHandling () + { + var method = new DynamicMethod ("", typeof(void), new[] { typeof(int) }, typeof (DynamicMethodTest)); + var ig = method.GetILGenerator (); + + ig.BeginExceptionBlock(); + ig.Emit(OpCodes.Call, typeof(ExceptionHandling_Test_Support).GetMethod("ThrowMe")); + + ig.BeginCatchBlock(typeof(Exception)); + ig.Emit(OpCodes.Call, typeof(ExceptionHandling_Test_Support).GetMethod("Handler")); + ig.EndExceptionBlock(); + + ig.Emit(OpCodes.Ret); + + var invoke = (Action) method.CreateDelegate (typeof(Action)); + invoke (456324); + + Assert.IsNotNull (ExceptionHandling_Test_Support.Caught, "#1"); + Assert.AreEqual (2, ExceptionHandling_Test_Support.CaughtStackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.None).Length, "#2"); + + var st = new StackTrace (ExceptionHandling_Test_Support.Caught, 0, true); + + // Caught stack trace when dynamic method is gone + Assert.AreEqual (ExceptionHandling_Test_Support.CaughtStackTrace, st.ToString (), "#3"); + + // Catch handler stack trace inside dynamic method match + Assert.AreEqual (ExceptionHandling_Test_Support.Caught.StackTrace, st.ToString (), "#4"); + } + + class ExceptionHandlingWithExceptionDispatchInfo_Test_Support + { + public static Exception Caught; + public static string CaughtStackTrace; + + public static void ThrowMe () + { + Caught = null; + CaughtStackTrace = null; + + Exception e; + try { + throw new Exception("test"); + } catch (Exception e2) { + e = e2; + } + + var edi = ExceptionDispatchInfo.Capture(e); + + edi.Throw(); + } + + public static void Handler (Exception e) + { + var split = e.StackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + Assert.AreEqual (5, split.Length, "#1"); + Assert.IsTrue (split [1].Contains ("---"), "#2"); + } + } + + [Test] + public void ExceptionHandlingWithExceptionDispatchInfo () + { + var method = new DynamicMethod ("", typeof(void), new[] { typeof(int) }, typeof (DynamicMethodTest)); + var ig = method.GetILGenerator (); + + ig.BeginExceptionBlock(); + ig.Emit(OpCodes.Call, typeof(ExceptionHandlingWithExceptionDispatchInfo_Test_Support).GetMethod("ThrowMe")); + + ig.BeginCatchBlock(typeof(Exception)); + ig.Emit(OpCodes.Call, typeof(ExceptionHandlingWithExceptionDispatchInfo_Test_Support).GetMethod("Handler")); + ig.EndExceptionBlock(); + + ig.Emit(OpCodes.Ret); + + var invoke = (Action) method.CreateDelegate (typeof(Action)); + invoke (444); + } + #if !MONODROID // RUNTIME: crash [Test] diff --git a/mcs/class/corlib/Test/System.Runtime.ExceptionServices/ExceptionDispatchInfoTest.cs b/mcs/class/corlib/Test/System.Runtime.ExceptionServices/ExceptionDispatchInfoTest.cs index bd5e8dad94..9c566b4baf 100644 --- a/mcs/class/corlib/Test/System.Runtime.ExceptionServices/ExceptionDispatchInfoTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.ExceptionServices/ExceptionDispatchInfoTest.cs @@ -165,7 +165,7 @@ namespace MonoTests.System.Runtime.ExceptionServices } } catch (Exception ex) { var st = new StackTrace (ex, true); - var split = ex.StackTrace.Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + var split = st.ToString ().Split (new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); Assert.AreEqual (4, split.Length, "#1"); Assert.IsTrue (split [1].Contains ("---"), "#2"); } diff --git a/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id index 49ed75b0c2..84727b7e9f 100644 --- a/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -8989927fb604b8ca8467922e3dd5c67c74761f5c \ No newline at end of file +80ad68773619189fd92720dfc4be4dc88e96837d \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id index 8a94a94d00..e7ffba6fb4 100644 --- a/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -a55ad8f540597ae0a40e9962f76193e6c788be48 \ No newline at end of file +c1b008b9b65aea06d591cf25fb0b8e290e1e8103 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.dll.REMOVED.git-id index 7dc5b381c3..8b655f2a64 100644 --- a/mcs/class/lib/monolite/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.dll.REMOVED.git-id @@ -1 +1 @@ -b8cea6dcffe27a5b0a143aebedac463756863910 \ No newline at end of file +efb429e450136e909b0edfdffcf39c51066a5d82 \ No newline at end of file diff --git a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id index 6d55633ea7..0b136c4339 100644 --- a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id @@ -1 +1 @@ -2a1000922df13cc892dd88a838f0cc92bba9af6d \ No newline at end of file +23172d2e452014cf90875324e9178ca360a9b996 \ No newline at end of file diff --git a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id index 840e6888ba..306f3eb3ab 100644 --- a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -4f955ac352d4d8d8f68953655b52e324d3c925b0 \ No newline at end of file +8b05839479cc274cab0914bae666e7d6d62f6c09 \ No newline at end of file diff --git a/mcs/mcs/assembly.cs b/mcs/mcs/assembly.cs index dd5af06406..38866e2660 100644 --- a/mcs/mcs/assembly.cs +++ b/mcs/mcs/assembly.cs @@ -873,8 +873,10 @@ namespace Mono.CSharp } else { Builder.Save (module.Builder.ScopeName, pekind, machine); } + } catch (ArgumentOutOfRangeException) { + Report.Error (16, "Output file `{0}' exceeds the 4GB limit"); } catch (Exception e) { - Report.Error (16, "Could not write to file `" + name + "', cause: " + e.Message); + Report.Error (16, "Could not write to file `{0}'. {1}", name, e.Message); } Compiler.TimeReporter.Stop (TimeReporter.TimerType.OutputSave); diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c index 005416dcf3..ffa38f3f1c 100644 --- a/mono/io-layer/processes.c +++ b/mono/io-layer/processes.c @@ -2202,6 +2202,11 @@ get_module_filename (gpointer process, gpointer module, char *path; gunichar2 *proc_path; + size *= sizeof (gunichar2); /* adjust for unicode characters */ + + if (basename == NULL || size == 0) + return 0; + pid = GetProcessId (process); path = wapi_process_get_path (pid); @@ -2209,6 +2214,8 @@ get_module_filename (gpointer process, gpointer module, return 0; proc_path = mono_unicode_from_external (path, &bytes); + g_free (path); + if (proc_path == NULL) return 0; @@ -2228,6 +2235,8 @@ get_module_filename (gpointer process, gpointer module, memcpy (basename, proc_path, bytes); } + g_free (proc_path); + return len; } diff --git a/mono/metadata/process.c b/mono/metadata/process.c index 658e43639a..7f5d62f079 100644 --- a/mono/metadata/process.c +++ b/mono/metadata/process.c @@ -534,16 +534,6 @@ MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject mono_array_setref (arr, i, mono_array_get (temp_arr, MonoObject*, i)); } - if (count == num_added) { - arr = temp_arr; - } else { - /* shorter version of the array */ - arr = mono_array_new (mono_domain_get (), proc_class, num_added); - - for (i = 0; i < num_added; i++) - mono_array_setref (arr, i, mono_array_get (temp_arr, MonoObject*, i)); - } - return arr; } diff --git a/mono/metadata/sgen-client-mono.h b/mono/metadata/sgen-client-mono.h index 2847011dc2..ede6e48ba4 100644 --- a/mono/metadata/sgen-client-mono.h +++ b/mono/metadata/sgen-client-mono.h @@ -103,6 +103,30 @@ enum { INTERNAL_MEM_MAX }; +static inline mword +sgen_mono_array_size (GCVTable vtable, MonoArray *array, mword *bounds_size, mword descr) +{ + mword size, size_without_bounds; + int element_size; + + if ((descr & DESC_TYPE_MASK) == DESC_TYPE_VECTOR) + element_size = ((descr) >> VECTOR_ELSIZE_SHIFT) & MAX_ELEMENT_SIZE; + else + element_size = vtable->klass->sizes.element_size; + + size_without_bounds = size = sizeof (MonoArray) + element_size * mono_array_length_fast (array); + + if (G_UNLIKELY (array->bounds)) { + size += sizeof (mono_array_size_t) - 1; + size &= ~(sizeof (mono_array_size_t) - 1); + size += sizeof (MonoArrayBounds) * vtable->klass->rank; + } + + if (bounds_size) + *bounds_size = size - size_without_bounds; + return size; +} + #define SGEN_CLIENT_OBJECT_HEADER_SIZE (sizeof (GCObject)) #define SGEN_CLIENT_MINIMUM_OBJECT_SIZE SGEN_CLIENT_OBJECT_HEADER_SIZE @@ -118,14 +142,7 @@ sgen_client_slow_object_get_size (GCVTable vtable, GCObject* o) if (klass == mono_defaults.string_class) { return G_STRUCT_OFFSET (MonoString, chars) + 2 * mono_string_length_fast ((MonoString*) o) + 2; } else if (klass->rank) { - MonoArray *array = (MonoArray*)o; - size_t size = sizeof (MonoArray) + klass->sizes.element_size * mono_array_length_fast (array); - if (G_UNLIKELY (array->bounds)) { - size += sizeof (mono_array_size_t) - 1; - size &= ~(sizeof (mono_array_size_t) - 1); - size += sizeof (MonoArrayBounds) * klass->rank; - } - return size; + return sgen_mono_array_size (vtable, (MonoArray*)o, NULL, 0); } else { /* from a created object: the class must be inited already */ return klass->instance_size; @@ -150,20 +167,7 @@ sgen_client_par_object_get_size (GCVTable vtable, GCObject* o) } else if (descr == SGEN_DESC_STRING) { return G_STRUCT_OFFSET (MonoString, chars) + 2 * mono_string_length_fast ((MonoString*) o) + 2; } else if (type == DESC_TYPE_VECTOR) { - int element_size = ((descr) >> VECTOR_ELSIZE_SHIFT) & MAX_ELEMENT_SIZE; - MonoArray *array = (MonoArray*)o; - size_t size = sizeof (MonoArray) + element_size * mono_array_length_fast (array); - - /* - * Non-vector arrays with a single dimension whose lower bound is zero are - * allocated without bounds. - */ - if ((descr & VECTOR_KIND_ARRAY) && array->bounds) { - size += sizeof (mono_array_size_t) - 1; - size &= ~(sizeof (mono_array_size_t) - 1); - size += sizeof (MonoArrayBounds) * ((MonoVTable*)vtable)->klass->rank; - } - return size; + return sgen_mono_array_size (vtable, (MonoArray*)o, NULL, descr); } return sgen_client_slow_object_get_size (vtable, o); diff --git a/mono/metadata/sgen-mono.c b/mono/metadata/sgen-mono.c index 9363487522..b836a839b9 100644 --- a/mono/metadata/sgen-mono.c +++ b/mono/metadata/sgen-mono.c @@ -1594,15 +1594,17 @@ sgen_client_cardtable_scan_object (GCObject *obj, mword block_obj_size, guint8 * SGEN_ASSERT (0, SGEN_VTABLE_HAS_REFERENCES (vt), "Why would we ever call this on reference-free objects?"); if (vt->rank) { + MonoArray *arr = (MonoArray*)obj; guint8 *card_data, *card_base; guint8 *card_data_end; char *obj_start = sgen_card_table_align_pointer (obj); - mword obj_size = sgen_client_par_object_get_size (vt, obj); - char *obj_end = (char*)obj + obj_size; + mword bounds_size; + mword obj_size = sgen_mono_array_size (vt, arr, &bounds_size, sgen_vtable_get_descriptor (vt)); + /* We don't want to scan the bounds entries at the end of multidimensional arrays */ + char *obj_end = (char*)obj + obj_size - bounds_size; size_t card_count; size_t extra_idx = 0; - MonoArray *arr = (MonoArray*)obj; mword desc = (mword)klass->element_class->gc_descr; int elem_size = mono_array_element_size (klass); diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am index fe14e37085..0370f52cc1 100644 --- a/mono/mini/Makefile.am +++ b/mono/mini/Makefile.am @@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \ Makefile.am.in version.h: Makefile - echo "#define FULL_VERSION \"Stable 4.2.0.179/a224653\"" > version.h + echo "#define FULL_VERSION \"Stable 4.2.0.207/2701b19\"" > version.h # Utility target for patching libtool to speed up linking patch-libtool: diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in index fe14e37085..0370f52cc1 100755 --- a/mono/mini/Makefile.am.in +++ b/mono/mini/Makefile.am.in @@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \ Makefile.am.in version.h: Makefile - echo "#define FULL_VERSION \"Stable 4.2.0.179/a224653\"" > version.h + echo "#define FULL_VERSION \"Stable 4.2.0.207/2701b19\"" > version.h # Utility target for patching libtool to speed up linking patch-libtool: diff --git a/mono/mini/Makefile.in.REMOVED.git-id b/mono/mini/Makefile.in.REMOVED.git-id index f8ff95679d..56293f57a6 100644 --- a/mono/mini/Makefile.in.REMOVED.git-id +++ b/mono/mini/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -ca69c875348787c45a14730f1e90051c3da6f74f \ No newline at end of file +3067f960d61f7e500f6a1568f95ac6b739298ae5 \ No newline at end of file diff --git a/mono/mini/debugger-agent.c.REMOVED.git-id b/mono/mini/debugger-agent.c.REMOVED.git-id index 52419ef279..05428309b2 100644 --- a/mono/mini/debugger-agent.c.REMOVED.git-id +++ b/mono/mini/debugger-agent.c.REMOVED.git-id @@ -1 +1 @@ -2a52f825d9bef37957ef6702c8f691ee8b61c831 \ No newline at end of file +39d38dab51642f90e7abc6171668bf4f7ceac01c \ No newline at end of file diff --git a/mono/mini/gshared.cs b/mono/mini/gshared.cs index 2f60cb7021..f5ee9bbbf6 100644 --- a/mono/mini/gshared.cs +++ b/mono/mini/gshared.cs @@ -1300,6 +1300,7 @@ public class Tests interface IFaceBox { object box (T t); + bool is_null (T t); } class ClassBox : IFaceBox { @@ -1307,6 +1308,12 @@ public class Tests object o = t; return o; } + + public bool is_null (T t) { + if (!(default(T) == null)) + return false; + return true; + } } public static int test_0_nullable_box () { @@ -1329,6 +1336,15 @@ public class Tests return 0; } + public static int test_0_nullable_box_brtrue_opt () { + IFaceBox c = new ClassBox (); + + if (c.is_null (null)) + return 0; + else + return 1; + } + interface IFaceUnbox2 { T unbox (object o); } diff --git a/mono/mini/method-to-ir.c.REMOVED.git-id b/mono/mini/method-to-ir.c.REMOVED.git-id index 692b8351d2..1fd94178a0 100644 --- a/mono/mini/method-to-ir.c.REMOVED.git-id +++ b/mono/mini/method-to-ir.c.REMOVED.git-id @@ -1 +1 @@ -27a91b1add7366b9c9316d9ee7cc45c8a3a407e5 \ No newline at end of file +8901046041bb65808a7d99cb9b185596c7be01c5 \ No newline at end of file diff --git a/mono/mini/mini-darwin.c b/mono/mini/mini-darwin.c index cb7a975f9d..9c1e46ed82 100644 --- a/mono/mini/mini-darwin.c +++ b/mono/mini/mini-darwin.c @@ -250,12 +250,14 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid) FILE *commands; gboolean using_lldb = FALSE; + using_lldb = TRUE; + /* argv [0] = g_find_program_in_path ("gdb"); - if (!argv [0]) { - // FIXME: LLDB doesn't quit when given the 'quit' command - //argv [0] = g_find_program_in_path ("lldb"); - //using_lldb = TRUE; - } + if (!argv [0]) + using_lldb = TRUE; + */ + if (using_lldb) + argv [0] = g_find_program_in_path ("lldb"); if (argv [0] == NULL) return; @@ -286,6 +288,8 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid) fflush (commands); fclose (commands); + fclose (stdin); + execv (argv [0], (char**)argv); unlink (template); } diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c index ed7d68a93a..95b60f61a1 100644 --- a/mono/mini/mini-exceptions.c +++ b/mono/mini/mini-exceptions.c @@ -618,50 +618,6 @@ mono_exception_walk_trace (MonoException *ex, MonoExceptionFrameWalk func, gpoin return len > 0; } -MonoString * -ves_icall_System_Exception_get_trace (MonoException *ex) -{ - MonoDomain *domain = mono_domain_get (); - MonoString *res; - MonoArray *ta = ex->trace_ips; - int i, len; - GString *trace_str; - - if (ta == NULL) - /* Exception is not thrown yet */ - return NULL; - - len = mono_array_length (ta) >> 1; - trace_str = g_string_new (""); - for (i = 0; i < len; i++) { - MonoJitInfo *ji; - gpointer ip = mono_array_get (ta, gpointer, i * 2 + 0); - gpointer generic_info = mono_array_get (ta, gpointer, i * 2 + 1); - - ji = mono_jit_info_table_find (domain, ip); - if (ji == NULL) { - /* Unmanaged frame */ - g_string_append_printf (trace_str, "in (unmanaged) %p\n", ip); - } else { - gchar *location; - gint32 address; - MonoMethod *method = get_method_from_stack_frame (ji, generic_info); - - address = (char *)ip - (char *)ji->code_start; - location = mono_debug_print_stack_frame ( - method, address, ex->object.vtable->domain); - - g_string_append_printf (trace_str, "%s\n", location); - g_free (location); - } - } - - res = mono_string_new (ex->object.vtable->domain, trace_str->str); - g_string_free (trace_str, TRUE); - - return res; -} - MonoArray * ves_icall_get_trace (MonoException *exc, gint32 skip, MonoBoolean need_file_info) { @@ -1191,9 +1147,6 @@ build_native_trace (void) trace_ips = g_list_reverse (trace_ips); \ MONO_OBJECT_SETREF (mono_ex, trace_ips, glist_to_array (trace_ips, mono_defaults.int_class)); \ MONO_OBJECT_SETREF (mono_ex, native_trace_ips, build_native_trace ()); \ - if (has_dynamic_methods) \ - /* These methods could go away anytime, so compute the stack trace now */ \ - MONO_OBJECT_SETREF (mono_ex, stack_trace, ves_icall_System_Exception_get_trace (mono_ex)); \ } \ g_list_free (trace_ips); \ trace_ips = NULL; \ diff --git a/mono/mini/mini-runtime.c.REMOVED.git-id b/mono/mini/mini-runtime.c.REMOVED.git-id index 2fed11bad1..179a865653 100644 --- a/mono/mini/mini-runtime.c.REMOVED.git-id +++ b/mono/mini/mini-runtime.c.REMOVED.git-id @@ -1 +1 @@ -c870782f0d4657331dc5c35647ccd1889a8eb124 \ No newline at end of file +8b14d1f670c108df89e59f0ab80f793a259597e1 \ No newline at end of file diff --git a/mono/mini/mini-x86.c.REMOVED.git-id b/mono/mini/mini-x86.c.REMOVED.git-id index 35434cb26b..7836266c40 100644 --- a/mono/mini/mini-x86.c.REMOVED.git-id +++ b/mono/mini/mini-x86.c.REMOVED.git-id @@ -1 +1 @@ -6b5def572a57ab04f15d8fa150e09fa60f431cf4 \ No newline at end of file +027aa259a942beaf7c3ed1fd6d29387d9ce70ae9 \ No newline at end of file diff --git a/mono/mini/mini.h.REMOVED.git-id b/mono/mini/mini.h.REMOVED.git-id index 3d171812ac..8d398b8252 100644 --- a/mono/mini/mini.h.REMOVED.git-id +++ b/mono/mini/mini.h.REMOVED.git-id @@ -1 +1 @@ -b0a5b2c287cb2b0e774c16233bb254dcd05b777e \ No newline at end of file +1cbbf289bd0e3394b2850dfd3d558327f35ec6cc \ No newline at end of file diff --git a/mono/mini/version.h b/mono/mini/version.h index e5558d29f7..7fcd700119 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "Stable 4.2.0.179/a224653" +#define FULL_VERSION "Stable 4.2.0.207/2701b19" diff --git a/mono/profiler/decode.c.REMOVED.git-id b/mono/profiler/decode.c.REMOVED.git-id index 021b69b385..43969f187d 100644 --- a/mono/profiler/decode.c.REMOVED.git-id +++ b/mono/profiler/decode.c.REMOVED.git-id @@ -1 +1 @@ -9924906bd90e625e238e6ca9ad03893a171431f1 \ No newline at end of file +0df2d3cd1af74d33f445fa11a8beaef0d820a95e \ No newline at end of file diff --git a/mono/profiler/proflog.c.REMOVED.git-id b/mono/profiler/proflog.c.REMOVED.git-id index 09a807be4b..7ee35f0322 100644 --- a/mono/profiler/proflog.c.REMOVED.git-id +++ b/mono/profiler/proflog.c.REMOVED.git-id @@ -1 +1 @@ -50fc30913bc08a4bfbc14f0b0bd30d36c2273512 \ No newline at end of file +549a7cf0c9085eb4b819e7233c09a5a5fedb2835 \ No newline at end of file diff --git a/mono/profiler/proflog.h b/mono/profiler/proflog.h index a2c0fb25f1..8fc22e4328 100644 --- a/mono/profiler/proflog.h +++ b/mono/profiler/proflog.h @@ -24,6 +24,7 @@ load/unload for contexts load/unload/name for assemblies removed TYPE_LOAD_ERR flag (profiler never generated it, now removed from the format itself) + added TYPE_GC_HANDLE_{CREATED,DESTROYED}_BT */ enum { @@ -56,8 +57,10 @@ enum { TYPE_GC_EVENT = 1 << 4, TYPE_GC_RESIZE = 2 << 4, TYPE_GC_MOVE = 3 << 4, - TYPE_GC_HANDLE_CREATED = 4 << 4, - TYPE_GC_HANDLE_DESTROYED = 5 << 4, + TYPE_GC_HANDLE_CREATED = 4 << 4, + TYPE_GC_HANDLE_DESTROYED = 5 << 4, + TYPE_GC_HANDLE_CREATED_BT = 6 << 4, + TYPE_GC_HANDLE_DESTROYED_BT = 7 << 4, /* extended type for TYPE_METHOD */ TYPE_LEAVE = 1 << 4, TYPE_ENTER = 2 << 4, diff --git a/mono/sgen/sgen-gc.c.REMOVED.git-id b/mono/sgen/sgen-gc.c.REMOVED.git-id index 8a36669511..a7a6677a39 100644 --- a/mono/sgen/sgen-gc.c.REMOVED.git-id +++ b/mono/sgen/sgen-gc.c.REMOVED.git-id @@ -1 +1 @@ -a24badfaf7c185d8a870932a9ed92ad26f23face \ No newline at end of file +21fd9dab9e70d3456026645e195f183d4ffb2739 \ No newline at end of file diff --git a/mono/sgen/sgen-marksweep.c b/mono/sgen/sgen-marksweep.c index fe3ab1a174..96444b1dc6 100644 --- a/mono/sgen/sgen-marksweep.c +++ b/mono/sgen/sgen-marksweep.c @@ -739,7 +739,11 @@ free_pinned_object (GCObject *obj, size_t size) static GCObject* major_alloc_degraded (GCVTable vtable, size_t size) { - GCObject *obj = alloc_obj (vtable, size, FALSE, SGEN_VTABLE_HAS_REFERENCES (vtable)); + GCObject *obj; + + major_finish_sweep_checking (); + + obj = alloc_obj (vtable, size, FALSE, SGEN_VTABLE_HAS_REFERENCES (vtable)); if (G_LIKELY (obj)) { HEAVY_STAT (++stat_objects_alloced_degraded); HEAVY_STAT (stat_bytes_alloced_degraded += size); diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index 27e925ed4e..2b8a9a65c5 100644 Binary files a/po/mcs/de.gmo and b/po/mcs/de.gmo differ diff --git a/po/mcs/de.po.REMOVED.git-id b/po/mcs/de.po.REMOVED.git-id index 33969eaaa6..3b0279582b 100644 --- a/po/mcs/de.po.REMOVED.git-id +++ b/po/mcs/de.po.REMOVED.git-id @@ -1 +1 @@ -86828524c5d2a46b02871c3eaafad72a3dae1661 \ No newline at end of file +dc74e599a1f3c5e89094b9b6c8057036541df8d1 \ No newline at end of file diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index d5833d3d37..86466c7ebc 100644 Binary files a/po/mcs/es.gmo and b/po/mcs/es.gmo differ diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index 0b3a7ecc25..7d2aa49c8f 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -43d0cea6d290f453ffb0ffb6b61d053049084591 \ No newline at end of file +82cdd3579ebdae8e40b3dc44480d7a9a4ac7d76e \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index 55a1de269a..a991cd55c5 100644 Binary files a/po/mcs/ja.gmo and b/po/mcs/ja.gmo differ diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index e43566906b..697bccbb0a 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -a11600cab4cf16c5ca3d3632e1a2b9de2c315435 \ No newline at end of file +b1e2b48686200b30de548c5ed12a4b756ae403a7 \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index db7959b5c9..609d9f48c6 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: mono 4.2.0\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2015-08-26 05:54-0400\n" +"POT-Creation-Date: 2015-09-02 12:15-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -235,57 +235,63 @@ msgid "Error reading resource file `{0}'" msgstr "" #: mcs/mcs/assembly.cs:877 -msgid "Could not write to file `" +#, csharp-format +msgid "Output file `{0}' exceeds the 4GB limit" msgstr "" -#: mcs/mcs/assembly.cs:921 +#: mcs/mcs/assembly.cs:879 +#, csharp-format +msgid "Could not write to file `{0}'. {1}" +msgstr "" + +#: mcs/mcs/assembly.cs:923 msgid "Cannot specify -main if building a module or library" msgstr "" -#: mcs/mcs/assembly.cs:947 +#: mcs/mcs/assembly.cs:949 #, csharp-format msgid "Could not find `{0}' specified for Main method" msgstr "" -#: mcs/mcs/assembly.cs:953 +#: mcs/mcs/assembly.cs:955 #, csharp-format msgid "`{0}' specified for Main method must be a valid class or struct" msgstr "" -#: mcs/mcs/assembly.cs:957 +#: mcs/mcs/assembly.cs:959 #, csharp-format msgid "`{0}' does not have a suitable static Main method" msgstr "" -#: mcs/mcs/assembly.cs:960 +#: mcs/mcs/assembly.cs:962 #, csharp-format msgid "" "Program `{0}' does not contain a static `Main' method suitable for an entry " "point" msgstr "" -#: mcs/mcs/assembly.cs:979 +#: mcs/mcs/assembly.cs:981 msgid "Error during assembly signing. " msgstr "" -#: mcs/mcs/assembly.cs:1164 +#: mcs/mcs/assembly.cs:1166 #, csharp-format msgid "Metadata file `{0}' could not be found" msgstr "" -#: mcs/mcs/assembly.cs:1169 +#: mcs/mcs/assembly.cs:1171 #, csharp-format msgid "Metadata file `{0}' does not contain valid metadata" msgstr "" -#: mcs/mcs/assembly.cs:1175 +#: mcs/mcs/assembly.cs:1177 #, csharp-format msgid "" "Referenced assembly file `{0}' is a module. Consider using `-addmodule' " "option to add the module" msgstr "" -#: mcs/mcs/assembly.cs:1182 +#: mcs/mcs/assembly.cs:1184 #, csharp-format msgid "" "Added module file `{0}' is an assembly. Consider using `-r' option to " diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index 66a3c4a7e1..e4d39d9408 100644 Binary files a/po/mcs/pt_BR.gmo and b/po/mcs/pt_BR.gmo differ diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index 4f5950cca3..b17944fd91 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -82b69c85aca927c81e94cd309004ba2205fc0cd8 \ No newline at end of file +8c07e6b82de635b8d95e371e308081ec6ead465e \ No newline at end of file diff --git a/support/errno.c b/support/errno.c index 384451da47..74c2fdf564 100644 --- a/support/errno.c +++ b/support/errno.c @@ -35,7 +35,7 @@ Mono_Posix_Stdlib_SetLastError (int error_number) * we assume that the XPG version is present. */ -#ifdef _GNU_SOURCE && !PLATFORM_ANDROID +#ifdef _GNU_SOURCE #define mph_min(x,y) ((x) <= (y) ? (x) : (y)) /* If you pass an invalid errno value to glibc 2.3.2's strerror_r, you get