Skip to content

fix: guard FFIPackedWriter against double close to prevent heap-use-after-free#48561

Open
sunby wants to merge 1 commit intomilvus-io:masterfrom
sunby:fix-ffi-packed-writer-double-close
Open

fix: guard FFIPackedWriter against double close to prevent heap-use-after-free#48561
sunby wants to merge 1 commit intomilvus-io:masterfrom
sunby:fix-ffi-packed-writer-double-close

Conversation

@sunby
Copy link
Contributor

@sunby sunby commented Mar 26, 2026

Add nil guard and nil-out cWriterHandle/cProperties after close in FFIPackedWriter, matching the FFIPackedReader fix in #48473.

issue: #48560

…fter-free

Signed-off-by: sunby <sunbingyi1992@gmail.com>
@sre-ci-robot sre-ci-robot added the size/XS Denotes a PR that changes 0-9 lines. label Mar 26, 2026
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sunby
To complete the pull request process, please assign czs007 after the PR has been reviewed.
You can assign the PR to them by writing /assign @czs007 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify mergify bot added dco-passed DCO check passed. kind/bug Issues or changes related a bug labels Mar 26, 2026
@sre-ci-robot
Copy link
Contributor

[ci-v2-notice]
Notice: New ci-v2 system is enabled for this PR.

To rerun ci-v2 checks, comment with:

  • /ci-rerun-code-check // for ci-v2/code-check
  • /ci-rerun-build // for ci-v2/build
  • /ci-rerun-build-all // for ci-v2/build-all (multi-arch builds)
  • /ci-rerun-buildenv // for ci-v2/build-env (build milvus-env builder images)
  • /ci-rerun-ut-integration // for ci-v2/ut-integration, will rerun ci-v2/build
  • /ci-rerun-ut-go // for ci-v2/ut-go, will rerun ci-v2/build
  • /ci-rerun-ut-cpp // for ci-v2/ut-cpp
  • /ci-rerun-ut // for all ci-v2/ut-integration, ci-v2/ut-go, ci-v2/ut-cpp, will rerun ci-v2/build
  • /ci-rerun-e2e-arm // for ci-v2/e2e-arm
  • /ci-rerun-e2e-default // for ci-v2/e2e-default
  • /ci-rerun-ciloop // for ci-v2/ciloop (build + unit tests in one pipeline)
  • /ci-rerun-gosdk // for ci-v2/go-sdk (Go SDK E2E tests, AMD)
  • /ci-rerun-gosdk-arm // for ci-v2/go-sdk-arm (Go SDK E2E tests, ARM)

If you have any questions or requests, please contact @zhikunyao.

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check

2 similar comments
@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check

@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.01%. Comparing base (d02e19d) to head (af4dafc).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #48561       +/-   ##
===========================================
+ Coverage   77.66%   84.01%    +6.35%     
===========================================
  Files        2112      627     -1485     
  Lines      351497   104217   -247280     
===========================================
- Hits       272974    87554   -185420     
+ Misses      70204    16663    -53541     
+ Partials     8319        0     -8319     
Components Coverage Δ
Client ∅ <ø> (∅)
Core 84.01% <ø> (-0.01%) ⬇️
Go ∅ <ø> (∅)
see 1486 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check

1 similar comment
@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check
/ci-rerun-e2e-arm
/ci-rerun-e2e-default
/ci-rerun-go-sdk
/ci-rerun-integration-test
/ci-rerun-ut-go

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check
/ci-rerun-e2e-arm
/ci-rerun-e2e-default
/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check
/ci-rerun-e2e-arm
/ci-rerun-e2e-default
/ci-rerun-go-sdk
/ci-rerun-integration-test
/ci-rerun-ut-go

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check
/ci-rerun-e2e-arm
/ci-rerun-e2e-default
/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-code-check
/ci-rerun-e2e-arm
/ci-rerun-e2e-default
/ci-rerun-go-sdk
/ci-rerun-integration-test
/ci-rerun-ut-go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-passed DCO check passed. kind/bug Issues or changes related a bug size/XS Denotes a PR that changes 0-9 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants