Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/bump_fuzz_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from __future__ import annotations
import json
from pathlib import Path
import shutil
import sys
import tempfile

Expand All @@ -34,7 +35,7 @@ def main() -> None:
with tempfile.NamedTemporaryFile("w", delete=False) as tmp:
json.dump(data, tmp, indent=2)
tmp.write("\n")
Path(tmp.name).replace(CFG)
shutil.move(tmp.name, CFG) # Fix: Invalid cross-device link

print(f"✅ base_seed bumped: {old} → {new}")

Expand Down
1 change: 1 addition & 0 deletions src/cor/lyt/buf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ void Buf::Swap(const Buf& a_buf) {
void Buf::UnsafeAdvance(const n_t byte_c) {
/**/
FLS_ASSERT_CORRECT_N(byte_c);
FLS_ASSERT_LE(m_off + byte_c, m_capacity);

m_off += byte_c;
}
Expand Down
4 changes: 3 additions & 1 deletion src/io/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ void File::Read(Buf& buf) {
}

auto file_size = fs::file_size(m_path);
FLS_ASSERT_LE(file_size, buf.Capacity())
FLS_ASSERT_LE(file_size, buf.Capacity());
buf.UnsafeAdvance(file_size);

m_if_stream->read(reinterpret_cast<char*>(buf.mutable_data()), static_cast<int64_t>(file_size));
}
Expand All @@ -61,6 +62,7 @@ void File::ReadRange(Buf& buf, const n_t offset, const n_t size) {
[[maybe_unused]] auto file_size = fs::file_size(m_path);
FLS_ASSERT_LE(offset + size, file_size);
FLS_ASSERT_LE(size, buf.Capacity());
buf.UnsafeAdvance(size);

m_if_stream->seekg(static_cast<std::streamoff>(offset), std::ios::beg);
m_if_stream->read(reinterpret_cast<char*>(buf.mutable_data()), static_cast<std::streamsize>(size));
Expand Down
2 changes: 1 addition & 1 deletion test/src/quick_fuzz_tests/fuzz_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"num_cases": 10,
"base_seed": 12,
"base_seed": 13,
"delimiter": "|",
"min_cols": 1,
"max_cols": 2,
Expand Down