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

RCORE:2259: Fix comparison function for ConditionType #8029

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Conversation

jedelbo
Copy link
Contributor

@jedelbo jedelbo commented Sep 19, 2024

The function should ensure strict weak ordering. According to the current one
{1, 0} == {0, 1} and {0, 1} == {2, 1}
but
{1, 0} < {2, 1}

It is not possible to construct a failing test as the outcome very much depends on how the runtime types are laid out.

What, How & Why?

Fixes #8028

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed
  • bindgen/spec.yml, if public C++ API changed

The function should ensure strict weak ordering. According to the current one
 {1, 0} == {0, 1} and {0, 1} == {2, 1}
but
 {1, 0} < {2, 1}

It is not possible to construct a failing test as the outcome very much depends
on how the runtime types are laid out.
@cla-bot cla-bot bot added the cla: yes label Sep 19, 2024
@jedelbo jedelbo requested review from nicola-cab and ironage and removed request for nicola-cab September 19, 2024 12:11
Copy link

Pull Request Test Coverage Report for Build jorgen.edelbo_429

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 27 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.03%) to 91.112%

Files with Coverage Reduction New Missed Lines %
src/realm/sync/noinst/changeset_index.cpp 1 79.47%
test/test_util_network_ssl.cpp 1 89.59%
src/realm/mixed.cpp 2 86.46%
test/object-store/util/test_file.cpp 2 87.06%
test/test_lang_bind_helper.cpp 2 93.2%
src/realm/table.cpp 3 90.29%
src/realm/sync/noinst/client_impl_base.cpp 4 82.67%
src/realm/sync/noinst/protocol_codec.hpp 6 75.74%
test/fuzz_group.cpp 6 45.14%
Totals Coverage Status
Change from base Build 2612: 0.03%
Covered Lines: 217201
Relevant Lines: 238389

💛 - Coveralls

Copy link
Member

@nicola-cab nicola-cab left a comment

Choose a reason for hiding this comment

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

It's a pity that there is no way to test this. Because it seems so easy to get this wrong.

Copy link
Contributor

@ironage ironage left a comment

Choose a reason for hiding this comment

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

Good find! Thanks for the fix! 👍

@jedelbo jedelbo merged commit 78636fe into master Sep 20, 2024
46 of 49 checks passed
@jedelbo jedelbo deleted the je/RCORE-2259 branch September 20, 2024 07:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on app startup in realm core code due to non-strict ordering comparator
3 participants