1. 24 4月, 2021 13 次提交
  2. 23 4月, 2021 23 次提交
    • E
      IAsyncEnumerable deserializer should tolerate custom queue converters (#51702) · 24900f83
      Eirik Tsarpalis 提交于
      * IAsyncEnumerable deserializer should tolerate custom queue converters
      
      * Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs
      Co-authored-by: NLayomi Akinrinade <layomia@gmail.com>
      
      * address feedback
      
      * update ILLink suppressions
      Co-authored-by: NLayomi Akinrinade <layomia@gmail.com>
      24900f83
    • F
      [ios] Use managed implementation of Pbkdf2 (#51714) · 53489ef0
      Filip Navara 提交于
      Mirror Android, the native APIs don't exist on iOS.
      
      Contributes to #47910.
      53489ef0
    • A
      [mono] Work around arm64 MacCatalyst unavailable JITing API (#51669) · a9f1207d
      Aleksey Kliger (λgeek) 提交于
      * To [JIT on Apple Silicon](https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon) the application must call `pthread_jit_write_protect_np (0)` before writing to a code page and then `pthread_jit_write_protect_np (1)` before executing JITed code.
      
      * Catalyst apps are Mac apps that get to use iOS frameworks (as well as some mac frameworks).  The API access is guarded by `__API_AVAILABLE` and `__API_UNAVAILABLE` macros in Apple framework headers.  If an API is not explicitly marked for catalyst, clang will follow the `ios` availability.
      
      Unfortunately, `pthread_jit_write_protect_np` is marked like this:
      
      ```c
      __API_AVAILABLE(macos(11.0))
      __API_UNAVAILABLE(ios, tvos, watchos)
      void pthread_jit_write_protect_np(int enabled);
      ```
      
      So a Catalyst app running on arm64 cannot call it.  It will get a compile-time error.
      ```
      src/mono/mono/utils/mono-codeman.c:669:3: error: 'pthread_jit_write_protect_np' is unavailable: not available on macCatalyst
                        pthread_jit_write_protect_np (0);
                        ^
        /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/pthread.h:561:6: note: 'pthread_jit_write_protect_np' has been explicitly marked unavailable here
        void pthread_jit_write_protect_np(int enabled);
             ^
      ```
      
      ---
      
      Turns out the symbol `pthread_jit_write_protect_np` is actually present in the Catalyst framework libraries, and it does the right thing.
      
      This PR works around the unfortunate `pthread.h` declaration by not using it.
      
      We create a new .c file that included our own declaration
      ```c
      void pthread_jit_write_protect_np(int enabled);
      ```
      
      And then a new `mono_jit_write_protect` function that calls the pthread function.
      
      ---
      
      Another option would be to use something like
      ```
      #pragma clang diagnostic push
      #pragma clang diagnostic ignored "-Wpartial-availability" 
      ...
      #pragma clang diagnostic pop
      ```
      around the offending callsites.  But neither ignoring `-Wpartial-availability` nor `-Wunguarded-availability-new` seem to have any effect on the compilation error.
      
      ---
      
      Caveat: It's not yet clear whether this is ok to do in a retail (App Store) app.
      
      ---
      
      * [mono] define HOST_MACCAT not HOST_MACCATALYST for Mac Catalyst
      
      The C code already has HOST_MACCAT ifdefs.  HOST_MACCATALYST isn't used.
      a9f1207d
    • P
      Dac changes for regions (#50092) · df61348e
      Peter Sollich 提交于
      There are two sets of changes here:
      
      - Make DacHeapWalker work for empty regions - I had observed a crash with the empty regions injected with STRESS_REGIONS.
      - Make GetGCHeapStaticData robust against globals saved_sweep_ephemeral_seg and saved_sweep_ephemeral_start being null.
      
      The changes should not cause issues for a coreclr NOT running with regions.
      df61348e
    • J
      Improve some of our recent obsoletions (#51721) · ac98c817
      Jeff Handley 提交于
      * Replace usage of NET50_OBSOLETIONS with NET5_0_OR_GREATER
      
      * Correct GitHub handle
      
      * Use a diagnostic id for the RuntimeEnvironment obsoletions from #50666
      
      * Use fully-qualified attribute name in ref source updates from #49411
      
      * Use a diagnostic id for the JsonSerializerOptions.IgnoreNullValues obsoletion from #41141
      ac98c817
    • S
    • D
      Fix test (#51729) · 1e28943d
      devsko 提交于
      1e28943d
    • G
    • R
      [mono] Remove support for "file://" URIs when loading assemblies (#51727) · dfeb707f
      Ryan Lucia 提交于
      This functionality was removed as part of .NET Core, see https://github.com/dotnet/docs/issues/19944 for more info
      dfeb707f
    • L
    • A
      282c394b
    • S
      Include FontName in Font.GetHashCode (#47674) · f39d544d
      Satish Yadav 提交于
      * Update Font.cs
      
      * Added test for GetHashCode pr #46816
      
      * Added SkipOnTargetFramework as GetHashCode doesn't include font name in .NET Framework and changed FontFamily to SansSarif as per PR #47674. Fixes #44343. Original PR #46816.
      
      * Update FontTests.cs
      
      * Fix test, skip font if name is equal
      Co-authored-by: NDan Moseley <danmose@microsoft.com>
      Co-authored-by: NSantiago Fernandez Madero <safern@microsoft.com>
      f39d544d
    • A
      Update jit for new likely class records (#51664) · 57104c73
      Andy Ayers 提交于
      Co-authored-by: NDavid Wrighton <davidwr@microsoft.com>
      57104c73
    • A
      Fix symbolic link tests (#51712) · ed1897ef
      Andy Gocke 提交于
      * Fix symbolic link tests
      
      Use IDisposable and `File.Delete` to ensure that symlinks get created
      and cleaned up properly on all platforms. If all symlinks aren't
      deleted, the later test cleanup phases have problems deleting them.
      
      Fixes #51502
      
      * Test still failing on Mac, skip until I can investigate
      ed1897ef
    • A
      Fix building the repo on ARM64 (#51706) · 1cc11b1f
      Anton Lapounov 提交于
      1cc11b1f
    • J
      WebRequest/ServicePoint/WebClient Obsoletion Follow-Up (#51550) · 39246d1f
      Jeff Handley 提交于
      * WebRequest/ServicePoint/WebClient Obsoletion Follow-Up
      
      * Suppress SYSLIB0014 at the project level for System.Net.Requests
      39246d1f
    • J
      Improve documentation for obsoletion/analyzer diagnostics (#51595) · 21dcc738
      Jeff Handley 提交于
      * Improve documentation for obsoletion/analyzer diagnostics
      
      * Clarity for SYSLIB0### and SYSLIB1### sequences
      
      * Add info about the SYSLIB documentation pages
      
      * Add pointer to the docs within Obsoletions.cs
      21dcc738
    • L
      Overwrite the old rsp (#51703) · df6e9560
      Larry Ewing 提交于
      df6e9560
    • A
      [wasm][tests] Fix path to System.Text.Json.Tests for excluding from .. (#51670) · 87956e17
      Ankit Jain 提交于
      - makes EAT build green again
      87956e17
    • D
      Add Blazor Pizza app SOD test (#51659) · 916d58a0
      Drew Scoggins 提交于
      * Add Pizza App for WASM SOD
      
      * Fix missing paren
      
      * Fix quoting
      916d58a0
    • H
      SOCKS4/4a/5 proxy support in SocketsHttpHandler (#48883) · 32d1a256
      Huo Yaoyuan 提交于
      * Separate method for proxy scheme validation.
      
      * Pass socks connection kind.
      
      * Unauthorized socks5 connection.
      
      * Username and password auth.
      
      * Fix response address.
      
      * Fix proxyUri value and assertion.
      
      * Use HttpConnectionKind for SOCKS.
      
      * Handle more connection kind assertions.
      
      * SOCKS4/4a support.
      
      * Move version selection into SocksHelper.
      
      * Call sync version of read write.
      
      * Cancellation by disposing stream.
      
      * Dispose cancellation registration.
      
      * IP addressing for SOCKS5.
      
      * IP addressing for SOCKS4.
      
      * Wrap write method.
      
      * Cancellation and optimization.
      
      * Optimize.
      
      * Apply suggestions from code review
      Co-authored-by: NMiha Zupan <mihazupan.zupan1@gmail.com>
      
      * Clarify logic.
      
      * Remove ssl assertion.
      
      * SocksException.
      
      * Make SocksException derive from IOException.
      
      * Use binary primitives to write port in BE.
      
      * Socks loopback test.
      
      * Expand test matrix.
      
      * Try to solve certificate issue.
      
      * Pass handler to httpclient.
      
      * Update ConnectToTcpHostAsync.
      
      * Remove custom self-signed cert use from Socks test
      
      * Fix LoopbackSocksServer's parsing of Socks4a domain name
      
      * Only set RequestVersionExact for H2C
      
      Setting it in general breaks H2 => H1.1 downgrade on platforms without ALPN
      
      * Add auth test.
      
      * Add IP in test matrix.
      
      * Only override host when required.
      
      * Don't attempt NT Auth for Socks proxies
      
      * Skip HTTP2 ssl test on platforms without ALPN support
      
      * Use NetworkCredential directly
      
      * Pass AddressFamily to sync Dns resolution too
      
      * Consistently check encoded string lengths
      
      * Fix Socks5 user/pass auth
      
      * Add IPv6 test for socks5
      
      * Exception nits
      
      * Add exceptional tests.
      
      * Fix exceptional test.
      
      * Fix NRT compilation
      Co-authored-by: NMiha Zupan <mihazupan.zupan1@gmail.com>
      
      * Server shouldn't wait for request in exceptional test.
      
      * Add exception message to test.
      
      * Update auth failure handling.
      
      * SOCKS4 and 5 uses different auth model, requires different error message.
      
      * Revert accidental indent change.
      
      * Expand test matrix to include Sync HTTP1
      
      * Read received bytes before returning error response in Socks4 loopback
      
      * Use named bool arguments
      
      * Improve exception messages
      
      * !IsEmpty => Length != 0
      
      * Improve exception messages 2
      
      * Avoid enforing Socks4 VN value
      Co-authored-by: NMiha Zupan <mihazupan.zupan1@gmail.com>
      32d1a256
    • K
      Cleanup XmlReader (#51561) · 1132baae
      kronic 提交于
      * remove repetitions ';'
      
      * Cleanup XmlReader
      
      * Cleanup XmlReaderAsync
      
      * review feedback
      
      * review feedback
      Co-authored-by: Nkronic <kronic@softland.ru>
      1132baae
    • D
      Fix another hang on shutdown (#51681) · bcd3aad9
      David Fowler 提交于
      * Fix another hang on shutdown
      - If SIGINT/Ctrl+C fires don't block shutdown waiting for dispose. This mechanism was intended to be a way to let application code unwind completely before exiting the process but we can cancel the the CancelKeyPress today, which means we don't need to wait for dispose to be called.
      - This is a change in behavior but I can't figure out a case where ProcessExit would fire and you'd want it to wait on a dispose call *after* SIGINT/CTRL+C has fired.
      bcd3aad9
  3. 22 4月, 2021 4 次提交