The branch, master has been updated via 98b443d9033 fuzzing: fix fuzz_stable_sort_r_unstable comparison via 267f307689b s3/torture: local_rbtree: avoid birthday collisions from 3a7dbf8b77b examples:winexe: embed Samba version as exe timestamp
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 98b443d9033943c4fd2bde939985af125ccd9e73 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu May 23 16:08:49 2024 +1200 fuzzing: fix fuzz_stable_sort_r_unstable comparison Credit to OSS-Fuzz. REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69176 Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Volker Lendecke <v...@samba.org> Autobuild-User(master): Volker Lendecke <v...@samba.org> Autobuild-Date(master): Fri May 31 05:29:08 UTC 2024 on atb-devel-224 commit 267f307689b92bc7e1e407fb7f1a9f556d7d8b90 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Wed May 22 12:15:37 2024 +1200 s3/torture: local_rbtree: avoid birthday collisions We insert 999 keys, but if two of them happen to be the same, we don't find 1000 nodes, and that is upsetting for CI: [130(1421)/303 at 4m46s] samba3.smbtorture_s3.LOCAL-RBTREE UNEXPECTED(failure): samba3.smbtorture_s3.LOCAL-RBTREE.smbtorture(none) REASON: Exception: Exception: using seed 1716333987 host=foo share=bar user= myname=runner-jlguopmm-project-6378020-concurrent-0 Running LOCAL-RBTREE run_local_rbtree: read1: 999 999, NT_STATUS_OK run_local_rbtree: delete: 999 999, NT_STATUS_OK run_local_rbtree: read2: 0 0, NT_STATUS_OK TEST LOCAL-RBTREE FAILED! LOCAL-RBTREE took 0.002706 secs This has been flapping very occasionally for a long time: https://lists.samba.org/archive/samba-technical/2016-March/112861.html Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> ----------------------------------------------------------------------- Summary of changes: lib/fuzzing/fuzz_stable_sort_r_unstable.c | 3 ++- source3/torture/torture.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/fuzzing/fuzz_stable_sort_r_unstable.c b/lib/fuzzing/fuzz_stable_sort_r_unstable.c index 68174ee460e..9338c75f7dc 100644 --- a/lib/fuzzing/fuzz_stable_sort_r_unstable.c +++ b/lib/fuzzing/fuzz_stable_sort_r_unstable.c @@ -71,8 +71,9 @@ static int cmp_int8(int8_t *_a, int8_t *_b, int8_t *ctx) #define MAX_SIZE (1024 * 1024) -int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) +int LLVMFuzzerTestOneInput(const uint8_t *input, size_t len) { + const int8_t *buf = (const int8_t *)input; int8_t buf2[MAX_SIZE]; int8_t aux[MAX_SIZE]; int8_t context; diff --git a/source3/torture/torture.c b/source3/torture/torture.c index e0cc39f732d..1f8621654ec 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -13634,17 +13634,17 @@ static bool run_local_rbtree(int dummy) } for (i = 0; i < 999; i++) { - char key[sizeof("key-9223372036854775807")]; - char value[sizeof("value-9223372036854775807")]; + char key[sizeof("key-9223372036854775807-1234")]; + char value[sizeof("value-9223372036854775807-1234")]; - snprintf(key, sizeof(key), "key%ld", random()); - snprintf(value, sizeof(value) ,"value%ld", random()); + snprintf(key, sizeof(key), "key%ld-%d", random(), i); + snprintf(value, sizeof(value) ,"value%ld-%d", random(), i); if (!rbt_testval(db, key, value)) { goto done; } - snprintf(value, sizeof(value) ,"value%ld", random()); + snprintf(value, sizeof(value) ,"value%ld-%d", random(), i + 1); if (!rbt_testval(db, key, value)) { goto done; -- Samba Shared Repository