-
Notifications
You must be signed in to change notification settings - Fork 62
Fix JNI string lifetime/null-safety, Windows cancel-drain race, and UWP version parse #1494
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
Merged
bmehta001
merged 41 commits into
microsoft:main
from
bmehta001:bhamehta/fix-jni-windows-uwp-safety
Aug 8, 2026
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
cd2f1a9
Fix four latent safety bugs (JNI lifetime/null-safety, cancel race, U…
bmehta001 4c176db
Address review comments: harden two JNI string reads
bmehta001 dca30a7
Guard all remaining GetStringUTFChars reads against null
bmehta001 778a2e5
Merge branch 'main' into bhamehta/fix-jni-windows-uwp-safety
bmehta001 772ce61
Guard tenant_j for null before GetStringUTFChars in GetRecords (Copil…
bmehta001 80f865c
Guard remaining jstring inputs before GetStringUTFChars (Copilot review)
bmehta001 25df775
GetRecords: clear pending JNI exception after tenant-token read (Copi…
bmehta001 1274680
JStringToStdString: clear pending JNI exception on failed read (Copil…
bmehta001 76d75ed
UWP: include <exception> directly for std::exception catch (Copilot r…
bmehta001 a911fe4
Merge branch 'main' into bhamehta/fix-jni-windows-uwp-safety
bmehta001 e027995
Bound the HTTP cancel drains so they cannot spin or hang (issue #1437)
bmehta001 2449788
Merge remote-tracking branch 'fork/bhamehta/fix-jni-windows-uwp-safet…
bmehta001 c92066e
Distinguish best-effort (pause) from full-drain (teardown) HTTP cancel
bmehta001 d573254
Clear pending JNI exception before returning false in Signals_jni
bmehta001 1e7a93d
Drop issue-number references from code comments
bmehta001 08722d2
Drop issue-number reference from JniConvertors comment
bmehta001 348ea88
Only add <condition_variable> for the new member in HttpClient_WinInet
bmehta001 ceddf4a
Re-add <mutex> to HttpClient_WinInet for a self-contained header
bmehta001 377e70e
Merge branch 'main' into bhamehta/fix-jni-windows-uwp-safety
bmehta001 372a74d
Clarify that best-effort pause is only bounded on async-handler platf…
bmehta001 4ad8c16
Bound best-effort pause on Windows by plumbing a deadline into Cancel…
bmehta001 55f7c41
Address review: preserve CancelAllRequests() override compat and tigh…
bmehta001 53b1e72
Clarify CancelAllRequests compatibility: source-compatible, not ABI-s…
bmehta001 15c9eb1
Keep the no-arg CancelAllRequests() working on every built-in client
bmehta001 d03ff26
Avoid public timed HTTP cancel virtual
bmehta001 476ef4a
Merge branch 'main' into bhamehta/fix-jni-windows-uwp-safety
bmehta001 40fa223
Guard Signals JNI logger pointer and drop unused cancel return
bmehta001 88f0268
Merge remote updates into fix-jni-windows-uwp-safety
bmehta001 b8def81
Merge branch 'main' into bhamehta/fix-jni-windows-uwp-safety
bmehta001 b2bd27b
Align vcpkg iOS deployment target
bmehta001 ca440fc
Harden Apple packaging integration
bmehta001 c96f7de
Migrate Apple builds to canonical CMake variables
bmehta001 02c70ef
Harden nullable JNI and WinRT version inputs
bmehta001 d7ba6b3
Simplify cancellation documentation and clock setup
bmehta001 135676d
Merge branch 'main' into bhamehta/fix-jni-windows-uwp-safety
bmehta001 362fd54
Stop test runner looping after failures
bmehta001 4b995f4
Merge remote-tracking branch 'origin/bhamehta/fix-jni-windows-uwp-saf…
bmehta001 da833b7
Avoid RTTI dependency and report test failures
bmehta001 0a15be1
Preserve JNI allocation failures
bmehta001 e039185
Merge remote-tracking branch 'origin/main' into review-pr-1494-fixes
bmehta001 7cbcb30
Merge remote-tracking branch 'msft/main' into pr1494-work
bmehta001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "ctmacros.hpp" | ||
|
|
||
| #include <chrono> | ||
|
|
||
| namespace MAT_NS_BEGIN { | ||
|
|
||
| class IBoundedHttpClientCancel | ||
| { | ||
| public: | ||
| virtual ~IBoundedHttpClientCancel() noexcept = default; | ||
|
|
||
| // Positive timeout is a best-effort cap. Zero means the caller requires a | ||
| // full drain, matching IHttpClient::CancelAllRequests(). | ||
| virtual void CancelAllRequests(std::chrono::milliseconds bestEffortTimeout) = 0; | ||
| }; | ||
|
|
||
| } MAT_NS_END |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.