[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Potential Mono removal from 32-bit big endian PowerPC in next upload



On Wed, Aug 26, 2015 at 12:16:14PM -0400, Lennart Sorensen wrote:
> On Wed, Aug 26, 2015 at 10:45:24AM -0400, Lennart Sorensen wrote:
> > On Tue, Aug 25, 2015 at 05:54:10PM -0400, Lennart Sorensen wrote:
> > > On Tue, Aug 25, 2015 at 10:30:45PM +0100, Jo Shields wrote:
> > > > On 25/08/15 22:29, Lennart Sorensen wrote:
> > > > > I had thought that could be it too. I certainly haven't seen that
> > > > > particular problem so far. Are you simply running make or are you
> > > > > passing any arguments to configure or anything? I tried using a copy
> > > > > of the debian dir from the mono package in experimental since I
> > > > > figured that had to be close to what this tree is based on, but
> > > > > running debian/rules build failed (I forget in what way, but it
> > > > > failed). Just running make seems fine though.
> > > > 
> > > > Just ./autogen.sh, make get-monolite-latest, make
> > > 
> > > Well I am running that in a fresh git clone just to be sure.
> > > 
> > > In case it helps, here is the list of pacakges and versions in my sid chroot:
> > 
> > By the way, one of the tests that fails is this:
> > 
> > Test Case Failures:
> > 1) MonoTests.Microsoft.Build.BuildEngine.Various.Properties.AllowedFrameworkMembers :   #4
> >   Expected string length 1 but was 21. Strings differ at index 0.
> >   Expected: "3"
> >   But was:  "1.04346664401671E-320"
> >   -----------^
> > 
> > Now it happens that as a double, 3 is:
> > 0x40 08 00 00 00 00 00 00
> > 
> > and 1.04346664401671E-320 is:
> > 0x00 00 00 00 00 00 08 40
> > 
> > So yet another obvious endianess bug.
> 
> And a patch that fixes that (since the double's stored in the table are
> little endian, they have to be endian swapped before being returned as
> a double).
> 
> diff --git a/mscorlib/system/globalization/charunicodeinfo.cs b/mscorlib/system/globalization/charunicodeinfo.cs
> index 22a4a01..c8e2ce1 100644
> --- a/mscorlib/system/globalization/charunicodeinfo.cs
> +++ b/mscorlib/system/globalization/charunicodeinfo.cs
> @@ -157,6 +157,22 @@ namespace System.Globalization {
>                  return(value);
>          }
>  
> +        unsafe private static double EndianSwap(double value)
> +        {
> +            if (!BitConverter.IsLittleEndian) {
> +                byte *ptr = (byte *) &value;
> +                double res;
> +                byte *buf = (byte *) &res;
> +                ushort t = sizeof(double) - 1;
> +
> +                for (ushort i = 0; i < sizeof(double); i++)
> +                    buf[t-i] = ptr[i];
> +
> +                return(res);
> +            } else
> +                return(value);
> +        }
> +
>  
>          //We need to allocate the underlying table that provides us with the information that we
>          //use.  We allocate this once in the class initializer and then we don't need to worry
> @@ -322,7 +338,7 @@ namespace System.Globalization {
>              }
>              return (((double*)s_pNumericValues)[pBytePtr[(ch & 0x000f)]]);
>  #else
> -            return (((double*)s_pNumericValues)[pBytePtr[(ch & 0x000f)]]);
> +            return EndianSwap(((double*)s_pNumericValues)[pBytePtr[(ch & 0x000f)]]);
>  #endif
>          }
> 
> 
> Now investigating:
> 
> Test Case Failures:
> 1) MonoTests.Microsoft.Build.Tasks.CopyTest.TestCopy_OverwriteReadOnlyFalse :   A1
>   Expected: ReadOnly
>   But was:  Normal
> 
> at MonoTests.Microsoft.Build.Tasks.CopyTest.TestCopy_OverwriteReadOnlyFalse () [0x00061] in /tmp/mono-new/mono-1/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CopyTest.cs:367
> at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
> at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /tmp/mono-new/mono-1/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
> 
> 2) MonoTests.Microsoft.Build.Tasks.CopyTest.TestCopy_OverwriteReadOnlyTrue :   A1
>   Expected: ReadOnly
>   But was:  Normal
> 
> at MonoTests.Microsoft.Build.Tasks.CopyTest.TestCopy_OverwriteReadOnlyTrue () [0x00061] in /tmp/mono-new/mono-1/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CopyTest.cs:319
> at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
> at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /tmp/mono-new/mono-1/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
> 
> 3) MonoTests.Microsoft.Build.Tasks.CopyTest.TestCopy_Retries :   A1
>   Expected: ReadOnly
>   But was:  Normal
> 
> at MonoTests.Microsoft.Build.Tasks.CopyTest.TestCopy_Retries () [0x00076] in /tmp/mono-new/mono-1/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CopyTest.cs:412
> at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
> at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /tmp/mono-new/mono-1/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

And running the test suite as NOT root solved that.  So now the only
problem I see left in 'make mcs-do-tests' is getting stuck forever in
one test:

make[9]: Entering directory '/tmp/mono-new/mono-1/mcs/class/corlib'
ok=:; \
PATH="/tmp/mono-new/mono-1/runtime/_tmpinst/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" MONO_REGISTRY_PATH="/home/lennartsorensen/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" MONO_PATH="./../../class/lib/net_4_5:/tmp/mono-new/mono-1/mcs/class/corlib/../l
ib/net_4_5:$MONO_PATH" /tmp/mono-new/mono-1/runtime/mono-wrapper --debug  ./../../class/lib/net_4_5/nunit-console.exe  corlib_test_net_4_5.dll -noshadow   -exclude=NotWorking,ValueAdd,CAS,InetAccess -output=TestResult-net_4_5.log -xml=TestResult-net_4_5.xml  || ok=false; 
\
(echo ''; cat TestResult-net_4_5.log) | sed '1,/^Tests run: /d'; xsltproc ./../../build/nunit-summary.xsl TestResult-net_4_5.xml >> TestResult-net_4_5.log ; $ok
NUnit version 2.4.8
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment - 
   OS Version: Unix 3.2.0.4
  CLR Version: 4.0.30319.17020 ( 4.0.2 (ppc32/ff41f08 Tue Aug 25 21:49:38 UTC 2015) )

Excluded categories: NotWorking,ValueAdd,CAS,InetAccess
.........N.N..............................N.N..........N.N..............................N.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................N.N.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................<EF><BB><BF><EF><BB><BF>.N...................................................................................................................................................................................................................................................................................................................................F.F..................................................................................................................N.................................................................................................................N..........N............N..................................................................................................N.N.N.N.N...............................N.N.N.........................................................................................................................................................................................................Killed
warning: failed to load external entity "TestResult-net_4_5.xml"
unable to parse TestResult-net_4_5.xml
../../build/tests.make:86: recipe for target 'run-test-lib' failed
make[9]: *** [run-test-lib] Error 1
make[9]: Leaving directory '/tmp/mono-new/mono-1/mcs/class/corlib'
../../build/rules.make:140: recipe for target 'do-run-test' failed
make[8]: *** [do-run-test] Error 1
make[8]: Leaving directory '/tmp/mono-new/mono-1/mcs/class/corlib'
../build/rules.make:164: recipe for target 'run-test-recursive' failed
make[7]: *** [run-test-recursive] Error 1
make[7]: Leaving directory '/tmp/mono-new/mono-1/mcs/class'
../build/rules.make:140: recipe for target 'do-run-test' failed
make[6]: *** [do-run-test] Error 1
make[6]: Leaving directory '/tmp/mono-new/mono-1/mcs/class'
build/rules.make:164: recipe for target 'run-test-recursive' failed
make[5]: *** [run-test-recursive] Error 1
make[5]: Leaving directory '/tmp/mono-new/mono-1/mcs'
build/rules.make:140: recipe for target 'do-run-test' failed

So I killed the process that was stuck with 'kill -9' and let the rest
of the testsuit run and saw no other problems.  So getting close.

Not sure how to tell what the failing test getting stuck is yet.  I am
killing this to make it continue:
1000      7192 82.1  0.6 171408 107948 pts/0   Sl+  16:21   0:20 /tmp/mono-new/mono-1/mono/mini/mono --config /tmp/mono-new/mono-1/runtime/etc/mono/config --debug ./../../class/lib/net_4_5/nunit-console.exe corlib_test_net_4_5.dll -noshadow -exclude=NotWorking,ValueAdd,CAS,InetAccess -output=TestResult-net_4_5.log -xml=TestResult-net_4_5.xml


-- 
Len Sorensen


Reply to: