mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-21 07:39:30 -10:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e66d9abbb2 | ||
|
|
1f4613aa1a | ||
|
|
d092ad186f | ||
|
|
c6605763a3 | ||
|
|
0fb4040ef1 | ||
|
|
fea2566b12 | ||
|
|
f3c9015ec4 | ||
|
|
0429840e5b | ||
|
|
28d71e9727 | ||
|
|
f1bca3dc5b |
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [5.4.0],
|
||||
AC_INIT(mono, [5.4.1],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace Mono.Net.Security
|
||||
|
||||
if (Interlocked.Exchange (ref WriteRequested, 0) != 0) {
|
||||
// Flush the write queue.
|
||||
await Parent.InnerWrite (RunSynchronously, cancellationToken).ConfigureAwait (false);
|
||||
await Parent.InnerWrite (RunSynchronously, cancellationToken);
|
||||
}
|
||||
|
||||
Debug ("ProcessOperation done: {0} -> {1}", status, newStatus);
|
||||
|
||||
@@ -901,33 +901,6 @@ namespace System.Net
|
||||
internal int EndRead (HttpWebRequest request, IAsyncResult result)
|
||||
{
|
||||
Stream s = null;
|
||||
Exception exception = null;
|
||||
|
||||
lock (this) {
|
||||
s = nstream;
|
||||
}
|
||||
|
||||
int nbytes = 0;
|
||||
bool done = false;
|
||||
WebAsyncResult wr = null;
|
||||
IAsyncResult nsAsync = ((WebAsyncResult) result).InnerAsyncResult;
|
||||
try {
|
||||
if (chunkedRead && (nsAsync is WebAsyncResult)) {
|
||||
wr = (WebAsyncResult) nsAsync;
|
||||
IAsyncResult inner = wr.InnerAsyncResult;
|
||||
if (inner != null && !(inner is WebAsyncResult)) {
|
||||
nbytes = s.EndRead (inner);
|
||||
done = nbytes == 0;
|
||||
}
|
||||
} else if (!(nsAsync is WebAsyncResult)) {
|
||||
nbytes = s.EndRead (nsAsync);
|
||||
wr = (WebAsyncResult) result;
|
||||
done = nbytes == 0;
|
||||
}
|
||||
} catch (Exception exc) {
|
||||
exception = exc;
|
||||
}
|
||||
|
||||
lock (this) {
|
||||
if (request.Aborted)
|
||||
throw new WebException ("Request aborted", WebExceptionStatus.RequestCanceled);
|
||||
@@ -935,10 +908,25 @@ namespace System.Net
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
if (nstream == null)
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
s = nstream;
|
||||
}
|
||||
|
||||
if (exception != null)
|
||||
throw exception;
|
||||
int nbytes = 0;
|
||||
bool done = false;
|
||||
WebAsyncResult wr = null;
|
||||
IAsyncResult nsAsync = ((WebAsyncResult) result).InnerAsyncResult;
|
||||
if (chunkedRead && (nsAsync is WebAsyncResult)) {
|
||||
wr = (WebAsyncResult) nsAsync;
|
||||
IAsyncResult inner = wr.InnerAsyncResult;
|
||||
if (inner != null && !(inner is WebAsyncResult)) {
|
||||
nbytes = s.EndRead (inner);
|
||||
done = nbytes == 0;
|
||||
}
|
||||
} else if (!(nsAsync is WebAsyncResult)) {
|
||||
nbytes = s.EndRead (nsAsync);
|
||||
wr = (WebAsyncResult) result;
|
||||
done = nbytes == 0;
|
||||
}
|
||||
|
||||
if (chunkedRead) {
|
||||
try {
|
||||
@@ -1041,24 +1029,6 @@ namespace System.Net
|
||||
internal bool EndWrite (HttpWebRequest request, bool throwOnError, IAsyncResult result)
|
||||
{
|
||||
Stream s = null;
|
||||
WebExceptionStatus newStatus = status;
|
||||
bool complete;
|
||||
Exception exception = null;
|
||||
|
||||
lock (this) {
|
||||
s = nstream;
|
||||
}
|
||||
|
||||
try {
|
||||
s.EndWrite (result);
|
||||
complete = true;
|
||||
} catch (Exception exc) {
|
||||
newStatus = WebExceptionStatus.SendFailure;
|
||||
if (throwOnError && exc.InnerException != null)
|
||||
exception = exc.InnerException;
|
||||
complete = false;
|
||||
}
|
||||
|
||||
lock (this) {
|
||||
if (status == WebExceptionStatus.RequestCanceled)
|
||||
return true;
|
||||
@@ -1066,12 +1036,18 @@ namespace System.Net
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
if (nstream == null)
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
s = nstream;
|
||||
}
|
||||
|
||||
status = newStatus;
|
||||
if (exception != null)
|
||||
throw exception;
|
||||
return complete;
|
||||
try {
|
||||
s.EndWrite (result);
|
||||
return true;
|
||||
} catch (Exception exc) {
|
||||
status = WebExceptionStatus.SendFailure;
|
||||
if (throwOnError && exc.InnerException != null)
|
||||
throw exc.InnerException;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
internal int Read (HttpWebRequest request, byte [] buffer, int offset, int size)
|
||||
@@ -1156,6 +1132,7 @@ namespace System.Net
|
||||
try {
|
||||
nstream.Close ();
|
||||
} catch {}
|
||||
nstream = null;
|
||||
}
|
||||
|
||||
if (socket != null) {
|
||||
|
||||
@@ -524,11 +524,13 @@ namespace MonoTests.System.Reflection.Emit
|
||||
|
||||
}
|
||||
|
||||
public class Base {
|
||||
public class Base<T> {
|
||||
public int x;
|
||||
|
||||
public void M () { }
|
||||
}
|
||||
|
||||
public class Derived : Base {
|
||||
public class Derived : Base<string> {
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -540,7 +542,7 @@ namespace MonoTests.System.Reflection.Emit
|
||||
//
|
||||
// Regression test for bugzilla #59364
|
||||
|
||||
var f1 = typeof (Base).GetField ("x");
|
||||
var f1 = typeof (Base<string>).GetField ("x");
|
||||
var f2 = typeof (Derived).GetField ("x");
|
||||
|
||||
var value_getter = typeof (RuntimeFieldHandle).GetProperty("Value").GetMethod;
|
||||
@@ -572,5 +574,42 @@ namespace MonoTests.System.Reflection.Emit
|
||||
Assert.AreEqual ("1", s);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MethodSpecTokenSame () {
|
||||
DefineBasicMethod ();
|
||||
// Get the same method from a base generic instance and
|
||||
// a type derived from it so that the
|
||||
// MemberInfo:DeclaredType differs but the tokens are
|
||||
// the same.
|
||||
//
|
||||
// Regression test for bugzilla #60233
|
||||
|
||||
var m1 = typeof (Base<string>).GetMethod ("M");
|
||||
var m2 = typeof (Derived).GetMethod ("M");
|
||||
|
||||
var il = il_gen;
|
||||
|
||||
var loc = il.DeclareLocal (typeof (Derived));
|
||||
|
||||
il.Emit (OpCodes.Newobj, typeof (Derived).GetConstructor(new Type[]{}));
|
||||
il.Emit (OpCodes.Stloc, loc);
|
||||
il.Emit (OpCodes.Ldloc, loc);
|
||||
il.Emit (OpCodes.Call, m1);
|
||||
il.Emit (OpCodes.Ldloc, loc);
|
||||
il.Emit (OpCodes.Call, m2);
|
||||
il.Emit (OpCodes.Ldstr, "1");
|
||||
il.Emit (OpCodes.Ret);
|
||||
|
||||
var baked = tb.CreateType ();
|
||||
|
||||
var x = Activator.CreateInstance (baked);
|
||||
var m = baked.GetMethod ("F");
|
||||
|
||||
var s = m.Invoke (x, null);
|
||||
|
||||
Assert.AreEqual ("1", s);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -204,9 +204,12 @@ mono_dynamic_image_register_token (MonoDynamicImage *assembly, guint32 token, Mo
|
||||
if (prev) {
|
||||
switch (how_collide) {
|
||||
case MONO_DYN_IMAGE_TOK_NEW:
|
||||
g_assert_not_reached ();
|
||||
g_warning ("%s: Unexpected previous object when called with MONO_DYN_IMAGE_TOK_NEW", __func__);
|
||||
break;
|
||||
case MONO_DYN_IMAGE_TOK_SAME_OK:
|
||||
g_assert (prev == MONO_HANDLE_RAW (obj));
|
||||
if (prev != MONO_HANDLE_RAW (obj)) {
|
||||
g_warning ("%s: condition `prev == MONO_HANDLE_RAW (obj)' not met", __func__);
|
||||
}
|
||||
break;
|
||||
case MONO_DYN_IMAGE_TOK_REPLACE:
|
||||
break;
|
||||
|
||||
+9
-3
@@ -1149,9 +1149,15 @@ mono_image_create_token (MonoDynamicImage *assembly, MonoObjectHandle obj,
|
||||
MonoReflectionMethodHandle m = MONO_HANDLE_CAST (MonoReflectionMethod, obj);
|
||||
MonoMethod *method = MONO_HANDLE_GETVAL (m, method);
|
||||
if (method->is_inflated) {
|
||||
if (create_open_instance)
|
||||
token = mono_image_get_methodspec_token (assembly, method);
|
||||
else
|
||||
if (create_open_instance) {
|
||||
guint32 methodspec_token = mono_image_get_methodspec_token (assembly, method);
|
||||
MonoReflectionMethodHandle canonical_obj =
|
||||
mono_method_get_object_handle (MONO_HANDLE_DOMAIN (obj), method, NULL, error);
|
||||
if (!is_ok (error))
|
||||
goto leave;
|
||||
MONO_HANDLE_ASSIGN (register_obj, canonical_obj);
|
||||
token = methodspec_token;
|
||||
} else
|
||||
token = mono_image_get_inflated_method_token (assembly, method);
|
||||
} else if ((method->klass->image == &assembly->image) &&
|
||||
!mono_class_is_ginst (method->klass)) {
|
||||
|
||||
@@ -2917,16 +2917,4 @@ END:
|
||||
valuetype [mscorlib]System.Decimal)
|
||||
IL_0028: ret
|
||||
}
|
||||
|
||||
.method public hidebysig static int32 test_104_conv_u_and_string() cil managed
|
||||
{
|
||||
.maxstack 8
|
||||
ldstr "hello"
|
||||
conv.u
|
||||
call int32 [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::get_OffsetToStringData()
|
||||
add
|
||||
ldind.u2
|
||||
ret
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1070,7 +1070,6 @@ type_from_op (MonoCompile *cfg, MonoInst *ins, MonoInst *src1, MonoInst *src2)
|
||||
break;
|
||||
case STACK_PTR:
|
||||
case STACK_MP:
|
||||
case STACK_OBJ:
|
||||
#if SIZEOF_VOID_P == 8
|
||||
ins->opcode = OP_LCONV_TO_U;
|
||||
#else
|
||||
|
||||
@@ -841,7 +841,7 @@ PROFILE_DISABLED_TESTS += \
|
||||
constant-division.exe \
|
||||
dynamic-method-resurrection.exe \
|
||||
assembly_append_ordering.exe \
|
||||
assemblyresolve_event5.cs
|
||||
assemblyresolve_event5.exe
|
||||
|
||||
# Test which needs System.Web support
|
||||
PROFILE_DISABLED_TESTS += \
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ IF NOT %ERRORLEVEL% == 0 (
|
||||
ECHO copy %WIN_CONFIG_H% %CONFIG_H%
|
||||
copy %WIN_CONFIG_H% %CONFIG_H%
|
||||
%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -Command "(Get-Content %CONFIG_H%) -replace '#MONO_VERSION#', (Select-String -path %CONFIGURE_AC% -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value | Set-Content %CONFIG_H%" 2>&1
|
||||
%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -Command "$mono_version=[int[]](Select-String -path %CONFIGURE_AC% -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value.Split('.'); $corlib_counter=[int](Select-String -path %CONFIGURE_AC% -pattern 'MONO_CORLIB_COUNTER=(.*)').Matches[0].Groups[1].Value; (Get-Content %CONFIG_H%) -replace '#MONO_CORLIB_VERSION#',('1{0:00}{1:00}{2:00}{3:000}' -f $mono_version[0],$mono_version[1],$mono_version[2],$corlib_counter) | Set-Content %CONFIG_H%" 2>&1
|
||||
%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -Command "$mono_version=[int[]](Select-String -path %CONFIGURE_AC% -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value.Split('.'); $corlib_counter=[int](Select-String -path %CONFIGURE_AC% -pattern 'MONO_CORLIB_COUNTER=(.*)').Matches[0].Groups[1].Value; (Get-Content %CONFIG_H%) -replace '#MONO_CORLIB_VERSION#',('1{0:00}{1:00}{2:00}{3:000}' -f $mono_version[0],$mono_version[1],0,$corlib_counter) | Set-Content %CONFIG_H%" 2>&1
|
||||
)
|
||||
|
||||
%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File compare-config-files.ps1 %EGLIB_WIN_CONFIG_H% %EGLIB_CONFIG_H% 2>&1
|
||||
|
||||
Reference in new issue
Block a user