Repository navigation
fix(curl): roll back duplicate MIME bookkeeping failures - #19861
Closed
DonRyuzaki wants to merge 2 commits into
Closed
DonRyuzaki wants to merge 2 commits into
DonRyuzaki wants to merge 2 commits into
Conversation
Contributor
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
DonRyuzaki
force-pushed
the
codex/curl-dupe-bookkeeping-20261114
branch
from
November 14, 2026 07:22
dcc60dc to
9314260
Compare
Collaborator
|
@DonRyuzaki I am closing this as padding. It rolls back libcurl's duplicate MIME bookkeeping when it fails, a path no title reaches, and the same kind of change has been sent for many libraries, so we are not taking this series. If a game hits a real leak, a PR for that case with the title and the run that shows it is welcome. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Include copied MIME callback bookkeeping in the existing curl_easy_duphandle allocation rollback. A host allocation can fail after native duplication and registration, leaving an unreachable native handle and registry entry. Destroy that duplicate while callback owners remain live, then remove MIME bookkeeping and registration. Release the context mutex before copying ownership; retain the existing null result for host bad_alloc, the early guest-allocation exception control, and callback rebinding. If native cleanup itself throws, attempt bookkeeping removal once and propagate that callback exception.
Match the external C backend to the parent's MinGW DWARF exception mode. Its separate build previously emitted SEH metadata inside the DWARF wrapper module, aborting the unchanged early guest-calloc exception test on Windows. Only MINGW plus ANYPS5_MINGW_DWARF_EXCEPTIONS receives the matching C flags; the fixture and callback semantics are not suppressed.
Tested
Final base
f9854b5a4b80a661ad6a5638565fc6d72a2f0a1a, head9314260d7f33f0d49cc7417176a7d9d66215f79c, tree8eb406dd0d6de4684904c4b827f50b4c5210d2f7.^guest_curl($|_(strings|utility|url|slistmime|options|handles|transfers|mimecallback|allocators)$)withctest --no-tests=error --output-on-failure -V.dcc60dc8796bf5b837872f8ad9b2b6f2266863acWindows allocator abort: unhandled GuestAllocationFailure, exit 0xc0000409. On that same base, changing only the three-line backend flags block makes the unchanged allocator test pass. The final rebased head above was separately rebuilt and tested across all ten suites.-fexceptions -fno-asynchronous-unwind-tables -fno-unwind-tablescombination emits DWARF CIE/FDE without SEH .pdata; an earlier -funwind-tables draft was rejected and is not in this PR.cmake --build build --target libs guest_curl_Allocators_tests guest_curl_MimeCallback_tests guest_curl_Handles_tests guest_curl_Transfers_tests --parallel 8passes;ctest --test-dir build --no-tests=error --output-on-failure -R '^guest_curl_(allocators|mimecallback|handles|transfers)$': 4/4 pass, zero skips.fb5d4e2023892a094daaf8bede9eafb5ffa7481dreproduces the registered duplicate bookkeeping failure; the other selected suites pass. The Linux host-new fault requires a captured native duplicate matching its source size and a successful CURLOPT_PRIVATE probe proving it is already registered. Original-MIME and clone-of-clone cases restore exact guest allocation maps, release copied callback data once and permit retry.BUILD_TESTING=ON,FT_ENABLE_ERROR_STRINGS=OFF,CMAKE_LINK_DEPENDS_NO_SHARED=ON. Conventions and literalgit diff --checkpass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)