-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Potential Initialization Bug in B+Tree Node Splitting
Report
In db.c:683-689, there's a potential logical error:
if (get_node_type(root) == NODE_INTERNAL) {
initialize_internal_node(right_child);
initialize_internal_node(left_child); // This initialization is lost
}
/* Left child has data copied from old root */
memcpy(left_child, root, PAGE_SIZE); // Overwrites the initialization
The initialize_internal_node(left_child) call is wasted because the subsequent memcpy completely overwrites left_child.
Metadata
Metadata
Assignees
Labels
No labels