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

Fix rb_remove() key comparison #250

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

visitorckw
Copy link
Collaborator

The origin code was erroneously comparing node->data when searching
for the node to remove, instead of using the node->key. This PR
corrects the comparison to use the node->key, ensuring the proper
removal of nodes. Also, to ensure that the map functions do not rely on
node data values when comparing and performing operations, this PR
modifies the unit tests for map. It replaces the sequential data values
with random values obtained from mt19937_extract().

Close: #168

The origin code was erroneously comparing node->data when searching
for the node to remove, instead of using the node->key. This commit
corrects the comparison to use the node->key, ensuring the proper
removal of nodes.
To ensure that the map functions do not rely on node data values when
comparing and performing operations, this commit modifies the unit
tests for map. It replaces the sequential data values with random
values obtained from mt19937_extract().
@jserv jserv requested a review from EagleTw October 16, 2023 11:56
@jserv jserv merged commit cd1d712 into sysprog21:master Oct 16, 2023
@jserv
Copy link
Contributor

jserv commented Oct 16, 2023

Thank @visitorckw for contributing!

@visitorckw visitorckw deleted the fix/rb-remove-key-comparison branch October 16, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jit: Fail to successfully execute the JIT assembler
3 participants