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

[ GPU ] fix return by reference to return by value #2753

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

EunjuYang
Copy link
Contributor

  • In the previous code, registerClKernel function returned reference of SharedPtrClKernel, causing the possible two problems:
    • returning by reference cannot return nullptr, leading an error in line 170 of cl_context.cpp
    • returning by reference of shared_ptr may not increase the reference counter, leading to early free problem.

- In the previous code, `registerClKernel` function returned reference
of SharedPtrClKernel, which has two problems:
	- returning by reference cannot return nullptr, leading an error in
line 169 of `cl_context.cpp`
	- returning by reference of `shared_ptr` may not increase the
reference counter, leading to early free problem.

Signed-off-by: Eunju Yang <[email protected]>
@taos-ci
Copy link

taos-ci commented Oct 10, 2024

📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2753. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.

Copy link

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EunjuYang, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Contributor

@lhs8928 lhs8928 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@baek2sm baek2sm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@SeoHyungjun SeoHyungjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@djeong20 djeong20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

@jijoongmoon jijoongmoon merged commit 6e4fa88 into nnstreamer:main Oct 16, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants