mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
Compare commits
51
Commits
2018-08-rc
...
2018-08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a07bd426d | ||
|
|
223ea7ef92 | ||
|
|
913c11def5 | ||
|
|
6843da5c57 | ||
|
|
167f04c902 | ||
|
|
082e1a2346 | ||
|
|
18fde9f8c2 | ||
|
|
ea8ae3e8e0 | ||
|
|
d1b7bf2c47 | ||
|
|
3cb36842fc | ||
|
|
6c9921e64b | ||
|
|
4d857ac249 | ||
|
|
a2d28226d4 | ||
|
|
592c75cf1f | ||
|
|
3f5ec6d95c | ||
|
|
bf4e8d2ae1 | ||
|
|
ca30169e75 | ||
|
|
7fb1361513 | ||
|
|
f236105056 | ||
|
|
4b020ca06d | ||
|
|
e475d80db3 | ||
|
|
c87a95ea23 | ||
|
|
75282c430b | ||
|
|
5756d04e1d | ||
|
|
484ce49a0b | ||
|
|
6a81d1dd5f | ||
|
|
fdb26b0a44 | ||
|
|
82547c4a12 | ||
|
|
693806ceda | ||
|
|
9cb3348c31 | ||
|
|
948b450991 | ||
|
|
60e60904ac | ||
|
|
89d7665e28 | ||
|
|
c47ab60cc4 | ||
|
|
7ad1871886 | ||
|
|
56906e2376 | ||
|
|
6ed7152fc8 | ||
|
|
68aad3b0eb | ||
|
|
5dd1c19b53 | ||
|
|
29eb176dd9 | ||
|
|
45e519e9df | ||
|
|
de14ec6c78 | ||
|
|
b041669258 | ||
|
|
d2e33f5f5c | ||
|
|
32f1873983 | ||
|
|
bbf2394619 | ||
|
|
98810acba1 | ||
|
|
d946a25079 | ||
|
|
4d2b7f8b01 | ||
|
|
89fe6abeef | ||
|
|
9d21a2bb15 |
No files matched your search
@@ -42,6 +42,13 @@ dist-hook:
|
||||
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
|
||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||
rm -rf `find $(top_distdir)/external -path '*\.libs'`
|
||||
rm -rf `find $(top_distdir)/external -path '*\.deps'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.o'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.so'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.lo'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.Plo'`
|
||||
rm -f `find $(top_distdir)/external -name '\.dirstamp'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
|
||||
rm -rf "$(top_distdir)/external/linker/linker/Tests"
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [5.18.0],
|
||||
AC_INIT(mono, [5.18.1],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 9fb4259c92...e6f50f3d36.
Vendored
+1
-1
Submodule external/bockbuild updated: ce5406a6df...a9cb11b534.
@@ -33,8 +33,10 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryManager<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryHandle))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryPool<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.OperationStatus))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequenceSegment<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.StandardFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Binary.BinaryPrimitives))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Base64))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Formatter))]
|
||||
|
||||
@@ -41,7 +41,8 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
HttpChannelFactory<IRequestChannel> source;
|
||||
|
||||
List<WebRequest> web_requests = new List<WebRequest> ();
|
||||
object locker = new object();
|
||||
List<WebRequest> web_requests = new List<WebRequest> (); //synced by locker
|
||||
|
||||
// Constructor
|
||||
|
||||
@@ -86,7 +87,12 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
|
||||
var web_request = (HttpWebRequest) HttpWebRequest.Create (destination);
|
||||
web_requests.Add (web_request);
|
||||
|
||||
lock (locker)
|
||||
{
|
||||
web_requests.Add (web_request);
|
||||
}
|
||||
|
||||
result.WebRequest = web_request;
|
||||
web_request.Method = "POST";
|
||||
web_request.ContentType = Encoder.ContentType;
|
||||
@@ -350,9 +356,20 @@ namespace System.ServiceModel.Channels
|
||||
|
||||
protected override void OnAbort ()
|
||||
{
|
||||
foreach (var web_request in web_requests.ToArray ())
|
||||
WebRequest[] current_web_requests;
|
||||
|
||||
lock (locker)
|
||||
{
|
||||
current_web_requests = web_requests.ToArray();
|
||||
}
|
||||
|
||||
foreach (var web_request in current_web_requests)
|
||||
web_request.Abort ();
|
||||
web_requests.Clear ();
|
||||
|
||||
lock(locker)
|
||||
{
|
||||
web_requests.Clear ();
|
||||
}
|
||||
}
|
||||
|
||||
// Close
|
||||
@@ -497,7 +514,10 @@ namespace System.ServiceModel.Channels
|
||||
|
||||
void Cleanup ()
|
||||
{
|
||||
owner.web_requests.Remove (WebRequest);
|
||||
lock (owner.locker)
|
||||
{
|
||||
owner.web_requests.Remove (WebRequest);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,7 +272,8 @@ namespace System.Web.Configuration
|
||||
{
|
||||
string path = NormalizeVirtualPath (virtualPath);
|
||||
|
||||
foreach (VirtualDirectoryMapping mapping in map.VirtualDirectories) {
|
||||
for (int j = 0; j < map.VirtualDirectories.Count; j++) {
|
||||
VirtualDirectoryMapping mapping = map.VirtualDirectories.Get(j);
|
||||
if (path.StartsWith (mapping.VirtualDirectory)) {
|
||||
int i = mapping.VirtualDirectory.Length;
|
||||
if (path.Length == i) {
|
||||
|
||||
@@ -82,3 +82,7 @@ using System.Runtime.InteropServices;
|
||||
#if XAMMAC || XAMMAC_4_5
|
||||
[assembly: InternalsVisibleTo ("Xamarin.Mac, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
|
||||
#endif
|
||||
|
||||
#if MONODROID
|
||||
[assembly: InternalsVisibleTo ("Mono.Android, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
|
||||
#endif
|
||||
@@ -690,7 +690,12 @@ namespace Microsoft.Win32 {
|
||||
|
||||
public void DirtyTimeout (object state)
|
||||
{
|
||||
Flush ();
|
||||
try {
|
||||
Flush ();
|
||||
} catch {
|
||||
// This was identified as a crasher under some scenarios
|
||||
// Internal MS issue: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/787119
|
||||
}
|
||||
}
|
||||
|
||||
public void Flush ()
|
||||
|
||||
@@ -769,7 +769,7 @@ namespace System
|
||||
return GetUtcOffset (dateTimeOffset.UtcDateTime, out isDST);
|
||||
}
|
||||
|
||||
private TimeSpan GetUtcOffset (DateTime dateTime, out bool isDST)
|
||||
private TimeSpan GetUtcOffset (DateTime dateTime, out bool isDST, bool forOffset = false)
|
||||
{
|
||||
isDST = false;
|
||||
|
||||
@@ -781,7 +781,7 @@ namespace System
|
||||
tz = TimeZoneInfo.Local;
|
||||
|
||||
bool isTzDst;
|
||||
var tzOffset = GetUtcOffsetHelper (dateTime, tz, out isTzDst);
|
||||
var tzOffset = GetUtcOffsetHelper (dateTime, tz, out isTzDst, forOffset);
|
||||
|
||||
if (tz == this) {
|
||||
isDST = isTzDst;
|
||||
@@ -792,11 +792,11 @@ namespace System
|
||||
if (!TryAddTicks (dateTime, -tzOffset.Ticks, out utcDateTime, DateTimeKind.Utc))
|
||||
return BaseUtcOffset;
|
||||
|
||||
return GetUtcOffsetHelper (utcDateTime, this, out isDST);
|
||||
return GetUtcOffsetHelper (utcDateTime, this, out isDST, forOffset);
|
||||
}
|
||||
|
||||
// This is an helper method used by the method above, do not use this on its own.
|
||||
private static TimeSpan GetUtcOffsetHelper (DateTime dateTime, TimeZoneInfo tz, out bool isDST)
|
||||
private static TimeSpan GetUtcOffsetHelper (DateTime dateTime, TimeZoneInfo tz, out bool isDST, bool forOffset = false)
|
||||
{
|
||||
if (dateTime.Kind == DateTimeKind.Local && tz != TimeZoneInfo.Local)
|
||||
throw new Exception ();
|
||||
@@ -807,7 +807,7 @@ namespace System
|
||||
return TimeSpan.Zero;
|
||||
|
||||
TimeSpan offset;
|
||||
if (tz.TryGetTransitionOffset(dateTime, out offset, out isDST))
|
||||
if (tz.TryGetTransitionOffset(dateTime, out offset, out isDST, forOffset))
|
||||
return offset;
|
||||
|
||||
if (dateTime.Kind == DateTimeKind.Utc) {
|
||||
@@ -834,10 +834,12 @@ namespace System
|
||||
|
||||
if (tzRule != null && tz.IsInDST (tzRule, dateTime)) {
|
||||
// Replicate what .NET does when given a time which falls into the hour which is lost when
|
||||
// DST starts. isDST should always be true but the offset should be BaseUtcOffset without the
|
||||
// DST starts. isDST should be false and the offset should be BaseUtcOffset without the
|
||||
// DST delta while in that hour.
|
||||
isDST = true;
|
||||
if (forOffset)
|
||||
isDST = true;
|
||||
if (tz.IsInDST (tzRule, dstUtcDateTime)) {
|
||||
isDST = true;
|
||||
return tz.BaseUtcOffset + tzRule.DaylightDelta;
|
||||
} else {
|
||||
return tz.BaseUtcOffset;
|
||||
@@ -946,7 +948,21 @@ namespace System
|
||||
|
||||
public bool IsDaylightSavingTime (DateTimeOffset dateTimeOffset)
|
||||
{
|
||||
return IsDaylightSavingTime (dateTimeOffset.DateTime);
|
||||
var dateTime = dateTimeOffset.DateTime;
|
||||
|
||||
if (dateTime.Kind == DateTimeKind.Local && IsInvalidTime (dateTime))
|
||||
throw new ArgumentException ("dateTime is invalid and Kind is Local");
|
||||
|
||||
if (this == TimeZoneInfo.Utc)
|
||||
return false;
|
||||
|
||||
if (!SupportsDaylightSavingTime)
|
||||
return false;
|
||||
|
||||
bool isDst;
|
||||
GetUtcOffset (dateTime, out isDst, true);
|
||||
|
||||
return isDst;
|
||||
}
|
||||
|
||||
internal DaylightTime GetDaylightChanges (int year)
|
||||
@@ -1183,7 +1199,7 @@ namespace System
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool TryGetTransitionOffset (DateTime dateTime, out TimeSpan offset,out bool isDst)
|
||||
private bool TryGetTransitionOffset (DateTime dateTime, out TimeSpan offset, out bool isDst, bool forOffset = false)
|
||||
{
|
||||
offset = BaseUtcOffset;
|
||||
isDst = false;
|
||||
@@ -1204,13 +1220,22 @@ namespace System
|
||||
return false;
|
||||
}
|
||||
|
||||
AdjustmentRule current = GetApplicableRule(date);
|
||||
AdjustmentRule current = GetApplicableRule (date);
|
||||
if (current != null) {
|
||||
DateTime tStart = TransitionPoint(current.DaylightTransitionStart, date.Year);
|
||||
DateTime tEnd = TransitionPoint(current.DaylightTransitionEnd, date.Year);
|
||||
DateTime tStart = TransitionPoint (current.DaylightTransitionStart, date.Year);
|
||||
DateTime tEnd = TransitionPoint (current.DaylightTransitionEnd, date.Year);
|
||||
TryAddTicks (tStart, -BaseUtcOffset.Ticks, out tStart, DateTimeKind.Utc);
|
||||
TryAddTicks (tEnd, -BaseUtcOffset.Ticks, out tEnd, DateTimeKind.Utc);
|
||||
if ((date >= tStart) && (date <= tEnd)) {
|
||||
offset = baseUtcOffset + current.DaylightDelta;
|
||||
isDst = true;
|
||||
if (forOffset)
|
||||
isDst = true;
|
||||
offset = baseUtcOffset;
|
||||
if (date >= new DateTime (tStart.Ticks + current.DaylightDelta.Ticks, DateTimeKind.Utc))
|
||||
{
|
||||
offset += current.DaylightDelta;
|
||||
isDst = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,15 +405,21 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
#if !MOBILE
|
||||
// Ensure that we can convert a stacktrace to a
|
||||
// telemetry message
|
||||
//
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToState ()
|
||||
void NestedStackTraces (int depth)
|
||||
{
|
||||
if (depth == 0)
|
||||
throw new ArgumentException ("Depth 0 exception");
|
||||
|
||||
try {
|
||||
NestedStackTraces (depth - 1);
|
||||
} catch (Exception exc) {
|
||||
throw new Exception (String.Format ("Depth {0} exception, expect nested", depth), exc);
|
||||
}
|
||||
}
|
||||
void StacktraceToStateTest (int depth)
|
||||
{
|
||||
try {
|
||||
throw new Exception ("#0");
|
||||
NestedStackTraces (depth);
|
||||
} catch (Exception exc) {
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
var convert = monoType.GetMethod("ExceptionToState", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
@@ -424,57 +430,39 @@ namespace MonoTests.System
|
||||
var portable_hash = output.Item2;
|
||||
var unportable_hash = output.Item3;
|
||||
|
||||
// To see what we're working with
|
||||
// Console.WriteLine (dump);
|
||||
|
||||
Assert.IsTrue (portable_hash != 0, "#1");
|
||||
Assert.IsTrue (unportable_hash != 0, "#2");
|
||||
Assert.IsTrue (dump.Length > 0, "#3");
|
||||
}
|
||||
}
|
||||
|
||||
// Console.WriteLine (dump);
|
||||
// dump should look something like:
|
||||
// {
|
||||
// "protocol_version" : "0.0.1",
|
||||
// "configuration" : {
|
||||
// "version" : "5.19.0 (managed_telemetry_pipeline/d342c73e320 Wed Aug 15 14:40:40 EDT 2018)",
|
||||
// "tlc" : "normal",
|
||||
// "sigsgev" : "altstack",
|
||||
// "notifications" : "kqueue",
|
||||
// "architecture" : "amd64",
|
||||
// "disabled_features" : "none",
|
||||
// "smallconfig" : "disabled",
|
||||
// "bigarrays" : "disabled",
|
||||
// "softdebug" : "enabled",
|
||||
// "interpreter" : "enabled",
|
||||
// "llvm_support" : "disabled",
|
||||
// "suspend" : "hybrid"
|
||||
// },
|
||||
// "memory" : {
|
||||
// "Resident Size" : "40693760",
|
||||
// "Virtual Size" : "4521312256",
|
||||
// "minor_gc_time" : "216992",
|
||||
// "major_gc_time" : "0",
|
||||
// "minor_gc_count" : "6",
|
||||
// "major_gc_count" : "0",
|
||||
// "major_gc_time_concurrent" : "0"
|
||||
// },
|
||||
// "threads" : [
|
||||
// {
|
||||
// "is_managed" : false,
|
||||
// "managed_thread_ptr" : "0x0",
|
||||
// "thread_info_addr" : "0x0",
|
||||
// "native_thread_id" : "0x0",
|
||||
// "managed_exception_type" : "System.Exception",
|
||||
// "managed_frames" : [
|
||||
// {
|
||||
// "is_managed" : "true",
|
||||
// "guid" : "43A03618-E657-44B0-B9FA-F63314A3C1B2",
|
||||
// "token" : "0x60008da",
|
||||
// "native_offset" : "0xb2",
|
||||
// "il_offset" : "0x00000"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
}
|
||||
// Ensure that we can convert a stacktrace to a
|
||||
// telemetry message
|
||||
//
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateBase ()
|
||||
{
|
||||
StacktraceToStateTest (0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateDeeper ()
|
||||
{
|
||||
StacktraceToStateTest (2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateOverflow ()
|
||||
{
|
||||
// We set a limit on 15 nested exceptions. Lets check that we're valid
|
||||
// when exceeding that limit.
|
||||
StacktraceToStateTest (20);
|
||||
}
|
||||
|
||||
void DumpSingle ()
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace MonoTests.System
|
||||
return "GTB Standard Time";
|
||||
case "US/Eastern":
|
||||
return "Eastern Standard Time";
|
||||
case "US/Central":
|
||||
return "Central Standard Time";
|
||||
case "US/Pacific":
|
||||
return "Pacific Standard Time";
|
||||
case "Australia/Sydney":
|
||||
@@ -385,23 +387,28 @@ namespace MonoTests.System
|
||||
[Test]
|
||||
public void TestAthensDST_InDSTDelta ()
|
||||
{
|
||||
// In .NET GetUtcOffset() returns the BaseUtcOffset for times within the hour
|
||||
// lost when DST starts but IsDaylightSavingTime() returns true.
|
||||
|
||||
// In .NET/.Net Core GetUtcOffset() returns the BaseUtcOffset for times within the hour
|
||||
// lost when DST starts and IsDaylightSavingTime() returns false for datetime and true for datetimeoffset
|
||||
|
||||
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("Europe/Athens"));
|
||||
|
||||
var date = new DateTime (2014, 3, 30 , 3, 0, 0);
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (date));
|
||||
var date = new DateTime (2014, 3, 30 , 2, 0, 0);
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
|
||||
|
||||
date = new DateTime (2014, 3, 30 , 3, 0, 0);
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
|
||||
|
||||
date = new DateTime (2014, 3, 30 , 3, 1, 0);
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (date));
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
|
||||
|
||||
date = new DateTime (2014, 3, 30 , 3, 59, 0);
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (date));
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
|
||||
|
||||
@@ -429,17 +436,17 @@ namespace MonoTests.System
|
||||
try {
|
||||
|
||||
var date = new DateTime (2014, 3, 30 , 3, 0, 0);
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (date));
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
|
||||
|
||||
date = new DateTime (2014, 3, 30 , 3, 1, 0);
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (date));
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
|
||||
|
||||
date = new DateTime (2014, 3, 30 , 3, 59, 0);
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (date));
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (2, 0, 0), tzi.GetUtcOffset (date));
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (new DateTimeOffset (date, tzi.GetUtcOffset (date))));
|
||||
|
||||
@@ -467,6 +474,31 @@ namespace MonoTests.System
|
||||
dateOffset = new DateTimeOffset (date, offset);
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (dateOffset));
|
||||
}
|
||||
|
||||
// https://github.com/mono/mono/issues/9664
|
||||
[Test]
|
||||
public void Bug_9664 ()
|
||||
{
|
||||
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
|
||||
var date = new DateTime (2019, 3, 9, 21, 0, 0);
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (-6, 0, 0), tzi.GetUtcOffset (date));
|
||||
|
||||
tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
|
||||
date = new DateTime (2019, 3, 10, 2, 0, 0);
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (-6, 0, 0), tzi.GetUtcOffset (date));
|
||||
|
||||
tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
|
||||
date = new DateTime (2019, 3, 10, 2, 30, 0);
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (-6, 0, 0), tzi.GetUtcOffset (date));
|
||||
|
||||
tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
|
||||
date = new DateTime (2019, 3, 10, 3, 0, 0);
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (date));
|
||||
Assert.AreEqual (new TimeSpan (-5, 0, 0), tzi.GetUtcOffset (date));
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
|
||||
@@ -3263,6 +3263,7 @@ namespace MonoTests.System
|
||||
Assert.AreEqual ("System.Int32", t.FullName);
|
||||
}
|
||||
|
||||
/*
|
||||
[Test]
|
||||
#if MONOTOUCH || FULL_AOT_RUNTIME
|
||||
[ExpectedException (typeof (NotSupportedException))]
|
||||
@@ -3321,6 +3322,7 @@ namespace MonoTests.System
|
||||
var g0 = t.GetGenericArguments () [0];
|
||||
Assert.AreSame (g0, ut, "#1");
|
||||
}
|
||||
*/
|
||||
|
||||
[Test]
|
||||
public void MakeGenericType_WrongNumOfArguments ()
|
||||
|
||||
@@ -36,7 +36,7 @@ DISTFILES = $(ROSLYN_FILES_FOR_MONO) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD) csi-tes
|
||||
ifeq ($(PROFILE), $(DEFAULT_PROFILE))
|
||||
|
||||
TARGET_DIR = $(DESTDIR)$(mono_libdir)/mono/$(FRAMEWORK_VERSION)
|
||||
MSBUILD_ROSLYN_DIR = $(DESTDIR)$(mono_libdir)/mono/msbuild/15.0/bin/Roslyn
|
||||
MSBUILD_ROSLYN_DIR = $(DESTDIR)$(mono_libdir)/mono/msbuild/Current/bin/Roslyn
|
||||
|
||||
install-local: install-prototypes
|
||||
$(MKINSTALLDIRS) $(TARGET_DIR)
|
||||
|
||||
@@ -5,6 +5,14 @@ include ../../build/rules.make
|
||||
PROGRAM = cil-stringreplacer.exe
|
||||
NO_INSTALL = yes
|
||||
|
||||
$(topdir)/class/lib/$(PROFILE_DIRECTORY)/tmp/Mono.Cecil.dll: $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Mono.Cecil.dll $(topdir)/class/lib/$(PROFILE_DIRECTORY)/tmp/.stamp
|
||||
cp $< $@
|
||||
|
||||
$(topdir)/class/lib/$(PROFILE_DIRECTORY)/tmp/Mono.Cecil.Mdb.dll: $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Mono.Cecil.Mdb.dll $(topdir)/class/lib/$(PROFILE_DIRECTORY)/tmp/.stamp
|
||||
cp $< $@
|
||||
|
||||
LIB_REFS = System
|
||||
|
||||
API = $(filter basic build, $(PROFILE))
|
||||
ifdef API
|
||||
# It can be run using system .net during boostrap
|
||||
@@ -12,12 +20,24 @@ TARGET_NET_REFERENCE = v4.6
|
||||
# Trick to make it work during boostrap where it has to run with system
|
||||
# assemblies not the ones in lib/basic folder
|
||||
PROGRAM_USE_INTERMEDIATE_FILE = 1
|
||||
endif
|
||||
|
||||
LIB_REFS = System Mono.Cecil
|
||||
$(topdir)/class/lib/$(PROFILE_DIRECTORY)/tmp/cil-stringreplacer.exe: $(topdir)/class/lib/$(PROFILE_DIRECTORY)/tmp/Mono.Cecil.dll
|
||||
|
||||
LIB_REFS += tmp/Mono.Cecil
|
||||
|
||||
ifdef MCS_MODE
|
||||
$(topdir)/class/lib/$(PROFILE_DIRECTORY)/tmp/cil-stringreplacer.exe: $(topdir)/class/lib/$(PROFILE_DIRECTORY)/tmp/Mono.Cecil.Mdb.dll
|
||||
|
||||
LIB_REFS += tmp/Mono.Cecil.Mdb
|
||||
endif # MCS_MODE
|
||||
|
||||
else # Not basic/build
|
||||
LIB_REFS += Mono.Cecil
|
||||
|
||||
ifdef MCS_MODE
|
||||
LIB_REFS += Mono.Cecil.Mdb
|
||||
endif
|
||||
endif # MCS_MODE
|
||||
|
||||
endif # Not basic/build
|
||||
|
||||
include ../../build/executable.make
|
||||
@@ -25,7 +25,7 @@ PCL5_FX_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETPortable/v5.0
|
||||
VS_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/VisualStudio
|
||||
PORTABLE_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Portable
|
||||
NUGET_BUILDTASKS_TARGETS_DIR = $(mono_libdir)/mono/xbuild/Microsoft/NuGet
|
||||
MSBUILD_EXTENSIONS_15_DIR=$(mono_libdir)/mono/xbuild/15.0
|
||||
MSBUILD_EXTENSIONS_CURRENT_DIR=$(mono_libdir)/mono/xbuild/Current
|
||||
|
||||
ifeq (14.0, $(XBUILD_VERSION))
|
||||
install-extras: install-versioned-files install-global-files
|
||||
@@ -97,7 +97,7 @@ install-pcl-targets:
|
||||
done
|
||||
|
||||
install-web-targets:
|
||||
for VERSION in v9.0 v10.0 v11.0 v12.0 v14.0 v15.0; do \
|
||||
for VERSION in v9.0 v10.0 v11.0 v12.0 v14.0 v15.0 v16.0; do \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(VS_TARGETS_DIR)/$$VERSION/WebApplications; \
|
||||
$(INSTALL_DATA) targets/Microsoft.WebApplication.targets $(DESTDIR)$(VS_TARGETS_DIR)/$$VERSION/WebApplications; \
|
||||
done
|
||||
@@ -106,12 +106,12 @@ NUGET_BUILDTASKS_REPO_DIR=$(topdir)/../external/nuget-buildtasks
|
||||
|
||||
install-nuget-targets:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(NUGET_BUILDTASKS_TARGETS_DIR)
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(MSBUILD_EXTENSIONS_15_DIR)/Imports/Microsoft.Common.props/ImportBefore
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(MSBUILD_EXTENSIONS_15_DIR)/Microsoft.Common.targets/ImportAfter
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(MSBUILD_EXTENSIONS_CURRENT_DIR)/Imports/Microsoft.Common.props/ImportBefore
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(MSBUILD_EXTENSIONS_CURRENT_DIR)/Microsoft.Common.targets/ImportAfter
|
||||
$(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets $(DESTDIR)$(NUGET_BUILDTASKS_TARGETS_DIR)
|
||||
$(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.props $(DESTDIR)$(NUGET_BUILDTASKS_TARGETS_DIR)
|
||||
$(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props $(DESTDIR)$(MSBUILD_EXTENSIONS_15_DIR)/Imports/Microsoft.Common.props/ImportBefore
|
||||
$(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets $(DESTDIR)$(MSBUILD_EXTENSIONS_15_DIR)/Microsoft.Common.targets/ImportAfter
|
||||
$(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props $(DESTDIR)$(MSBUILD_EXTENSIONS_CURRENT_DIR)/Imports/Microsoft.Common.props/ImportBefore
|
||||
$(INSTALL_DATA) $(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets $(DESTDIR)$(MSBUILD_EXTENSIONS_CURRENT_DIR)/Microsoft.Common.targets/ImportAfter
|
||||
|
||||
install-nuget-imports:
|
||||
ifeq (14.0, $(XBUILD_VERSION))
|
||||
|
||||
@@ -450,15 +450,18 @@ typedef union {
|
||||
} while (0)
|
||||
|
||||
|
||||
#define amd64_lea_membase_body(inst,reg,basereg,disp) \
|
||||
#define amd64_lea_membase_body(inst,reg,basereg,disp,width) \
|
||||
do { \
|
||||
amd64_emit_rex(inst, 8, (reg), 0, (basereg)); \
|
||||
amd64_emit_rex(inst, width, (reg), 0, (basereg)); \
|
||||
*(inst)++ = (unsigned char)0x8d; \
|
||||
amd64_membase_emit ((inst), (reg), (basereg), (disp)); \
|
||||
} while (0)
|
||||
|
||||
#define amd64_lea4_membase(inst,reg,basereg,disp) \
|
||||
amd64_lea_membase_body((inst), (reg), (basereg), (disp), 4)
|
||||
|
||||
#define amd64_lea_membase(inst,reg,basereg,disp) \
|
||||
amd64_lea_membase_body((inst), (reg), (basereg), (disp))
|
||||
amd64_lea_membase_body((inst), (reg), (basereg), (disp), 8)
|
||||
|
||||
/* Instruction are implicitly 64-bits so don't generate REX for just the size. */
|
||||
#define amd64_push_reg(inst,reg) \
|
||||
|
||||
@@ -412,6 +412,13 @@ typedef struct {
|
||||
MonoArray *out_args;
|
||||
} MonoAsyncCall;
|
||||
|
||||
typedef struct {
|
||||
MonoObject obj;
|
||||
MonoArray *frames;
|
||||
MonoArray *captured_traces;
|
||||
MonoBoolean debug_info;
|
||||
} MonoStackTrace;
|
||||
|
||||
typedef struct {
|
||||
MonoObject obj;
|
||||
gint32 il_offset;
|
||||
|
||||
@@ -498,6 +498,7 @@ mono_set_pending_exception_handle (MonoExceptionHandle exc);
|
||||
#define MONO_MAX_THREAD_NAME_LEN 140
|
||||
#define MONO_MAX_SUMMARY_THREADS 32
|
||||
#define MONO_MAX_SUMMARY_FRAMES 80
|
||||
#define MONO_MAX_SUMMARY_EXCEPTIONS 15
|
||||
|
||||
typedef struct {
|
||||
gboolean is_managed;
|
||||
@@ -527,8 +528,15 @@ typedef struct {
|
||||
} MonoFrameSummary;
|
||||
|
||||
typedef struct {
|
||||
intptr_t offset_free_hash;
|
||||
intptr_t offset_rich_hash;
|
||||
MonoClass *managed_exc_type;
|
||||
|
||||
int num_managed_frames;
|
||||
MonoFrameSummary managed_frames [MONO_MAX_SUMMARY_FRAMES];
|
||||
} MonoExcSummary;
|
||||
|
||||
typedef struct {
|
||||
guint64 offset_free_hash;
|
||||
guint64 offset_rich_hash;
|
||||
} MonoStackHash;
|
||||
|
||||
typedef struct {
|
||||
@@ -560,12 +568,13 @@ typedef struct {
|
||||
int num_unmanaged_frames;
|
||||
MonoFrameSummary unmanaged_frames [MONO_MAX_SUMMARY_FRAMES];
|
||||
|
||||
int num_exceptions;
|
||||
MonoExcSummary exceptions [MONO_MAX_SUMMARY_EXCEPTIONS];
|
||||
|
||||
MonoStackHash hashes;
|
||||
|
||||
MonoContext *ctx;
|
||||
MonoContext ctx_mem;
|
||||
|
||||
MonoClass *managed_exc_type;
|
||||
} MonoThreadSummary;
|
||||
|
||||
gboolean
|
||||
|
||||
@@ -806,6 +806,28 @@ class Tests
|
||||
arr [i] = 1;
|
||||
return llvm_ldlen_licm (arr);
|
||||
}
|
||||
|
||||
private unsafe static void WritePtr (FooStruct *val, out FooStruct* ptr)
|
||||
{
|
||||
ptr = val;
|
||||
}
|
||||
|
||||
public unsafe static int test_0_ldelema_ptr () {
|
||||
int i;
|
||||
int len = 10;
|
||||
FooStruct*[] ptr_array = new FooStruct* [len];
|
||||
FooStruct str = new FooStruct (3);
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
WritePtr (&str, out ptr_array [i]);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (ptr_array [i]->i != 3)
|
||||
return i;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -336,6 +336,7 @@ x86_push_membase: src1:b len:8
|
||||
x86_push_obj: src1:b len:40
|
||||
x86_lea: dest:i src1:i src2:i len:8
|
||||
x86_lea_membase: dest:i src1:i len:11
|
||||
amd64_lea_membase: dest:i src1:i len:11
|
||||
x86_xchg: src1:i src2:i clob:x len:2
|
||||
x86_fpop: src1:f len:3
|
||||
x86_seteq_membase: src1:b len:9
|
||||
|
||||
+19
-10
@@ -2789,6 +2789,8 @@ try_process_suspend (void *the_tls, MonoContext *ctx)
|
||||
/* Fastpath during invokes, see in process_suspend () */
|
||||
if (suspend_count - tls->resume_count == 0)
|
||||
return FALSE;
|
||||
if (tls->invoke)
|
||||
return FALSE;
|
||||
process_suspend (tls, ctx);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -3232,7 +3234,7 @@ compute_frame_info_from (MonoInternalThread *thread, DebuggerTlsData *tls, MonoT
|
||||
}
|
||||
|
||||
static void
|
||||
compute_frame_info (MonoInternalThread *thread, DebuggerTlsData *tls)
|
||||
compute_frame_info (MonoInternalThread *thread, DebuggerTlsData *tls, gboolean force_update)
|
||||
{
|
||||
ComputeFramesUserData user_data;
|
||||
GSList *tmp;
|
||||
@@ -3241,7 +3243,7 @@ compute_frame_info (MonoInternalThread *thread, DebuggerTlsData *tls)
|
||||
MonoUnwindOptions opts = (MonoUnwindOptions)(MONO_UNWIND_DEFAULT | MONO_UNWIND_REG_LOCATIONS);
|
||||
|
||||
// FIXME: Locking on tls
|
||||
if (tls->frames && tls->frames_up_to_date)
|
||||
if (tls->frames && tls->frames_up_to_date && !force_update)
|
||||
return;
|
||||
|
||||
DEBUG_PRINTF (1, "Frames for %p(tid=%lx):\n", thread, (glong)thread->tid);
|
||||
@@ -3977,13 +3979,17 @@ thread_end (MonoProfiler *prof, uintptr_t tid)
|
||||
|
||||
/* We might be called for threads started before we registered the start callback */
|
||||
if (thread) {
|
||||
DEBUG_PRINTF (1, "[%p] Thread terminated, obj=%p, tls=%p.\n", (gpointer)tid, thread, tls);
|
||||
DEBUG_PRINTF (1, "[%p] Thread terminated, obj=%p, tls=%p (domain=%p).\n", (gpointer)tid, thread, tls, (gpointer)mono_domain_get ());
|
||||
|
||||
if (mono_thread_internal_is_current (thread) && !mono_native_tls_get_value (debugger_tls_id)
|
||||
if (mono_thread_internal_is_current (thread) &&
|
||||
(!mono_native_tls_get_value (debugger_tls_id) ||
|
||||
!mono_domain_get ())
|
||||
) {
|
||||
/*
|
||||
* This can happen on darwin since we deregister threads using pthread dtors.
|
||||
* process_profiler_event () and the code it calls cannot handle a null TLS value.
|
||||
* This can happen on darwin and android since we
|
||||
* deregister threads using pthread dtors.
|
||||
* process_profiler_event () and the code it calls
|
||||
* cannot handle a null TLS value.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
@@ -4220,7 +4226,7 @@ ss_calculate_framecount (void *the_tls, MonoContext *ctx, gboolean force_use_ctx
|
||||
|
||||
if (force_use_ctx || !tls->context.valid)
|
||||
mono_thread_state_init_from_monoctx (&tls->context, ctx);
|
||||
compute_frame_info (tls->thread, tls);
|
||||
compute_frame_info (tls->thread, tls, FALSE);
|
||||
if (frames)
|
||||
*frames = (DbgEngineStackFrame**)tls->frames;
|
||||
if (nframes)
|
||||
@@ -4780,7 +4786,7 @@ ss_create_init_args (SingleStepReq *ss_req, SingleStepArgs *args)
|
||||
if (frames && nframes)
|
||||
frame = frames [0];
|
||||
} else {
|
||||
compute_frame_info (ss_req->thread, tls);
|
||||
compute_frame_info (ss_req->thread, tls, FALSE);
|
||||
|
||||
if (tls->frame_count)
|
||||
frame = tls->frames [0];
|
||||
@@ -8510,7 +8516,7 @@ thread_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
|
||||
mono_loader_unlock ();
|
||||
g_assert (tls);
|
||||
|
||||
compute_frame_info (thread, tls);
|
||||
compute_frame_info (thread, tls, TRUE); //the last parameter is TRUE to force that the frame info that will be send is synchronised with the debugged thread
|
||||
|
||||
buffer_add_int (buf, tls->frame_count);
|
||||
for (i = 0; i < tls->frame_count; ++i) {
|
||||
@@ -8564,7 +8570,7 @@ thread_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
|
||||
mono_loader_unlock ();
|
||||
g_assert (tls);
|
||||
|
||||
compute_frame_info (thread, tls);
|
||||
compute_frame_info (thread, tls, FALSE);
|
||||
if (tls->frame_count == 0 || tls->frames [0]->actual_method != method)
|
||||
return ERR_INVALID_ARGUMENT;
|
||||
|
||||
@@ -8630,6 +8636,9 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
|
||||
if (i == tls->frame_count)
|
||||
return ERR_INVALID_FRAMEID;
|
||||
|
||||
/* The thread is still running native code, can't get frame variables info */
|
||||
if (!tls->really_suspended && !tls->async_state.valid)
|
||||
return ERR_NOT_SUSPENDED;
|
||||
frame_idx = i;
|
||||
frame = tls->frames [frame_idx];
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
|
||||
fregs_offset = offset;
|
||||
offset += num_fregs * 8;
|
||||
ctx_offset = offset;
|
||||
ctx_offset += 8;
|
||||
offset += 8;
|
||||
frame_size = ALIGN_TO (offset, MONO_ARCH_FRAME_ALIGNMENT);
|
||||
|
||||
/*
|
||||
|
||||
@@ -1448,6 +1448,20 @@ class Tests
|
||||
var res = builder.Caller (ref awaiter);
|
||||
return res == typeof (bool) ? 0 : 1;
|
||||
}
|
||||
|
||||
struct OneThing<T1> {
|
||||
public T1 Item1;
|
||||
}
|
||||
|
||||
[MethodImpl (MethodImplOptions.NoInlining)]
|
||||
static T FromResult<T> (T result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static int test_42_llvm_gsharedvt_small_vtype_in_regs () {
|
||||
var t = FromResult<OneThing<int>>(new OneThing<int> {Item1 = 42});
|
||||
return t.Item1;
|
||||
}
|
||||
}
|
||||
|
||||
#if !__MOBILE__
|
||||
|
||||
@@ -924,7 +924,7 @@ ves_array_element_address (InterpFrame *frame, MonoClass *required_type, MonoArr
|
||||
if (frame->ex)
|
||||
return NULL;
|
||||
|
||||
if (needs_typecheck && !mono_class_is_assignable_from_internal (m_class_get_element_class (mono_object_class ((MonoObject *) ao)), m_class_get_element_class (required_type))) {
|
||||
if (needs_typecheck && !mono_class_is_assignable_from_internal (m_class_get_element_class (mono_object_class ((MonoObject *) ao)), required_type)) {
|
||||
frame->ex = mono_get_exception_array_type_mismatch ();
|
||||
FILL_IN_TRACE (frame->ex, frame);
|
||||
return NULL;
|
||||
|
||||
@@ -1622,7 +1622,7 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target
|
||||
#endif
|
||||
}
|
||||
if (op == MINT_LDELEMA || op == MINT_LDELEMA_TC) {
|
||||
ADD_CODE (td, get_data_item_index (td, target_method->klass));
|
||||
ADD_CODE (td, get_data_item_index (td, m_class_get_element_class (target_method->klass)));
|
||||
ADD_CODE (td, 1 + m_class_get_rank (target_method->klass));
|
||||
}
|
||||
|
||||
@@ -2010,10 +2010,6 @@ save_seq_points (TransformData *td, MonoJitInfo *jinfo)
|
||||
|
||||
g_byte_array_free (array, TRUE);
|
||||
|
||||
mono_domain_lock (domain);
|
||||
g_hash_table_insert (domain_jit_info (domain)->seq_points, rtm->method, info);
|
||||
mono_domain_unlock (domain);
|
||||
|
||||
jinfo->seq_points = info;
|
||||
}
|
||||
|
||||
@@ -5294,9 +5290,6 @@ mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context, Mon
|
||||
|
||||
return_if_nok (error);
|
||||
|
||||
// FIXME: Add a different callback ?
|
||||
MONO_PROFILER_RAISE (jit_done, (method, imethod->jinfo));
|
||||
|
||||
/* Copy changes back */
|
||||
imethod = real_imethod;
|
||||
mono_os_mutex_lock (&calc_section);
|
||||
@@ -5307,7 +5300,16 @@ mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context, Mon
|
||||
mono_memory_barrier ();
|
||||
imethod->transformed = TRUE;
|
||||
mono_atomic_fetch_add_i32 (&mono_jit_stats.methods_with_interp, 1);
|
||||
|
||||
}
|
||||
mono_os_mutex_unlock (&calc_section);
|
||||
|
||||
mono_domain_lock (domain);
|
||||
if (!g_hash_table_lookup (domain_jit_info (domain)->seq_points, imethod->method))
|
||||
g_hash_table_insert (domain_jit_info (domain)->seq_points, imethod->method, imethod->jinfo->seq_points);
|
||||
mono_domain_unlock (domain);
|
||||
|
||||
// FIXME: Add a different callback ?
|
||||
MONO_PROFILER_RAISE (jit_done, (method, imethod->jinfo));
|
||||
}
|
||||
|
||||
@@ -9653,7 +9653,7 @@ calli_end:
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_class_is_enumtype (klass) && !(val->type == STACK_I8 && TARGET_SIZEOF_VOID_P == 4)) {
|
||||
if (m_class_is_enumtype (klass) && !mini_is_gsharedvt_klass (klass) && !(val->type == STACK_I8 && TARGET_SIZEOF_VOID_P == 4)) {
|
||||
/* Can't do this with 64 bit enums on 32 bit since the vtype decomp pass is ran after the long decomp pass */
|
||||
if (val->opcode == OP_ICONST) {
|
||||
MONO_INST_NEW (cfg, ins, OP_BOX_ICONST);
|
||||
|
||||
@@ -2461,7 +2461,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
|
||||
mini_emit_memcpy (cfg, load->dreg, 0, src->dreg, 0, size, TARGET_SIZEOF_VOID_P);
|
||||
|
||||
if (ainfo->pair_storage [0] == ArgInIReg) {
|
||||
MONO_INST_NEW (cfg, arg, OP_X86_LEA_MEMBASE);
|
||||
MONO_INST_NEW (cfg, arg, OP_AMD64_LEA_MEMBASE);
|
||||
arg->dreg = mono_alloc_ireg (cfg);
|
||||
arg->sreg1 = load->dreg;
|
||||
arg->inst_imm = 0;
|
||||
@@ -3203,7 +3203,7 @@ mono_arch_peephole_pass_1 (MonoCompile *cfg, MonoBasicBlock *bb)
|
||||
* sreg1==dreg restriction. inst_imm > 0 is needed since LEA sign-extends
|
||||
* its operand to 64 bit.
|
||||
*/
|
||||
ins->opcode = OP_X86_LEA_MEMBASE;
|
||||
ins->opcode = ins->opcode == OP_IADD_IMM ? OP_X86_LEA_MEMBASE : OP_AMD64_LEA_MEMBASE;
|
||||
ins->inst_basereg = ins->sreg1;
|
||||
}
|
||||
break;
|
||||
@@ -5074,6 +5074,9 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
|
||||
amd64_lea_memindex (code, ins->dreg, ins->sreg1, ins->inst_imm, ins->sreg2, ins->backend.shift_amount);
|
||||
break;
|
||||
case OP_X86_LEA_MEMBASE:
|
||||
amd64_lea4_membase (code, ins->dreg, ins->sreg1, ins->inst_imm);
|
||||
break;
|
||||
case OP_AMD64_LEA_MEMBASE:
|
||||
amd64_lea_membase (code, ins->dreg, ins->sreg1, ins->inst_imm);
|
||||
break;
|
||||
case OP_X86_XCHG:
|
||||
|
||||
@@ -281,7 +281,7 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
|
||||
src [0] |= (arg_size << 22);
|
||||
/* Encode the offset inside the stack slot */
|
||||
src [0] |= ((ainfo->offset % 8) << 26);
|
||||
if (ainfo2->storage == ArgOnStack)
|
||||
if (ainfo2->storage == ArgOnStack || ainfo2->storage == ArgOnStackR4)
|
||||
dst [0] |= ((ainfo2->offset % 8) << 26);
|
||||
} else if (ainfo2->storage == ArgOnStack && ainfo2->slot_size != 8) {
|
||||
/* The caller passes in an address, need to store it into a stack slot */
|
||||
|
||||
+88
-17
@@ -905,6 +905,46 @@ mono_exception_walk_trace (MonoException *ex, MonoExceptionFrameWalk func, gpoin
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
mono_exception_stackframe_obj_walk (MonoStackFrame *captured_frame, MonoExceptionFrameWalk func, gpointer user_data)
|
||||
{
|
||||
if (!captured_frame)
|
||||
return TRUE;
|
||||
|
||||
gpointer ip = (gpointer) (captured_frame->method_address + captured_frame->native_offset);
|
||||
MonoJitInfo *ji = mono_jit_info_table_find_internal (mono_domain_get (), ip, TRUE, TRUE);
|
||||
|
||||
// Other domain maybe?
|
||||
if (!ji)
|
||||
return FALSE;
|
||||
MonoMethod *method = jinfo_get_method (ji);
|
||||
|
||||
gboolean r = func (method, (gpointer) captured_frame->method_address, captured_frame->native_offset, TRUE, user_data);
|
||||
if (r)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
mono_exception_stacktrace_obj_walk (MonoStackTrace *st, MonoExceptionFrameWalk func, gpointer user_data)
|
||||
{
|
||||
int num_captured = st->captured_traces ? mono_array_length (st->captured_traces) : 0;
|
||||
for (int i=0; i < num_captured; i++) {
|
||||
MonoStackTrace *curr_trace = mono_array_get_fast (st->captured_traces, MonoStackTrace *, i);
|
||||
mono_exception_stacktrace_obj_walk (curr_trace, func, user_data);
|
||||
}
|
||||
|
||||
int num_frames = st->frames ? mono_array_length (st->frames) : 0;
|
||||
for (int frame = 0; frame < num_frames; frame++) {
|
||||
gboolean r = mono_exception_stackframe_obj_walk (mono_array_get_fast (st->frames, MonoStackFrame *, frame), func, user_data);
|
||||
if (r)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
mono_exception_walk_trace_internal (MonoException *ex, MonoExceptionFrameWalk func, gpointer user_data)
|
||||
{
|
||||
@@ -912,13 +952,15 @@ mono_exception_walk_trace_internal (MonoException *ex, MonoExceptionFrameWalk fu
|
||||
|
||||
MonoDomain *domain = mono_domain_get ();
|
||||
MonoArray *ta = ex->trace_ips;
|
||||
int len, i;
|
||||
|
||||
/* Exception is not thrown yet */
|
||||
if (ta == NULL)
|
||||
return FALSE;
|
||||
|
||||
len = mono_array_length (ta) / TRACE_IP_ENTRY_SIZE;
|
||||
for (i = 0; i < len; i++) {
|
||||
int len = mono_array_length (ta) / TRACE_IP_ENTRY_SIZE;
|
||||
gboolean otherwise_has_traces = len > 0;
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
ExceptionTraceIp trace_ip;
|
||||
|
||||
memcpy (&trace_ip, mono_array_addr_fast (ta, ExceptionTraceIp, i), sizeof (ExceptionTraceIp));
|
||||
@@ -938,15 +980,27 @@ mono_exception_walk_trace_internal (MonoException *ex, MonoExceptionFrameWalk fu
|
||||
r = func (NULL, ip, 0, FALSE, user_data);
|
||||
MONO_EXIT_GC_SAFE;
|
||||
if (r)
|
||||
return TRUE;
|
||||
break;
|
||||
} else {
|
||||
MonoMethod *method = get_method_from_stack_frame (ji, generic_info);
|
||||
if (func (method, ji->code_start, (char *) ip - (char *) ji->code_start, TRUE, user_data))
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return len > 0;
|
||||
|
||||
ta = (MonoArray *) ex->captured_traces;
|
||||
len = ta ? mono_array_length (ta) : 0;
|
||||
gboolean captured_has_traces = len > 0;
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
MonoStackTrace *captured_trace = mono_array_get_fast (ta, MonoStackTrace *, i);
|
||||
if (!captured_trace)
|
||||
break;
|
||||
|
||||
mono_exception_stacktrace_obj_walk (captured_trace, func, user_data);
|
||||
}
|
||||
|
||||
return captured_has_traces || otherwise_has_traces;
|
||||
}
|
||||
|
||||
MonoArray *
|
||||
@@ -1512,7 +1566,7 @@ summarize_frame_internal (MonoMethod *method, gpointer ip, size_t native_offset,
|
||||
|
||||
MonoCLIImageInfo *image_info = (MonoCLIImageInfo *)image->image_info;
|
||||
MonoDotNetHeader *header = &image_info->cli_header;
|
||||
dest->managed_data.image_size = header->pe.pe_code_size;
|
||||
dest->managed_data.image_size = header->nt.pe_image_size;
|
||||
|
||||
dest->managed_data.time_date_stamp = image->time_date_stamp;
|
||||
|
||||
@@ -1583,17 +1637,34 @@ mono_summarize_exception (MonoException *exc, MonoThreadSummary *out)
|
||||
{
|
||||
memset (out, 0, sizeof (MonoThreadSummary));
|
||||
|
||||
MonoSummarizeUserData data;
|
||||
memset (&data, 0, sizeof (MonoSummarizeUserData));
|
||||
data.max_frames = MONO_MAX_SUMMARY_FRAMES;
|
||||
data.num_frames = 0;
|
||||
data.frames = out->managed_frames;
|
||||
data.hashes = &out->hashes;
|
||||
MonoException *inner_exc = exc;
|
||||
int exc_index = 0;
|
||||
|
||||
mono_exception_walk_trace (exc, summarize_frame_managed_walk, &data);
|
||||
out->num_managed_frames = data.num_frames;
|
||||
for (exc_index = 0; exc_index < MONO_MAX_SUMMARY_EXCEPTIONS; exc_index++) {
|
||||
if (inner_exc == NULL)
|
||||
break;
|
||||
|
||||
out->managed_exc_type = exc->object.vtable->klass;
|
||||
// Set up state to walk this MonoException's stack
|
||||
MonoSummarizeUserData data;
|
||||
memset (&data, 0, sizeof (MonoSummarizeUserData));
|
||||
data.max_frames = MONO_MAX_SUMMARY_FRAMES;
|
||||
data.num_frames = 0;
|
||||
data.frames = out->exceptions [exc_index].managed_frames;
|
||||
|
||||
// Accumulate all hashes from all exceptions in traveral order
|
||||
data.hashes = &out->hashes;
|
||||
|
||||
mono_exception_walk_trace (inner_exc, summarize_frame_managed_walk, &data);
|
||||
|
||||
// Save per-MonoException info
|
||||
out->exceptions [exc_index].managed_exc_type = inner_exc->object.vtable->klass;
|
||||
out->exceptions [exc_index].num_managed_frames = data.num_frames;
|
||||
|
||||
// Continue to traverse nesting of exceptions
|
||||
inner_exc = (MonoException *) inner_exc->inner_ex;
|
||||
}
|
||||
|
||||
out->num_exceptions = exc_index;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+19
-7
@@ -2236,12 +2236,14 @@ static void
|
||||
emit_args_to_vtype (EmitContext *ctx, LLVMBuilderRef builder, MonoType *t, LLVMValueRef address, LLVMArgInfo *ainfo, LLVMValueRef *args)
|
||||
{
|
||||
int j, size, nslots;
|
||||
MonoClass *klass;
|
||||
|
||||
size = mono_class_value_size (mono_class_from_mono_type (t), NULL);
|
||||
t = mini_get_underlying_type (t);
|
||||
klass = mono_class_from_mono_type (t);
|
||||
size = mono_class_value_size (klass, NULL);
|
||||
|
||||
if (MONO_CLASS_IS_SIMD (ctx->cfg, mono_class_from_mono_type (t))) {
|
||||
if (MONO_CLASS_IS_SIMD (ctx->cfg, klass))
|
||||
address = LLVMBuildBitCast (ctx->builder, address, LLVMPointerType (LLVMInt8Type (), 0), "");
|
||||
}
|
||||
|
||||
if (ainfo->storage == LLVMArgAsFpArgs)
|
||||
nslots = ainfo->nslots;
|
||||
@@ -2262,8 +2264,8 @@ emit_args_to_vtype (EmitContext *ctx, LLVMBuilderRef builder, MonoType *t, LLVMV
|
||||
switch (ainfo->pair_storage [j]) {
|
||||
case LLVMArgInIReg: {
|
||||
part_type = LLVMIntType (part_size * 8);
|
||||
if (MONO_CLASS_IS_SIMD (ctx->cfg, mono_class_from_mono_type (t))) {
|
||||
index [0] = LLVMConstInt (LLVMInt32Type (), j * sizeof (gpointer), FALSE);
|
||||
if (MONO_CLASS_IS_SIMD (ctx->cfg, klass)) {
|
||||
index [0] = LLVMConstInt (LLVMInt32Type (), j * TARGET_SIZEOF_VOID_P, FALSE);
|
||||
addr = LLVMBuildGEP (builder, address, index, 1, "");
|
||||
} else {
|
||||
daddr = LLVMBuildBitCast (ctx->builder, address, LLVMPointerType (IntPtrType (), 0), "");
|
||||
@@ -2310,6 +2312,7 @@ emit_vtype_to_args (EmitContext *ctx, LLVMBuilderRef builder, MonoType *t, LLVMV
|
||||
int j, size, nslots;
|
||||
LLVMTypeRef arg_type;
|
||||
|
||||
t = mini_get_underlying_type (t);
|
||||
size = get_vtype_size (t);
|
||||
|
||||
if (MONO_CLASS_IS_SIMD (ctx->cfg, mono_class_from_mono_type (t)))
|
||||
@@ -3021,11 +3024,12 @@ emit_entry_bb (EmitContext *ctx, LLVMBuilderRef builder)
|
||||
case LLVMArgAsIArgs: {
|
||||
LLVMValueRef arg = LLVMGetParam (ctx->lmethod, pindex);
|
||||
int size;
|
||||
MonoType *t = mini_get_underlying_type (ainfo->type);
|
||||
|
||||
/* The argument is received as an array of ints, store it into the real argument */
|
||||
ctx->addresses [reg] = build_alloca (ctx, ainfo->type);
|
||||
ctx->addresses [reg] = build_alloca (ctx, t);
|
||||
|
||||
size = mono_class_value_size (mono_class_from_mono_type (ainfo->type), NULL);
|
||||
size = mono_class_value_size (mono_class_from_mono_type (t), NULL);
|
||||
if (size == 0) {
|
||||
} else if (size < TARGET_SIZEOF_VOID_P) {
|
||||
/* The upper bits of the registers might not be valid */
|
||||
@@ -8617,6 +8621,14 @@ mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix,
|
||||
add_intrinsics (module->lmodule);
|
||||
add_types (module);
|
||||
|
||||
#ifdef MONO_ARCH_LLVM_TARGET_LAYOUT
|
||||
LLVMSetDataLayout (module->lmodule, MONO_ARCH_LLVM_TARGET_LAYOUT);
|
||||
#endif
|
||||
|
||||
#ifdef MONO_ARCH_LLVM_TARGET_TRIPLE
|
||||
LLVMSetTarget (module->lmodule, MONO_ARCH_LLVM_TARGET_TRIPLE);
|
||||
#endif
|
||||
|
||||
#if LLVM_API_VERSION > 100
|
||||
if (module->emit_dwarf) {
|
||||
char *dir, *build_info, *s, *cu_name;
|
||||
|
||||
@@ -1173,6 +1173,7 @@ MINI_OP(OP_AMD64_AND_MEMBASE_IMM, "amd64_and_membase_imm", NONE, IREG, NO
|
||||
MINI_OP(OP_AMD64_OR_MEMBASE_IMM, "amd64_or_membase_imm", NONE, IREG, NONE)
|
||||
MINI_OP(OP_AMD64_XOR_MEMBASE_IMM, "amd64_xor_membase_imm", NONE, IREG, NONE)
|
||||
MINI_OP(OP_AMD64_MUL_MEMBASE_IMM, "amd64_mul_membase_imm", NONE, IREG, NONE)
|
||||
MINI_OP(OP_AMD64_LEA_MEMBASE, "amd64_lea_membase", IREG, IREG, NONE)
|
||||
|
||||
MINI_OP(OP_AMD64_ADD_REG_MEMBASE, "amd64_add_reg_membase", IREG, IREG, IREG)
|
||||
MINI_OP(OP_AMD64_SUB_REG_MEMBASE, "amd64_sub_reg_membase", IREG, IREG, IREG)
|
||||
|
||||
+1
-1
@@ -624,7 +624,7 @@ typedef struct {
|
||||
LLVMArgStorage storage;
|
||||
|
||||
/*
|
||||
* Only if storage == ArgValuetypeInReg/LLVMArgAsFpArgs.
|
||||
* Only if storage == ArgVtypeInReg/LLVMArgAsFpArgs.
|
||||
* This contains how the parts of the vtype are passed.
|
||||
*/
|
||||
LLVMArgStorage pair_storage [8];
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
* - the defines below
|
||||
*/
|
||||
|
||||
#include "mono-mmap.h"
|
||||
|
||||
#define USE_DL_PREFIX 1
|
||||
#define USE_LOCKS 1
|
||||
/* Use mmap for allocating memory */
|
||||
@@ -1308,14 +1310,18 @@ extern void* sbrk(ptrdiff_t);
|
||||
#define USE_MMAP_BIT (SIZE_T_ONE)
|
||||
|
||||
#ifndef WIN32
|
||||
#define CALL_MUNMAP(a, s) munmap((a), (s))
|
||||
//#define CALL_MUNMAP(a, s) munmap((a), (s))
|
||||
#define CALL_MUNMAP(a, s) mono_vfree((a), (s), MONO_MEM_ACCOUNT_CODE)
|
||||
#define MMAP_PROT (PROT_READ|PROT_WRITE|PROT_EXEC)
|
||||
#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
||||
#endif /* MAP_ANON */
|
||||
#ifdef MAP_ANONYMOUS
|
||||
#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS)
|
||||
#define CALL_MMAP(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0)
|
||||
|
||||
//#define CALL_MMAP(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0)
|
||||
#define CALL_MMAP(s) mono_valloc(NULL, (s), MONO_MMAP_READ|MONO_MMAP_WRITE|MONO_MMAP_EXEC|MONO_MMAP_JIT, MONO_MEM_ACCOUNT_CODE)
|
||||
|
||||
#else /* MAP_ANONYMOUS */
|
||||
/*
|
||||
Nearly all versions of mmap support MAP_ANONYMOUS, so the following
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <utils/mono-mmap.h>
|
||||
#include <utils/strenc.h>
|
||||
#include <utils/mono-io-portability.h>
|
||||
#include <utils/mono-logger-internals.h>
|
||||
|
||||
#if defined(_POSIX_VERSION)
|
||||
#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);
|
||||
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;
|
||||
}
|
||||
@@ -1034,37 +1035,37 @@ mono_pe_file_map (gunichar2 *filename, gint32 *map_size, void **handle)
|
||||
if (!located_filename) {
|
||||
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;
|
||||
}
|
||||
|
||||
fd = open (located_filename, O_RDONLY, 0);
|
||||
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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
*map_size = statbuf.st_size;
|
||||
|
||||
/* Check basic file size */
|
||||
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;
|
||||
}
|
||||
|
||||
file_map = mono_file_map (statbuf.st_size, MONO_MMAP_READ | MONO_MMAP_PRIVATE, fd, 0, handle);
|
||||
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;
|
||||
}
|
||||
exit:
|
||||
|
||||
+57
-23
@@ -259,15 +259,16 @@ mono_state_alloc_mem (MonoStateMem *mem, long tag, size_t size)
|
||||
mem->size = size;
|
||||
|
||||
mem->handle = g_open (name, O_RDWR | O_CREAT | O_EXCL, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||
if (mem->handle < 1)
|
||||
return FALSE;
|
||||
if (mem->handle < 1) {
|
||||
mem->mem = (gpointer *) mmap (0, mem->size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
} else {
|
||||
lseek (mem->handle, mem->size, SEEK_SET);
|
||||
g_write (mem->handle, "", 1);
|
||||
|
||||
lseek (mem->handle, mem->size, SEEK_SET);
|
||||
g_write (mem->handle, "", 1);
|
||||
|
||||
mem->mem = (gpointer *) mmap (0, mem->size, PROT_READ | PROT_WRITE, MAP_SHARED, mem->handle, 0);
|
||||
mem->mem = (gpointer *) mmap (0, mem->size, PROT_READ | PROT_WRITE, MAP_SHARED, mem->handle, 0);
|
||||
}
|
||||
if (mem->mem == GINT_TO_POINTER (-1))
|
||||
g_assert_not_reached ();
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -545,14 +546,11 @@ mono_native_state_add_frames (MonoStateWriter *writer, int num_frames, MonoFrame
|
||||
|
||||
mono_state_writer_printf(writer, "[\n");
|
||||
|
||||
// Where you are: everything works but
|
||||
// the add_frame method
|
||||
|
||||
mono_native_state_add_frame (writer, &frames [0]);
|
||||
for (int i = 1; i < num_frames; ++i) {
|
||||
mono_state_writer_printf(writer, ",\n");
|
||||
mono_native_state_add_frame (writer, &frames [i]);
|
||||
}
|
||||
for (int i = 0; i < num_frames; ++i) {
|
||||
if (i > 0)
|
||||
mono_state_writer_printf(writer, ",\n");
|
||||
mono_native_state_add_frame (writer, &frames [i]);
|
||||
}
|
||||
mono_state_writer_printf(writer, "\n");
|
||||
|
||||
mono_state_writer_indent (writer);
|
||||
@@ -560,6 +558,45 @@ mono_native_state_add_frames (MonoStateWriter *writer, int num_frames, MonoFrame
|
||||
mono_state_writer_printf(writer, "]");
|
||||
}
|
||||
|
||||
static void
|
||||
mono_native_state_add_managed_exc (MonoStateWriter *writer, MonoExcSummary *exc)
|
||||
{
|
||||
mono_state_writer_indent (writer);
|
||||
mono_state_writer_printf(writer, "{\n");
|
||||
writer->indent++;
|
||||
|
||||
assert_has_space (writer);
|
||||
mono_state_writer_indent (writer);
|
||||
mono_state_writer_object_key (writer, "type");
|
||||
mono_state_writer_printf(writer, "\"%s.%s\",\n", m_class_get_name_space (exc->managed_exc_type), m_class_get_name (exc->managed_exc_type));
|
||||
|
||||
mono_native_state_add_frames (writer, exc->num_managed_frames, exc->managed_frames, "managed_frames");
|
||||
|
||||
mono_state_writer_indent (writer);
|
||||
writer->indent--;
|
||||
mono_state_writer_printf(writer, "}\n");
|
||||
}
|
||||
|
||||
static void
|
||||
mono_native_state_add_managed_excs (MonoStateWriter *writer, int num_excs, MonoExcSummary *excs)
|
||||
{
|
||||
mono_state_writer_indent (writer);
|
||||
mono_state_writer_object_key (writer, "exceptions");
|
||||
|
||||
mono_state_writer_printf(writer, "[\n");
|
||||
|
||||
for (int i = 0; i < num_excs; ++i) {
|
||||
if (i > 0)
|
||||
mono_state_writer_printf(writer, ",\n");
|
||||
mono_native_state_add_managed_exc (writer, &excs [i]);
|
||||
}
|
||||
|
||||
mono_state_writer_indent (writer);
|
||||
writer->indent--;
|
||||
mono_state_writer_printf(writer, "]");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mono_native_state_add_thread (MonoStateWriter *writer, MonoThreadSummary *thread, MonoContext *ctx, gboolean first_thread, gboolean crashing_thread)
|
||||
{
|
||||
@@ -619,19 +656,16 @@ mono_native_state_add_thread (MonoStateWriter *writer, MonoThreadSummary *thread
|
||||
mono_state_writer_printf(writer, "\"%s\"", thread->name);
|
||||
}
|
||||
|
||||
if (thread->managed_exc_type) {
|
||||
mono_state_writer_printf(writer, ",\n");
|
||||
assert_has_space (writer);
|
||||
mono_state_writer_indent (writer);
|
||||
mono_state_writer_object_key (writer, "managed_exception_type");
|
||||
mono_state_writer_printf(writer, "\"%s.%s\"", m_class_get_name_space (thread->managed_exc_type), m_class_get_name (thread->managed_exc_type));
|
||||
}
|
||||
|
||||
if (ctx) {
|
||||
mono_state_writer_printf(writer, ",\n");
|
||||
mono_native_state_add_ctx (writer, ctx);
|
||||
}
|
||||
|
||||
if (thread->num_exceptions > 0) {
|
||||
mono_state_writer_printf(writer, ",\n");
|
||||
mono_native_state_add_managed_excs (writer, thread->num_exceptions, thread->exceptions);
|
||||
}
|
||||
|
||||
if (thread->num_managed_frames > 0) {
|
||||
mono_state_writer_printf(writer, ",\n");
|
||||
mono_native_state_add_frames (writer, thread->num_managed_frames, thread->managed_frames, "managed_frames");
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <mono/metadata/threads-types.h>
|
||||
#include <mono/utils/json.h>
|
||||
|
||||
#define MONO_NATIVE_STATE_PROTOCOL_VERSION "0.0.2"
|
||||
#define MONO_NATIVE_STATE_PROTOCOL_VERSION "0.0.4"
|
||||
|
||||
typedef enum {
|
||||
MonoSummaryNone,
|
||||
|
||||
@@ -11,7 +11,8 @@ class FsharpPackage(GitHubTarballPackage):
|
||||
self.sources.extend(['patches/fsharp-portable-pdb.patch',
|
||||
'patches/fsharp-string-switchName.patch',
|
||||
'patches/fsharp-path-overloads.patch',
|
||||
'patches/fsharp-debug-pinvoke-fix.patch'])
|
||||
'patches/fsharp-debug-pinvoke-fix.patch',
|
||||
'patches/fsharp-msbuild-16-0.patch'])
|
||||
|
||||
def prep(self):
|
||||
Package.prep(self)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
GitHubTarballPackage(
|
||||
'mono',
|
||||
'libgdiplus',
|
||||
'5.6',
|
||||
'f07965ec5fc2b22bfb300d5fef410d25ae472a34',
|
||||
'5.6.1',
|
||||
'3506915c865dec746565bbc4a5683d4e53e842b4',
|
||||
configure='CFLAGS="%{gcc_flags} %{local_gcc_flags} -I/opt/X11/include" ./autogen.sh --prefix="%{package_prefix}"',
|
||||
override_properties={
|
||||
'make': 'C_INCLUDE_PATH="" make'})
|
||||
@@ -3,12 +3,11 @@ import fileinput
|
||||
class MSBuild (GitHubPackage):
|
||||
def __init__ (self):
|
||||
GitHubPackage.__init__ (self, 'mono', 'msbuild', '15', # note: fix scripts/ci/run-test-mac-sdk.sh when bumping the version number
|
||||
revision = '804bde742bdf9d65c7ceb672a3d5400c0c22e628')
|
||||
revision = '5b35a69a2e2b09b0ce39616f4639cd1df3d4ccae')
|
||||
|
||||
def build (self):
|
||||
self.sh ('mono --version')
|
||||
self.sh ('./build.sh -hostType mono -configuration Release -skipTests')
|
||||
self.sh ('zip msbuild-bin-logs.zip artifacts/Release-MONO/log/*')
|
||||
self.sh ('./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release --skip_tests')
|
||||
self.sh ('find artifacts -wholename \'*/log/*\' -type f -exec zip msbuild-bin-logs.zip {} \+')
|
||||
|
||||
def install (self):
|
||||
# use the bootstrap msbuild as the system might not have one available!
|
||||
|
||||
@@ -4,7 +4,7 @@ import fileinput
|
||||
class NuGetBinary (Package):
|
||||
|
||||
def __init__(self):
|
||||
Package.__init__(self, name='NuGet', version='4.8.1', sources=[
|
||||
Package.__init__(self, name='NuGet', version='5.0.2', sources=[
|
||||
'https://dist.nuget.org/win-x86-commandline/v%{version}/nuget.exe'])
|
||||
|
||||
def build(self):
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
diff --git a/mono/config.make.in b/mono/config.make.in
|
||||
index 3106ab99f..8af247ffd 100644
|
||||
--- a/mono/config.make.in
|
||||
+++ b/mono/config.make.in
|
||||
@@ -148,6 +148,7 @@ install-sdk-lib:
|
||||
echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/"; \
|
||||
echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/"; \
|
||||
echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/"; \
|
||||
+ echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/"; \
|
||||
\
|
||||
mkdir -p $(tmpdir); \
|
||||
mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \
|
||||
@@ -160,6 +161,7 @@ install-sdk-lib:
|
||||
mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
|
||||
mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
|
||||
mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
|
||||
+ mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \
|
||||
\
|
||||
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \
|
||||
$(INSTALL_LIB) $(outdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \
|
||||
@@ -177,6 +179,7 @@ install-sdk-lib:
|
||||
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
|
||||
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
|
||||
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
|
||||
+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \
|
||||
\
|
||||
echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' > $(tmpdir)Microsoft.Portable.FSharp.Targets; \
|
||||
echo ' <Import Project="$(monodir)/fsharp/Microsoft.Portable.FSharp.Targets" />' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \
|
||||
@@ -191,18 +194,21 @@ 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) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.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.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.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/; \
|
||||
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \
|
||||
fi
|
||||
@if test x-$(outsuffix) = x-net40; then \
|
||||
if test -e $(outdir)$(NAME).dll; then \
|
||||
@@ -75,15 +75,17 @@ install()
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/Microsoft* ${REPODIR}/../../tmp/mono/lib/mono/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/msbuild ${REPODIR}/../../tmp/mono/lib/mono/
|
||||
rm -f ${REPODIR}/../../tmp/mono/lib/mono/msbuild/15.0/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/libhostfxr.dylib
|
||||
rm -f ${REPODIR}/../../tmp/mono/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/libhostfxr.dylib
|
||||
if [ "$1" = "x64" ]; then
|
||||
cp ${REPODIR}/hostfxr-x64/hostfxr.dll ${REPODIR}/../../tmp/mono/lib/mono/msbuild/15.0/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
|
||||
cp ${REPODIR}/hostfxr-x64/hostfxr.dll ${REPODIR}/../../tmp/mono/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
|
||||
else
|
||||
cp ${REPODIR}/hostfxr-x86/hostfxr.dll ${REPODIR}/../../tmp/mono/lib/mono/msbuild/15.0/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
|
||||
cp ${REPODIR}/hostfxr-x86/hostfxr.dll ${REPODIR}/../../tmp/mono/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
|
||||
fi
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/nuget ${REPODIR}/../../tmp/mono/lib/mono/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild-frameworks ${REPODIR}/../../tmp/mono/lib/mono/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/deniedAssembliesList.txt ${REPODIR}/../../tmp/mono/lib/mono/xbuild/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/15.0 ${REPODIR}/../../tmp/mono/lib/mono/xbuild/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/Current ${REPODIR}/../../tmp/mono/lib/mono/xbuild/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/Microsoft/Microsoft.NET.Build.Extensions ${REPODIR}/../../tmp/mono/lib/mono/xbuild/Microsoft/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/Microsoft/NuGet ${REPODIR}/../../tmp/mono/lib/mono/xbuild/Microsoft/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/Microsoft/Portable/VisualStudio ${REPODIR}/../../tmp/mono/lib/mono/xbuild/Microsoft/Portable/
|
||||
@@ -93,6 +95,7 @@ install()
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/Microsoft/VisualStudio/v14.0/FSharp ${REPODIR}/../../tmp/mono/lib/mono/xbuild/Microsoft/VisualStudio/v14.0/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/FSharp ${REPODIR}/../../tmp/mono/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/gac/nunit*/2.4.8.0__96d09a1eb7f44a77/*.dll* ${REPODIR}/../../tmp/mono/lib/mono/4.5/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/FSharp ${REPODIR}/../../tmp/mono/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/4.5/Microsoft.VisualBasic.dll ${REPODIR}/../../tmp/mono/lib/mono/4.5/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/4.5/Mono.Cecil.VB* ${REPODIR}/../../tmp/mono/lib/mono/4.5/
|
||||
rsync -a --copy-links ${REPODIR}/mono-mac/lib/mono/4.5/Mono.WebServer2.dll ${REPODIR}/../../tmp/mono/lib/mono/4.5/
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
def isPrivate = (env.JENKINS_URL ==~ /.*jenkins\.internalx\.com.*/ ? true : false)
|
||||
def isPr = (env.ghprbPullId && !env.ghprbPullId.empty ? true : false)
|
||||
def monoBranch = (isPr ? "pr" : env.BRANCH_NAME)
|
||||
def isReleaseJob = (!isPr && monoBranch ==~ /201\d-\d\d/) // check if we're on a 2017-xx branch, i.e. release
|
||||
def jobName = (isPr ? "build-package-osx-mono-pullrequest" : "build-package-osx-mono")
|
||||
def windowsJobName = (isPr ? "build-package-win-mono-pullrequest" : "build-package-win-mono/${monoBranch}")
|
||||
def jobName = (isPr ? "build-package-osx-mono-pullrequest" : isPrivate ? "build-package-osx-mono-private" : "build-package-osx-mono")
|
||||
def windowsJobName = (isPr ? "build-package-win-mono-pullrequest" : isPrivate ? "build-package-win-mono-private/${monoBranch}" : "build-package-win-mono/${monoBranch}")
|
||||
def isWindowsPrBuild = (isPr && env.ghprbCommentBody.contains("@monojenkins build pkg and msi"))
|
||||
def packageFileName = null
|
||||
def commitHash = null
|
||||
@@ -48,13 +49,13 @@ node ("mono-package") {
|
||||
packageFileName = findFiles (glob: "MonoFramework-MDK-*.pkg")[0].name
|
||||
}
|
||||
stage('Upload .pkg to Azure') {
|
||||
azureUpload(storageCredentialId: "fbd29020e8166fbede5518e038544343",
|
||||
azureUpload(storageCredentialId: (isPrivate ? "bc6a99d18d7d9ca3f6bf6b19e364d564" : "fbd29020e8166fbede5518e038544343"),
|
||||
storageType: "blobstorage",
|
||||
containerName: "${jobName}",
|
||||
virtualPath: "${monoBranch}/${env.BUILD_NUMBER}/${commitHash}/",
|
||||
filesPath: "${packageFileName}",
|
||||
allowAnonymousAccess: true,
|
||||
pubAccessible: true,
|
||||
allowAnonymousAccess: (isPrivate ? false : true),
|
||||
pubAccessible: (isPrivate ? false : true),
|
||||
doNotWaitForPreviousBuild: true,
|
||||
uploadArtifactsOnlyIfSuccessful: true)
|
||||
}
|
||||
@@ -72,7 +73,8 @@ node ("mono-package") {
|
||||
echo "Not a release job, skipping signing."
|
||||
}
|
||||
|
||||
def packageUrl = "https://xamjenkinsartifact.azureedge.net/${jobName}/${monoBranch}/${env.BUILD_NUMBER}/${commitHash}"
|
||||
def downloadHost = (isPrivate ? "dl.internalx.com" : "xamjenkinsartifact.azureedge.net")
|
||||
def packageUrl = "https://${downloadHost}/${jobName}/${monoBranch}/${env.BUILD_NUMBER}/${commitHash}"
|
||||
currentBuild.description = "<hr/><h2>DOWNLOAD: <a href=\"${packageUrl}/${packageFileName}\">${packageFileName}</a></h2><hr/>"
|
||||
|
||||
if (isReleaseJob) { utils.reportGitHubStatus (isPr ? env.ghprbActualCommit : commitHash, 'artifacts.json', "${packageUrl}/artifacts.json", 'SUCCESS', '') }
|
||||
@@ -86,6 +88,11 @@ node ("mono-package") {
|
||||
}
|
||||
}
|
||||
|
||||
if (isPrivate) {
|
||||
// skip Windows build on private jobs for now
|
||||
return
|
||||
}
|
||||
|
||||
if (!isPr || isWindowsPrBuild) {
|
||||
def parameters = [[$class: 'StringParameterValue', name: 'sha1', value: commitHash]]
|
||||
|
||||
|
||||
@@ -3,33 +3,45 @@ properties([/* compressBuildLog() */])
|
||||
|
||||
parallel (
|
||||
"Archive-android-debug-Darwin": {
|
||||
node ("osx-devices") {
|
||||
archive ("android", "debug", "Darwin")
|
||||
throttle(['provisions-android-toolchain']) {
|
||||
node ("osx-devices") {
|
||||
archive ("android", "debug", "Darwin")
|
||||
}
|
||||
}
|
||||
},
|
||||
"Archive-android-release-Darwin": {
|
||||
node ("osx-devices") {
|
||||
archive ("android", "release", "Darwin")
|
||||
throttle(['provisions-android-toolchain']) {
|
||||
node ("osx-devices") {
|
||||
archive ("android", "release", "Darwin")
|
||||
}
|
||||
}
|
||||
},
|
||||
// "Archive-android-debug-Linux": {
|
||||
// node ("debian-9-amd64multiarchi386-preview") {
|
||||
// archive ("android", "debug", "Linux",)
|
||||
// throttle(['provisions-android-toolchain']) {
|
||||
// node ("debian-9-amd64multiarchi386-preview") {
|
||||
// archive ("android", "debug", "Linux",)
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// "Archive-android-release-Linux": {
|
||||
// node ("debian-9-amd64multiarchi386-preview") {
|
||||
// archive ("android", "release", "Linux",)
|
||||
// throttle(['provisions-android-toolchain']) {
|
||||
// node ("debian-9-amd64multiarchi386-preview") {
|
||||
// archive ("android", "release", "Linux",)
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
"Archive-ios-release-Darwin": {
|
||||
node ("osx-devices") {
|
||||
archive ("ios", "release", "Darwin")
|
||||
throttle(['provisions-ios-toolchain']) {
|
||||
node ("osx-devices") {
|
||||
archive ("ios", "release", "Darwin")
|
||||
}
|
||||
}
|
||||
},
|
||||
"Archive-wasm-release-Linux": {
|
||||
node ("ubuntu-1804-amd64") {
|
||||
archive ("wasm", "release", "Linux", "ubuntu-1804-amd64-preview", "npm dotnet-sdk-2.1 nuget")
|
||||
throttle(['provisions-wasm-toolchain']) {
|
||||
node ("ubuntu-1804-amd64") {
|
||||
archive ("wasm", "release", "Linux", "ubuntu-1804-amd64-preview", "npm dotnet-sdk-2.1 nuget")
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -66,19 +78,17 @@ def archive (product, configuration, platform, chrootname = "", chrootadditional
|
||||
|
||||
// build the Archive
|
||||
timeout (time: 300, unit: 'MINUTES') {
|
||||
lock ("${product}-${env.NODE_NAME}") {
|
||||
if (platform == "Darwin") {
|
||||
def brewpackages = "autoconf automake ccache cmake coreutils gdk-pixbuf gettext glib gnu-sed gnu-tar intltool ios-deploy jpeg libffi libidn2 libpng libtiff libtool libunistring ninja openssl p7zip pcre pkg-config scons wget xz"
|
||||
sh "brew install ${brewpackages} || brew upgrade ${brewpackages}"
|
||||
if (platform == "Darwin") {
|
||||
def brewpackages = "autoconf automake ccache cmake coreutils gdk-pixbuf gettext glib gnu-sed gnu-tar intltool ios-deploy jpeg libffi libidn2 libpng libtiff libtool libunistring ninja openssl p7zip pcre pkg-config scons wget xz mingw-w64 make"
|
||||
sh "brew install ${brewpackages} || brew upgrade ${brewpackages}"
|
||||
|
||||
sh "CI_TAGS=sdks-${product},no-tests,${configuration} scripts/ci/run-jenkins.sh"
|
||||
} else if (platform == "Linux") {
|
||||
chroot chrootName: chrootname,
|
||||
command: "CI_TAGS=sdks-${product},no-tests,${configuration} scripts/ci/run-jenkins.sh",
|
||||
additionalPackages: "xvfb xauth mono-devel git python wget bc build-essential libtool autoconf automake gettext iputils-ping cmake lsof libkrb5-dev curl p7zip-full ninja-build zip unzip gcc-multilib g++-multilib mingw-w64 binutils-mingw-w64 openjdk-8-jre ${chrootadditionalpackages}"
|
||||
} else {
|
||||
throw new Exception("Unknown platform \"${platform}\"")
|
||||
}
|
||||
sh "CI_TAGS=sdks-${product},no-tests,${configuration} scripts/ci/run-jenkins.sh"
|
||||
} else if (platform == "Linux") {
|
||||
chroot chrootName: chrootname,
|
||||
command: "CI_TAGS=sdks-${product},no-tests,${configuration} scripts/ci/run-jenkins.sh",
|
||||
additionalPackages: "xvfb xauth mono-devel git python wget bc build-essential libtool autoconf automake gettext iputils-ping cmake lsof libkrb5-dev curl p7zip-full ninja-build zip unzip gcc-multilib g++-multilib mingw-w64 binutils-mingw-w64 openjdk-8-jre ${chrootadditionalpackages}"
|
||||
} else {
|
||||
throw new Exception("Unknown platform \"${platform}\"")
|
||||
}
|
||||
}
|
||||
// move Archive to the workspace root
|
||||
|
||||
@@ -7,8 +7,8 @@ export PATH=${MONO_REPO_ROOT}/external/bockbuild/stage/bin:$PATH
|
||||
|
||||
# Bundled MSBuild
|
||||
cd ${MONO_REPO_ROOT}/external/bockbuild/builds/msbuild-15/
|
||||
${TESTCMD} --label="msbuild-tests" --timeout=180m ./build.sh -hostType mono -configuration Release
|
||||
zip ${MONO_REPO_ROOT}/msbuild-test-results.zip artifacts/2/Release-MONO/TestResults/*
|
||||
${TESTCMD} --label="msbuild-tests" --timeout=180m ./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release
|
||||
zip ${MONO_REPO_ROOT}/msbuild-test-results.zip artifacts/2/TestResults/Release-MONO/* artifacts/2/log/Release-MONO/*.log
|
||||
|
||||
# Bundled LLVM
|
||||
cd ${MONO_REPO_ROOT}/external/bockbuild/builds/mono
|
||||
|
||||
@@ -61,6 +61,11 @@ for ver in $MS_EXTN_VERSIONS; do
|
||||
curl -L https://dotnet.myget.org/F/dotnet-core/api/v2/package/Microsoft.NET.Build.Extensions/${ver} -o nugets/microsoft.net.build.extensions.${ver}.nupkg
|
||||
done
|
||||
|
||||
curl https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.build.extensions/2.1.300-preview3-62804-06/microsoft.net.build.extensions.2.1.300-preview3-62804-06.nupkg -o nugets//microsoft.net.build.extensions.2.1.300-preview3-62804-06.nupkg
|
||||
MS_EXTN_VERSIONS_DOTNETFEED="2.1.300-preview3-62804-06" # https://github.com/dotnet/cli/blob/8c937a0db08e56660aca456ac088f2d0e70735ab/build/DependencyVersions.props
|
||||
MS_EXTN_VERSIONS_DOTNETFEED="$MS_EXTN_VERSIONS_DOTNETFEED 2.1.600-preview-63821-02" # https://github.com/dotnet/cli/blob/4b9d6502f8061db4a56b730d3d4e65262c72ad5c/build/DependencyVersions.props
|
||||
|
||||
for ver in $MS_EXTN_VERSIONS_DOTNETFEED; do
|
||||
curl https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.build.extensions/${ver}/microsoft.net.build.extensions.${ver}.nupkg -o nugets//microsoft.net.build.extensions.${ver}.nupkg
|
||||
done
|
||||
|
||||
touch .download_stamp_file
|
||||
Reference in new issue
Block a user