On 7/29/22 08:05, Ales Musil wrote:
> 
> On Thu, Jul 28, 2022 at 5:43 PM Ilya Maximets <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     LeakSanitizer for some reason reports these json objects as leaked,
>     even though we do have references to them at the moment ovs_fatal()
>     called from check_ovsdb_error().
> 
>     Previously it complained only with -O2, but with newer versions of
>     clang/llvm it started complaining even with -O1.  For example, negative
>     ovsdb parsing tests are failing on ubuntu 22.04 with clang 14 if built
>     with ASan and detect_leaks=1.
> 
>     Fix that by destroying the json object before aborting the process.
>     And we may also build with default -O2 in CI with that change.
> 
>     Alternative implementation might be to just pass the json to destroy
>     to every check_ovsdb_error() call, but indirect registering of the
>     pointer seems a bit less invasive.
> 
>     Signed-off-by: Ilya Maximets <[email protected] 
> <mailto:[email protected]>>
>     ---
>      .ci/linux-build.sh |  6 ++---
>      tests/test-ovsdb.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++
>      2 files changed, 63 insertions(+), 4 deletions(-)
> 
> 
> Hi Ilya,
> 
> I actually saw that couple of times even when running the OVN tests.
> 
> Acked-by: Ales Musil <[email protected] <mailto:[email protected]>>

Thanks!  Applied and backported down to 2.17 to avoid possible issues
on a future LTS branch.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to