mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-19 09:34:18 +01:00
Using `usize` to compute file offsets caps us at ~16GB on 32-bit systems. For example, with 4 KiB pages we can only address up to 1048576 pages; attempting the next page overflows a 32-bit usize and can wrap the write offset, corrupting data. Switching our I/O APIs and offset math to u64 avoids this overflow on 32-bit targets Closes #2791