Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyze the package with RcppDeepState #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FabrizioSandri
Copy link

@FabrizioSandri FabrizioSandri commented Aug 30, 2022

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

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
decode_olc 21 bytes in 1 blocks are definitely lost in loss record 12 of 1,308 coders.cpp:269 No Address Trace found
Test code
testlist <- list(olcs = c("tvxribcdqvnaxcotklne", "kzqjuwijrhntmhrngxdz", NA, "vuo", "jpkfqhnsrkspexjmr", "craqxgokeyryonkcxmgx", "cmpquwsdnwdsa", "", "ojdztkrfdgxctbksqvnx", NA, NA, NA, "s", "ntxybrvwirkeocykburc", NA, "jmowsfyzzqqdmagtmozk", "ddykbaofqsakmevhwbvn", "nyosyduqhmcumkhxmvxq", "gvbeqjzdpegplgsvcrla", "", "plwqlvpyfkpn", NA, NA, "txpkfbkng", "qkrfvxhtkgcjxgvzx", NA, "moe", "zztusvlvlftzuohqjese", NA, "zbkegtpiyyazdtzwtrgf", "fdzomecriugwftiolvts", "lznymjsueymdwayobdzs", "kneyjualcaofdwjuboiu", NA, "mhmmkdwzifvzwbzgehfu", "czjdr", NA, "klpksqsganuhqbsnnnes", "yrhdlcaqrnlxmwwzydxf", "fgwhkwoeyxcvauzzvp", "azfowgstkryouwojavgc", "jhirqlgfytalwxhqisgy", "brckdpdvzjppmsdn", "qhgwbbjvgc", NA, "yyyaowns", NA, "njxxzzzb", "cvtfvjweg", "yqcldcd", "okgdqlidqslbirovjhsf", "urpkfosvtljjrgtydoax", "t", "kmsnqluwwxxivgp", NA, "ytocuezrm", "gbyazyulugawyxbtfd", "wimahxpyzonldfdzjczg", "gdyaepczotlbeypslguh", NA, "", NA, NA, "pcn", NA, "qbnjukspbyrtphxizccx", "hsmxen", "xtqntu", NA, NA, "ozbggovcoxkwsxuvhtfq", "dbvaefmpzzlkkescjnrl", NA, "rqatnhzpqhuevdpwyret", "nymhfl", "mpcrmilqow", "vlzapqoavwclrtxtqj", NA, "aannbvaenvlzbm", "wohkradefsvmqzqr", NA, "udvhypxpa", "auchzlgreapwnopgevhz", "qxjaxqnokmkbtztzfze", NA, "fmaowgvtietjlysonuwj", "jmnduhizprbeo"))
result <- do.call(olctools:::decode_olc, testlist)
encode_olc 31 bytes in 1 blocks are definitely lost in loss record 13 of 1,299 validate.cpp:179 No Address Trace found
Test code
testlist <- list(lats = c(8.06497574590537e+177, 9.8151070497375e-08, 2.68403877027113e-253, -5.48342576485625e+204, -1.25798408390046e+56, -9.82994031595295e+251, -1.2819531839764e-131, 6.00876263952574e+175, -8.98518117109925e-32, -1.28000806015678e+143, -9032572608630847488, 2.88544721469642e+37, -3.74433476875031e-72, 4.98408664571294e-59, -1.05579504390393e+95, 2.26284010236865e+229, -7.26627572326934e-163, 3.90595907600679e-271, -3.28909146015198e-138, -4.19916406496376e-296, 3.13502147340732e-190, 6.53109493618018e+181, -1.39317179797388e-39, 1.62634739727233e-30, 4.82737938893593e-95, 3.85603939944442e-44, 1.61473943028664e-202, 1.3475947905548e+104, 9.9544342646471e+280, -0.0661105797627036, -7.7864946303865e-265, 7.179739428545e+220, 1.86162946025856e+25, -4.55376436600318e+184, 2.99285700510704e+277, 3.57689309645466e-297, -1.96578656282717e-175, 2.32659544369483e+193, 1.34026465115179e+249, 5.07095027806975e+150, -2.31274587763898e+183, 1277778179983540, -3.56734063865915e+99, 5.4314765481922e+295, 1.22033279621846e+101, 7.60906737090031e+66, 6.52452761497888e-271, 2.24883930767103e+98, 2.2335536906853e-100, -7.25474839759624e+133, 3.48071561083417e+73), length = c(-1499064370L, -295852430L, -604464893L, 42738414L, -1801659100L, -1255377831L, -1999337196L, -1339756458L, -888724039L, 1691036479L, -1010548027L, 1348842725L, 26282423L, -1115811771L, 1385781507L, -1102489207L, 1350451892L, 1232007949L, 842453635L, -1685690212L, 393302996L, -278718142L, -42777157L, -1130478579L, 495370598L, -189435097L, -347690362L, -871226652L, -2089371533L, -640502314L, 1174049025L, -1730867531L, 1557142608L, -2054195344L, -719194462L, 857245367L, -1908528536L, 283065941L, -640657551L, -1520097535L, 893604538L, -758568280L, -350205410L, NA, 251604767L, -563186505L, 1053501923L, 827385190L, -1825103515L, 4918763L, 1817643685L, 668953654L, -543402563L, 180974920L, -1784796218L, -300929919L, 1196287560L, -1712049403L, 1262332531L, 488024572L, -1291929156L, -953285540L, -869260614L, 1078934408L, -1675440075L, 369310305L, 1105515614L, NA, 2064869955L, 1114545934L, -1631401505L, 285501357L, 641196860L, 975019643L), longs = c(2.17708538013524e-94, -6.64368650971619e-146, 63094825003.9819, 1.4436261775625e+233, -1.46953093565565e+292, 4.7508223122106e-36, 5.15245838425245e-198, 2.63044193488135e+237, -10948612782987024, 2.50350534813401e-43, -3.36241494592629e+162, Inf, -7.39542562426958e-252, 4.19648785187355e-159, -7.44425623661824e+188, -1.95609905901454e+155, -2.44582196487614e+287, -1.9528228296768e-235, -Inf, Inf, 2.84722521746154e-83, 3.24179018121752e+90, 1.75939340647591e+46, NaN, Inf, -1.13846554899388e-210, -9.99458288339999e-163, -1.05161554544323e-285, 1.23150422370931e+170, -4.09395205418049e+235, -4.41155735308696e-117, -6.57044572423885e+168, 3.93518801176924e-87, 3.15527545466038e+44, -2.60989158256592e-92, -2.9445252090774e-148, 3.60350884023597e+285, 0))
result <- do.call(olctools:::encode_olc, testlist)
recover_olc 31 bytes in 1 blocks are definitely lost in loss record 13 of 1,302 validate.cpp:179 No Address Trace found
Test code
testlist <- list(lats = c(2.05747067989499e+32, 1.20139916549157e-39, -6.03122848147968e-133, 1.44158804588069e+175, -2.57397460989245e+160, 1.77060368504562e-26, 4.05950008809242e+254, -1.92015573714164e-84, -4.98003950985946e+113, -4.64309377826132e-51, -7.70729307339684e+224, -5.73420216578284e-168, -3.23777383702014e-33, -8.62301729995521e+277, 6.04003820551175e-85, 7.71036880796102e-282, 2.70843820680431e-235, -1.99689603349306e+68, -5.89234185794001e+286, -3.66376311049086e+137, 7.56853885665948e+149, -4.33458722665251e+54, -8.70534967072003e-107, -1.50192336880785e-64, 3.56616254038896e+242, 1.45164600800723e+88, -6.03716769849843e-170, 1.04154927341485e-221, 157050970109.486, 3.23227764486062e-131, 35366879399980.5, 2.75259664644415e+268, 5.62775343674637e-279, 5.91416172952924e-221, -3.41965767832633e-193, -6.97499590507283e-78, 1.37353812327135e+224, -1.22727630162923e+123, -2.86098243817463e+69, -2.32727707806676e+164, 1.43659727876003e-296, -1.4212429497983e+193, 4.7612308426206e-24, -1.38986321169801e+139, -3.67053410340364e-16, -1.21236531705568e-62, 1.3398855301806e+96, 3.24239772989454e+307, -8.87181471580084e-160, 1.81931902642494e+91, 1.31357374340995e+124, 7.53962597396854e+43, 1.60390195072422e+75, -2.25202696975448e+64, -1.09605722687561e-291, -9.28764237143686e-178, 9.00199251231565e-59, -2.14176189484057e+291, 3.20598387245254e+74, -1.28010112642561e+231, -7.55858454856584e+251, -9.99997680111284e-162, -1.4315419390218e+79, -6.9803361602786e+283, -1.38377851619455e-260, 2.8132701527624e-144, -4.44072043627457e+199, 2.359380713289e-255, -2.49048359440789e+233, 2.88203316670111e-18, 7.25589056387301e-84, 6.33077647020287e+78, 1.27245505753152e-276, -3.49943564272332e+184, -6.40918878023022e+246, 1.34718333735674e-75, 1.61863828217187e-167, -1.83668827142479e+189, 6.40049916531409e-219, 2.67472545196982e-70, -1.28920906331904e-215, 2120360086068368, -1.75714467045373e-167, 2.15140830063603e-193, 9.19403946950584e+232, 1.84214334576916e+126, 3.97503775633679e-205), longs = c(-5.20052424877081e+296, 5.60187263465484e+184, 3.00432336698211e-264, 4.64291670091632e-228, 8.87882784977779e-281, -2.64419244925547e+69, 3.008658568797e+41, -1.7480442312568e-94, 6.52218251029455e+206, 2068736549454604288, -1.761804841715e+267, -1.59425264453671e-24, -6.51818700875176e-162, 8.38187964824539e+122, -3.22339142454457e+44, -5.65562467571536e+226, -1.05566537730201e-164, 3.33239984666257e-115, 1.649904546499e+293, -3.01472584760687e-215, 1.45199517823263e-173, -7.69713878105604e-193, 1.3891687016095e-285, -1.02697807788718e-24, -1.3478022638312e-76, -4.83858670921739e+249, 4.56549255727402e-63, -7.31584896347754e-214, 8.31356137720827e-157, -1764366279182012, 1.21285441019201e-296, -1.99246404791553e+198, -2.60608345280013e-281, -3.23234374765818e-285, -2.15516165381864e-272, -3.72215152278077e-126, 3.08564952617162e+48, -8.73313066353565e-249, -8.37476210728799e+263, -2.19661299215507e+115, -2.41091211406175e+114, 7.0605139372181e-44, -2.21979077285543e-29, 0.0735896741879817, 4.35970738754194e+114, 1.86981683059964e-135, 8.47786876899559e+212, -4.53914822753305e+135, 3.40345944319597e+268, -2.37333785403253e+288, 1.45635427582222e-65, -4.64373535041445e-32, -1.98478269141811e-104, 5.25431711589157e+93, -2.05365698776555e+267, 2.2330379908281e+294, 2.74799511213538e-200, 2.53446914791181e-166, 7.37975713053394e+139, -6.00789596087645e-148, 1.50819356655407e-232, -3.99423273356397e+139, 4.70306044327626e+81, 5.89821143994372e-138, -2.55369256724197e-77, -8.67058095316316e+192, 1.50501376114716e-279, 6.23382956957488e-129, -1.12329049264292e+28, 5.54758614699416e+108), olcs = c("ltsqntnklunqloybbss", NA, "idlsabemvizywksuxe", "ypsxhvic", "wk", "bmlyiekcyfu", NA, "", "ucurdyryuxcndb"))
result <- do.call(olctools:::recover_olc, testlist)
shorten_olc 31 bytes in 1 blocks are definitely lost in loss record 13 of 1,302 validate.cpp:179 No Address Trace found
Test code
testlist <- list(lats = c(2.05747067989499e+32, 1.20139916549157e-39, -6.03122848147968e-133, 1.44158804588069e+175, -2.57397460989245e+160, 1.77060368504562e-26, 4.05950008809242e+254, -1.92015573714164e-84, -4.98003950985946e+113, -4.64309377826132e-51, -7.70729307339684e+224, -5.73420216578284e-168, -3.23777383702014e-33, -8.62301729995521e+277, 6.04003820551175e-85, 7.71036880796102e-282, 2.70843820680431e-235, -1.99689603349306e+68, -5.89234185794001e+286, -3.66376311049086e+137, 7.56853885665948e+149, -4.33458722665251e+54, -8.70534967072003e-107, -1.50192336880785e-64, 3.56616254038896e+242, 1.45164600800723e+88, -6.03716769849843e-170, 1.04154927341485e-221, 157050970109.486, 3.23227764486062e-131, 35366879399980.5, 2.75259664644415e+268, 5.62775343674637e-279, 5.91416172952924e-221, -3.41965767832633e-193, -6.97499590507283e-78, 1.37353812327135e+224, -1.22727630162923e+123, -2.86098243817463e+69, -2.32727707806676e+164, 1.43659727876003e-296, -1.4212429497983e+193, 4.7612308426206e-24, -1.38986321169801e+139, -3.67053410340364e-16, -1.21236531705568e-62, 1.3398855301806e+96, 3.24239772989454e+307, -8.87181471580084e-160, 1.81931902642494e+91, 1.31357374340995e+124, 7.53962597396854e+43, 1.60390195072422e+75, -2.25202696975448e+64, -1.09605722687561e-291, -9.28764237143686e-178, 9.00199251231565e-59, -2.14176189484057e+291, 3.20598387245254e+74, -1.28010112642561e+231, -7.55858454856584e+251, -9.99997680111284e-162, -1.4315419390218e+79, -6.9803361602786e+283, -1.38377851619455e-260, 2.8132701527624e-144, -4.44072043627457e+199, 2.359380713289e-255, -2.49048359440789e+233, 2.88203316670111e-18, 7.25589056387301e-84, 6.33077647020287e+78, 1.27245505753152e-276, -3.49943564272332e+184, -6.40918878023022e+246, 1.34718333735674e-75, 1.61863828217187e-167, -1.83668827142479e+189, 6.40049916531409e-219, 2.67472545196982e-70, -1.28920906331904e-215, 2120360086068368, -1.75714467045373e-167, 2.15140830063603e-193, 9.19403946950584e+232, 1.84214334576916e+126, 3.97503775633679e-205), longs = c(-5.20052424877081e+296, 5.60187263465484e+184, 3.00432336698211e-264, 4.64291670091632e-228, 8.87882784977779e-281, -2.64419244925547e+69, 3.008658568797e+41, -1.7480442312568e-94, 6.52218251029455e+206, 2068736549454604288, -1.761804841715e+267, -1.59425264453671e-24, -6.51818700875176e-162, 8.38187964824539e+122, -3.22339142454457e+44, -5.65562467571536e+226, -1.05566537730201e-164, 3.33239984666257e-115, 1.649904546499e+293, -3.01472584760687e-215, 1.45199517823263e-173, -7.69713878105604e-193, 1.3891687016095e-285, -1.02697807788718e-24, -1.3478022638312e-76, -4.83858670921739e+249, 4.56549255727402e-63, -7.31584896347754e-214, 8.31356137720827e-157, -1764366279182012, 1.21285441019201e-296, -1.99246404791553e+198, -2.60608345280013e-281, -3.23234374765818e-285, -2.15516165381864e-272, -3.72215152278077e-126, 3.08564952617162e+48, -8.73313066353565e-249, -8.37476210728799e+263, -2.19661299215507e+115, -2.41091211406175e+114, 7.0605139372181e-44, -2.21979077285543e-29, 0.0735896741879817, 4.35970738754194e+114, 1.86981683059964e-135, 8.47786876899559e+212, -4.53914822753305e+135, 3.40345944319597e+268, -2.37333785403253e+288, 1.45635427582222e-65, -4.64373535041445e-32, -1.98478269141811e-104, 5.25431711589157e+93, -2.05365698776555e+267, 2.2330379908281e+294, 2.74799511213538e-200, 2.53446914791181e-166, 7.37975713053394e+139, -6.00789596087645e-148, 1.50819356655407e-232, -3.99423273356397e+139, 4.70306044327626e+81, 5.89821143994372e-138, -2.55369256724197e-77, -8.67058095316316e+192, 1.50501376114716e-279, 6.23382956957488e-129, -1.12329049264292e+28, 5.54758614699416e+108), olcs = c("ltsqntnklunqloybbss", NA, "idlsabemvizywksuxe", "ypsxhvic", "wk", "bmlyiekcyfu", NA, "", "ucurdyryuxcndb"))
result <- do.call(olctools:::shorten_olc, testlist)

Analyzed functions summary

function name tested inputs inputs with issues
decode_olc 3 3
encode_olc 3 3
recover_olc 3 3
shorten_olc 3 3
validate_full 3 0
validate_olc 3 0
validate_short 3 0

Report details

  • Report generated by: 06283e7
  • Inputs generator seed: 1661798648

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.

None yet

1 participant