Conditional jump or move depends on uninitialised value(s)

Hello folks,

I’m trying to use C API inference and I’m getting the valgrind error “Conditional jump or move depends on uninitialised value(s)” on the model initialization.

I put together an MWE:
Here is the simple model trained with scikit-learn and C++ inference code:
And the valgrind error:

Ubuntu 20.04, linux kernel 5.4.0-77-generic, xgboost from master (commit 9c6e791), I compiled the binary with clang++ 8.0.1-9.

Interesting thing is that the error doesn’t appear when I compile with g++ 9.3.0.

I’m wondering if I do something wrong or if it’s a known issue?