Compare commits

...
Author SHA1 Message Date
Zoltan Varga e66d9abbb2 [llvm] Fix the returning of vtypes using a hidden argument in bitcode, in some cases, we forgot to generate the code to return the value, causing random data to be returned. Fixes #59956. (#5786) 2017-10-25 10:35:58 -04:00
Aleksey Kliger (λgeek) 1f4613aa1a [sre] Register a canonical reflected method for a methodspec token. (Fixes #60233) (#5814)
* [sre] mono_dynamic_image_register_token: Change asserts to warnings

This partly relaxes the changes in 792b5367cd
which added the assertions.

In practice the assertions introduced a crash in heavy uses of
System.Reflection.Emit such as unit testing frameworks and dynamic languages.
We still want to know if there are surprising uses of
mono_dynamic_image_register_token, but we don't need a crash.  SRE used to work
before 792b5367cd, so no need to break it.

* [test] ILGenerator test for duplicate methodspec tokens

Regression test for [Bugzilla #60233](https://bugzilla.xamarin.com/show_bug.cgi?id=60233)

* [sre] Register a canonical reflected method for a methodspec token (Fixes #60233)

This is like the fix for [bugzilla
59364](https://bugzilla.xamarin.com/show_bug.cgi?id=59364) but this time it's a
methodspec token, not a memberref token.
2017-10-18 08:09:39 -04:00
Zoltan Varga d092ad186f [llvm] Map byref types to the same type as the this argument so they are called using the same signature if the this argument is passed explicitly. Fixes #59436. (#5572) 2017-10-17 09:21:39 +02:00
Alexis Christoforides c6605763a3 Merge pull request #5783 from marek-safar/2017-06-fixes
[corlib]: Fix race condition in ExceptionDispatchInfo. (#5279)
2017-10-13 14:07:22 -04:00
Martin Baulig 0fb4040ef1 [corlib]: Fix race condition in ExceptionDispatchInfo. (#5279) 2017-10-13 16:03:37 +02:00
Luis Aguilera fea2566b12 Merge pull request #5772 from marek-safar/2017-06-fixes
Brings CoreFX update which contains a fix for #59302
2017-10-12 11:34:26 -04:00
Marek Safar f3c9015ec4 Brings CoreFX update which contains a fix for #59302 2017-10-12 09:44:55 +02:00
Jo Shields 0429840e5b Bump branch to 5.4.1, in anticipation of next release (#5760) 2017-10-12 02:36:03 +02:00
Alexander Köplinger 28d71e9727 [msvc] Fix MONO_CORLIB_VERSION to match configure.ac (#5770)
When I simplified MONO_CORLIB_VERSION to only include major.minor
instead of major.minor.build in https://github.com/mono/mono/pull/5449
I forgot to apply the same change to the msvc copy of that logic.

(cherry picked from commit 43757d67ef)
2017-10-12 02:35:44 +02:00
Alexis Christoforides f1bca3dc5b Fix typo 2017-10-11 16:51:03 -04:00
Aleksey Kliger fbc487ff42 [sre] register a canonical MonoReflectionMethod for a methodref token
In mono_image_create_token we are passed in a managed reflection object and we
need to create a token for it and optionally register it so that we can resolve
that token back to a runtime structure and managed object later.

For a MonoReflectionMethod object that refers to a method from outside the
current dynamic image, we need to generate a memberref token.  It will be the
same token for the same underlying MonoMethod*.  When we go to register the
token with mono_dynamic_image_register_token we need to pass a managed object.
Unfortunately two MonoReflectionMethod objects could refer to the same
MonoMethod* but differ in their ReflectedType, so just registering the
passed-in MonoReflectionMethod means we could assert in
mono_dynamic_image_register_token because previously we may have registered the
same method via a different ReflectedType.

So what we do is we cal mono_method_get_object_handle with NULL for the
reflected type - which corresponds to just using the DeclaringType of the given
MonoMethod*.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59364
2017-10-06 11:12:06 +02:00
Aleksey Kliger 72c4a0ca08 [sre] Expect a new token for MonoArrayMethod and SignatureHelper 2017-10-06 11:12:06 +02:00
Aleksey Kliger 9685274a8a [sre] Remove MonoDynamicImage:handleref_managed field
It's now unused.
2017-10-06 11:12:06 +02:00
Aleksey Kliger 5cb0e59bea [sre] Map fieldref tokens to MonoClassField*
Previously, we mapped fieldref tokens to MonoReflectionField managed objects,
But the object is just used as a key for caching the token so we may as well
use the native field instead of a managed object.
2017-10-06 11:12:06 +02:00
Aleksey Kliger fc364332ff [sre] Wrap mono_image_create_token with HANDLE_FUNCTION_{ENTER,RETURN}
We will allocate a handle for the object that we will register.  For now it's
just an alias of the object passed in, but it could differ.
2017-10-06 11:12:06 +02:00
Aleksey Kliger ff204dae30 [test] SRE ILGenerator test for methodref and fieldref token caching
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=59364

We need to cause SRE to generate the same methodref/fieldref token from two
different reflection objects.  That happens if you get the same method or field
via a base and a derived class so that the MemberInfo:DeclaredType is different
but the underlying MonoMethod* or MonoClassField* is the same.
2017-10-06 11:12:06 +02:00
Rolf Bjarne Kvinge 9b466abc49 [appletls] Trust SecTrustResult.Proceed as well. Fixes #58411.
Apple states clearly in their documentation about SecTrustResult.Proceed [1]:

    The user explicitly chose to trust a certificate in the chain (usually by
    clicking a button in a certificate trust panel).

    Your app should trust the chain.

This fixes bug #[58411][2], where SecTrustEvaluate returns
SecTrustResult.Proceed starting with iOS 11.

[1]: https://developer.apple.com/documentation/security/1394363-sectrustevaluate
[2]: https://bugzilla.xamarin.com/show_bug.cgi?id=58411
2017-10-06 11:08:22 +02:00
Zoltan Varga ab058f8e49 [aot] Don't error out if a method fails to JIT in full-aot mode. This was a regression caused by 9302c31f81. Fixes #59832. (#5686) (#5709) 2017-10-06 01:31:56 +02:00
Cody Russell cb4c3ca997 Add glib to the list of packages with debugging symbols. (#5658) 2017-10-04 17:54:12 +02:00
Ludovic Henry 0dd35e9d64 [w32handle] Only own first handle if doing WaitHandle.WaitAny (#5625)
This is the behaviour on .NET, even if it goes against the documentation at https://msdn.microsoft.com/en-us/library/tdykks7z(v=vs.110).aspx#Anchor_2

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59281
2017-09-29 11:21:47 +02:00
Ludovic Henry 7ba4e9e7b1 [w32process] Fix inverted kernel and user ticks (#5641) 2017-09-29 11:18:21 +02:00
Alexis Christoforides 71277e78f6 Merge pull request #5619 from mono/2017-06-bump-bockbuild
Bump bockbuild to get gtk Japanese IME fixes
2017-09-21 17:09:21 -04:00
Cody Russell c61b3bd6d9 Bump bockbuild to get gtk Japanese IME fixes 2017-09-21 10:54:29 -05:00
nosami 7d78877800 Install Microsoft.FSharp.NetSdk.props and targets
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57771
2017-09-15 15:56:17 +02:00
Ankit Jain 87a052504b [msbuild] Bump to get workaround for bxc #55697 . (#5585)
https://github.com/mono/msbuild/commit/f296e67b6004dd39c3f43b177bcf45dfbe931341
2017-09-15 09:29:37 -04:00
Zoltan Varga 26e759903e [profiler] Clear events for all profilers on profiler shutdown. Previously only the profiler which was added last had its events cleared. Fixes #59274. 2017-09-15 10:45:33 +02:00
Ankit Jain 12ca38606d Bump NuGet.BuildTasks to get new updates and switch to dev branch (#5540) 2017-09-13 08:52:03 -04:00
Marek Safar 0ab383de1e [corlib] Update negative symbol for all cultures. Fixes #57496 2017-09-13 13:45:24 +02:00
Ankit Jain 132135cb22 [msbuild] Bump msbuild to pick up SDK updates 2017-09-12 20:42:28 +02:00
nosami 5066d707ac [F#] Reinstate _DebugFileExt as it's needed for mobile debugging.
Also added a mechanism for users to override DebugType
2017-09-11 12:09:15 +02:00
29 changed files with 1726 additions and 1354 deletions

No files matched your search

+1 -1
View File
@@ -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])
+1 -1
@@ -149,7 +149,7 @@ namespace Mono.AppleTls
}
var result = trust.Evaluate ();
if (result == SecTrustResult.Unspecified)
if (result == SecTrustResult.Unspecified || result == SecTrustResult.Proceed)
return true;
errors |= MonoSslPolicyErrors.RemoteCertificateChainErrors;
@@ -49,9 +49,15 @@ namespace MonoTests.System.Globalization
c = CultureInfo.InvariantCulture;
Assert.AreEqual (2, c.NumberFormat.CurrencyDecimalDigits, "#3");
}
[Test]
public void AllCulturesCanParseNegativeNumber ()
{
foreach (var c in CultureInfo.GetCultures (CultureTypes.AllCultures))
{
int.Parse ("-1", c);
}
}
}
}
@@ -480,5 +480,136 @@ namespace MonoTests.System.Reflection.Emit
Assert.AreEqual (0x02, il [14]); //typedef
Assert.AreEqual (0x01, il [19]); //typeref
}
[Test]
public void MethodRefTokenSame () {
// Get the same non-virtual method from a base and a derived type so
// that the MemberInfo:DeclaredType differs but the tokens are the same.
//
// Regression test for bugzilla #59364
DefineBasicMethod ();
var m1 = typeof (object).GetMethod ("GetType");
var m2 = typeof (string).GetMethod ("GetType");
var value_getter = typeof (RuntimeMethodHandle).GetProperty ("Value").GetMethod;
var il = il_gen;
var loc = il.DeclareLocal (typeof (RuntimeMethodHandle));
// return ((int)(RuntimeMethodHandle (m1).Value == RuntimeMethodHandle (m2).Value)).ToString ()
il.Emit (OpCodes.Ldtoken, m1);
il.Emit (OpCodes.Stloc, loc);
il.Emit (OpCodes.Ldloca, loc);
il.Emit (OpCodes.Call, value_getter);
il.Emit (OpCodes.Ldtoken, m2);
il.Emit (OpCodes.Stloc, loc);
il.Emit (OpCodes.Ldloca, loc);
il.Emit (OpCodes.Call, value_getter);
il.Emit (OpCodes.Ceq);
il.Emit (OpCodes.Box, typeof (Int32));
il.Emit (OpCodes.Callvirt, typeof (object).GetMethod ("ToString"));
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);
}
public class Base<T> {
public int x;
public void M () { }
}
public class Derived : Base<string> {
}
[Test]
public void FieldRefTokenSame () {
DefineBasicMethod ();
// Get the same field from a base and a derived type so hat
// the MemberInfo:DeclaredType differs but the tokens are the same.
//
// Regression test for bugzilla #59364
var f1 = typeof (Base<string>).GetField ("x");
var f2 = typeof (Derived).GetField ("x");
var value_getter = typeof (RuntimeFieldHandle).GetProperty("Value").GetMethod;
var il = il_gen;
var loc = il.DeclareLocal (typeof (RuntimeFieldHandle));
il.Emit (OpCodes.Ldtoken, f1);
il.Emit (OpCodes.Stloc, loc);
il.Emit (OpCodes.Ldloca, loc);
il.Emit (OpCodes.Call, value_getter);
il.Emit (OpCodes.Ldtoken, f2);
il.Emit (OpCodes.Stloc, loc);
il.Emit (OpCodes.Ldloca, loc);
il.Emit (OpCodes.Call, value_getter);
il.Emit (OpCodes.Ceq);
il.Emit (OpCodes.Box, typeof (Int32));
il.Emit (OpCodes.Callvirt, typeof (object).GetMethod ("ToString"));
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);
}
[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);
}
}
}
@@ -47,10 +47,11 @@ namespace System.Runtime.ExceptionServices {
// Copy over the details we need to save.
m_Exception = exception;
#if MONO
var count = exception.captured_traces == null ? 0 : exception.captured_traces.Length;
var traces = exception.captured_traces;
var count = traces == null ? 0 : traces.Length;
var stack_traces = new System.Diagnostics.StackTrace [count + 1];
if (count != 0)
Array.Copy (exception.captured_traces, 0, stack_traces, 0, count);
Array.Copy (traces, 0, stack_traces, 0, count);
stack_traces [count] = new System.Diagnostics.StackTrace (exception, 0, true);
m_stackTrace = stack_traces;
File diff suppressed because it is too large. Load diff
+5 -6
View File
@@ -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;
@@ -360,7 +363,6 @@ mono_dynamic_image_create (MonoDynamicAssembly *assembly, char *assembly_name, c
image->method_aux_hash = g_hash_table_new (NULL, NULL);
image->vararg_aux_hash = g_hash_table_new (NULL, NULL);
image->handleref = g_hash_table_new (NULL, NULL);
image->handleref_managed = mono_g_hash_table_new_type ((GHashFunc)mono_object_hash, NULL, MONO_HASH_KEY_GC, MONO_ROOT_SOURCE_REFLECTION, "dynamic module reference-to-token table");
image->tokens = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_VALUE_GC, MONO_ROOT_SOURCE_REFLECTION, "dynamic module tokens table");
image->generic_def_objects = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_VALUE_GC, MONO_ROOT_SOURCE_REFLECTION, "dynamic module generic definitions table");
image->typespec = g_hash_table_new ((GHashFunc)mono_metadata_type_hash, (GCompareFunc)mono_metadata_type_equal);
@@ -480,7 +482,6 @@ void
mono_dynamic_image_release_gc_roots (MonoDynamicImage *image)
{
release_hashtable (&image->token_fixups);
release_hashtable (&image->handleref_managed);
release_hashtable (&image->tokens);
release_hashtable (&image->remapped_tokens);
release_hashtable (&image->generic_def_objects);
@@ -500,8 +501,6 @@ mono_dynamic_image_free (MonoDynamicImage *image)
g_hash_table_destroy (di->typeref);
if (di->handleref)
g_hash_table_destroy (di->handleref);
if (di->handleref_managed)
mono_g_hash_table_destroy (di->handleref_managed);
if (di->tokens)
mono_g_hash_table_destroy (di->tokens);
if (di->remapped_tokens)
-1
View File
@@ -498,7 +498,6 @@ struct _MonoDynamicImage {
GHashTable *typespec;
GHashTable *typeref;
GHashTable *handleref;
MonoGHashTable *handleref_managed;
MonoGHashTable *tokens;
GHashTable *blob_cache;
GHashTable *standalonesig_cache;
+4 -1
View File
@@ -897,7 +897,10 @@ mono_profiler_shutdown (void)
prof->shutdown_callback (prof->profiler);
}
mono_profiler_set_events ((MonoProfileFlags)0);
/* Clear all events */
for (prof = prof_list; prof; prof = prof->next)
prof->events = (MonoProfileFlags)0;
mono_profiler_events = (MonoProfileFlags)0;
}
/**
+57 -16
View File
@@ -740,7 +740,7 @@ is_field_on_inst (MonoClassField *field)
#ifndef DISABLE_REFLECTION_EMIT
static guint32
mono_image_get_fieldref_token (MonoDynamicImage *assembly, MonoObjectHandle f, MonoClassField *field)
mono_image_get_fieldref_token (MonoDynamicImage *assembly, MonoClassField *field)
{
MonoType *type;
guint32 token;
@@ -748,7 +748,7 @@ mono_image_get_fieldref_token (MonoDynamicImage *assembly, MonoObjectHandle f, M
g_assert (field);
g_assert (field->parent);
token = GPOINTER_TO_UINT (mono_g_hash_table_lookup (assembly->handleref_managed, MONO_HANDLE_RAW (f)));
token = GPOINTER_TO_UINT (g_hash_table_lookup (assembly->handleref, field));
if (token)
return token;
@@ -761,7 +761,7 @@ mono_image_get_fieldref_token (MonoDynamicImage *assembly, MonoObjectHandle f, M
token = mono_image_get_memberref_token (assembly, &field->parent->byval_arg,
mono_field_get_name (field),
mono_dynimage_encode_fieldref_signature (assembly, field->parent->image, type));
mono_g_hash_table_insert (assembly->handleref_managed, MONO_HANDLE_RAW (f), GUINT_TO_POINTER(token));
g_hash_table_insert (assembly->handleref, field, GUINT_TO_POINTER(token));
return token;
}
@@ -1115,17 +1115,20 @@ mono_image_create_token (MonoDynamicImage *assembly, MonoObjectHandle obj,
gboolean create_open_instance, gboolean register_token,
MonoError *error)
{
HANDLE_FUNCTION_ENTER ();
guint32 token = 0;
error_init (error);
MonoClass *klass = mono_handle_class (obj);
MonoObjectHandle register_obj = MONO_HANDLE_NEW (MonoObject, NULL);
MONO_HANDLE_ASSIGN (register_obj, obj);
/* Check for user defined reflection objects */
/* TypeDelegator is the only corlib type which doesn't look like a MonoReflectionType */
if (klass->image != mono_defaults.corlib || (strcmp (klass->name, "TypeDelegator") == 0)) {
mono_error_set_not_supported (error, "User defined subclasses of System.Type are not yet supported");
return 0;
goto leave;
}
/* This function is called from ModuleBuilder:getToken multiple times for the same objects */
@@ -1133,7 +1136,8 @@ mono_image_create_token (MonoDynamicImage *assembly, MonoObjectHandle obj,
if (strcmp (klass->name, "RuntimeType") == 0) {
MonoType *type = mono_reflection_type_handle_mono_type (MONO_HANDLE_CAST (MonoReflectionType, obj), error);
return_val_if_nok (error, 0);
if (!is_ok (error))
goto leave;
MonoClass *mc = mono_class_from_mono_type (type);
token = mono_metadata_token_from_dor (
mono_dynimage_encode_typedef_or_ref_full (assembly, type, !mono_class_is_gtd (mc) || create_open_instance));
@@ -1145,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)) {
@@ -1170,7 +1180,21 @@ mono_image_create_token (MonoDynamicImage *assembly, MonoObjectHandle obj,
how_collide = MONO_DYN_IMAGE_TOK_NEW;
}
} else {
token = mono_image_get_methodref_token (assembly, method, create_open_instance);
guint32 methodref_token = mono_image_get_methodref_token (assembly, method, create_open_instance);
/* We need to register a 'canonical' object. The same
* MonoMethod could have been reflected via different
* classes so the MonoReflectionMethod:reftype could be
* different, and the object lookup in
* dynamic_image_register_token would assert assert. So
* we pick the MonoReflectionMethod object that has the
* reflected type as NULL (ie, take the declaring type
* of the 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 = methodref_token;
}
/*g_print ("got token 0x%08x for %s\n", token, m->method->name);*/
} else if (strcmp (klass->name, "MonoField") == 0) {
@@ -1182,25 +1206,42 @@ mono_image_create_token (MonoDynamicImage *assembly, MonoObjectHandle obj,
token = MONO_TOKEN_FIELD_DEF | field_table_idx;
how_collide = MONO_DYN_IMAGE_TOK_NEW;
} else {
token = mono_image_get_fieldref_token (assembly, obj, field);
guint32 fieldref_token = mono_image_get_fieldref_token (assembly, field);
/* Same as methodref: get a canonical object to
* register with the token. */
MonoReflectionFieldHandle canonical_obj =
mono_field_get_object_handle (MONO_HANDLE_DOMAIN (obj), field->parent, field, error);
if (!is_ok (error))
goto leave;
MONO_HANDLE_ASSIGN (register_obj, canonical_obj);
token = fieldref_token;
}
/*g_print ("got token 0x%08x for %s\n", token, f->field->name);*/
} else if (strcmp (klass->name, "MonoArrayMethod") == 0) {
MonoReflectionArrayMethodHandle m = MONO_HANDLE_CAST (MonoReflectionArrayMethod, obj);
token = mono_image_get_array_token (assembly, m, error);
return_val_if_nok (error, 0);
/* always returns a fresh token */
guint32 array_token = mono_image_get_array_token (assembly, m, error);
if (!is_ok (error))
goto leave;
token = array_token;
how_collide = MONO_DYN_IMAGE_TOK_NEW;
} else if (strcmp (klass->name, "SignatureHelper") == 0) {
MonoReflectionSigHelperHandle s = MONO_HANDLE_CAST (MonoReflectionSigHelper, obj);
token = MONO_TOKEN_SIGNATURE | mono_image_get_sighelper_token (assembly, s, error);
return_val_if_nok (error, 0);
/* always returns a fresh token */
guint32 sig_token = MONO_TOKEN_SIGNATURE | mono_image_get_sighelper_token (assembly, s, error);
if (!is_ok (error))
goto leave;
token = sig_token;
how_collide = MONO_DYN_IMAGE_TOK_NEW;
} else {
g_error ("requested token for %s\n", klass->name);
}
if (register_token)
mono_dynamic_image_register_token (assembly, token, obj, how_collide);
mono_dynamic_image_register_token (assembly, token, register_obj, how_collide);
return token;
leave:
HANDLE_FUNCTION_RETURN_VAL (token);
}
+7 -2
View File
@@ -1297,8 +1297,13 @@ mono_w32handle_wait_multiple (gpointer *handles, gsize nhandles, gboolean waital
signalled = (waitall && count == nhandles) || (!waitall && count > 0);
if (signalled) {
for (i = 0; i < nhandles; i++)
own_if_signalled (handles [i], &abandoned [i]);
for (i = 0; i < nhandles; i++) {
if (own_if_signalled (handles [i], &abandoned [i]) && !waitall) {
/* if we are calling WaitHandle.WaitAny, .NET only owns the first one; it matters for Mutex which
* throw AbandonedMutexException in case we owned it but didn't release it */
break;
}
}
}
mono_w32handle_unlock_handles (handles, nhandles);
+2 -2
View File
@@ -2582,8 +2582,8 @@ ves_icall_Microsoft_Win32_NativeMethods_GetProcessTimes (gpointer handle, gint64
&start_ticks, &user_ticks, &kernel_ticks);
ticks_to_processtime (start_ticks, creation_processtime);
ticks_to_processtime (user_ticks, kernel_processtime);
ticks_to_processtime (kernel_ticks, user_processtime);
ticks_to_processtime (kernel_ticks, kernel_processtime);
ticks_to_processtime (user_ticks, user_processtime);
return TRUE;
}
+9 -9
View File
@@ -421,7 +421,7 @@ aot_printerrf (MonoAotCompile *acfg, const gchar *format, ...)
}
static void
report_loader_error (MonoAotCompile *acfg, MonoError *error, const char *format, ...)
report_loader_error (MonoAotCompile *acfg, MonoError *error, gboolean fatal, const char *format, ...)
{
FILE *output;
va_list args;
@@ -439,7 +439,7 @@ report_loader_error (MonoAotCompile *acfg, MonoError *error, const char *format,
va_end (args);
mono_error_cleanup (error);
if (acfg->is_full_aot) {
if (acfg->is_full_aot && fatal) {
fprintf (output, "FullAOT cannot continue if there are loader errors.\n");
exit (1);
}
@@ -3832,7 +3832,7 @@ add_wrappers (MonoAotCompile *acfg)
gboolean skip = FALSE;
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
if ((method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
(method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) ||
@@ -4181,7 +4181,7 @@ add_wrappers (MonoAotCompile *acfg)
MonoError error;
token = MONO_TOKEN_METHOD_DEF | (i + 1);
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
if (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED) {
if (method->is_generic) {
@@ -4214,7 +4214,7 @@ add_wrappers (MonoAotCompile *acfg)
guint32 token = MONO_TOKEN_METHOD_DEF | (i + 1);
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
if ((method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
(method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL)) {
@@ -4238,7 +4238,7 @@ add_wrappers (MonoAotCompile *acfg)
int j;
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
/*
* Only generate native-to-managed wrappers for methods which have an
@@ -4248,7 +4248,7 @@ add_wrappers (MonoAotCompile *acfg)
cattr = mono_custom_attrs_from_method_checked (method, &error);
if (!is_ok (&error)) {
char *name = mono_method_get_full_name (method);
report_loader_error (acfg, &error, "Failed to load custom attributes from method %s due to %s\n", name, mono_error_get_message (&error));
report_loader_error (acfg, &error, TRUE, "Failed to load custom attributes from method %s due to %s\n", name, mono_error_get_message (&error));
g_free (name);
}
@@ -7642,7 +7642,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
if (cfg->exception_type != MONO_EXCEPTION_NONE) {
/* Some instances cannot be JITted due to constraints etc. */
if (!method->is_inflated)
report_loader_error (acfg, &cfg->error, "Unable to compile method '%s' due to: '%s'.\n", mono_method_get_full_name (method), mono_error_get_message (&cfg->error));
report_loader_error (acfg, &cfg->error, FALSE, "Unable to compile method '%s' due to: '%s'.\n", mono_method_get_full_name (method), mono_error_get_message (&cfg->error));
/* Let the exception happen at runtime */
return;
}
@@ -10271,7 +10271,7 @@ collect_methods (MonoAotCompile *acfg)
continue;
method = mono_get_method_checked (acfg->image, token, NULL, NULL, &error);
report_loader_error (acfg, &error, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
report_loader_error (acfg, &error, TRUE, "Failed to load method token 0x%x due to %s\n", i, mono_error_get_message (&error));
if (method->is_generic || mono_class_is_gtd (method->klass)) {
MonoMethod *gshared;
+46
View File
@@ -1996,6 +1996,23 @@ public class Tests
Console.WriteLine ("X: " + iface.is_ref<AStruct3<string, int, int>> ());
return 0;
}
interface IFace59956 {
int foo<T> ();
}
class Impl59956 : IFace59956 {
public int foo<T> () {
var builder = new SparseArrayBuilder<T>(true);
return builder.Markers._count;
}
}
public static int test_1_59956_regress () {
IFace59956 iface = new Impl59956 ();
return iface.foo<int> ();
}
}
// #13191
@@ -2013,6 +2030,35 @@ public class MobileServiceCollection<TTable, TCol>
}
}
// #59956
internal struct Marker
{
public Marker(int count, int index) {
}
}
public struct ArrayBuilder<T>
{
private T[] _array;
public int _count;
public ArrayBuilder(int capacity) {
_array = new T[capacity];
_count = 1;
}
}
internal struct SparseArrayBuilder<T>
{
private ArrayBuilder<Marker> _markers;
public SparseArrayBuilder(bool initialize) : this () {
_markers = new ArrayBuilder<Marker> (10);
}
public ArrayBuilder<Marker> Markers => _markers;
}
#if !__MOBILE__
public class GSharedTests : Tests {
}
+21
View File
@@ -2896,4 +2896,25 @@ END:
IL_0018: ldloc.0
ret
}
.method public static bool llvm_regress_59436 () {
// Code size 41 (0x29)
.maxstack 3
.locals init (float64 V_0,
float64 V_1,
valuetype [mscorlib]System.Decimal V_2)
IL_0000: ldc.r8 1
IL_0009: stloc.0
IL_000a: ldc.r8 2
IL_0013: stloc.1
IL_0014: ldloc.0
IL_0015: newobj instance void [mscorlib]System.Decimal::.ctor(float64)
IL_001a: ldloca.s V_2
IL_001c: ldloc.1
IL_001d: call instance void [mscorlib]System.Decimal::.ctor(float64)
IL_0022: ldloc.2
IL_0023: call bool [mscorlib]System.Decimal::op_LessThanOrEqual(valuetype [mscorlib]System.Decimal,
valuetype [mscorlib]System.Decimal)
IL_0028: ret
}
}
+22 -4
View File
@@ -467,6 +467,9 @@ create_llvm_type_for_type (MonoLLVMModule *module, MonoClass *klass)
static LLVMTypeRef
type_to_llvm_type (EmitContext *ctx, MonoType *t)
{
if (t->byref)
return ThisType ();
t = mini_get_underlying_type (t);
switch (t->type) {
@@ -1226,10 +1229,10 @@ sig_to_llvm_sig_no_cinfo (EmitContext *ctx, MonoMethodSignature *sig)
int i, pindex;
MonoType *rtype;
rtype = mini_get_underlying_type (sig->ret);
ret_type = type_to_llvm_type (ctx, rtype);
ret_type = type_to_llvm_type (ctx, sig->ret);
if (!ctx_ok (ctx))
return NULL;
rtype = mini_get_underlying_type (sig->ret);
param_types = g_new0 (LLVMTypeRef, (sig->param_count * 8) + 3);
pindex = 0;
@@ -1269,10 +1272,10 @@ sig_to_llvm_sig_full (EmitContext *ctx, MonoMethodSignature *sig, LLVMCallInfo *
if (!cinfo)
return sig_to_llvm_sig_no_cinfo (ctx, sig);
rtype = mini_get_underlying_type (sig->ret);
ret_type = type_to_llvm_type (ctx, rtype);
ret_type = type_to_llvm_type (ctx, sig->ret);
if (!ctx_ok (ctx))
return NULL;
rtype = mini_get_underlying_type (sig->ret);
switch (cinfo->ret.storage) {
case LLVMArgVtypeInReg:
@@ -7489,7 +7492,22 @@ mono_llvm_create_vars (MonoCompile *cfg)
sig = mono_method_signature (cfg->method);
if (cfg->gsharedvt && cfg->llvm_only) {
gboolean vretaddr = FALSE;
if (mini_is_gsharedvt_variable_signature (sig) && sig->ret->type != MONO_TYPE_VOID) {
vretaddr = TRUE;
} else {
MonoMethodSignature *sig = mono_method_signature (cfg->method);
LLVMCallInfo *linfo;
linfo = get_llvm_call_info (cfg, sig);
vretaddr = (linfo->ret.storage == LLVMArgVtypeRetAddr || linfo->ret.storage == LLVMArgVtypeByRef || linfo->ret.storage == LLVMArgGsharedvtFixed || linfo->ret.storage == LLVMArgGsharedvtVariable || linfo->ret.storage == LLVMArgGsharedvtFixedVtype);
}
if (vretaddr) {
/*
* Creating vret_addr forces CEE_SETRET to store the result into it,
* so we don't have to generate any code in our OP_SETRET case.
*/
cfg->vret_addr = mono_compile_create_var (cfg, &mono_get_intptr_class ()->byval_arg, OP_ARG);
if (G_UNLIKELY (cfg->verbose_level > 1)) {
printf ("vret_addr = ");
+3 -2
View File
@@ -515,7 +515,8 @@ TESTS_CS_SRC= \
runtime-invoke.gen.cs \
imt_big_iface_test.cs \
bug-58782-plain-throw.cs \
bug-58782-capture-and-throw.cs
bug-58782-capture-and-throw.cs \
bug-59281.cs
if AMD64
TESTS_CS_SRC += async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs
@@ -840,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 += \
+51
View File
@@ -0,0 +1,51 @@
using System;
using System.Threading;
class Driver
{
static readonly Mutex[] mutexes = new Mutex[2];
public static void Main(string[] args)
{
for (int i = 0; i < mutexes.Length; i++) {
mutexes [i] = new Mutex();
}
Thread thread1 = new Thread(() => {
for (int i = 0; i < 1; i++) {
int idx = -1;
try {
idx = WaitHandle.WaitAny (mutexes);
Console.WriteLine($"Thread 1 iter: {i} with mutex: {idx}");
} finally {
if (idx != -1)
mutexes [idx].ReleaseMutex();
}
}
Console.WriteLine("Thread 1 ended");
});
thread1.Start();
thread1.Join();
Thread thread2 = new Thread(() => {
for (int i = 0; i < 1000; i++) {
int idx = -1;
try {
idx = WaitHandle.WaitAny (mutexes);
Console.WriteLine($"Thread 2 iter: {i} with mutex: {idx}");
} finally {
if (idx != -1)
mutexes [idx].ReleaseMutex();
}
}
Console.WriteLine("Thread 2 ended");
});
thread2.Start();
thread2.Join();
}
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -8,7 +8,7 @@ class FsharpPackage(GitHubTarballPackage):
override_properties={ 'make': 'make' })
self.extra_stage_files = ['lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets']
self.sources.extend(['patches/fsharp-portable-pdb.patch', 'patches/fsharp-metadata-table-size-fix.patch'])
self.sources.extend(['patches/fsharp-portable-pdb.patch', 'patches/fsharp-metadata-table-size-fix.patch', 'patches/fsharp-install-netsdk-targets.patch'])
def prep(self):
Package.prep(self)
+1 -1
View File
@@ -3,7 +3,7 @@ import fileinput
class MSBuild (GitHubPackage):
def __init__ (self):
GitHubPackage.__init__ (self, 'mono', 'msbuild', '15.4',
revision = '5633e38dd86d5ca588a7a3b9c8e961b5f7bdcf62')
revision = 'f296e67b6004dd39c3f43b177bcf45dfbe931341')
def build (self):
self.sh ('./cibuild.sh --scope Compile --target Mono --host Mono --config Release')
@@ -0,0 +1,47 @@
From 066a39a0ccd98222a0e372a443e59e28182def50 Mon Sep 17 00:00:00 2001
From: nosami <[email protected]>
Date: Thu, 14 Sep 2017 18:54:49 +0100
Subject: [PATCH] Install Microsoft.FSharp.NetSdk.props and targets into Mono
So that F# .NET Core 2.0 templates can be built with VS for Mac and
Mono msbuild. Re: https://bugzilla.xamarin.com/show_bug.cgi?id=57771
Searching the .NET Core sdk files we see:
/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.FSharp.props:
```
<FSharpPropsShim Condition = " '$(FSharpPropsShim)' == '' and Exists('$(MSBuildToolsPath)\FSharp\Microsoft.FSharp.NetSdk.props') ">$(MSBuildToolsPath)\FSharp\Microsoft.FSharp.NetSdk.props</FSharpPropsShim>
<FSharpPropsShim Condition = " '$(FSharpPropsShim)' == '' and Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.NetSdk.props') ">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.NetSdk.props</FSharpPropsShim>
<Import Condition=" '$(UseBundledFSharpTargets)' == 'true' and
Exists('$(FSharpPropsShim)') " Project="$(FSharpPropsShim)" />
```
---
mono/config.make.in | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/mono/config.make.in b/mono/config.make.in
index 6249aca46..573717208 100644
--- a/mono/config.make.in
+++ b/mono/config.make.in
@@ -194,6 +194,18 @@ install-sdk-lib:
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
+ \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
+ \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
fi
@if test x-$(outsuffix) = x-net40; then \
if test -e $(outdir)$(NAME).dll; then \
@@ -2,7 +2,7 @@ diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets b/src/fsharp/FShar
index 34d716485..ec99e87ed 100644
--- a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets
+++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets
@@ -41,6 +41,16 @@ this file.
@@ -41,6 +41,21 @@ this file.
<RootNamespace Condition="'$(RootNamespace)'==''">RootNamespace</RootNamespace>
<Actual32Bit Condition="'$(TargetFrameworkVersion)'=='v2.0' or '$(TargetFrameworkVersion)'=='v3.0' or '$(TargetFrameworkVersion)'=='v3.5' or '$(TargetFrameworkVersion)'=='v4.0'">false</Actual32Bit>
<Actual32Bit Condition="!('$(TargetFrameworkVersion)'=='v2.0' or '$(TargetFrameworkVersion)'=='v3.0' or '$(TargetFrameworkVersion)'=='v3.5' or '$(TargetFrameworkVersion)'=='v4.0')">$(Prefer32Bit)</Actual32Bit>
@@ -15,7 +15,12 @@ index 34d716485..ec99e87ed 100644
+ <_ConfigurationNameTmp>$(ConfigurationName)</_ConfigurationNameTmp>
+ <_ConfigurationNameTmp Condition="'$(ConfigurationName)' == ''">$(Configuration)</_ConfigurationNameTmp>
+
+ <!-- _DebugFileExt is not an upstream msbuild feature yet -->
+ <_DebugFileExt>.pdb</_DebugFileExt>
+ <_DebugFileExt Condition="'$(FscDebugFileExt)' != ''">$(FscDebugFileExt)</_DebugFileExt>
+
+ <DebugType Condition="'$(OS)' != 'Windows_NT' And ('$(DebugSymbols)'=='True' or ('$(DebugSymbols)'=='' And '$(_ConfigurationNameTmp)'=='Debug'))">portable</DebugType>
+ <DebugType Condition="'$(FscDebugType)' != ''">$(FscDebugType)</DebugType>
</PropertyGroup>
<!--
+2 -2
View File
@@ -100,7 +100,7 @@ class MonoReleaseProfile(DarwinProfile):
self.env.set('PANGO_SYSCONFDIR', '%{staged_prefix}/etc')
self.env.set('PANGO_LIBDIR', '%{staged_prefix}/lib')
# self.env.set ('MONO_PATH', '%{staged_prefix}/lib/mono/4.0')
self.debug_info = ['gtk+', 'cairo',
self.debug_info = ['glib', 'gtk+', 'cairo',
'pango', 'mono', 'llvm', 'libgdiplus']
self.cache_host = None
@@ -396,4 +396,4 @@ class MonoReleaseProfile(DarwinProfile):
subprocess.call(['bash', '-c', path])
MonoReleaseProfile()
MonoReleaseProfile()
+6 -3
View File
@@ -1177,10 +1177,13 @@ namespace Mono.Tools.LocaleBuilder
if (el != null)
ni.PositiveSign = el.InnerText;
// CLDR uses unicode negative sign for some culture (e.g sv, is, lt, don't kwnow why) but .NET always
// uses simple "-" sign and what is worse the parsing code cannot deal with non-ASCII values
ni.NegativeSign = "-";
/*
el = node.SelectSingleNode ("minusSign");
if (el != null) {
// CLDR uses unicode negative sign for some culture (e.g sv, is, lt, don't kwnow why) but .net always
// uses simple - sign
switch (el.InnerText) {
case "\u2212":
case "\u200F\u002D": // Remove any right-to-left mark characters
@@ -1194,7 +1197,7 @@ namespace Mono.Tools.LocaleBuilder
break;
}
}
*/
el = node.SelectSingleNode ("infinity");
// We cannot use the value from CLDR because many broken
+1 -1
View File
@@ -41,7 +41,7 @@ minimal: locale-builder.exe locale-data
$(RUNTIME) locale-builder.exe --locales '$(MINIMAL_LOCALES)'
locale-data:
if ! test -d CLDR/common ; then \
if ! test -e CLDR/common/supplemental/supplementalData.xml ; then \
curl http://www.unicode.org/Public/cldr/30.0.2/core.zip -o core.zip ; \
unzip core.zip -d CLDR ; \
fi