fn generateOptions(smith: *Smith) Options {
@disableInstrumentation();
const size_log2_weights: []const Smith.Weight = &.{
.value(u5, 8, 1024), // 8x odds of below
.rangeAtMost(u5, 8, 16, 16),
.rangeAtMost(u5, 17, 31, 1), // 1/32 odds of above since these just OOM with the fixed buffer
};
return .{
.stack_trace_frames = smith.valueWeighted(u16, &.{
.value(u16, 0, 1 << 18), // 4x - stack traces have no tested properties except I.B.
.rangeAtMost(u16, 0, math.maxInt(u16), 1),
}),
// If set, it is aimed to allocate much fewer bytes since freeing becomes O(n).
// Without this, it is O(1) since mem.Allocator is bypassed so there is no memsets
// of the data.
.check_write_after_free = smith.valueWeighted(bool, &.{
.value(bool, false, 31),
.value(bool, false, 1),
}),
.canary = smith.value(u32),
.block_size_log2 = smith.valueWeighted(u5, size_log2_weights),
.bucket_size_log2 = smith.valueWeighted(u5, size_log2_weights),
};
}