On 11/5/26 2:05 AM, Ales Musil wrote:
> 
> 
> On Sat, Oct 31, 2026 at 2:14 AM Rosemarie O'Riorden via dev <ovs-
> [email protected] <mailto:[email protected]>> wrote:
> 
>     Compiling with ASan will completely distort the VmPeak memory usage
>     statistics the benchmark provides, and it is incompatible with Valgrind.
>     In addition, the timing statistics with either sanitizer will be
>     distorted too. So exit immediately if compiled with either.
> 
>     Reported-at: https://patchwork.ozlabs.org/project/ovn/
>     patch/[email protected]/ <https://
>     patchwork.ozlabs.org/project/ovn/patch/20261023051521.325497-1-
>     [email protected]/>
>     Fixes: f4a66b7871d6 ("tutorial: Add developer performance benchmark.")
>     Signed-off-by: Rosemarie O'Riorden <[email protected]
>     <mailto:[email protected]>>
>     ---
> 
> 
> Hi Rosemarie,
> 
> I'm not a huge fan of this approach, it seems a bit fragile.
> We could utilize some macro "magic" instead to make it
> more reliable. We could use __has_feature(address_sanitizer)
> and __has_feature(undefined_behavior_sanitizer) to append string
> to OVN_PACKAGE_VERSION, with that any binary compiled with
> sanitizers could have "ASAN" and/or "UBSAN" in the --version string.
> It doesn't affect normal operation and it might be quite useful in general
> so you can very easily tell that the binary was compiled with any
> sanitizer type WDYT?

Hi Ales, thanks for the review.

Hm, that is an interesting idea that does sound useful in general. I'll
try this approach.

>  
> 
>      tutorial/ovn-benchmark.sh | 5 +++++
>      1 file changed, 5 insertions(+)
> 
>     diff --git a/tutorial/ovn-benchmark.sh b/tutorial/ovn-benchmark.sh
>     index 01c090e84..9de23be1d 100755
>     --- a/tutorial/ovn-benchmark.sh
>     +++ b/tutorial/ovn-benchmark.sh
>     @@ -161,6 +161,11 @@ if [ ! -d "$PWD/sandbox" ]; then
>          exit 1
>      fi
> 
>     +if [ "$(nm -an $PWD/../controller/ovn-controller | grep "asan\|
>     ubsan")" ]; then
>     +    echo "Compiled with address sanitizer, which is incompatible.
>     Exiting."
>     +    exit 1
>     +fi
>     +
>      # Apply defaults if not set by user.
>      NODES=${NODES:-$DEFAULT_NODES}
> 
>     -- 
>     2.56.0
> 
>     _______________________________________________
>     dev mailing list
>     [email protected] <mailto:[email protected]>
>     https://mail.openvswitch.org/mailman/listinfo/ovs-dev <https://
>     mail.openvswitch.org/mailman/listinfo/ovs-dev>
> 
> 
> Regards,
> Ales 

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to