On 28 Nov 2024, at 13:54, Ilya Maximets wrote:

> For some reason, MemorySanitizer thinks that the index is not
> initialized when we hit the OPT_LOCAL option:
>
>  WARNING: MemorySanitizer: use-of-uninitialized-value
>   0 0x4c49d4 in parse_options utilities/ovs-vsctl.c:288:9
>   1 0x4c3955 in main utilities/ovs-vsctl.c:167:5
>   2 0x7f28e4 in __libc_start_call_main
>   3 0x7f28e4 in __libc_start_main@GLIBC_2.2.5
>   4 0x432b04 in _start (utilities/ovs-vsctl+0x432b04)
>
> The value is initialized and the option works correctly, so I'm not
> sure why the sanitizer is confused.  I saw similar reports from the
> valgrind as well, IIRC...
>
> Let's silence the warning by initializing to INT_MAX.  If it is not
> actually initialized for some reason, at least it will crash and we'll
> have a better idea on what is happening.
>
> 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

Reply via email to