Uh oh!
There was an error while loading. Please reload this page.
[QUIC] Fix native crashes and heap corruption via "generated-like" interop - #74669
Conversation
ghost
commented
Aug 26, 2022
Tagging subscribers to this area: @dotnet/ncl |
ghost
commented
Aug 26, 2022
Tagging subscribers to this area: @dotnet/ncl |
Uh oh!
There was an error while loading. Please reload this page.
rzikm
commented
Aug 29, 2022
Can we also make the Also, since we are touching this, what about getting rid of the |
bc96468 to
0653eb5Compare0653eb5 to
72367aaCompare| MsQuicApi.Api.Registration, | ||
| &NativeCallback, | ||
| (void*)GCHandle.ToIntPtr(context), | ||
| &handle), |
There was a problem hiding this comment.
For the *Open methods we could make the wrapper use out MsQuicContextSafeHandle handle parameter and construct the safe handle inside. What do you think?
There was a problem hiding this comment.
I'll try it out and see if makes sense. If yes, I'll work it in. I like the idea.
There was a problem hiding this comment.
This would be hard to make work automagically (tm) with source generators. But we could introduce manual helpers. Once again, postponing this for a follow up.
ManickaP
commented
Sep 2, 2022
We're using it directly for
I'd love that, but as I'll the same reasoning as above, minimize churn and we can address this as a follow up. |
287b350 to
4667cefCompare4667cef to
657639fCompareManickaP
commented
Sep 2, 2022
For follow up, filed: #75009 |
| { | ||
| _sendBuffers.Reset(); | ||
| _sendTcs.TrySetException(exception, final: true); | ||
| if (_sendBuffers.Count > 0 && _sendBuffers.Buffers[0].Buffer != null) |
There was a problem hiding this comment.
I believe this will become a non-issue when #73691 is implemented. I made it a high prio issue for 8.0 since it seems more important now.
Uh oh!
There was an error while loading. Please reload this page.
| _connectedTcs.TrySetResult(); | ||
| return QUIC_STATUS_SUCCESS; | ||
| } | ||
There was a problem hiding this comment.
Are these whitespace changes intentional?
There was a problem hiding this comment.
Yes, they are. Either we do have whitespace between Handle... or not, but we should be consistent in all classes (Listener, Connection, Stream). I don't mind going either way, but I mind having them in Connection and nowhere else.
…terop (dotnet#74669) * Send buffers and handles crash fixes * Add generated-like interop * Apply PR feedback from dotnet#74611 * Change asserts * Feedback + moved native methods to their own file * PR feedback Co-authored-by: ManickaP <mapichov@microsoft.com>
…terop (#74669) (#75192) * Send buffers and handles crash fixes * Add generated-like interop * Apply PR feedback from #74611 * Change asserts * Feedback + moved native methods to their own file * PR feedback Co-authored-by: ManickaP <mapichov@microsoft.com> Co-authored-by: ManickaP <mapichov@microsoft.com>
Alternative to #74611
We should explore how to generate stuff like that in the future. Relevant PR: #65204
Fixes#72696