On 28 Nov 2024, at 22:11, Ilya Maximets wrote:
> Columns in 'new_datum' may not be initialized if they were not written,
> i.e., when the column in not in the 'written' bitmap. In this case the
> actual content should be read from the 'old_datum' instead. If the old
> one is also not available, then the default should be used.
>
> WARNING: MemorySanitizer: use-of-uninitialized-value
> 0 0x78d27f in ovsdb_idl_check_consistency lib/ovsdb-idl.c:732:21
> 1 0x4ee12a in idl_set tests/test-ovsdb.c:2586:9
> 2 0x4d7c4b in do_idl tests/test-ovsdb.c:2868:18
> 3 0x6c5704 in ovs_cmdl_run_command__ lib/command-line.c:247:17
> 4 0x6c4d28 in ovs_cmdl_run_command lib/command-line.c:278:5
> 5 0x4c39bf in main tests/test-ovsdb.c:80:5
> 6 0x7f912a02958f in __libc_start_call_main
> 7 0x7f912a02963f in __libc_start_main@GLIBC_2.2.5
> 8 0x432b54 in _start (tests/test-ovsdb+0x432b54)
>
> Use the ovsdb_idl_read() helper to read the actual correct data
> during the consistency check.
>
> Alternative might be to iterate over the 'written' bitmap and only
> check those columns, but it seems like that will reduce the intended
> scope of the check, sine 'new_datum' may exist while the 'written'
> bitmap doesn't, e.g., when 'new_datum == old_datum'.
>
> Fixes: 11990a5274f7 ("ovsdb-idl: Check internal graph in OVSDB tests.")
> Signed-off-by: Ilya Maximets <[email protected]>
Change looks good to me. Did not test the actual change (other than github
actions).
Acked-by: Eelco Chaudron <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev