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

Possible bugs (dangling references) due to returning reference to temporary object in l1_proximal.h? #377

Open
krishnakumarg1984 opened this issue Jun 22, 2023 · 0 comments

Comments

@krishnakumarg1984
Copy link
Collaborator

krishnakumarg1984 commented Jun 22, 2023

In l1_proximal.h, we have

Vector<Real> const &weights() const { return L1TightFrame<Scalar>::weights(); }

Similarly, in , we have

LinearTransform<Vector<Scalar>> const &Psi() const { return L1TightFrame<Scalar>::Psi(); }

Can we please have a closer look at this (first visually, and then maybe through unit tests)? This was flagged in static analysis that there functions are likely returning references to temporary objects (i.e. dangling references).

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

No branches or pull requests

1 participant