You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Coverity issue 367349: Different smart pointers managing same raw pointer #56926
This may cause a crash, as different smart pointers may try to delete the raw pointer twice.
In node::crypto::ManagedX509::operator =(node::crypto::ManagedX509 const &): Same raw pointer is used to initialize or reset two or more different smart pointers.
Yeah, this one has always bugged. When working in this area recently I wasn't entirely sure how to clean this one up. Right now these are internally ref counted by openssl. I think what we want is that ManagedX509 should effectively become a type of shared_ptr that avoids these kinds of hacks.
@targos@jasnell Just a quick heads up, I had to do a git rebase and force-push to clean up a stray commit that accidentally slipped into my branch, which is why the issue timeline generated a few duplicate commit events above. The PR itself is now completely clean and contains only the single commit fixing crypto_x509.cc. Let me know if you need any other changes!
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
Activity
jasnell commentedon Feb 5, 2025
Yeah, this one has always bugged. When working in this area recently I wasn't entirely sure how to clean this one up. Right now these are internally ref counted by openssl. I think what we want is that
ManagedX509should effectively become a type of shared_ptr that avoids these kinds of hacks.omghante commentedon Apr 14, 2026
@targos @jasnell Just a quick heads up, I had to do a
git rebaseand force-push to clean up a stray commit that accidentally slipped into my branch, which is why the issue timeline generated a few duplicate commit events above. The PR itself is now completely clean and contains only the single commit fixingcrypto_x509.cc. Let me know if you need any other changes!github-actions commentedon Jul 20, 2026
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.