r-quantities / units

Measurement units for R
https://r-quantities.github.io/units
175 stars 28 forks source link

valgrind issue observed on `CRAN` #374

Closed mattfidler closed 2 weeks ago

mattfidler commented 2 weeks ago

There is an issue with memory loss observed on CRAN with udunits (I have been asked to address them)

It is shown here:

==1579489== 2 bytes in 1 blocks are possibly lost in loss record 4 of 5,636
==1579489==    at 0x484280F: malloc (/builddir/build/BUILD/valgrind-3.22.0/coregrind/m_replacemalloc/vg_replace_malloc.c:442)
==1579489==    by 0x549000E: strdup (/usr/src/debug/glibc-2.37-19.fc38.x86_64/string/strdup.c:42)
==1579489==    by 0x1EB40C4E: uaiNew (/usr/src/debug/udunits2-2.2.28-7.fc38.x86_64/lib/unitAndId.c:56)
==1579489==    by 0x1EB40D9E: UnknownInlinedFun (/usr/src/debug/udunits2-2.2.28-7.fc38.x86_64/lib/idToUnitMap.c:127)
==1579489==    by 0x1EB40D9E: mapIdToUnit.part.0 (/usr/src/debug/udunits2-2.2.28-7.fc38.x86_64/lib/idToUnitMap.c:282)
==1579489==    by 0x1EB40EE7: UnknownInlinedFun (/usr/src/debug/udunits2-2.2.28-7.fc38.x86_64/lib/idToUnitMap.c:253)
==1579489==    by 0x1EB40EE7: ut_map_symbol_to_unit (/usr/src/debug/udunits2-2.2.28-7.fc38.x86_64/lib/idToUnitMap.c:400)
==1579489==    by 0x1EAC47AA: ud_map_symbols(Rcpp::Vector<16, Rcpp::PreserveStorage>, SEXPREC*) (/tmp/RtmpQ5VG1D/R.INSTALL2778033902454/units/src/udunits.cpp:170)
==1579489==    by 0x1EAB9F61: _units_ud_map_symbols (/tmp/RtmpQ5VG1D/R.INSTALL2778033902454/units/src/RcppExports.cpp:97)
==1579489==    by 0x4A42E9: R_doDotCall (svn/R-devel/src/main/dotcode.c:757)
==1579489==    by 0x4A47E3: do_dotcall (svn/R-devel/src/main/dotcode.c:1437)
==1579489==    by 0x4DFC7A: bcEval_loop (svn/R-devel/src/main/eval.c:8118)
==1579489==    by 0x4F66AF: bcEval (svn/R-devel/src/main/eval.c:7501)
==1579489==    by 0x4F66AF: bcEval (svn/R-devel/src/main/eval.c:7486)
==1579489==    by 0x4F695A: Rf_eval (svn/R-devel/src/main/eval.c:1167)
mattfidler commented 2 weeks ago

I have seen this before and I think you are likely aware. I will submit to CRAN assuming there will be no issue.