Closed jwijffels closed 1 year ago
Hi,
the issue is in the public-domain code performing LZMA (de)compression (we use it to compress the parts of the models where it make sense). The same code is also in UDPipe 1, MorphoDiTa, ... .
As you say, I am not sure how difficult will be to find the cause (given that it is someone else's code), but I will try to do it next week (and do minor releases with the fix).
That would be great! Thanks for the effort.
Hi,
after investigation, I believe it is just a false positive report by valgrind (the code actually does read an uninitialized value, but the conditional jump is guarded by other conditions, so the program behavior cannot be influenced by the unitialized value). I tried to fix the problem by https://github.com/ufal/cpp_utils/commit/fc215c8d68224ac50f4e9026be15c0953adcc611 (on g++-10 and clang-11 the valgrind report disappeared) and then updated cpp_utils
in nametag in the lastest commit 294466f.
Could you please try building the nametag R wrapper to verify the problem is really solved? Thanks!
Many thanks for the fixes and your time. I've incorporated the changes and uploaded to CRAN. It's currently under CRAN review. I tried to reproduce the valgrind issue myself but it depends clearly on valgrind 3.21.0 and I don't have an instrumented build of R-devel compiled with valgrind level 2 instrumentation alongside valgrind 3.21.0 to be able to reproduce it.
What I did already got as feedback from CRAN is that I had to replace std::interator as it is deprecated in C++17 and future compilers will not support C++11. I'll make a new issue for this if you don't mind.
I'll keep you updated here if I have more feedback from CRAN.
Found the following significant warnings:
./nametag/src/unilib/utf8.h:148:52: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
./nametag/src/unilib/utf8.h:180:52: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
nametag/src/unilib/utf16.h:116:53: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
nametag/src/unilib/utf16.h:148:53: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
nametag/src/unilib/utf8.h:148:52: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
nametag/src/unilib/utf8.h:180:52: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
The R package was accepted on CRAN yesterday including the fix for this issue which incorporated your changes of https://github.com/ufal/nametag/commit/294466f7a5e420165801d531614e9cc5646f48af. Yesterday CRAN tested as well with valgrind and the fix solved the problem. Many thanks again!
Hello foxik.
In 2020 I've created an R wrapper around the nametag library. It's on CRAN since June 2020 (https://cran.r-project.org/package=nametagger). Recently the CRAN build system has changed and the build log at CRAN shows that a valgrind issue has appeared at ufal::nametag::utils::lzma::MatchFinder_Create(
Although in the R package (at https://github.com/bnosac/nametagger) I use commit 598666b5aa2f3ebbb9658976fe06749f551aed02 of nametag, I think the issue is still there in the current version of nametag. Not sure how difficult it is to fix this.