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

Test error in Part 10 #54

Open
gagachang opened this issue Jan 5, 2020 · 3 comments
Open

Test error in Part 10 #54

gagachang opened this issue Jan 5, 2020 · 3 comments

Comments

@gagachang
Copy link

Hello,

Thanks for your tutorial, it's very awesome.
However, when I practiced the part 10, I found some error about test-cases below:

image

And I also found that this sentence, "Need to implement searching an internal node.", does not exist so far.
Are there any steps the tutorial misses?

@juraev
Copy link

juraev commented Feb 19, 2021

Hi @gagachang. Have you found how to resolve this? I have the test problem on my mac for part 10. If I insert 14 elements to a table by myself, then the program finishes with a segmentation fault.

@thewangcj
Copy link

Hi @gagachang. Have you found how to resolve this? I have the test problem on my mac for part 10. If I insert 14 elements to a table by myself, then the program finishes with a segmentation fault.
Hi,I also encountered this problem. debugging found that the loop variable was out of bounds.
when you write code like:
for (int32_t i = LEAF_NODE_MAX_CELLS; i >= 0; i--)
due to the intelligent prompt of IDE,it might becomes
for (size_t i = LEAF_NODE_MAX_CELLS; i >= 0; i--), size_t is an unsigned type. When it reaches 0, minus one, it is out of bounds and become super big,so the program finishes with a segmentation fault.

@wtyfpc
Copy link

wtyfpc commented May 17, 2023

i encountered the same problem,after some debugging,i found some problems in my code:
it should be void *destination = leaf_node_cell(destination_node, index_within_node);
rather than void *destination = leaf_node_cell(destination, index_within_node);

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

No branches or pull requests

4 participants