Uh oh!
There was an error while loading. Please reload this page.
Conversation
MihaZupan
commented
Nov 22, 2022
/azp list |
ghost
commented
Nov 22, 2022
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? |
MihaZupan
commented
Nov 22, 2022
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 checkedThe privatestaticreadonlyIndexOfAnyValues<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]publicvoidIndexOfAnyExceptTest(){ReadOnlySpan<byte>bytes=newbyte[]{70,105,108,101,195,131,78,97,109,101,46,98,97,116};intoffset=bytes.IndexOfAnyExcept(s_rfc5987AttrBytes);_output.WriteLine($"s_rfc5987AttrBytes is {s_rfc5987AttrBytes.GetType().FullName}");Assert.Equal(4,offset);} |
EgorBo
commented
Nov 22, 2022
@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 should be if(AdvSimd.Arm64.IsSupported||TOptimizations.NeedleContainsZero)like it is above for chars 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. |
EgorBo
commented
Nov 22, 2022
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. |
MihaZupan
commented
Nov 22, 2022
I'll get a PR up, shouldn't need this one anymore. Thanks for looking into this as well Egor! |
#78660