Skip to content
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

[java] Fix double close #19133

Merged
merged 1 commit into from
Jan 14, 2024
Merged

[java] Fix double close #19133

merged 1 commit into from
Jan 14, 2024

Conversation

Craigacp
Copy link
Contributor

Description

The OnnxValue and OrtProviderOptions implementations now check to see if they've been closed before accessing the native pointer, and also before close is called.

Motivation and Context

Before they could be closed twice which SIGSEGV'd the JVM. Fixes #19125.

…ure they aren't used after they've been closed.
@snnn
Copy link
Member

snnn commented Jan 14, 2024

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline, Linux QNN CI Pipeline, MacOS CI Pipeline, Windows ARM64 QNN CI Pipeline

@snnn
Copy link
Member

snnn commented Jan 14, 2024

/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows x64 QNN CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed

Copy link

Azure Pipelines successfully started running 8 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 8 pipeline(s).

@snnn snnn merged commit 71657d1 into microsoft:main Jan 14, 2024
56 checks passed
mszhanyi pushed a commit that referenced this pull request Jan 15, 2024
### Description
The `OnnxValue` and `OrtProviderOptions` implementations now check to
see if they've been closed before accessing the native pointer, and also
before close is called.

### Motivation and Context
Before they could be closed twice which SIGSEGV'd the JVM. Fixes #19125.
@Craigacp Craigacp deleted the java-fix-close branch January 16, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIGSEGV when calling onnxValue.close()
2 participants