diff --git a/configure.REMOVED.git-id b/configure.REMOVED.git-id index f5f55a41ab..b8818105d8 100644 --- a/configure.REMOVED.git-id +++ b/configure.REMOVED.git-id @@ -1 +1 @@ -523906662921cbaf2a45e1930b524dd9e64bcc91 \ No newline at end of file +049b897e1931b418af32b321b8bec26b0c4f1210 \ No newline at end of file diff --git a/configure.ac.REMOVED.git-id b/configure.ac.REMOVED.git-id index ba3bdf68d5..522630f003 100644 --- a/configure.ac.REMOVED.git-id +++ b/configure.ac.REMOVED.git-id @@ -1 +1 @@ -79b8df2131d5b3213b46975e3dc08979ea9001b4 \ No newline at end of file +2460f68689d061e282b97ea542dea9e46ce5f0b5 \ No newline at end of file diff --git a/docs/deploy/mono-api-assembly.html b/docs/deploy/mono-api-assembly.html index da902c70b1..cd7d91b102 100644 --- a/docs/deploy/mono-api-assembly.html +++ b/docs/deploy/mono-api-assembly.html @@ -779,20 +779,16 @@ mono_assembly_getrootdir (void)
Syntax
-
gboolean -mono_assembly_get_assemblyref_checked (MonoImage *image, int index, MonoAssemblyName *aname, MonoError *error) +
void +mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *aname)

Parameters
-
image pointer to the MonoImage to extract the information from.
index index to the assembly reference in the image.
aname pointer to a MonoAssemblyName that will hold the returned value.
error set on error
Return value
-
TRUE on success, otherwise sets error and returns FALSE -
-
Description
+
image pointer to the MonoImage to extract the information from.
index index to the assembly reference in the image.
aname pointer to a MonoAssemblyName that will hold the returned value.
Description

- Fills out the aname with the assembly name of the index assembly reference in image. -

+ Fills out the aname with the assembly name of the index assembly reference in image.
diff --git a/external/corefx/src/Common/src/Interop/OSX/Interop.EventStream.cs b/external/corefx/src/Common/src/Interop/OSX/Interop.EventStream.cs index 7c6e93c761..19e9f5cb62 100644 --- a/external/corefx/src/Common/src/Interop/OSX/Interop.EventStream.cs +++ b/external/corefx/src/Common/src/Interop/OSX/Interop.EventStream.cs @@ -88,10 +88,8 @@ internal static partial class Interop size_t numEvents, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte** eventPaths, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] - FSEventStreamEventFlags[] eventFlags, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] - FSEventStreamEventId[] eventIds); + FSEventStreamEventFlags* eventFlags, + FSEventStreamEventId* eventIds); /// /// Internal wrapper to create a new EventStream to listen to events from the core OS (such as File System events). diff --git a/external/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj b/external/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj index c797318179..6a5fc78601 100644 --- a/external/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj +++ b/external/corefx/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj @@ -1,4 +1,4 @@ - + diff --git a/external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs b/external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs index 959597cfd4..1165464901 100644 --- a/external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs +++ b/external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs @@ -9,10 +9,12 @@ using System.Runtime.InteropServices; using System.Threading; using System.Text; +#pragma warning disable SA1121 // we don't want to simplify built-ins here as we're using aliasing using CFStringRef = System.IntPtr; using FSEventStreamRef = System.IntPtr; using size_t = System.IntPtr; using FSEventStreamEventId = System.UInt64; +using FSEventStreamEventFlags = Interop.EventStream.FSEventStreamEventFlags; using CFRunLoopRef = System.IntPtr; using Microsoft.Win32.SafeHandles; @@ -87,38 +89,38 @@ namespace System.IO private CancellationTokenSource _cancellation; - private static Interop.EventStream.FSEventStreamEventFlags TranslateFlags(NotifyFilters flagsToTranslate) + private static FSEventStreamEventFlags TranslateFlags(NotifyFilters flagsToTranslate) { - Interop.EventStream.FSEventStreamEventFlags flags = 0; + FSEventStreamEventFlags flags = 0; // Always re-create the filter flags when start is called since they could have changed if ((flagsToTranslate & (NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Size)) != 0) { - flags = Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemInodeMetaMod | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemFinderInfoMod | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemModified | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemChangeOwner; + flags = FSEventStreamEventFlags.kFSEventStreamEventFlagItemInodeMetaMod | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemFinderInfoMod | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemModified | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemChangeOwner; } if ((flagsToTranslate & NotifyFilters.Security) != 0) { - flags |= Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemChangeOwner | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemXattrMod; + flags |= FSEventStreamEventFlags.kFSEventStreamEventFlagItemChangeOwner | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemXattrMod; } if ((flagsToTranslate & NotifyFilters.DirectoryName) != 0) { - flags |= Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsDir | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsSymlink | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemCreated | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemRemoved | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemRenamed; + flags |= FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsDir | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsSymlink | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemCreated | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemRemoved | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemRenamed; } if ((flagsToTranslate & NotifyFilters.FileName) != 0) { - flags |= Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsFile | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsSymlink | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemCreated | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemRemoved | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemRenamed; + flags |= FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsFile | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsSymlink | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemCreated | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemRemoved | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemRenamed; } return flags; @@ -127,15 +129,15 @@ namespace System.IO private sealed class RunningInstance { // Flags used to create the event stream - private const Interop.EventStream.FSEventStreamCreateFlags EventStreamFlags = (Interop.EventStream.FSEventStreamCreateFlags.kFSEventStreamCreateFlagFileEvents | - Interop.EventStream.FSEventStreamCreateFlags.kFSEventStreamCreateFlagNoDefer | + private const Interop.EventStream.FSEventStreamCreateFlags EventStreamFlags = (Interop.EventStream.FSEventStreamCreateFlags.kFSEventStreamCreateFlagFileEvents | + Interop.EventStream.FSEventStreamCreateFlags.kFSEventStreamCreateFlagNoDefer | Interop.EventStream.FSEventStreamCreateFlags.kFSEventStreamCreateFlagWatchRoot); // Weak reference to the associated watcher. A weak reference is used so that the FileSystemWatcher may be collected and finalized, // causing an active operation to be torn down. private readonly WeakReference _weakWatcher; - // The user can input relative paths, which can muck with our path comparisons. Save off the + // The user can input relative paths, which can muck with our path comparisons. Save off the // actual full path so we can use it for comparing private string _fullDirectory; @@ -143,13 +145,13 @@ namespace System.IO private bool _includeChildren; // The bitmask of events that we want to send to the user - private Interop.EventStream.FSEventStreamEventFlags _filterFlags; + private FSEventStreamEventFlags _filterFlags; // The EventStream to listen for events on private SafeEventStreamHandle _eventStream; - // Callback delegate for the EventStream events + // Callback delegate for the EventStream events private Interop.EventStream.FSEventStreamCallback _callback; // Token to monitor for cancellation requests, upon which processing is stopped and all @@ -165,7 +167,7 @@ namespace System.IO FileSystemWatcher watcher, string directory, bool includeChildren, - Interop.EventStream.FSEventStreamEventFlags filter, + FSEventStreamEventFlags filter, CancellationToken cancelToken) { Debug.Assert(string.IsNullOrEmpty(directory) == false); @@ -364,13 +366,9 @@ namespace System.IO IntPtr clientCallBackInfo, size_t numEvents, byte** eventPaths, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] - Interop.EventStream.FSEventStreamEventFlags[] eventFlags, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] - FSEventStreamEventId[] eventIds) + FSEventStreamEventFlags* eventFlags, + FSEventStreamEventId* eventIds) { - Debug.Assert((eventPaths != null) && (numEvents.ToInt32() == eventFlags.Length) && (numEvents.ToInt32() == eventIds.Length)); - // Try to get the actual watcher from our weak reference. We maintain a weak reference most of the time // so as to avoid a rooted cycle that would prevent our processing loop from ever ending // if the watcher is dropped by the user without being disposed. If we can't get the watcher, @@ -386,33 +384,33 @@ namespace System.IO if (context is null) { // Flow suppressed, just run here - ProcessEvents(numEvents.ToInt32(), eventPaths, eventFlags, eventIds, watcher); + ProcessEvents(numEvents.ToInt32(), eventPaths, new Span(eventFlags, numEvents.ToInt32()), new Span(eventIds, numEvents.ToInt32()), watcher); } else { ExecutionContext.Run( context, - (object o) => ((RunningInstance)o).ProcessEvents(numEvents.ToInt32(), eventPaths, eventFlags, eventIds, watcher), + (object o) => ((RunningInstance)o).ProcessEvents(numEvents.ToInt32(), eventPaths, new Span(eventFlags, numEvents.ToInt32()), new Span(eventIds, numEvents.ToInt32()), watcher), this); } } private unsafe void ProcessEvents(int numEvents, byte** eventPaths, - Interop.EventStream.FSEventStreamEventFlags[] eventFlags, - FSEventStreamEventId[] eventIds, + Span eventFlags, + Span eventIds, FileSystemWatcher watcher) { - // Since renames come in pairs, when we find the first we need to search for the next one. Once we find it, we'll add it to this - // list so when the for-loop comes across it, we'll skip it since it's already been processed as part of the original of the pair. - List handledRenameEvents = null; - Memory[] events = new Memory[numEvents]; - ParseEvents(); + // Since renames come in pairs, when we reach the first we need to test for the next one if it is the case. If the next one belongs into the pair, + // we'll store the event id so when the for-loop comes across it, we'll skip it since it's already been processed as part of the original of the pair. + int? handledRenameEvents = null; - for (long i = 0; i < numEvents; i++) + for (int i = 0; i < numEvents; i++) { - ReadOnlySpan path = events[i].Span; - Debug.Assert(path[path.Length - 1] != '/', "Trailing slashes on events is not supported"); + using ParsedEvent parsedEvent = ParseEvent(eventPaths[i]); + + ReadOnlySpan path = parsedEvent.Path; + Debug.Assert(path[^1] != '/', "Trailing slashes on events is not supported"); // Match Windows and don't notify us about changes to the Root folder if (_fullDirectory.Length >= path.Length && path.Equals(_fullDirectory.AsSpan(0, path.Length), StringComparison.OrdinalIgnoreCase)) @@ -427,7 +425,7 @@ namespace System.IO watcher.OnError(new ErrorEventArgs(new IOException(SR.FSW_BufferOverflow, (int)eventFlags[i]))); break; } - else if ((handledRenameEvents != null) && (handledRenameEvents.Contains(eventIds[i]))) + else if (handledRenameEvents == i) { // If this event is the second in a rename pair then skip it continue; @@ -460,15 +458,15 @@ namespace System.IO } if (((eventType & WatcherChangeTypes.Renamed) > 0)) { - // Find the rename that is paired to this rename, which should be the next rename in the list - long pairedId = FindRenameChangePairedChange(i, eventFlags); - if (pairedId == long.MinValue) + // Find the rename that is paired to this rename. + int? pairedId = FindRenameChangePairedChange(i, eventFlags, eventIds); + if (!pairedId.HasValue) { - // Getting here means we have a rename without a pair, meaning it should be a create for the + // Getting here means we have a rename without a pair, meaning it should be a create for the // move from unwatched folder to watcher folder scenario or a move from the watcher folder out. // Check if the item exists on disk to check which it is // Don't send a new notification if we already sent one for this event. - if (DoesItemExist(path, IsFlagSet(eventFlags[i], Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsFile))) + if (DoesItemExist(path, eventFlags[i].HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsFile))) { if ((eventType & WatcherChangeTypes.Created) == 0) { @@ -482,74 +480,78 @@ namespace System.IO } else { - // Remove the base directory prefix and add the paired event to the list of + // Remove the base directory prefix and add the paired event to the list of // events to skip and notify the user of the rename - if (events[pairedId].Span.Length >= _fullDirectory.Length - && _fullDirectory.AsSpan().Equals(events[pairedId].Span.Slice(0, _fullDirectory.Length), StringComparison.OrdinalIgnoreCase)) + using (ParsedEvent pairedEvent = ParseEvent(eventPaths[pairedId.GetValueOrDefault()])) { - ReadOnlySpan newPathRelativeName = events[pairedId].Span.Slice(_fullDirectory.Length); + ReadOnlySpan newPathRelativeName = pairedEvent.Path; + if (newPathRelativeName.Length >= _fullDirectory.Length && + newPathRelativeName.StartsWith(_fullDirectory, StringComparison.OrdinalIgnoreCase)) + { + newPathRelativeName = newPathRelativeName.Slice(_fullDirectory.Length); + } + watcher.NotifyRenameEventArgs(WatcherChangeTypes.Renamed, newPathRelativeName, relativePath); } - else - { - //if the base directory prefix isn't there, just use the full absolute path - watcher.NotifyRenameEventArgs(WatcherChangeTypes.Renamed, events[pairedId].Span, relativePath); - } - - // Create a new list, if necessary, and add the event - if (handledRenameEvents == null) - { - handledRenameEvents = new List(); - } - handledRenameEvents.Add(eventIds[pairedId]); + handledRenameEvents = pairedId.GetValueOrDefault(); } } } - - ArraySegment underlyingArray; - if (MemoryMarshal.TryGetArray(events[i], out underlyingArray)) - ArrayPool.Shared.Return(underlyingArray.Array); } this._context = ExecutionContext.Capture(); - void ParseEvents() + ParsedEvent ParseEvent(byte* nativeEventPath) { - for (int i = 0; i < events.Length; i++) + int byteCount = 0; + Debug.Assert(nativeEventPath != null); + byte* temp = nativeEventPath; + + // Finds the position of null character. + while (*temp != 0) { - int byteCount = 0; - Debug.Assert(eventPaths[i] != null); - byte* temp = eventPaths[i]; - - // Finds the position of null character. - while (*temp != 0) - { - temp++; - byteCount++; - } - - Debug.Assert(byteCount > 0, "Empty events are not supported"); - events[i] = new Memory(ArrayPool.Shared.Rent(Encoding.UTF8.GetMaxCharCount(byteCount))); - int charCount; - - // Converting an array of bytes to UTF-8 char array - charCount = Encoding.UTF8.GetChars(new ReadOnlySpan(eventPaths[i], byteCount), events[i].Span); - events[i] = events[i].Slice(0, charCount); + temp++; + byteCount++; } + + Debug.Assert(byteCount > 0, "Empty events are not supported"); + char[] tempBuffer = ArrayPool.Shared.Rent(Encoding.UTF8.GetMaxCharCount(byteCount)); + + // Converting an array of bytes to UTF-8 char array + int charCount = Encoding.UTF8.GetChars(new ReadOnlySpan(nativeEventPath, byteCount), tempBuffer); + return new ParsedEvent(tempBuffer.AsSpan(0, charCount), tempBuffer); } + + } + + private readonly ref struct ParsedEvent + { + + public ParsedEvent(ReadOnlySpan path, char[] tempBuffer) + { + TempBuffer = tempBuffer; + Path = path; + } + + public readonly ReadOnlySpan Path; + + public readonly char[] TempBuffer; + + public void Dispose() => ArrayPool.Shared.Return(TempBuffer); + } /// /// Compares the given event flags to the filter flags and returns which event (if any) corresponds /// to those flags. /// - private WatcherChangeTypes FilterEvents(Interop.EventStream.FSEventStreamEventFlags eventFlags) + private WatcherChangeTypes FilterEvents(FSEventStreamEventFlags eventFlags) { - const Interop.EventStream.FSEventStreamEventFlags changedFlags = Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemInodeMetaMod | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemFinderInfoMod | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemModified | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemChangeOwner | - Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemXattrMod; + const FSEventStreamEventFlags changedFlags = FSEventStreamEventFlags.kFSEventStreamEventFlagItemInodeMetaMod | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemFinderInfoMod | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemModified | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemChangeOwner | + FSEventStreamEventFlags.kFSEventStreamEventFlagItemXattrMod; WatcherChangeTypes eventType = 0; // If any of the Changed flags are set in both Filter and Event then a Changed event has occurred. if (((_filterFlags & changedFlags) & (eventFlags & changedFlags)) > 0) @@ -558,25 +560,25 @@ namespace System.IO } // Notify created/deleted/renamed events if they pass through the filters - bool allowDirs = (_filterFlags & Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsDir) > 0; - bool allowFiles = (_filterFlags & Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsFile) > 0; - bool isDir = (eventFlags & Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsDir) > 0; - bool isFile = (eventFlags & Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsFile) > 0; + bool allowDirs = (_filterFlags & FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsDir) > 0; + bool allowFiles = (_filterFlags & FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsFile) > 0; + bool isDir = (eventFlags & FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsDir) > 0; + bool isFile = (eventFlags & FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsFile) > 0; bool eventIsCorrectType = (isDir && allowDirs) || (isFile && allowFiles); - bool eventIsLink = (eventFlags & (Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsHardlink | Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsSymlink | Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsLastHardlink)) > 0; + bool eventIsLink = (eventFlags & (FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsHardlink | FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsSymlink | FSEventStreamEventFlags.kFSEventStreamEventFlagItemIsLastHardlink)) > 0; if (eventIsCorrectType || ((allowDirs || allowFiles) && (eventIsLink))) { // Notify Created/Deleted/Renamed events. - if (IsFlagSet(eventFlags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemRenamed)) + if (eventFlags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagItemRenamed)) { eventType |= WatcherChangeTypes.Renamed; } - if (IsFlagSet(eventFlags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemCreated)) + if (eventFlags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagItemCreated)) { eventType |= WatcherChangeTypes.Created; } - if (IsFlagSet(eventFlags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemRemoved)) + if (eventFlags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagItemRemoved)) { eventType |= WatcherChangeTypes.Deleted; } @@ -584,15 +586,15 @@ namespace System.IO return eventType; } - private bool ShouldRescanOccur(Interop.EventStream.FSEventStreamEventFlags flags) + private bool ShouldRescanOccur(FSEventStreamEventFlags flags) { // Check if any bit is set that signals that the caller should rescan - return (IsFlagSet(flags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagMustScanSubDirs) || - IsFlagSet(flags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagUserDropped) || - IsFlagSet(flags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagKernelDropped) || - IsFlagSet(flags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagRootChanged) || - IsFlagSet(flags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagMount) || - IsFlagSet(flags, Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagUnmount)); + return (flags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagMustScanSubDirs) || + flags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagUserDropped) || + flags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagKernelDropped) || + flags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagRootChanged) || + flags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagMount) || + flags.HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagUnmount)); } private bool CheckIfPathIsNested(ReadOnlySpan eventPath) @@ -603,35 +605,36 @@ namespace System.IO return _includeChildren || _fullDirectory.AsSpan().StartsWith(System.IO.Path.GetDirectoryName(eventPath), StringComparison.OrdinalIgnoreCase); } - private long FindRenameChangePairedChange( - long currentIndex, - Interop.EventStream.FSEventStreamEventFlags[] eventFlags) + private unsafe int? FindRenameChangePairedChange( + int currentIndex, + Span flags, Span ids) { - // Start at one past the current index and try to find the next Rename item, which should be the old path. - for (long i = currentIndex + 1; i < eventFlags.Length; i++) + // The rename event can be composed of two events. The first contains the original file name the second contains the new file name. + // Each of the events is delivered only when the corresponding folder is watched. It means both events are delivered when the rename/move + // occurs inside the watched folder. When the move has origin o final destination outside, only one event is delivered. To distinguish + // between two nonrelated events and the event which belong together the event ID is tested. Only related rename events differ in ID by one. + // This behavior isn't documented and there is an open radar http://www.openradar.me/13461247. + + int nextIndex = currentIndex + 1; + + if (nextIndex >= flags.Length) + return null; + + if (ids[currentIndex] + 1 == ids[nextIndex] && + flags[nextIndex].HasFlag(FSEventStreamEventFlags.kFSEventStreamEventFlagItemRenamed)) { - if (IsFlagSet(eventFlags[i], Interop.EventStream.FSEventStreamEventFlags.kFSEventStreamEventFlagItemRenamed)) - { - // We found match, stop looking - return i; - } + return nextIndex; } - return long.MinValue; + return null; } - - private static bool IsFlagSet(Interop.EventStream.FSEventStreamEventFlags flags, Interop.EventStream.FSEventStreamEventFlags value) - { - return (value & flags) == value; - } - private static bool DoesItemExist(ReadOnlySpan path, bool isFile) { if (path.IsEmpty || path.Length == 0) return false; if (!isFile) - return FileSystem.DirectoryExists(path); + return FileSystem.DirectoryExists(path); #if MONO return path[path.Length - 1] == '/' #else diff --git a/external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Move.cs b/external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Move.cs index 654cec1cf9..bf8da6bb14 100644 --- a/external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Move.cs +++ b/external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Move.cs @@ -4,6 +4,10 @@ using Xunit; +using System.Collections.Generic; +using System.Linq; +using System.Threading; + namespace System.IO.Tests { public class Directory_Move_Tests : FileSystemWatcherTest @@ -16,11 +20,43 @@ namespace System.IO.Tests } [Fact] + [PlatformSpecific(TestPlatforms.OSX)] public void Directory_Move_From_Watched_To_Unwatched() { DirectoryMove_FromWatchedToUnwatched(WatcherChangeTypes.Deleted); } + [Theory] + [PlatformSpecific(TestPlatforms.OSX)] + [InlineData(1)] + [InlineData(2)] + [InlineData(3)] + public void Directory_Move_Multiple_From_Watched_To_Unwatched_Mac(int filesCount) + { + // On Mac, the FSStream aggregate old events caused by the test setup. + // There is no option how to get rid of it but skip it. + DirectoryMove_Multiple_FromWatchedToUnwatched(filesCount, skipOldEvents: true); + } + + [Theory] + [PlatformSpecific(~TestPlatforms.OSX)] + [InlineData(1)] + [InlineData(2)] + [InlineData(3)] + public void Directory_Move_Multiple_From_Watched_To_Unwatched(int filesCount) + { + DirectoryMove_Multiple_FromWatchedToUnwatched(filesCount, skipOldEvents: false); + } + + [Theory] + [InlineData(1)] + [InlineData(2)] + [InlineData(3)] + public void Directory_Move_Multiple_From_Unatched_To_Watched(int filesCount) + { + DirectoryMove_Multiple_FromUnwatchedToWatched(filesCount); + } + [Fact] [PlatformSpecific(TestPlatforms.Windows)] // Expected WatcherChangeTypes are different based on OS public void Windows_Directory_Move_To_Different_Watched_Directory() @@ -92,6 +128,71 @@ namespace System.IO.Tests } } + private void DirectoryMove_Multiple_FromWatchedToUnwatched(int filesCount, bool skipOldEvents) + { + Assert.InRange(filesCount, 0, int.MaxValue); + + using var watchedTestDirectory = new TempDirectory(GetTestFilePath()); + using var unwatchedTestDirectory = new TempDirectory(GetTestFilePath()); + + var dirs = Enumerable.Range(0, filesCount) + .Select(i => new + { + DirecoryInWatchedDir = Path.Combine(watchedTestDirectory.Path, $"dir{i}"), + DirecoryInUnwatchedDir = Path.Combine(unwatchedTestDirectory.Path, $"dir{i}") + }).ToArray(); + + Array.ForEach(dirs, (dir) => Directory.CreateDirectory(dir.DirecoryInWatchedDir)); + + using var watcher = new FileSystemWatcher(watchedTestDirectory.Path, "*"); + + Action action = () => Array.ForEach(dirs, dir => Directory.Move(dir.DirecoryInWatchedDir, dir.DirecoryInUnwatchedDir)); + + // On macOS, for each file we receive two events as describe in comment below. + int expectEvents = filesCount; + if (skipOldEvents) + expectEvents = expectEvents * 2; + + IEnumerable events = ExpectEvents(watcher, expectEvents, action); + + if (skipOldEvents) + events = events.Where(x => x.EventType != WatcherChangeTypes.Created); + + var expectedEvents = dirs.Select(dir => new FiredEvent(WatcherChangeTypes.Deleted, dir.DirecoryInWatchedDir)); + + // Remove Created events as there is racecondition when create dir and then observe parent folder. It receives Create event altought Watcher is not registered yet. + Assert.Equal(expectedEvents, events.Where(x => x.EventType != WatcherChangeTypes.Created)); + + + } + + private void DirectoryMove_Multiple_FromUnwatchedToWatched(int filesCount) + { + Assert.InRange(filesCount, 0, int.MaxValue); + + using var watchedTestDirectory = new TempDirectory(GetTestFilePath()); + using var unwatchedTestDirectory = new TempDirectory(GetTestFilePath()); + + + var dirs = Enumerable.Range(0, filesCount) + .Select(i => new + { + DirecoryInWatchedDir = Path.Combine(watchedTestDirectory.Path, $"dir{i}"), + DirecoryInUnwatchedDir = Path.Combine(unwatchedTestDirectory.Path, $"dir{i}") + }).ToArray(); + + Array.ForEach(dirs, (dir) => Directory.CreateDirectory(dir.DirecoryInUnwatchedDir)); + + using var watcher = new FileSystemWatcher(watchedTestDirectory.Path, "*"); + + Action action = () => Array.ForEach(dirs, dir => Directory.Move(dir.DirecoryInUnwatchedDir, dir.DirecoryInWatchedDir)); + + List events = ExpectEvents(watcher, filesCount, action); + var expectedEvents = dirs.Select(dir => new FiredEvent(WatcherChangeTypes.Created, dir.DirecoryInWatchedDir)); + + Assert.Equal(expectedEvents, events); + } + private void DirectoryMove_FromWatchedToUnwatched(WatcherChangeTypes eventType) { using (var watchedTestDirectory = new TempDirectory(GetTestFilePath())) @@ -168,4 +269,4 @@ namespace System.IO.Tests #endregion } -} \ No newline at end of file +} diff --git a/external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs b/external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs index f9e37eeb2d..be9d25490f 100644 --- a/external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs +++ b/external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.File.Move.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; using Xunit; namespace System.IO.Tests @@ -28,6 +31,37 @@ namespace System.IO.Tests FileMove_FromWatchedToUnwatched(WatcherChangeTypes.Deleted); } + [Theory] + [PlatformSpecific(TestPlatforms.OSX)] + [InlineData(1)] + [InlineData(2)] + [InlineData(3)] + public void File_Move_Multiple_From_Watched_To_Unwatched_Mac(int filesCount) + { + // On Mac, the FSStream aggregate old events caused by the test setup. + // There is no option how to get rid of it but skip it. + FileMove_Multiple_FromWatchedToUnwatched(filesCount, skipOldEvents: true); + } + + [Theory] + [PlatformSpecific(~TestPlatforms.OSX)] + [InlineData(1)] + [InlineData(2)] + [InlineData(3)] + public void File_Move_From_Watched_To_Unwatched(int filesCount) + { + FileMove_Multiple_FromWatchedToUnwatched(filesCount, skipOldEvents: false); + } + + [Theory] + [InlineData(1)] + [InlineData(2)] + [InlineData(3)] + public void File_Move_Multiple_From_Unwatched_To_WatchedMac(int filesCount) + { + FileMove_Multiple_FromUnwatchedToWatched(filesCount); + } + [Fact] [PlatformSpecific(TestPlatforms.Windows)] // Expected WatcherChangeTypes are different based on OS public void Windows_File_Move_To_Different_Watched_Directory() @@ -147,6 +181,74 @@ namespace System.IO.Tests } } + private void FileMove_Multiple_FromWatchedToUnwatched(int filesCount, bool skipOldEvents) + { + Assert.InRange(filesCount, 0, int.MaxValue); + + using var testDirectory = new TempDirectory(GetTestFilePath()); + using var watchedTestDirectory = new TempDirectory(Path.Combine(testDirectory.Path, "dir_watched")); + using var unwatchedTestDirectory = new TempDirectory(Path.Combine(testDirectory.Path, "dir_unwatched")); + + var files = Enumerable.Range(0, filesCount) + .Select(i => new + { + FileInWatchedDir = Path.Combine(watchedTestDirectory.Path, $"file{i}"), + FileInUnwatchedDir = Path.Combine(unwatchedTestDirectory.Path, $"file{i}") + }).ToArray(); + + Array.ForEach(files, (file) => File.Create(file.FileInWatchedDir).Dispose()); + + using var watcher = new FileSystemWatcher(watchedTestDirectory.Path, "*"); + + Action action = () => Array.ForEach(files, file => File.Move(file.FileInWatchedDir, file.FileInUnwatchedDir)); + + // On macOS, for each file we receive two events as describe in comment below. + int expectEvents = filesCount; + if (skipOldEvents) + { + expectEvents = expectEvents * 3; + } + + IEnumerable events = ExpectEvents(watcher, expectEvents, action); + + // Remove Created and Changed events as there is racecondition when create file and then observe parent folder. It receives Create and Changed event altought Watcher is not registered yet. + if (skipOldEvents) + { + events = events.Where(x => (x.EventType & (WatcherChangeTypes.Created | WatcherChangeTypes.Changed)) == 0); + } + + var expectedEvents = files.Select(file => new FiredEvent(WatcherChangeTypes.Deleted, file.FileInWatchedDir)); + + Assert.Equal(expectedEvents, events); + } + + private void FileMove_Multiple_FromUnwatchedToWatched(int filesCount) + { + Assert.InRange(filesCount, 0, int.MaxValue); + + using var testDirectory = new TempDirectory(GetTestFilePath()); + using var watchedTestDirectory = new TempDirectory(Path.Combine(testDirectory.Path, "dir_watched")); + using var unwatchedTestDirectory = new TempDirectory(Path.Combine(testDirectory.Path, "dir_unwatched")); + + var files = Enumerable.Range(0, filesCount) + .Select(i => new + { + FileInWatchedDir = Path.Combine(watchedTestDirectory.Path, $"file{i}"), + FileInUnwatchedDir = Path.Combine(unwatchedTestDirectory.Path, $"file{i}") + }).ToArray(); + + Array.ForEach(files, (file) => File.Create(file.FileInUnwatchedDir).Dispose()); + + using var watcher = new FileSystemWatcher(watchedTestDirectory.Path, "*"); + + Action action = () => Array.ForEach(files, file => File.Move(file.FileInUnwatchedDir, file.FileInWatchedDir)); + + List events = ExpectEvents(watcher, filesCount, action); + var expectedEvents = files.Select(file => new FiredEvent(WatcherChangeTypes.Created, file.FileInWatchedDir)); + + Assert.Equal(expectedEvents, events); + } + private void FileMove_FromUnwatchedToWatched(WatcherChangeTypes eventType) { using (var testDirectory = new TempDirectory(GetTestFilePath())) @@ -213,4 +315,4 @@ namespace System.IO.Tests #endregion } -} \ No newline at end of file +} diff --git a/external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs b/external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs index 0ce6ebb12b..78dccce319 100644 --- a/external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs +++ b/external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs @@ -484,5 +484,82 @@ namespace System.IO.Tests return newWatcher; } #endif + + internal readonly struct FiredEvent + { + public FiredEvent(WatcherChangeTypes eventType, string dir1, string dir2 = "") => (EventType, Dir1, Dir2) = (eventType, dir1, dir2); + + public readonly WatcherChangeTypes EventType; + public readonly string Dir1; + public readonly string Dir2; + + public override bool Equals(object obj) => obj is FiredEvent evt && Equals(evt); + + public bool Equals(FiredEvent other) => EventType == other.EventType && + Dir1 == other.Dir1 && + Dir2 == other.Dir2; + + + public override int GetHashCode() => EventType.GetHashCode() ^ Dir1.GetHashCode() ^ Dir2.GetHashCode(); + + public override string ToString() => $"{EventType} {Dir1} {Dir2}"; + + } + + // Observe until an expected count of events is triggered, otherwise fail. Return all collected events. + internal static List ExpectEvents(FileSystemWatcher watcher, int expectedEvents, Action action) + { + using var eventsOccured = new AutoResetEvent(false); + var eventsOrrures = 0; + + var events = new List(); + + ErrorEventArgs error = null; + + FileSystemEventHandler fileWatcherEvent = (_, e) => AddEvent(e.ChangeType, e.FullPath); + RenamedEventHandler renameWatcherEvent = (_, e) => AddEvent(e.ChangeType, e.FullPath, e.OldFullPath); + ErrorEventHandler errorHandler = (_, e) => error ??= e ?? new ErrorEventArgs(null); + + watcher.Changed += fileWatcherEvent; + watcher.Created += fileWatcherEvent; + watcher.Deleted += fileWatcherEvent; + watcher.Renamed += renameWatcherEvent; + watcher.Error += errorHandler; + + bool raisingEvent = watcher.EnableRaisingEvents; + watcher.EnableRaisingEvents = true; + + try + { + action(); + eventsOccured.WaitOne(new TimeSpan(0, 0, 5)); + } + finally + { + watcher.Changed -= fileWatcherEvent; + watcher.Created -= fileWatcherEvent; + watcher.Deleted -= fileWatcherEvent; + watcher.Renamed -= renameWatcherEvent; + watcher.Error -= errorHandler; + watcher.EnableRaisingEvents = raisingEvent; + } + + if (error != null) + { + Assert.False(true, $"Filewatcher error event triggered: { error.GetException()?.Message ?? "Unknow error" }"); + } + Assert.True(eventsOrrures == expectedEvents, $"Expected events ({expectedEvents}) count doesn't match triggered events count ({eventsOrrures}):{Environment.NewLine}{String.Join(Environment.NewLine, events)}"); + + return events; + + void AddEvent(WatcherChangeTypes eventType, string dir1, string dir2 = "") + { + events.Add(new FiredEvent(eventType, dir1, dir2)); + if (Interlocked.Increment(ref eventsOrrures) == expectedEvents) + { + eventsOccured.Set(); + } + } + } } } \ No newline at end of file diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs index 390fae3fbe..64b264585e 100644 --- a/mcs/build/common/Consts.cs +++ b/mcs/build/common/Consts.cs @@ -41,7 +41,7 @@ static partial class Consts // Use these assembly version constants to make code more maintainable. // - public const string MonoVersion = "6.8.0.85"; + public const string MonoVersion = "6.8.0.87"; public const string MonoCompany = "Mono development team"; public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoCopyright = "(c) Various Mono authors"; diff --git a/mcs/class/PEAPI/Metadata.cs.REMOVED.git-id b/mcs/class/PEAPI/Metadata.cs.REMOVED.git-id index d6d502279d..5949292755 100644 --- a/mcs/class/PEAPI/Metadata.cs.REMOVED.git-id +++ b/mcs/class/PEAPI/Metadata.cs.REMOVED.git-id @@ -1 +1 @@ -222ece4633ae80aea9d99ef4526b5a75372aa725 \ No newline at end of file +98e81a42aedaf7e4a355b79292c70367377538c1 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id index 0e4d2075ce..4931381741 100644 --- a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -1d6ec4ca64500ff82995780bf33175f1421b7d08 \ No newline at end of file +54d97180aa78f4c8d673a5da0326d2733aa8fdac \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id index 87b5c6a33a..ace4d166d6 100644 --- a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -1c1b67655a882062b5fb2973fc1cdb968c931733 \ No newline at end of file +beccb5ae6dbcd4b168c68fb63b9417d52b95bc8a \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id index e463c245e2..521c24400f 100644 --- a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -8429d46a922f9c2eb6c8aebe20948006528bdd21 \ No newline at end of file +f8f9ccfedec878c09fa0e0d5fd4b87912e952330 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id index 17e220f9d2..0003055058 100644 --- a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id @@ -1 +1 @@ -82b56e2bf5f1981c96e411a0b2a88a1aaf56142e \ No newline at end of file +17ee4ef88336af007120be5b8f3db670de143b1d \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id index de570d44e4..0df8edd93e 100644 --- a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id @@ -1 +1 @@ -56f3d2d99b033dfc3c6159718b9ed4a56b8bd3be \ No newline at end of file +e440f6ac09f22b1db2fe660ed68ae2f423dffe24 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id index 238250a145..69f304c6a7 100644 --- a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -c5d83c42e9e1b343cce4ed2301d445f534429010 \ No newline at end of file +7d9290d77fb963197df93b5e5d2d1b286898bac9 \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id index dd3a266cdd..a14b06698e 100644 --- a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id @@ -1 +1 @@ -85a98d4312254cdf9fc82ee4e2cad84afd515c69 \ No newline at end of file +ace7ea7edcb443539836ff6217f6018f16f5e61b \ No newline at end of file diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id index 08d7ed5ac0..df74e23cca 100644 --- a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -e318cd3079c2f1034c5a6d0874ad3eb544e93782 \ No newline at end of file +955d03cb282a3dc4d8355f27d6f910d7d4778722 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id index 0e4d2075ce..4931381741 100644 --- a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -1d6ec4ca64500ff82995780bf33175f1421b7d08 \ No newline at end of file +54d97180aa78f4c8d673a5da0326d2733aa8fdac \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id index 87b5c6a33a..ace4d166d6 100644 --- a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -1c1b67655a882062b5fb2973fc1cdb968c931733 \ No newline at end of file +beccb5ae6dbcd4b168c68fb63b9417d52b95bc8a \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id index e463c245e2..521c24400f 100644 --- a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -8429d46a922f9c2eb6c8aebe20948006528bdd21 \ No newline at end of file +f8f9ccfedec878c09fa0e0d5fd4b87912e952330 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id index 17e220f9d2..0003055058 100644 --- a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id @@ -1 +1 @@ -82b56e2bf5f1981c96e411a0b2a88a1aaf56142e \ No newline at end of file +17ee4ef88336af007120be5b8f3db670de143b1d \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id index de570d44e4..0df8edd93e 100644 --- a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id @@ -1 +1 @@ -56f3d2d99b033dfc3c6159718b9ed4a56b8bd3be \ No newline at end of file +e440f6ac09f22b1db2fe660ed68ae2f423dffe24 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id index 238250a145..69f304c6a7 100644 --- a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -c5d83c42e9e1b343cce4ed2301d445f534429010 \ No newline at end of file +7d9290d77fb963197df93b5e5d2d1b286898bac9 \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id index dd3a266cdd..a14b06698e 100644 --- a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id @@ -1 +1 @@ -85a98d4312254cdf9fc82ee4e2cad84afd515c69 \ No newline at end of file +ace7ea7edcb443539836ff6217f6018f16f5e61b \ No newline at end of file diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id index 08d7ed5ac0..df74e23cca 100644 --- a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -e318cd3079c2f1034c5a6d0874ad3eb544e93782 \ No newline at end of file +955d03cb282a3dc4d8355f27d6f910d7d4778722 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id index 0e4d2075ce..4931381741 100644 --- a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -1d6ec4ca64500ff82995780bf33175f1421b7d08 \ No newline at end of file +54d97180aa78f4c8d673a5da0326d2733aa8fdac \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id index 87b5c6a33a..ace4d166d6 100644 --- a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -1c1b67655a882062b5fb2973fc1cdb968c931733 \ No newline at end of file +beccb5ae6dbcd4b168c68fb63b9417d52b95bc8a \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id index e463c245e2..521c24400f 100644 --- a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -8429d46a922f9c2eb6c8aebe20948006528bdd21 \ No newline at end of file +f8f9ccfedec878c09fa0e0d5fd4b87912e952330 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id index 17e220f9d2..0003055058 100644 --- a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id @@ -1 +1 @@ -82b56e2bf5f1981c96e411a0b2a88a1aaf56142e \ No newline at end of file +17ee4ef88336af007120be5b8f3db670de143b1d \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id index de570d44e4..0df8edd93e 100644 --- a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id @@ -1 +1 @@ -56f3d2d99b033dfc3c6159718b9ed4a56b8bd3be \ No newline at end of file +e440f6ac09f22b1db2fe660ed68ae2f423dffe24 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id index 238250a145..69f304c6a7 100644 --- a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -c5d83c42e9e1b343cce4ed2301d445f534429010 \ No newline at end of file +7d9290d77fb963197df93b5e5d2d1b286898bac9 \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id index dd3a266cdd..a14b06698e 100644 --- a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id @@ -1 +1 @@ -85a98d4312254cdf9fc82ee4e2cad84afd515c69 \ No newline at end of file +ace7ea7edcb443539836ff6217f6018f16f5e61b \ No newline at end of file diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id index 08d7ed5ac0..df74e23cca 100644 --- a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -e318cd3079c2f1034c5a6d0874ad3eb544e93782 \ No newline at end of file +955d03cb282a3dc4d8355f27d6f910d7d4778722 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id index 0e4d2075ce..4931381741 100644 --- a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -1d6ec4ca64500ff82995780bf33175f1421b7d08 \ No newline at end of file +54d97180aa78f4c8d673a5da0326d2733aa8fdac \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id index 87b5c6a33a..ace4d166d6 100644 --- a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -1c1b67655a882062b5fb2973fc1cdb968c931733 \ No newline at end of file +beccb5ae6dbcd4b168c68fb63b9417d52b95bc8a \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id index 2efd4b78e0..0fa27d9c2b 100644 --- a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -2560cfd4a323f4a2407092e27e70c2264bb4e888 \ No newline at end of file +55660ad557ff73e9436949f751e82a5615aaac79 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id index 17e220f9d2..0003055058 100644 --- a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id @@ -1 +1 @@ -82b56e2bf5f1981c96e411a0b2a88a1aaf56142e \ No newline at end of file +17ee4ef88336af007120be5b8f3db670de143b1d \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id index de570d44e4..0df8edd93e 100644 --- a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id @@ -1 +1 @@ -56f3d2d99b033dfc3c6159718b9ed4a56b8bd3be \ No newline at end of file +e440f6ac09f22b1db2fe660ed68ae2f423dffe24 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id index 238250a145..69f304c6a7 100644 --- a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -c5d83c42e9e1b343cce4ed2301d445f534429010 \ No newline at end of file +7d9290d77fb963197df93b5e5d2d1b286898bac9 \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id index dd3a266cdd..a14b06698e 100644 --- a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id @@ -1 +1 @@ -85a98d4312254cdf9fc82ee4e2cad84afd515c69 \ No newline at end of file +ace7ea7edcb443539836ff6217f6018f16f5e61b \ No newline at end of file diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id index fba02ec67f..d67d6e7f4d 100644 --- a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -591226df1a7c80c93482ac1afbca57e28e110bde \ No newline at end of file +d2d41fd7d7c91c497ac19222c65d7e814c2b9c12 \ No newline at end of file diff --git a/mono/dis/dump.c b/mono/dis/dump.c index 5d652d07e2..4160e7733d 100755 --- a/mono/dis/dump.c +++ b/mono/dis/dump.c @@ -137,15 +137,28 @@ dump_table_assemblyref (MonoImage *m) cols [MONO_ASSEMBLYREF_REV_NUMBER], mono_metadata_string_heap (m, cols [MONO_ASSEMBLYREF_NAME])); fprintf (output, "\tFlags=0x%08x\n", cols [MONO_ASSEMBLYREF_FLAGS]); - ptr = mono_metadata_blob_heap (m, cols [MONO_ASSEMBLYREF_PUBLIC_KEY]); - len = mono_metadata_decode_value (ptr, &ptr); + ptr = mono_metadata_blob_heap_null_ok (m, cols [MONO_ASSEMBLYREF_PUBLIC_KEY]); + if (ptr) + len = mono_metadata_decode_value (ptr, &ptr); + else + len = 0; if (len > 0){ fprintf (output, "\tPublic Key:"); hex_dump (ptr, 0, len); fprintf (output, "\n"); } else fprintf (output, "\tZero sized public key\n"); - + ptr = mono_metadata_blob_heap_null_ok (m, cols [MONO_ASSEMBLYREF_HASH_VALUE]); + if (ptr) + len = mono_metadata_decode_value (ptr, &ptr); + else + len = 0; + if (len > 0) { + fprintf (output, "\tHash:"); + hex_dump (ptr, 0, len); + fprintf (output, "\n"); + } else + fprintf (output, "\tZero sized hash value\n"); } fprintf (output, "\n"); } diff --git a/mono/metadata/assembly.c.REMOVED.git-id b/mono/metadata/assembly.c.REMOVED.git-id index 46bc1ac87b..08815343b9 100644 --- a/mono/metadata/assembly.c.REMOVED.git-id +++ b/mono/metadata/assembly.c.REMOVED.git-id @@ -1 +1 @@ -fc7656937a997d785ce49d5ed636027ccaa5a649 \ No newline at end of file +febd22b26a95d6097c4aa121997d7574cf419cad \ No newline at end of file diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h index b033439c43..02a8027c42 100644 --- a/mono/metadata/metadata-internals.h +++ b/mono/metadata/metadata-internals.h @@ -908,6 +908,8 @@ mono_image_load_metadata (MonoImage *image, MonoCLIImageInfo *iinfo); const char* mono_metadata_string_heap_checked (MonoImage *meta, uint32_t table_index, MonoError *error); +const char * +mono_metadata_blob_heap_null_ok (MonoImage *meta, guint32 index); const char* mono_metadata_blob_heap_checked (MonoImage *meta, uint32_t table_index, MonoError *error); gboolean diff --git a/mono/metadata/metadata.c.REMOVED.git-id b/mono/metadata/metadata.c.REMOVED.git-id index b0967ee7e7..e13749674a 100644 --- a/mono/metadata/metadata.c.REMOVED.git-id +++ b/mono/metadata/metadata.c.REMOVED.git-id @@ -1 +1 @@ -ecc4414cc92dc2f53d51365c34f4ae2e99f1c90e \ No newline at end of file +a596e6a972952f579f24c9d22ea89616ac1acace \ No newline at end of file diff --git a/mono/mini/version.h b/mono/mini/version.h index 615926b1d1..a560cc2418 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "explicit/99e3aed" +#define FULL_VERSION "explicit/df42020" diff --git a/mono/tests/Makefile.am.REMOVED.git-id b/mono/tests/Makefile.am.REMOVED.git-id index 87b5ff3b38..324c35adee 100644 --- a/mono/tests/Makefile.am.REMOVED.git-id +++ b/mono/tests/Makefile.am.REMOVED.git-id @@ -1 +1 @@ -046ae211c02e7a9214df5eb62e04eba4173718fd \ No newline at end of file +d88fbff361799dac3c15471adf0e7a04a130d633 \ No newline at end of file diff --git a/mono/tests/Makefile.in.REMOVED.git-id b/mono/tests/Makefile.in.REMOVED.git-id index fa0632a198..882cc68425 100644 --- a/mono/tests/Makefile.in.REMOVED.git-id +++ b/mono/tests/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -14e93764cea5ce7d67c6d59144319a6657b0abd9 \ No newline at end of file +70f98f3e2316036fb2188cc8e8517025a645391a \ No newline at end of file diff --git a/mono/tests/null-blob-main.cs b/mono/tests/null-blob-main.cs new file mode 100644 index 0000000000..202656a6bc --- /dev/null +++ b/mono/tests/null-blob-main.cs @@ -0,0 +1,19 @@ +using System; +using System.Reflection; + +public class M { + public static int Main () + { + var an = new AssemblyName ("null-blob-ref"); + var assm = Assembly.Load (an); + var t = assm.GetType ("C2"); + var o = Activator.CreateInstance (t); + var mi = t.GetMethod ("M1"); + // This method call to C2.M1 causes a load of null-blob-ref.dll + // which will forward to null-blob-null-blob-assm.dll which is + // an assembly with a size zero Blob stream. Loading + // null-blob-null-blob-assm.dll should not trigger a crash + mi.Invoke (o, new object[] { null } ); + return 0; + } +} diff --git a/mono/tests/null-blob-null-blob-assm.il b/mono/tests/null-blob-null-blob-assm.il new file mode 100644 index 0000000000..04cf661174 --- /dev/null +++ b/mono/tests/null-blob-null-blob-assm.il @@ -0,0 +1,11 @@ +// This assembly compiles to a CIL image with a zero sized Blob stream +.assembly 'null-blob-null-blob-assm' +{ + .ver 0:0:0:0 +} +.assembly extern 'null-blob-tgt' { } +.class extern forwarder C1 +{ + .assembly extern 'null-blob-tgt' +} + diff --git a/mono/tests/null-blob-ref.il b/mono/tests/null-blob-ref.il new file mode 100644 index 0000000000..dff68b5d64 --- /dev/null +++ b/mono/tests/null-blob-ref.il @@ -0,0 +1,46 @@ +.assembly extern mscorlib +{ + .ver 4:0:0:0 + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. +} +.assembly extern 'null-blob-null-blob-assm' +{ + .ver 0:0:0:0 +} +.assembly 'null-blob-ref' +{ + .ver 0:0:0:0 +} +.module 'null-blob-ref.dll' + + + .class public auto ansi beforefieldinit C2 + extends [mscorlib]System.Object + { + + // method line 1 + .method public hidebysig + instance default void M1 (class ['null-blob-null-blob-assm']C1 c1) cil managed + { + // Method begins at RVA 0x2050 + // Code size 2 (0x2) + .maxstack 8 + IL_0000: nop + IL_0001: ret + } // end of method C2::M1 + + // method line 2 + .method public hidebysig specialname rtspecialname + instance default void '.ctor' () cil managed + { + // Method begins at RVA 0x2053 + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void object::'.ctor'() + IL_0006: nop + IL_0007: ret + } // end of method C2::.ctor + + } // end of class C2 + diff --git a/mono/tests/null-blob-tgt.cs b/mono/tests/null-blob-tgt.cs new file mode 100644 index 0000000000..d7a76edfdd --- /dev/null +++ b/mono/tests/null-blob-tgt.cs @@ -0,0 +1,3 @@ + +public class C1 { +} diff --git a/msvc/Makefile.in b/msvc/Makefile.in index 7bd8058722..3f7935e25c 100644 --- a/msvc/Makefile.in +++ b/msvc/Makefile.in @@ -526,8 +526,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@ENABLE_MSVC_FALSE@clean-local: @ENABLE_MSVC_FALSE@install-exec-local: +@ENABLE_MSVC_FALSE@clean-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index 926f8050a3..ba92a421ff 100644 Binary files a/po/mcs/de.gmo and b/po/mcs/de.gmo differ diff --git a/po/mcs/de.po.REMOVED.git-id b/po/mcs/de.po.REMOVED.git-id index 59e486c018..e7e265527d 100644 --- a/po/mcs/de.po.REMOVED.git-id +++ b/po/mcs/de.po.REMOVED.git-id @@ -1 +1 @@ -d017221cd873a9ed90fc072f5c810106ae78bda8 \ No newline at end of file +00c07aa61c23bedf050091b50cfca69e8369bdfc \ No newline at end of file diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index e739948c05..2dc12787e0 100644 Binary files a/po/mcs/es.gmo and b/po/mcs/es.gmo differ diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index 877ecf6b88..5bcb764148 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -217d641a56fa758c931f8ccb4107b333e93c6cb3 \ No newline at end of file +ea43f1caa3df80b21cd4c20aaa37ea7f5c96ea2c \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index b23d1aaccb..394d2ef5c0 100644 Binary files a/po/mcs/ja.gmo and b/po/mcs/ja.gmo differ diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index ae8aa6c933..814af84dde 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -4fd4e8b34ba1d45be6acf5322fd5676b00949f23 \ No newline at end of file +8bb781479bfb5127613ba2f9250eed1da2e41432 \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index a13890a449..761bc64971 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: mono 6.8.0.85\n" +"Project-Id-Version: mono 6.8.0.87\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2020-01-02 08:08+0000\n" +"POT-Creation-Date: 2020-01-07 08:08+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index 66de8f3e13..ea17fdc172 100644 Binary files a/po/mcs/pt_BR.gmo and b/po/mcs/pt_BR.gmo differ diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index 630ad8131f..82f5520c1a 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -17e9cf29008c072d372dae4eae09b113b6ccd9a4 \ No newline at end of file +1f347b6c10e542f310be1586ba1ca7e2f5d46d79 \ No newline at end of file diff --git a/support/Makefile.in b/support/Makefile.in index a38abf9503..883365daa4 100644 --- a/support/Makefile.in +++ b/support/Makefile.in @@ -962,8 +962,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@ENABLE_MSVC_ONLY_TRUE@test-bundle-local: @ENABLE_MSVC_ONLY_FALSE@clean-local: +@ENABLE_MSVC_ONLY_TRUE@test-bundle-local: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \