-
Notifications
You must be signed in to change notification settings - Fork 118
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
Remove non_owning_*::get_raw_pointer()
.
#2497
Conversation
I would like towards allowing the stable identifiers to be reference counted. One prerequisite for this to work without risking segfaults is that nobody has the address of the stable identifier. Instead they should just have a |
✔️ b92adf5 -> Azure artifacts URL |
Codecov Report
@@ Coverage Diff @@
## master #2497 +/- ##
==========================================
- Coverage 61.49% 61.49% -0.01%
==========================================
Files 624 624
Lines 119189 119190 +1
==========================================
- Hits 73294 73292 -2
- Misses 45895 45898 +3
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This comment has been minimized.
This comment has been minimized.
ModelDB CI passed, see: Given how recent the addition of the method is I suspect that we can remove it without any breakage. I feels it crucial that we do not expose the address of the stable identifier. The reason for this it's a requirement for understanding the lifetime of the stable identifiers. As mentioned before it's a requirement to make the stable identifiers reference counted; because if we expose the address, we can't know when it's safe to deallocate. Finally, we can always add it back, but removing this method once it's in use could easily become a very hard problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume this has nothing to do with handles to raw pointers?
Summary: no, this function returns the address of the stable identifier. Not the raw pointer that can be stored in a Detailed explanation: There's two levels of lifetime at play. One is to keep rows in soa containers alive. This happens via You'll notice the second level of ownership, how does the In simulations at BBP we've seen that the amount of memory used by these identifiers isn't high, but high enough to optimize it away (if possible). The question is then: When is it safe to deallocate the stable identifier? Currently the answer is that we can't know, because someone could have gotten the address of the stable identifier via However, this method should be removed regardless of the reference counting issue; simply because it makes the developers life much harder if it's we start using it. |
✔️ 159a007 -> Azure artifacts URL |
No description provided.