-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI Test #78709
CI Test #78709
Conversation
/azp list |
Tagging subscribers to this area: @dotnet/ncl Issue Details
|
This comment was marked as resolved.
This comment was marked as resolved.
@MihaZupan any guesses from the log of your test that has just failed? |
The "Correct" behavior is on the left, "arm64 checked" on the right: https://www.diffchecker.com/Wuwbdju9 utf8Length=14 utf8='70, 105, 108, 101, 195, 131, 78, 97, 109, 101, 46, 98, 97, 116'
-IndexOfAnyExcept length=4 // Expected
+IndexOfAnyExcept length=5 // Arm64 checked The private static readonly IndexOfAnyValues<byte> s_rfc5987AttrBytes =
IndexOfAnyValues.Create("!#$&+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~"u8);
utf8.IndexOfAnyExcept(s_rfc5987AttrBytes); I've added a log to see if the type of |
Narrowing it down to [Fact]
public void IndexOfAnyExceptTest()
{
ReadOnlySpan<byte> bytes = new byte[] { 70, 105, 108, 101, 195, 131, 78, 97, 109, 101, 46, 98, 97, 116 };
int offset = bytes.IndexOfAnyExcept(s_rfc5987AttrBytes);
_output.WriteLine($"s_rfc5987AttrBytes is {s_rfc5987AttrBytes.GetType().FullName}");
Assert.Equal(4, offset);
} |
@MihaZupan from what I see so far - it reproduces on Release too (osx-arm64) and with JitMinOpts=1 meaning that it's very unlikely a jit optimization |
🤦♂️ Found it... it's a bug in runtime/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/IndexOfAnyAsciiSearcher.cs Line 527 in 167b0a1
should be if (AdvSimd.Arm64.IsSupported || TOptimizations.NeedleContainsZero) like it is above for chars runtime/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/IndexOfAnyAsciiSearcher.cs Line 506 in 167b0a1
I'm very surprised the tests missed this in #78093, looks like we need more ... |
@MihaZupan any idea why tests in #78093 didn't fail? From my understanding, it should reliably fail on any arm64 device (since neon is always there) |
As long as it supports I expected that at least the outerloop tests I added in that PR should exercise this case, but maybe I was wrong.
Perhaps the test doesn't satisfy 4.? I'll have to double-check. |
It should be a baseline for any arm64 hardware, unless explicitly disabled |
Actually, there is another condition: In this case we weren't matching Since we're testing random inputs, I bet this is a case we just didn't hit :/ We just got lucky that that one HTTP test happened to be using exactly such values. |
I'll get a PR up, shouldn't need this one anymore. Thanks for looking into this as well Egor! |
#78660