Skip to content

Conversation

and-cb
Copy link
Collaborator

@and-cb and-cb commented Sep 26, 2025

wipe() was not correctly erasing the metadata, mostly because it was filling with zeros the incorrect memory range ([size..] instead of [..size]). This made opening existing databases using wipe(true) fail with an error because the number of pages specified in the metadata didn't correspond with the number of pages in the data file.

This fixes the problem, and also adds a test to prevent similar issues from occurring in the future.

@and-cb and-cb requested review from jjtny1 and kmchicoine September 26, 2025 00:13
@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Sep 26, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@and-cb and-cb force-pushed the andrea/fix-wipe branch 2 times, most recently from 90e4dd2 to e5075e6 Compare September 26, 2025 00:28
`wipe()` was not correctly erasing the metadata, mostly because it was
filling with zeros the incorrect memory range (`[size..]` instead of
`[..size]`). This made opening existing databases using `wipe(true)`
fail with an error because the number of pages specified in the metadata
didn't correspond with the number of pages in the data file.

This fixes the problem, and also adds a test to prevent similar issues
from occurring in the future.
@cb-heimdall
Copy link
Collaborator

Review Error for jjtny1 @ 2025-10-16 16:13:42 UTC
User failed mfa authentication, see go/mfa-help

@and-cb and-cb merged commit 7050ef1 into main Oct 16, 2025
19 checks passed
@and-cb and-cb deleted the andrea/fix-wipe branch October 16, 2025 20:26
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.

3 participants