Skip to content

Conversation

FabrizioSandri
Copy link

This PR adds a new Github Action which runs RcppDeepState+valgrind on your package. That means the C++ functions of your package will be tested with random inputs, and there will be a comment like this one for each new PR (which reports if valgrind found any issues with random inputs).

RcppDeepState analysis result

This package contains problems, according to RcppDeepState. The report was generated by RcppDeepState-action in this repository's fork and is accessible here.

@FabrizioSandri
Copy link
Author

RcppDeepState Report

function name message file line address trace R code
nnls_solver 55 bytes in 1 blocks are possibly lost in loss record 18 of 1,327 nnls_solver.cpp:64 No Address Trace found
Test code
testlist <- list(A = c(2.4389e-275, -1.1012e+154, 1.1829e+179, 2.8375e-204, 2.0531e-264, 1.5827e+175, -2.0148e-286, 1.0358e-67, -4.7031e-82, 4.9709e-122, 1.4227e-171, -2.4518e-148, -2.0154e-286, 2.8589e+10, 4.0279e+24, -2.1849e+192, 1.6353e-284, 8.6924e+248, 50.832, -4.358e-195, 2.4379e-226, -2.7431e-63, 0.026366, 2.5559e+94, -4.6478e-54, 4.9723e-37, -354.76, -2.6774e+82, 3.9902e+290, 1.717e-191, 1.3335e+104, 8.5867e+71, -9.4665e-49, 5.4347e+213, -4.0242e-239, 1.7951e-131, 7.3864e+171, -1.4842e-169, -1.8211e+171, -8.1628e-254, 1.1893e+82, 1.5781e-247, 2.7956e-41, -8.5461e+104, -8394.5, -4.1527e+219, -3.1441e-199, -6.0806e+172, -3.5075e-185), iterate = -1736960827L,     tolerance = -1.10556256759025e+29, x = c(-8.5078e-307, 1.3758e+193,     1.7714e-175, -3.3988e-154, 6.1861e+145, 6.8865e+62, 4.507e-144,     -3.1618e-170, -3.4503e+205, -4.6411e-303, 1.2494e+263, -2.1419e+204,     1.1429e+60, 2.3124e-218, -2.3362e-76, -6.5035e-147, -5.8828e-179,     4.0015e+177, 3.3069e+239, 3.8235e+120, -6.2073e+291, -3.1985e+153,     -3.553e-238, -6.045e+124, -4.4387e-46, -1.4186e-171, 1.3116e+216,     8.669e+305, 7.2132e-174, -5.0882e+222, -2.4799e-199, -5.9556e+215,     8.6606e-196, -8.768e-09, 2.259e-184, 1.1473e+297, 8.5961e+39,     -3.3662e-292, 7.2792e+278, 2.0422e-228, 1.9415e-150, -5.8319e-128,     6.7883e+73, -6.4067e+22, -3.1378e-205, 1.6332e-151, -1.4025e-200,     -1.0766e-103, -4.7939e-36, -7.1697e-124, 1.4415e-240, -2.4478e+216,     4.2014e-154, 4.2099e+263, -1.4786e+75, 1.8906e-209, -9.0295e+39,     2.484e+144, -5.1351e-249, -2.4715e+292, -1.0879e+242, 1.4098e+138,     -4.3252e-160, 1.3262e-29, 22882000, 1.1103e+167, -2.8744e-207,     -1.8023e+225, -1.1685e+256, 4.5287e+83, 2.4877e-179, 9.694e+139,     3.6803e-175, 8.6292e-102, -4.5427e-256, 2.6664e+168, 6.9872e+79,     7.786e-103, 5.0902e-161, -1.2556e+210, 3.6834e+122, -2.088e+103,     -1.5343e-104, 8.3659e-12, 7.4273e-121, 1.4638e+145, 4.3067e+260,     6.4554e+153, -1.5196e+148, -2.5196e+240))
result <- do.call(RStoolbox:::nnls_solver, testlist)
rescaleImageCpp 59 bytes in 1 blocks are possibly lost in loss record 19 of 1,325 rescaleImage.cpp:6 No Address Trace found
Test code
testlist <- list(scal = c(6.61903605448577e-130, -1.35844783036667e-25, -1.8588353073292e+96, NaN, 2.01673459430357e-56, -5.18007586403957e+195, -14680554403278544, NaN, NaN, 4.97276591966579e-222, 7.16955701955792e+137, -3.23508016685734e-68, 8.93296479072921e-260, 1.87697818149602e-125, 8.56451741116024e+159, 1.04845537806277e+172, -3.13667723447412e+31, -3.38740912267915e+143, 7.9444989955908, -3.69601110264727e+278, 1.94832480864077e-81, 1.32978678817622e-252, 1.21101966559862e-74, -8.5568313518715e-225, -1.0481592411962e-257, 5.59144686673498e-300, 3.38994642379571e+84, -4.52871070357949e+163, 2.74059043163062e-201, -5.05071190608188e+48, 1.7477367000974e-308, -8.27972329325969e-136, 2.09892646774259e-47, -2.56568207302308e+263, -1.07660142227507e+188, -2.77060176288078e-62, 6.50826271969534e+299, 3.90639683050416e+187, -1.88580232080591e+139, -2.12945901875827e-299, 6.48350572057634e-228, -1.06990014947452e-42, -Inf, -1.1227806603886e-239, -9.26941594600342e-249, -2.03441450269256e-46, -7.93512777985796e+176, -4.29190508051724e-101, 8.16101441336232e-64, -2.91887161423658e+245, 3.71820698406054e+255, -3.5223548756562e-217, 2.19216698987394e+225, -1.01491434868132e-305, 0), x = structure(c(1.34992437840507e+99, 1.31241064223528e-33, 8.24195218837643e+270, 5.60681635941762e+46, 6.36069447260888e+111, 1.47735582879012e-187, 2.2351073113232e-222, 2.00903020299304e-281, 1.96065641717136e+156, 3.09593456349771e-229, 2.66780759336313e+213, 2.08002623013388e-159, 2.82754508962287e+277, 1.69918366844048e-236, 7.46427231762292e-108, 4.64075188853066e-271, 3.01664383061889e+29, 6.4984504556461e+167, 1.53842718955425e+269, 25985.6077500418, 6.57968794929521e+98, 2.15091370974876e+179, 3.15353046904835e-112, 3.62559946674683e-52, 4.33139262301886e-110, 4.8371535530609e-192, 9.84503571553072e-167, 1.28129655440098e+250, 1.07020123779832e-71, 6.96471088792091e+202, 1.0391802286628e-184, 2.03952972952604e-41, 9.32388426010062e+164, 2.29216104180117e+86, 1.21941449546223e-289, 3.66177349404132e-191, 1.46543935476786e-202, 2.52658080195973e+148, 4.66938598740508e-285, 4.1178586291471e+103, 3.40064689280246e-301, 2.0697906022563e-299), .Dim = 7:6), xmin = c(1.20347049030498e-93, 1.10781929055301e-303, 1.18210614859444e-165, -1.04348887085573e+51, 9.98795505061282e+156, 2.38564425069613e+36, 6.81409470309946e-189, -1.23598160868212e-282, 1.16845603808904e+64, 2.25633960128235e-101, -3.83679430756213e+69, 2.02770153626226e-88, 2.05354650432914e+219, -2.31878721141391e-212, -3.30928775916725e-242, -4.77196640738967e+154, -1.76035799217632e-248, -3.4939498965393e+105, 4.03753418246746e-277, -1.97975335175947e+124, 3.42836792322636e-251, -1.25304694757744e+274, 5.48539784120835e-136, -5.15991986201343e-32, -2.43355403816617e+163, 5.08289690003425e-63, 9.21398152769147e+66, 4.54884636106998e-188, -5.49215656258118e-254, 2.97502449752743e+137, -8.53227718146841e+290, 178.6737424363, 1.55120775894212e-283, -1.80669766642475e+215, 1.91815111213207e+56, -6.61389099514208e-23, 5.64847807100904e+199, -2.81701089636051e-16), ymin = c(1.13434926398294e+89, 2.66077829263012e+156, -2.80978609416932e-73, 3.52854133374048e-90, 6.22440635971181e-81, -2.67246129280271e-123, 1.41911592507846e+176, 3.42830856750997e-112, 9.46003033669259e+62, 5.67394293903741e-89, -3.64705843013247e+240, 1.7156698460261e-139, 7.16867057132829e+198, -2.45451749454369e+97, -4.1097657913015e-298, 2.25863643582046e+200, 1.89939367933777e+67, -4.77336074089446e+190, 9.63079673541141e-132, -1.10009270257889e-98, -2.05687059242399e-143, -2.27348300503774e-200, 5.29908916675181e-213, -7.91357478074315e+304, -5.53951467516477e+23, -2.9887089194668e-41, -1.80574963847358e-166, 1.4118412424814e+179, 2.36083216618214e+159, -4.10161189455311e-109, -1.4336725355867e+114, 8.40992655251015e-249, 3.1607847382244e-19, 1.17489706691365e+157, -2.76848767665176e-76, -1.46399008702055e-216, 1.99535909314955e+236, -6.88667139252295e-201, -6.43781055547512e-133, -3.72897241909609e-220, -4.3219680813305e+79, 4.06053708595644e-86, -5.61515176039558e+199, 126189187.176882, -1.61954565948055e-233, -5.8696859279685e-225, -2.77437218307061e-275, 3.0628318768227e+270, -1.82935865756635e-106, 7.3091920295998e-167, 3.07704793204955e+149, -8.9244610791885e+153, 3.726516171203e+26, 1.24258884895604e-115, -6.02906979509421e+280, 6.60813611396386e+186, -1.5334567545535e-59, -1.35516500537811e+66, -8.69352533898074e+246, 5.55594015533909e+127, 1.17423655866157e-07, -1.26284637190651e+114, -1.12378556785915e-301, 1.78569939513386e+44, -3.75587373176638e+97, 6.5843450506878e-292, -7.22588951353567e-86, 3.81729130101224e+290, -4.0260318270104e-88))
result <- do.call(RStoolbox:::rescaleImageCpp, testlist)
spectralIndicesCpp Invalid read of size 8 spectralIndices.cpp:32 No Address Trace found
Test code
testlist <- list(C1 = 3.55489252954771e-133, C2 = -1.58533356500216e+170,     G = -2.62243882669982e-277, L = 4.4173553758081e+196, Levi = -7.38364268305816e-97,     blueBand = 12380622L, greenBand = 1843035498L, indices = c(NA,     "starqkdztkaypuccmvlf", NA, "pfmyjkvaemxmldotggqk", NA, "itdddcdr",     NA, "lmqqm", "odztblxbypwjkcxzoczx", NA, NA, "oaeybrwljegiawkhlutj",     NA, "bjyepuoubkvizbezulmk", NA, "cfatquvksqyedfnpexon", "aucsahmtzqtuidnlelsw",     "xusipjvboufvjitdjvep", "mjkqhexgtnjszumfa", "pinjkfevq",     "rxavfqwjxtjhfgvolfp", "ndbtpitbxtzqcjhlext", NA, "hdkglaykcasmbgivfpxz",     "oj"), maskLayer = 1106412916L, maskValue = -1374016457L,     nirBand = 867997111L, redBand = 1685132314L, redEdge1Band = -1981314472L,     redEdge2Band = 407526056L, redEdge3Band = 1729159552L, s = 7.86246079498875e+295,     sf = -8.97642212604198e+22, swir1Band = 3464548L, swir2Band = -1510834522L,     swir2ccc = 0.611902887133428, swir2cdiff = -4.91585856021161e+158,     swir3Band = -1368951781L, x = structure(c(7.52775998386956e-206,     9.71654335537747e-169, 3.40801659009967e+69, 3.19754207275388e+278,     NA, -Inf, -2.33412577749564e+95, 8.69427203367242e-307, 7.15066609880172e-85,     1.58063604665511e+220, 1.0568446440577e+67, 3.37968657270603e+101,     1.56213584559175e-199, 9.15409850632902e+303, -2.33412577749564e+95,     8.89683454430977e+285, 4.28073224171794e-152, 2.27515639413501e+148,     NA, 2.20168285687844e+50, 1.11571284418646e-98, 7.28014394831925e+233,     2.61996924637157e-130, 2.7009211577334e+99, 1.20124686159212e-142    ), .Dim = c(5L, 5L)))
result <- do.call(RStoolbox:::spectralIndicesCpp, testlist)

Analyzed functions summary

function name tested inputs inputs with issues
nnls_solver 3 3
rescaleImageCpp 3 3
spectralIndicesCpp 3 3

Report details

  • Report generated by: 2076f47
  • Inputs generator seed: 1680075470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant