Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
AgeCommit message (Collapse)Author
2020-03-09[corlib] Suppress finalization of underlying console FileStreams (#19137)Aleksey Kliger (λgeek)
* [corlib] Suppress finalization of underlying console FileStreams We already suppress the finalization of the CStreamReader and CStreamWriter, but during shutdown, the underlying FileStream may be finalized which invalidates its access field which can lead to a crash. Addresses https://github.com/mono/mono/issues/19005
2020-03-09[bcl] Update BCL Linked Sizemonojenkins
2020-03-05[debugger] NRE when 2 threads try to call GetThreads at same time (#19122)Thays Grazia
As analysed by @jstedfast and me the only way to get this exception with this callstack below is 2 threads call GetThreads at same time, so while one of them is filling the items in the array, the other one is already trying to use the array with null items. ``` System.NullReferenceException: Object reference not set to an instance of an object at Mono.Debugging.Soft.SoftDebuggerSession.GetId (Mono.Debugger.Soft.ThreadMirror thread) [0x00000] in /Users/runner/runners/2.164.6/work/1/s/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:3227 at Mono.Debugging.Soft.SoftDebuggerSession.OnGetThreads (System.Int64 processId) [0x0002c] in /Users/runner/runners/2.164.6/work/1/s/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:879 at Mono.Debugging.Soft.SoftDebuggerSession.GetThread (Mono.Debugging.Client.ProcessInfo process, Mono.Debugger.Soft.ThreadMirror thread) [0x00008] in /Users/runner/runners/2.164.6/work/1/s/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:902 at Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet (Mono.Debugger.Soft.Event[] es, System.Boolean dequeuing) [0x00501] in /Users/runner/runners/2.164.6/work/1/s/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:2038 at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet (Mono.Debugger.Soft.EventSet es) [0x0005b] in /Users/runner/runners/2.164.6/work/1/s/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:1687 at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler () [0x0005d] in /Users/runner/runners/2.164.6/work/1/s/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:1625 ``` PR on mono/debugger-libs -> https://github.com/mono/debugger-libs/pull/300 Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1070384/
2020-03-03Changed Max and MinLengthAttribute validation (#19084)Steve Pfister
It should now validate against ICollection or any other type that has a Count property for that matter. We're still relying on the reference source implementation because corefx strips some types out. Fixes https://github.com/mono/mono/issues/19022
2020-02-28[wasm] Use PNSE version of System.Net.NetworkInformation.NetworkInterface ↵Maxim Lipnin
(#19074) PNSE coverage of wasm bcl has shown that only three public members of `System.Net.NetworkInformation.NetworkInterface` class throw `PlatformNotSupportedException`. Now all public members throw PNSE on WASM. Relates to https://github.com/mono/mono/issues/18735 Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-02-28[runtime] Use pointer size gchandles (#19039)Vlad Brezae
* [runtime] Use pointer size gchandles This would enable in the future to use CoreCLR's GC with mono. This doesn't change the current embedding api, but, in the future, we will end up aligning with coreclr on an embedding api that uses pointer sized gchandles. * [gc] Change format of gchandles to be netcore compatible On netcore, the GCHandle class assumes the lowest bit to be usable, for perf improvements. Move the responsability to have this bit available down to the GC implementation, since for CoreCLR GC we shouldn't do any shifting above the gc interface.
2020-02-27[WinForms] Colorize PropertyGrid's Categories properly (#19045)Nikita Voronchev
Assume, one have colorized `PropertyGrid propertyGrid` control: ``` propertyGrid.CategoryForeColor = Color.Red; propertyGrid.LineColor = Color.Blue; ``` Before changes proposed by the current PR we get the following image: ![before](https://user-images.githubusercontent.com/12382656/75364102-3391fe80-58cc-11ea-9136-347bcd567731.png) After: ![after](https://user-images.githubusercontent.com/12382656/75364115-3987df80-58cc-11ea-95d1-20691a4a8467.png) (item labeled "_Child 2_" is selected by user)
2020-02-25Bump linker. (#19006)Zoltan Varga
* Bump linker. * Bump linker tools framework version * [csproj] Update project files Co-authored-by: Marek Safar <marek.safar@gmail.com> Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-02-25Ensure ListView ItemCheck event can update the checked state (#18926) (#18937)Matthew Baird
Fixes #18926
2020-02-24[bcl] Update BCL Linked Sizemonojenkins
2020-02-23[corlib] Link out more SR/SRE types (#18770)Zoltan Varga
* [corlib] Invoke TypeBuilderInstantiation.MakeGenericType through a delegate created in the TypeBuilder ctor to break a linker dependency between RuntimeType and TypeBuilderInstantiation. * [corlib] Update linker descriptor. * UnmanagedMarshal is not used from native code at all. * AssemblyName is not used from native code at all.
2020-02-23[bcl] Update BCL Linked Sizemonojenkins
2020-02-22Revert linker change of 5a65a97 (#18991)Fan Yang
This is needed because the required='false' field in ``` <type fullname="System.Reflection.Emit.TypeBuilder" required='false' preserve="fields" feature="sre"> <method name="SetCharSet" feature="sre" /> <!-- reflection.c mono_reflection_call_is_assignable_to () --> <method name="IsAssignableTo" feature="sre" /> ``` Fails to preserve the IsAssignableTo method.
2020-02-20[debugger] Enable reading embedded ppdb (#18895)Thays Grazia
To fix the issue of enabling embedded pdb everywhere the problem was that when the roslyn tests are compiling sources it creates embedded pdb with source file "", and before enable reading the embedded pdb we don't read this information, and now we read and our StackTrace file written in our corlib doesn't expect a source file "", it's okay if it's NULL but not "". I could fix in corlib or in mono, I prefer to fix on mono because I don't know if there is any other place that doesn't expect source file "".
2020-02-20Remove TestEnvVarSwitchForInnerHttpHandler test as it should be in ↵Egor Bogatov
XA/LinkerTests.cs instead (#18952) The test will be moved to XA's `src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/LinkerTests.cs` It only works if ```xml <AndroidHttpClientHandlerType>System.Net.Http.MonoWebRequestHandler, System.Net.Http</AndroidHttpClientHandlerType> ``` is set in `Xamarin.Android.Bcl-Tests.csproj` and we don't want it (other tests expect SocketsHttpHandler to be default one). As an alternative we can add it to the `Xamarin.Android.Bcl-Tests.csproj`'s Linker exceptions but `/Xamarin.Android.Build.Tests/Tasks/LinkerTests.cs` is a better place for it.
2020-02-19[bcl] Default XmlSerializer stream serialize to UTF8 Encoding (#18836)Mitchell Hwang
* [mcs] Default XmlSerializer stream serialize to UTF8 Encoding * [bcl] Add XmlSerialize Test to preserve UTF chars in stream
2020-02-19Move HttpClientHandlerTests.Android.cs to nunit (#18883)Egor Bogatov
2020-02-18[wasm] Implement generation of empty assemblies in wasm-tuner. (#18880)Zoltan Varga
The linker can completely link away some assemblies, but the rest of the ninja build still requires them. Previously they were generated by running csc, but thats too slow, so generate them using Cecil from wasm-tuner.
2020-02-14Make MonoWebRequestHandler linker friendly (#18832)Egor Bogatov
Create it using reflection so it will be always linked out. However if it's set via `XA_HTTP_CLIENT_HANDLER_TYPE` linker will preserve it in a special substep: https://github.com/xamarin/xamarin-android/blob/master/src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/PreserveHttpAndroidClientHandler.cs#L72-L80 I had to make its ctor **public** because Linker instantiate it via `Activator.CreateInstance(string)` ([here](https://github.com/xamarin/xamarin-android/blob/60363ef45cd6994a322adac1b73d4271b0658c1e/src/Mono.Android/Android.Runtime/AndroidEnvironment.cs#L369)). But the whole type remains internal so it's not a real API change. Fixes issue from https://github.com/mono/mono/pull/18818#issuecomment-585611647
2020-02-14Bump linker submodule (#18844)Fan Yang
* Bump linker submodule * Use -o instead of -out for linker output The arguments changed in linker. Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2020-02-13[System.Drawing] Release the Graphics HDC on Dispose. (#18801)Vincent Povirk
Libgdiplus will fail when attempting to delete a Graphics object that has an unreleased HDC. This allows Dispose to succeed in that case. This more closely resembles the behavior of corefx.
2020-02-12Allow users to switch to MonoWebRequestHandler on Android via UI (#18764)Egor Bogatov
* Bring back old HttpHandler for Android
2020-02-06[corlib] Silence undocumented exceptions in ReadXdgUserDir (#18684)mdh1418
2020-02-05[bcl] Update BCL Linked Sizemonojenkins
2020-02-04Bump linker. (#18691)Zoltan Varga
* Bump linker. * [csproj] Update project files Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-01-29[corlib] Split corlib xunit tests even more for iOS (#18619)Alexander Köplinger
Follow-up to https://github.com/mono/mono/pull/18228 since two parts wasn't enough to fix the size issue on 32bits devices. We now use three parts. Fixes https://github.com/mono/mono/issues/18614
2020-01-28Use memmove in Buffer.MemoryCopy (#18547)Egor Bogatov
* Use memmove in Buffer.MemoryCopy * add test case
2020-01-28[WinForms] Incorrect Tree Nodes drawing at the `OwnerDrawText` mode (#18605)Nikita Voronchev
Assume we have the following form `MyForm`: ``` using System; using System.Drawing; using System.Windows.Forms; namespace test_TreeView { public class MyForm : Form { TreeView treeView = new TreeView() public MyForm() { treeView.Nodes.Add("root node"); treeView.Nodes[0].Nodes.Add("first child node"); treeView.BackColor = Color.Gray; treeView.LineColor = Color.Yellow; treeView.DrawMode = TreeViewDrawMode.OwnerDrawText; treeView.DrawNode += treeView_DrawNode; Controls.Add(treeView); } private void treeView_DrawNode(object sender, DrawTreeNodeEventArgs e) { var brush = new SolidBrush(Color.FromArgb(100, 255, 0, 0)); e.Graphics.FillRectangle(brush, e.Bounds); } } } ``` The displayed result is ![image](https://user-images.githubusercontent.com/12382656/73263417-92872980-41e1-11ea-8f7c-7cecbb376b60.png) One can see couple drawing issues: * White rectangles under each `TreeNode`. * The area of custom drawing (red rectangles) is shifted with respect to this white rectangles. Current PR proposes the fix of this issues. Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-01-28[Winforms] Form fixes (#18427)Karl
* Fix Return handling. Ensure correct ClientSize. When pressing Return / Enter, ensure any target button is both visible and enabled. In CreateHandle(), ensure the ClientSize is correct if set. If not, update it to make it right. Suspend layout while changing it so that child controls with anchors other than Top Left are not moved. * Select active control. PerformLayout after updating for client size. Select the active control with SendControlFocus to avoid upsetting what is currently selected. * Improve Form window decoration adjustment handling Reverts the incorrect attempted fix contained in previous commits. Basically, when a property is changed that affects window decorations, ensure the client size stays the same. * Use UpdateFormStyles on FormBorderStyle too.
2020-01-28Don't select ListBox item if SelectionMode == None (#18492)Karl
When the user types a letter or digit, KeySearch looks for and selects an item starting with that character. However, it should not if SelectionMode is None.
2020-01-28[WinForms] Make `ContextMenuStrip` behavior closer to the reference one (#18598)Nikita Voronchev
* [WinForms] Make `ContextMenuStrip` behavior closer to the reference one * Bump API snapshot submodule Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com>
2020-01-28Merge pull request #18491 from PreferLinux/RTF+Textbox-workAlexander Köplinger
I've implemented a heap of missing RTF and RichTextBox stuff, and also made some improvements or fixes to various aspects of it. I'm sorry this is so big... To give an overview of the changes, here's a list: - Removed the RTF Charcode / Charset handling that wasn't actually used, had a lot of missing functionality and was basically reimplementing character encoding handling, and replaced it with ensuring the correct character encoding is being used (changing when needed). - Improved RTF handling of objects with object results (process the given object result). Sometimes pictures can be like this. - Improved line wrapping and alignment - Added or greatly improved support for: - paragraph spacing - line spacing - paragraph indents (left, right, hanging) - tabstops (left, centre, right, decimal) - text background colour (like highlighting) - superscript / subscript - character offset (vertical) - text visibility - Significantly improved RichTextBox RTF generation - Cache DPI, rather than doing `CreateGraphics()` every time it is needed - A variety of other fixes and improvements, with a few I can think of relating to: - caret position - replacing text - invalidation and drawing - when tags are added or deleted
2020-01-28[csproj] Update project filesmonojenkins
2020-01-27[WinForms] Display caret while click on ComboBox (#18523)Nikita Voronchev
If one click on a `ComboBox` the caret does not appear. This is so because `document.PositionCaret` call hides the caret.
2020-01-27Fix UnixEncoding.GetBytes() for empty strings (#18520)Steffen Kieß
Current versions of the mono return a null pointer as address of the first element for empty arrays, i.e. fixed (byte* ptr = new byte[0]) Console.WriteLine (ptr == null); will print "true". This causes a problem in the UnixEncoding class where it triggers a check for null pointers. Fix this by allowing null pointers when the number of elements is zero.
2020-01-27Fix open port for X11 applications (#18583)felixdoerre
Whenever mono opens an X11 window, the application opens a tcp socket for controlling the (non-tcp)-connection to X11. This is bad practice, as a tcp socket is not needed. This pull request cleans the logic, by replacing the tcp socket with a fifo. That way this loopback connection is not visible from outside the .NET application, and all logic surrounding it should remain unchanged.
2020-01-27[Winforms] X11 Fix bounds change from within bounds-related events (#18513)Karl
The real change here is, in `XplatUIX11.SetWindowPos()`, simply moving the `SendMessage` call to the end instead of earlier. The problem with it earlier is that any change in bounds from any of the bounds-related events (OnLocationChanged / OnMove, OnSizeChanged / OnResize, OnLayout, OnClientSizeChanged) will be overridden. When `SendMessage` is called, `UpdateBounds` is run, and that raises those events as relevant. After those events finish, `SetWindowPos` continues with setting the size of the window to the value originally specified – which is now potentially wrong. So send the message later on. There is also no point that I can see in writing the values to `hwnd` twice, because as far as I can see the only one that can be changed is `hwnd.ClientRect` (set by `PerformNCCalc`).
2020-01-27[WinForms] Fix #18506 ActiveTracker, do not propagate message to control ↵abrevet-dev
when it is not enabled and visible. (#18541) Fixes #18506
2020-01-26[debugger] Access invalid memory address using PointerValue Command. (#18537)Thays Grazia
* Validate the address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono. Fixes #18191 Fixes #15612 Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
2020-01-25Fix typos (#18585)Maher Jendoubi
* Contributing: fix typos * fixed encoding and other typos * fixed encoding and spotted other typos * Update TransformationRules.cs
2020-01-24[aprofutil] Update the tool nameRadek Doulik
2020-01-24[mcs] Fix support for digit separators (#18539)mdh1418
* [mcs] skip "_" when building number * [mcs] Refactor digit separator feature report * [mcs] Clean up digit separator code * [mcs] Throw errors for invalid digit separator usage * [mcs] Fix hex and bin usage of digit separator tests * [mcs] Add digit separator usages that throw errors * [mcs] Update il
2020-01-21Store the current encoding code page, not encodingKarl
The encoding itself could be null, while encoding_code_page should always be valid.
2020-01-21Use correct default encoding.Karl
2020-01-18Calculate DPI before Recalculate.Karl
2020-01-18Fix NullReferenceException when parsing RTF.Karl
charset_stack was never initialised.
2020-01-17[tests] Re-enable profiler test that used to fail (#18471)Vlad Brezae
It is not clear if it will fail again or not, but it is not reproducible. Closes https://github.com/mono/mono/issues/8709
2020-01-17[bcl] Update BCL Linked Sizemonojenkins
2020-01-17[runtime] NOHANDLES for ves_icall_System_Threading_Thread_GetCurrentThread ↵Aleksey Kliger (λgeek)
(#18480) * [runtime] NOHANDLES for ves_icall_System_Threading_Thread_GetCurrentThread This function (and its call to mono_handle_new) was showing up in the flamegraph for some async-heavy benchmarks
2020-01-14Add normalized .bat files after the .gitattributes EOL changeAlexander Köplinger