-
Notifications
You must be signed in to change notification settings - Fork 152
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
Refactoring get_path() #6472
Refactoring get_path() #6472
Conversation
AddressSanitizer complains about a use-after-free related to using a StringData for the field name:
|
8d0566a
to
e9bd77a
Compare
24a763b
to
e132c10
Compare
e132c10
to
df9dab4
Compare
@danieltabacaru This PR should be ready for review now. |
FullPath result; | ||
if (m_table->is_embedded()) { | ||
REALM_ASSERT(get_backlink_count() == 1); | ||
m_table->for_each_backlink_column([&](ColKey col_key) { |
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.
Do we need this since there is only one backlink?
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.
There may be several backlink columns - one for each Table that points to this embedded Table
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.
Don't we assert above that it's just 1? (or maybe get_backlink_count() does something else)
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.
We assert that we have only one backlink. So although we have several backlink columns, only one of them must contain a link. We have to go through all to find that one.
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.
got it
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.
LGTM
What, How & Why?
☑️ ToDos