Imported Upstream version 5.20.0.197
Former-commit-id: 5c07c43a31eac4feaa80af83fcfd029473b7f9c8
This commit is contained in:
parent
fad63d06c9
commit
335b1cf07f
@ -1 +1 @@
|
|||||||
42d9284971bf51d3e040505f0c7b9b308011035b
|
614e386f452de288ad25cf8bcc6cc8c52895725e
|
@ -1 +1 @@
|
|||||||
b23890c3e29672d68a1fe844443ac09ff25a2ac9
|
a6e1aaf149f62742bb8957ffa3a03529a6b46dbe
|
@ -34,7 +34,7 @@ static class Consts
|
|||||||
// Use these assembly version constants to make code more maintainable.
|
// Use these assembly version constants to make code more maintainable.
|
||||||
//
|
//
|
||||||
|
|
||||||
public const string MonoVersion = "5.20.0.191";
|
public const string MonoVersion = "5.20.0.197";
|
||||||
public const string MonoCompany = "Mono development team";
|
public const string MonoCompany = "Mono development team";
|
||||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||||
public const string MonoCopyright = "(c) Various Mono authors";
|
public const string MonoCopyright = "(c) Various Mono authors";
|
||||||
|
@ -277,11 +277,24 @@ namespace System.Reflection.Emit {
|
|||||||
return System.Text.Encoding.UTF8.GetString(data, pos, len);
|
return System.Text.Encoding.UTF8.GetString(data, pos, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static string decode_string (byte [] data, int pos, out int rpos)
|
||||||
|
{
|
||||||
|
if (data [pos] == 0xff) {
|
||||||
|
rpos = pos + 1;
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
int len = decode_len (data, pos, out pos);
|
||||||
|
string s = string_from_bytes (data, pos, len);
|
||||||
|
pos += len;
|
||||||
|
rpos = pos;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal string string_arg ()
|
internal string string_arg ()
|
||||||
{
|
{
|
||||||
int pos = 2;
|
int pos = 2;
|
||||||
int len = decode_len (data, pos, out pos);
|
return decode_string (data, pos, out pos);
|
||||||
return string_from_bytes (data, pos, len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static UnmanagedMarshal get_umarshal (CustomAttributeBuilder customBuilder, bool is_field) {
|
internal static UnmanagedMarshal get_umarshal (CustomAttributeBuilder customBuilder, bool is_field) {
|
||||||
@ -309,18 +322,14 @@ namespace System.Reflection.Emit {
|
|||||||
int paramType; // What is this ?
|
int paramType; // What is this ?
|
||||||
|
|
||||||
/* Skip field/property signature */
|
/* Skip field/property signature */
|
||||||
pos ++;
|
int fieldPropSig = (int)data [pos ++];
|
||||||
/* Read type */
|
/* Read type */
|
||||||
paramType = ((int)data [pos++]);
|
paramType = ((int)data [pos++]);
|
||||||
if (paramType == 0x55) {
|
if (paramType == 0x55) {
|
||||||
/* enums, the value is preceeded by the type */
|
/* enums, the value is preceeded by the type */
|
||||||
int len2 = decode_len (data, pos, out pos);
|
decode_string (data, pos, out pos);
|
||||||
string_from_bytes (data, pos, len2);
|
|
||||||
pos += len2;
|
|
||||||
}
|
}
|
||||||
int len = decode_len (data, pos, out pos);
|
string named_name = decode_string (data, pos, out pos);
|
||||||
string named_name = string_from_bytes (data, pos, len);
|
|
||||||
pos += len;
|
|
||||||
|
|
||||||
switch (named_name) {
|
switch (named_name) {
|
||||||
case "ArraySubType":
|
case "ArraySubType":
|
||||||
@ -349,9 +358,7 @@ namespace System.Reflection.Emit {
|
|||||||
pos += 4;
|
pos += 4;
|
||||||
break;
|
break;
|
||||||
case "SafeArrayUserDefinedSubType":
|
case "SafeArrayUserDefinedSubType":
|
||||||
len = decode_len (data, pos, out pos);
|
decode_string (data, pos, out pos);
|
||||||
string_from_bytes (data, pos, len);
|
|
||||||
pos += len;
|
|
||||||
break;
|
break;
|
||||||
case "SizeParamIndex":
|
case "SizeParamIndex":
|
||||||
value = (int)data [pos++];
|
value = (int)data [pos++];
|
||||||
@ -360,20 +367,15 @@ namespace System.Reflection.Emit {
|
|||||||
hasSize = true;
|
hasSize = true;
|
||||||
break;
|
break;
|
||||||
case "MarshalType":
|
case "MarshalType":
|
||||||
len = decode_len (data, pos, out pos);
|
marshalTypeName = decode_string (data, pos, out pos);
|
||||||
marshalTypeName = string_from_bytes (data, pos, len);
|
|
||||||
pos += len;
|
|
||||||
break;
|
break;
|
||||||
case "MarshalTypeRef":
|
case "MarshalTypeRef":
|
||||||
len = decode_len (data, pos, out pos);
|
marshalTypeName = decode_string (data, pos, out pos);
|
||||||
marshalTypeName = string_from_bytes (data, pos, len);
|
if (marshalTypeName != null)
|
||||||
marshalTypeRef = Type.GetType (marshalTypeName);
|
marshalTypeRef = Type.GetType (marshalTypeName);
|
||||||
pos += len;
|
|
||||||
break;
|
break;
|
||||||
case "MarshalCookie":
|
case "MarshalCookie":
|
||||||
len = decode_len (data, pos, out pos);
|
marshalCookie = decode_string (data, pos, out pos);
|
||||||
marshalCookie = string_from_bytes (data, pos, len);
|
|
||||||
pos += len;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception ("Unknown MarshalAsAttribute field: " + named_name);
|
throw new Exception ("Unknown MarshalAsAttribute field: " + named_name);
|
||||||
|
@ -9,6 +9,7 @@ using System.IO;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Reflection.Emit;
|
using System.Reflection.Emit;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace MonoTests.System.Reflection.Emit
|
namespace MonoTests.System.Reflection.Emit
|
||||||
@ -845,6 +846,59 @@ namespace MonoTests.System.Reflection.Emit
|
|||||||
assemblyBuilder1.Save ("Repro55681-2a.dll");
|
assemblyBuilder1.Save ("Repro55681-2a.dll");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("SomeLib")]
|
||||||
|
private static extern void MethodForNullStringMarshalAsFields([MarshalAs(UnmanagedType.LPWStr)] string param);
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void NullStringMarshalAsFields () {
|
||||||
|
// Regression test for https://github.com/mono/mono/issues/12747
|
||||||
|
//
|
||||||
|
// MarshalAsAttribute goes through
|
||||||
|
// CustomAttributeBuilder.get_umarshal which tries to
|
||||||
|
// build an UnmanagedMarshal value by decoding the CAB's data.
|
||||||
|
//
|
||||||
|
// The data decoding needs to handle null string (encoded as 0xFF) properly.
|
||||||
|
var aName = new AssemblyName("Repro12747");
|
||||||
|
var assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(aName, AssemblyBuilderAccess.RunAndSave, tempDir);
|
||||||
|
var module = assembly.DefineDynamicModule(aName.Name, aName.Name + ".dll");
|
||||||
|
|
||||||
|
var prototypeMethodName = nameof(MethodForNullStringMarshalAsFields);
|
||||||
|
var someMethod = this.GetType().GetMethod(prototypeMethodName, BindingFlags.Static | BindingFlags.NonPublic);
|
||||||
|
|
||||||
|
var typeBuilder = module.DefineType("NewType" + module.ToString(), TypeAttributes.Class | TypeAttributes.Public);
|
||||||
|
var methodBuilder = typeBuilder.DefineMethod("NewMethod", MethodAttributes.Public | MethodAttributes.HideBySig, typeof(void), new[] { typeof(string) });
|
||||||
|
var il = methodBuilder.GetILGenerator();
|
||||||
|
il.Emit(OpCodes.Ret);
|
||||||
|
|
||||||
|
var param = someMethod.GetParameters()[0];
|
||||||
|
var paramBuilder = methodBuilder.DefineParameter(1, param.Attributes, null);
|
||||||
|
MarshalAsAttribute attr = param.GetCustomAttribute<MarshalAsAttribute>();
|
||||||
|
var attrCtor = typeof(MarshalAsAttribute).GetConstructor(new[] { typeof(UnmanagedType) });
|
||||||
|
object[] attrCtorArgs = { attr.Value };
|
||||||
|
|
||||||
|
// copy over the fields from the real MarshalAsAttribute on the parameter of "MethodForNullStringMarshalAsFields",
|
||||||
|
// including the ones that were initialized to null
|
||||||
|
var srcFields = typeof(MarshalAsAttribute).GetFields(BindingFlags.Public | BindingFlags.Instance);
|
||||||
|
var fieldArguments = new FieldInfo[srcFields.Length];
|
||||||
|
var fieldArgumentValues = new object[srcFields.Length];
|
||||||
|
for(int i = 0; i < srcFields.Length; i++)
|
||||||
|
{
|
||||||
|
var field = srcFields[i];
|
||||||
|
fieldArguments[i] = field;
|
||||||
|
fieldArgumentValues[i] = field.GetValue(attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
var attrBuilder = new CustomAttributeBuilder(attrCtor, attrCtorArgs, Array.Empty<PropertyInfo>(), Array.Empty<object>(),
|
||||||
|
fieldArguments, fieldArgumentValues);
|
||||||
|
// this encodes the CustomAttributeBuilder as a data
|
||||||
|
// blob and then tries to decode it using
|
||||||
|
// CustomAttributeBuilder.get_umarshal
|
||||||
|
paramBuilder.SetCustomAttribute(attrBuilder);
|
||||||
|
|
||||||
|
var finalType = typeBuilder.CreateType();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
798ab98b275858de38ea9093f694ac55c9a86318
|
383ae3ef9dd1b2c400ec51ee81f2076d5153746c
|
@ -1 +1 @@
|
|||||||
807ee298114e63cab56ac11f23f724b64361593e
|
11edb02350ed75b55fc884159ac11000eb956a3a
|
@ -1 +1 @@
|
|||||||
d16a9e3f8d92c7681eb5e092d7df6b513c4d44ab
|
1bd22293b7b92de83e22d39e1ff97fa286c884e3
|
@ -1 +1 @@
|
|||||||
4be30bfda39da9a2ecdc34470e4665c753304cb5
|
1cb06e425be41ed94546d04d837e9432db750448
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
8e522da568214f396478998d70a9137bedfc4bd4
|
adc618f49511118ee5f21252b88d3949f71dfcde
|
@ -1 +1 @@
|
|||||||
c5f9829e33f69207ea8aac86b8ec8e2b64ff87b9
|
9e2aafee7d31e49a01f1502aa00b67c1a1904fb0
|
@ -1 +1 @@
|
|||||||
eabd0a96a209dae105d82f03d3f1030ea31917f9
|
fbd3f505c8886e1d95a5a83c8e1d0976059a4233
|
@ -1 +1 @@
|
|||||||
cd9d8e97314061d17467eb14aeda7610bc40a15d
|
d61f67c1b8380fb0ee08877aa66ef1ea23aca853
|
@ -1 +1 @@
|
|||||||
807ee298114e63cab56ac11f23f724b64361593e
|
11edb02350ed75b55fc884159ac11000eb956a3a
|
@ -1 +1 @@
|
|||||||
d16a9e3f8d92c7681eb5e092d7df6b513c4d44ab
|
1bd22293b7b92de83e22d39e1ff97fa286c884e3
|
@ -1 +1 @@
|
|||||||
4be30bfda39da9a2ecdc34470e4665c753304cb5
|
1cb06e425be41ed94546d04d837e9432db750448
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
8e522da568214f396478998d70a9137bedfc4bd4
|
adc618f49511118ee5f21252b88d3949f71dfcde
|
@ -1 +1 @@
|
|||||||
c5f9829e33f69207ea8aac86b8ec8e2b64ff87b9
|
9e2aafee7d31e49a01f1502aa00b67c1a1904fb0
|
@ -1 +1 @@
|
|||||||
eabd0a96a209dae105d82f03d3f1030ea31917f9
|
fbd3f505c8886e1d95a5a83c8e1d0976059a4233
|
@ -1 +1 @@
|
|||||||
cd9d8e97314061d17467eb14aeda7610bc40a15d
|
d61f67c1b8380fb0ee08877aa66ef1ea23aca853
|
@ -1 +1 @@
|
|||||||
807ee298114e63cab56ac11f23f724b64361593e
|
11edb02350ed75b55fc884159ac11000eb956a3a
|
@ -1 +1 @@
|
|||||||
d16a9e3f8d92c7681eb5e092d7df6b513c4d44ab
|
1bd22293b7b92de83e22d39e1ff97fa286c884e3
|
@ -1 +1 @@
|
|||||||
4be30bfda39da9a2ecdc34470e4665c753304cb5
|
1cb06e425be41ed94546d04d837e9432db750448
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
8e522da568214f396478998d70a9137bedfc4bd4
|
adc618f49511118ee5f21252b88d3949f71dfcde
|
@ -1 +1 @@
|
|||||||
c5f9829e33f69207ea8aac86b8ec8e2b64ff87b9
|
9e2aafee7d31e49a01f1502aa00b67c1a1904fb0
|
@ -1 +1 @@
|
|||||||
eabd0a96a209dae105d82f03d3f1030ea31917f9
|
fbd3f505c8886e1d95a5a83c8e1d0976059a4233
|
@ -1 +1 @@
|
|||||||
cd9d8e97314061d17467eb14aeda7610bc40a15d
|
d61f67c1b8380fb0ee08877aa66ef1ea23aca853
|
@ -1 +1 @@
|
|||||||
807ee298114e63cab56ac11f23f724b64361593e
|
11edb02350ed75b55fc884159ac11000eb956a3a
|
@ -1 +1 @@
|
|||||||
d16a9e3f8d92c7681eb5e092d7df6b513c4d44ab
|
1bd22293b7b92de83e22d39e1ff97fa286c884e3
|
@ -1 +1 @@
|
|||||||
4be30bfda39da9a2ecdc34470e4665c753304cb5
|
1cb06e425be41ed94546d04d837e9432db750448
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
8e522da568214f396478998d70a9137bedfc4bd4
|
adc618f49511118ee5f21252b88d3949f71dfcde
|
@ -1 +1 @@
|
|||||||
c5f9829e33f69207ea8aac86b8ec8e2b64ff87b9
|
9e2aafee7d31e49a01f1502aa00b67c1a1904fb0
|
@ -1 +1 @@
|
|||||||
eabd0a96a209dae105d82f03d3f1030ea31917f9
|
fbd3f505c8886e1d95a5a83c8e1d0976059a4233
|
@ -1 +1 @@
|
|||||||
cd9d8e97314061d17467eb14aeda7610bc40a15d
|
d61f67c1b8380fb0ee08877aa66ef1ea23aca853
|
@ -1 +1 @@
|
|||||||
d5e52bc3fb391f69b506b5747e78c7ac14d0d127
|
b933f2b6dd48b23198ed8860a0a6cc6573d9d16c
|
@ -281,7 +281,7 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
|
|||||||
src [0] |= (arg_size << 22);
|
src [0] |= (arg_size << 22);
|
||||||
/* Encode the offset inside the stack slot */
|
/* Encode the offset inside the stack slot */
|
||||||
src [0] |= ((ainfo->offset % 8) << 26);
|
src [0] |= ((ainfo->offset % 8) << 26);
|
||||||
if (ainfo2->storage == ArgOnStack)
|
if (ainfo2->storage == ArgOnStack || ainfo2->storage == ArgOnStackR4)
|
||||||
dst [0] |= ((ainfo2->offset % 8) << 26);
|
dst [0] |= ((ainfo2->offset % 8) << 26);
|
||||||
} else if (ainfo2->storage == ArgOnStack && ainfo2->slot_size != 8) {
|
} else if (ainfo2->storage == ArgOnStack && ainfo2->slot_size != 8) {
|
||||||
/* The caller passes in an address, need to store it into a stack slot */
|
/* The caller passes in an address, need to store it into a stack slot */
|
||||||
|
@ -1 +1 @@
|
|||||||
#define FULL_VERSION "explicit/d3ebbdc"
|
#define FULL_VERSION "explicit/a13ca00"
|
||||||
|
@ -127,7 +127,7 @@ class C
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static string configDir = "./";
|
static string configDir = "./merp-crash-test/";
|
||||||
|
|
||||||
public static void
|
public static void
|
||||||
CrashWithMerp (int testNum)
|
CrashWithMerp (int testNum)
|
||||||
@ -161,7 +161,7 @@ class C
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void
|
public static void
|
||||||
TestValidateAndCleanup (string configDir, bool silent)
|
TestValidate (string configDir, bool silent)
|
||||||
{
|
{
|
||||||
DumpLogCheck ();
|
DumpLogCheck ();
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ class C
|
|||||||
Console.WriteLine ("Xml file {0}", text);
|
Console.WriteLine ("Xml file {0}", text);
|
||||||
File.Delete (xmlFilePath);
|
File.Delete (xmlFilePath);
|
||||||
} else {
|
} else {
|
||||||
Console.WriteLine ("Xml file missing");
|
Console.WriteLine ("Xml file {0} missing", xmlFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paramsFileExists) {
|
if (paramsFileExists) {
|
||||||
@ -190,7 +190,7 @@ class C
|
|||||||
Console.WriteLine ("Params file {0}", text);
|
Console.WriteLine ("Params file {0}", text);
|
||||||
File.Delete (paramsFilePath);
|
File.Delete (paramsFilePath);
|
||||||
} else {
|
} else {
|
||||||
Console.WriteLine ("Params file missing");
|
Console.WriteLine ("Params file {0} missing", paramsFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crashFileExists) {
|
if (crashFileExists) {
|
||||||
@ -211,7 +211,7 @@ class C
|
|||||||
File.Delete (crashFilePath);
|
File.Delete (crashFilePath);
|
||||||
// Assert it has the required merp fields
|
// Assert it has the required merp fields
|
||||||
} else {
|
} else {
|
||||||
Console.WriteLine ("Crash file missing");
|
Console.WriteLine ("Crash file {0} missing", crashFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!xmlFileExists)
|
if (!xmlFileExists)
|
||||||
@ -227,24 +227,7 @@ class C
|
|||||||
public static void
|
public static void
|
||||||
Cleanup (string configDir)
|
Cleanup (string configDir)
|
||||||
{
|
{
|
||||||
var xmlFilePath = String.Format("{0}CustomLogsMetadata.xml", configDir);
|
Directory.Delete (configDir, true);
|
||||||
var paramsFilePath = String.Format("{0}MERP.uploadparams.txt", configDir);
|
|
||||||
var crashFilePath = String.Format("{0}lastcrashlog.txt", configDir);
|
|
||||||
|
|
||||||
// Fixme: Maybe parse these json files rather than
|
|
||||||
// just checking they exist
|
|
||||||
var xmlFileExists = File.Exists (xmlFilePath);
|
|
||||||
var paramsFileExists = File.Exists (paramsFilePath);
|
|
||||||
var crashFileExists = File.Exists (crashFilePath);
|
|
||||||
|
|
||||||
if (xmlFileExists)
|
|
||||||
File.Delete (xmlFilePath);
|
|
||||||
|
|
||||||
if (paramsFileExists)
|
|
||||||
File.Delete (paramsFilePath);
|
|
||||||
|
|
||||||
if (crashFileExists)
|
|
||||||
File.Delete (crashFilePath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DumpLogSet ()
|
static void DumpLogSet ()
|
||||||
@ -287,13 +270,26 @@ class C
|
|||||||
pi.Arguments = String.Format ("{0} {1}", asm, testNum);;
|
pi.Arguments = String.Format ("{0} {1}", asm, testNum);;
|
||||||
pi.Environment ["MONO_PATH"] = env;
|
pi.Environment ["MONO_PATH"] = env;
|
||||||
|
|
||||||
if (!silent)
|
if (!silent) {
|
||||||
|
Console.WriteLine ("Running {0}", CrasherClass.Crashers [testNum].Item1);
|
||||||
Console.WriteLine ("MONO_PATH={0} {1} {2} {3}", env, runtime, asm, testNum);
|
Console.WriteLine ("MONO_PATH={0} {1} {2} {3}", env, runtime, asm, testNum);
|
||||||
|
}
|
||||||
|
|
||||||
var process = Diag.Process.Start (pi);
|
if (Directory.Exists (configDir)) {
|
||||||
process.WaitForExit ();
|
Console.WriteLine ("Cleaning up left over configDir {0}", configDir);
|
||||||
|
Cleanup (configDir);
|
||||||
|
}
|
||||||
|
|
||||||
TestValidateAndCleanup (configDir, silent);
|
Directory.CreateDirectory (configDir);
|
||||||
|
|
||||||
|
try {
|
||||||
|
var process = Diag.Process.Start (pi);
|
||||||
|
process.WaitForExit ();
|
||||||
|
|
||||||
|
TestValidate (configDir, silent);
|
||||||
|
} finally {
|
||||||
|
Cleanup (configDir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Main (string [] args)
|
public static void Main (string [] args)
|
||||||
@ -350,7 +346,6 @@ class C
|
|||||||
SpawnCrashingRuntime (processExe, CrasherClass.StresserIndex, true);
|
SpawnCrashingRuntime (processExe, CrasherClass.StresserIndex, true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Console.WriteLine ("Stress test caught failure. Shutting down after {1} iterations.\n {0} \n\n", e.InnerException, iter);
|
Console.WriteLine ("Stress test caught failure. Shutting down after {1} iterations.\n {0} \n\n", e.InnerException, iter);
|
||||||
Cleanup (configDir);
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ class C
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void
|
public static void
|
||||||
JsonValidateMerp ()
|
JsonValidateMerp (string configDir)
|
||||||
{
|
{
|
||||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||||
var m = monoType.GetMethod("EnableMicrosoftTelemetry", BindingFlags.NonPublic | BindingFlags.Static);
|
var m = monoType.GetMethod("EnableMicrosoftTelemetry", BindingFlags.NonPublic | BindingFlags.Static);
|
||||||
@ -32,7 +32,6 @@ class C
|
|||||||
var appVersion = "123456";
|
var appVersion = "123456";
|
||||||
var eventType = "AppleAppCrash";
|
var eventType = "AppleAppCrash";
|
||||||
var appPath = "/where/mono/lives";
|
var appPath = "/where/mono/lives";
|
||||||
var configDir = "./";
|
|
||||||
|
|
||||||
var m_params = new object[] { appBundleId, appSignature, appVersion, merpGUIPath, eventType, appPath, configDir };
|
var m_params = new object[] { appBundleId, appSignature, appVersion, merpGUIPath, eventType, appPath, configDir };
|
||||||
|
|
||||||
@ -63,8 +62,6 @@ class C
|
|||||||
var paramsFilePath = String.Format("{0}MERP.uploadparams.txt", configDir);
|
var paramsFilePath = String.Format("{0}MERP.uploadparams.txt", configDir);
|
||||||
var crashFilePath = String.Format("{0}lastcrashlog.txt", configDir);
|
var crashFilePath = String.Format("{0}lastcrashlog.txt", configDir);
|
||||||
|
|
||||||
// Fixme: Maybe parse these json files rather than
|
|
||||||
// just checking they exist
|
|
||||||
var xmlFileExists = File.Exists (xmlFilePath);
|
var xmlFileExists = File.Exists (xmlFilePath);
|
||||||
var paramsFileExists = File.Exists (paramsFilePath);
|
var paramsFileExists = File.Exists (paramsFilePath);
|
||||||
var crashFileExists = File.Exists (crashFilePath);
|
var crashFileExists = File.Exists (crashFilePath);
|
||||||
@ -81,7 +78,7 @@ class C
|
|||||||
|
|
||||||
if (crashFileExists) {
|
if (crashFileExists) {
|
||||||
var crashFile = File.ReadAllText (crashFilePath);
|
var crashFile = File.ReadAllText (crashFilePath);
|
||||||
//File.Delete (crashFilePath);
|
File.Delete (crashFilePath);
|
||||||
|
|
||||||
var checker = new JavaScriptSerializer ();
|
var checker = new JavaScriptSerializer ();
|
||||||
|
|
||||||
@ -103,6 +100,13 @@ class C
|
|||||||
public static void Main ()
|
public static void Main ()
|
||||||
{
|
{
|
||||||
JsonValidateState ();
|
JsonValidateState ();
|
||||||
JsonValidateMerp ();
|
|
||||||
|
var configDir = "./merp-json-valid/";
|
||||||
|
Directory.CreateDirectory (configDir);
|
||||||
|
try {
|
||||||
|
JsonValidateMerp (configDir);
|
||||||
|
} finally {
|
||||||
|
Directory.Delete (configDir, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <utils/mono-mmap.h>
|
#include <utils/mono-mmap.h>
|
||||||
#include <utils/strenc.h>
|
#include <utils/strenc.h>
|
||||||
#include <utils/mono-io-portability.h>
|
#include <utils/mono-io-portability.h>
|
||||||
|
#include <utils/mono-logger-internals.h>
|
||||||
|
|
||||||
#if defined(_POSIX_VERSION)
|
#if defined(_POSIX_VERSION)
|
||||||
#ifdef HAVE_SYS_ERRNO_H
|
#ifdef HAVE_SYS_ERRNO_H
|
||||||
@ -1021,7 +1022,7 @@ mono_pe_file_map (gunichar2 *filename, gint32 *map_size, void **handle)
|
|||||||
|
|
||||||
filename_ext = mono_unicode_to_external (filename);
|
filename_ext = mono_unicode_to_external (filename);
|
||||||
if (filename_ext == NULL) {
|
if (filename_ext == NULL) {
|
||||||
g_async_safe_printf ("%s: unicode conversion returned NULL", __func__);
|
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: unicode conversion returned NULL", __func__);
|
||||||
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -1034,37 +1035,37 @@ mono_pe_file_map (gunichar2 *filename, gint32 *map_size, void **handle)
|
|||||||
if (!located_filename) {
|
if (!located_filename) {
|
||||||
errno = saved_errno;
|
errno = saved_errno;
|
||||||
|
|
||||||
g_async_safe_printf ("%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno));
|
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = open (located_filename, O_RDONLY, 0);
|
fd = open (located_filename, O_RDONLY, 0);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
g_async_safe_printf ("%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno));
|
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (fd == -1) {
|
else if (fd == -1) {
|
||||||
g_async_safe_printf ("%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno));
|
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: Error opening file %s (3): %s", __func__, filename_ext, strerror (errno));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fstat (fd, &statbuf) == -1) {
|
if (fstat (fd, &statbuf) == -1) {
|
||||||
g_async_safe_printf ("%s: Error stat()ing file %s: %s", __func__, filename_ext, strerror (errno));
|
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: Error stat()ing file %s: %s", __func__, filename_ext, strerror (errno));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
*map_size = statbuf.st_size;
|
*map_size = statbuf.st_size;
|
||||||
|
|
||||||
/* Check basic file size */
|
/* Check basic file size */
|
||||||
if (statbuf.st_size < sizeof(IMAGE_DOS_HEADER)) {
|
if (statbuf.st_size < sizeof(IMAGE_DOS_HEADER)) {
|
||||||
g_async_safe_printf ("%s: File %s is too small: %lld", __func__, filename_ext, (long long) statbuf.st_size);
|
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: File %s is too small: %lld", __func__, filename_ext, (long long) statbuf.st_size);
|
||||||
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
file_map = mono_file_map (statbuf.st_size, MONO_MMAP_READ | MONO_MMAP_PRIVATE, fd, 0, handle);
|
file_map = mono_file_map (statbuf.st_size, MONO_MMAP_READ | MONO_MMAP_PRIVATE, fd, 0, handle);
|
||||||
if (file_map == NULL) {
|
if (file_map == NULL) {
|
||||||
g_async_safe_printf ("%s: Error mmap()int file %s: %s", __func__, filename_ext, strerror (errno));
|
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: Error mmap()int file %s: %s", __func__, filename_ext, strerror (errno));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
|
BIN
po/mcs/de.gmo
BIN
po/mcs/de.gmo
Binary file not shown.
@ -1 +1 @@
|
|||||||
2284578bd1c0e74650e8143a0c06fc482684d458
|
accd51aba71622210895cf94f264bcdd5ccd941b
|
BIN
po/mcs/es.gmo
BIN
po/mcs/es.gmo
Binary file not shown.
@ -1 +1 @@
|
|||||||
22f634fa30caa15749381abf8029f74290c5d1ae
|
9d51c5e362caffa8254005266e691d0f34f38c0e
|
BIN
po/mcs/ja.gmo
BIN
po/mcs/ja.gmo
Binary file not shown.
@ -1 +1 @@
|
|||||||
b908c0ae69f33af04cd7d8a7322f4f24247d9cdf
|
6f33ab318482690b6b44e8f6bae2ecc8b01781ec
|
@ -6,9 +6,9 @@
|
|||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mono 5.20.0.191\n"
|
"Project-Id-Version: mono 5.20.0.197\n"
|
||||||
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
|
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
|
||||||
"POT-Creation-Date: 2019-02-08 08:13+0000\n"
|
"POT-Creation-Date: 2019-02-09 08:06+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
BIN
po/mcs/pt_BR.gmo
BIN
po/mcs/pt_BR.gmo
Binary file not shown.
@ -1 +1 @@
|
|||||||
c38e3cace33a7f13722f8253915ce71a87fe2ba9
|
d589f80e59f13b276b3e63357edae720244352fb
|
Loading…
x
Reference in New Issue
Block a user