Uh oh!
There was an error while loading. Please reload this page.
JsonPath not using last frame during continuation - #57681
Conversation
ghost
commented
Aug 18, 2021
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsFixes #39055 The test failure reports in that issue reference This appears to be a regression from #54420 where the "continuation count" is now 1 less than before.
|
eiriktsarpalis
left a comment
There was a problem hiding this comment.
Thanks. Out of curiosity why did this only repro in netfx? Should we backport this to release/6.0?
Actually this did repro in 5.0. I don't think it makes the bar for back-porting. Also, I don't think it meets the bar for 6.0 porting to main either (no customer reports + not a regression + used for debugging bad JSON and not runtime functionality). Here's a standalone repro: for(inti=1;i<30;i++){stringjson=@"{""Child"":{""MyDictionary"":{""Key"": bad]";JsonSerializerOptionsoptions=new(){DefaultBufferSize=i};MemoryStreamms=newMemoryStream(System.Text.Encoding.ASCII.GetBytes(json));try{awaitJsonSerializer.DeserializeAsync<RootClass>(ms,options);}catch(JsonExceptionex){Console.WriteLine($"{i}:"+ex.Path);// should be "$.Child.MyDictionary.Key"}}publicclassRootClass{publicChildClassChild{get;set;}}publicclassChildClass{publicintMyInt{get;set;}publicint[]MyIntArray{get;set;}publicDictionary<string,ChildClass>MyDictionary{get;set;}publicChildClass[]Children{get;set;}} |
Nevermind, it seems like #57834 should be a sufficient intervention. |
Fixes#39055
The test failure reports in that issue reference
PathForChildDictionaryFailshowever only for .NET framework 461. However, the refactoredPathForChildDictionaryFailstest now repros on net6 as well. I believe the 461 ArrayPool was returning just the right size pooled buffer from a previous test that caused the continuation issue, and net6 returned a larger pool (likely on a boundary).This also occurs in 5.0.