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 #35

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
find_discords_brute_force Invalid read of size 1 visit_registry.cpp:54 No Address Trace found
Test code
testlist <- list(discords_num = -1060532665L, ts = c(-Inf, NA), w_size = 966236145L)
result <- do.call(jmotif:::find_discords_brute_force, testlist)
find_discords_hotsax Invalid read of size 8 hot-sax.cpp:163 hot-sax.cpp:163
Test code
testlist <- list(a_size = -1133788262L, discords_num = -973403020L, n_threshold = 6.82052220002715e+301,     paa_size = -216643676L, ts = c(-4.40168706388367e-299, -6.81011367816273e+58,     -1.74596123671089e-62, 2.35664674891128e+103, -7.34676839219453e-204,     18246.6722211775, 2.12486428515207e-297, -3.65415818647277e+149,     3.04878044954172e-176, -9.3092813898844e+32, -1.08681412918405e-244,     -1.76825679541207e-258, 3.69072600854281e+41, -2.66161261167014e+163,     -7.80881697492692e-125, 4.1200416537432e-104, -7.24708871550165e+283,     -9.51261354548949e-18, -1.70910301628978e+144, -8.61427134315865e+142,     1.51637923939648e+58, 2.38322787935977e-29, -1621.46653920929,     -1.31866644798172e+82, -2574799950292324864, -1.98714902228073e-264,     2.62129759791053e+178, 2.19206573058837e-300, 2.56108371216421e+161,     -2.51514340459804e+116, -4.63597112261019e-306, 4.61749967202817e+251,     -3.32598758252959e-123, -3.35199850752755e-244, -1.60077301245421e-46    ), w_size = 1255466451L)
result <- do.call(jmotif:::find_discords_hotsax, testlist)
find_discords_rra 62 bytes in 1 blocks are possibly lost in loss record 20 of 1,299 rra.cpp:326 No Address Trace found
Test code
testlist <- list(a_size = -1484187319L, discords_num = -439423508L, n_threshold = 1.06799009430505e-130,     nr_strategy = c("bsqcfclmwpsicmevylae", "yuikiturqqoytywbtqcy",     "znsdfrdamgiispwwumur", "sjidsuxqtnaaplrxbsxe", "pnahlifqmfgh",     NA, NA, NA, "cdlyvptuxijwrbmmfela", "mvzjldejlipyxnfqjrea",     "bleqrmvujoezmbqddvkn", "fm", NA, "iguayifojqzpsdukqolw",     NA, NA, "wmrmpienkmzbtojzogni", "onbbgmotlwssh", "imodru",     NA, NA, "jhsjbjhbhfznqslcbahq", "szqfcvnwfzoyzfcwtnna", "rppnoizmmfejjtmwvkyr",     "wbarjvkhofiiascbsvkf"), paa_size = 1979806750L, series = c(4.35311503303897e-253,     1.73232154533617e+225, 9.18832269000572e+210, 1.52824370602564e-241,     -1.55944399025452e+302, -4.1810728351886e+122, -2.6693751949625e-45,     4.13215887904925e+265, 2.25517775695754e+101, 3.07861848126594e-147,     6.11166944232844e-129, -1.05993128062056e+141, 7.8704852130192e+245,     6.81233859191571e-221, 4.47157378505948e-76, -1.63052396296785e-178,     1.81143795990472e-289, -6.92822222178914e+31, NaN, 7.95959050815145e-203,     -3.80285385092954e+296, -Inf, -6.23311622525382e+264, NaN,     -1.57164815556968e+159, -3.34118828952537e-217, 1.67084034093978e-121,     -8.13314998465459e+307, -9.70117390177528e+84, Inf, 2.68383905269473e-52,     -7.47645941271375e-47, -1.45453848187852e-11, -2.30161272772341e+73,     0), w_size = 1294386236L)
result <- do.call(jmotif:::find_discords_rra, testlist)
idx_to_letter Invalid read of size 1 string.cpp:17 No Address Trace found
Test code
testlist <- list(idx = -609900322L)
result <- do.call(jmotif:::idx_to_letter, testlist)
is_equal_mindist 62 bytes in 1 blocks are possibly lost in loss record 20 of 1,301 string.cpp:77 No Address Trace found
Test code
testlist <- list(a = c(NA, NA, "xdmkgbnwvjuzxia", "qggsawmndyeslj", "fmohntsnwwri", NA, "", "v", "ropxohtudsvwmzhycnjb", NA, "xtovprfnntrj", NA, "flcfrrbubtptlxkdeuzg", NA, "ypwhksiemhvatjrikcky", "mxlktimbpmcacybjqsgc", "winmukaexkjwkfsjdkxg", "olcecbcratzbxkvvpiqc", "pxgnatsankw", "zxqcjhfjbvtitbanmejs", NA, NA, "hiegagtlazseokheahsk", "ljinhtgqfqjtpjhgyycc", NA, "mxjsdq", "izvzfzmeowrxz", NA, "ldigofahfowrmxjyyhcr", "typheikteuhyvk", "hdwugqgjncby"), b = c("tfknvruhqgxugmorlwep", "ozgirs", "ayszdwebieaapsmaqzai", NA, "ktmsnembknwsuiypzdoc", NA, "araoguc", "lvybnbcqfquoqysdtwdg", "hnlixlleqakdylemnfwc", "higst", "vxztjprcormuvzqnl", NA, "hxzgtq", "xssvirutokrseqffyi", "h", "jv", "jxikogtaoaxz", "vxhmehxfejdpkpygywip", NA, "kweg", "itk", "zptkqodaedpkladmo", "nv", "vtubhetvmewqdkabxorp", NA, "fwlbvnzialormmcscukk", "xn", NA, "blrdmfihdxxmywhivzx", "tzxexfnpbchnveca", "scxzoxpviynhzqzllrse", "olxykrznkoveaeqdiqku", "uglzonvjyulnnfvgs", NA, NA, NA, NA, "glfufxdwszzkgmvxhaak", "vpcrgrhxo", NA, "gmpzedkzsurehtqdc", "uttewqxgvmimvypwtt", NA, "jpzj", "cpu", "kxztzpfvwzcxtcdzorob", NA, "xjrsv", "zymwhuhtdgkksjochtfn", "tcwkolslwxmznfl", "yaadqjdjcniverzvpfnx", "filcpnp"))
result <- do.call(jmotif:::is_equal_mindist, testlist)
is_equal_str 62 bytes in 1 blocks are possibly lost in loss record 20 of 1,301 string.cpp:60 No Address Trace found
Test code
testlist <- list(a = c(NA, NA, "xdmkgbnwvjuzxia", "qggsawmndyeslj", "fmohntsnwwri", NA, "", "v", "ropxohtudsvwmzhycnjb", NA, "xtovprfnntrj", NA, "flcfrrbubtptlxkdeuzg", NA, "ypwhksiemhvatjrikcky", "mxlktimbpmcacybjqsgc", "winmukaexkjwkfsjdkxg", "olcecbcratzbxkvvpiqc", "pxgnatsankw", "zxqcjhfjbvtitbanmejs", NA, NA, "hiegagtlazseokheahsk", "ljinhtgqfqjtpjhgyycc", NA, "mxjsdq", "izvzfzmeowrxz", NA, "ldigofahfowrmxjyyhcr", "typheikteuhyvk", "hdwugqgjncby"), b = c("tfknvruhqgxugmorlwep", "ozgirs", "ayszdwebieaapsmaqzai", NA, "ktmsnembknwsuiypzdoc", NA, "araoguc", "lvybnbcqfquoqysdtwdg", "hnlixlleqakdylemnfwc", "higst", "vxztjprcormuvzqnl", NA, "hxzgtq", "xssvirutokrseqffyi", "h", "jv", "jxikogtaoaxz", "vxhmehxfejdpkpygywip", NA, "kweg", "itk", "zptkqodaedpkladmo", "nv", "vtubhetvmewqdkabxorp", NA, "fwlbvnzialormmcscukk", "xn", NA, "blrdmfihdxxmywhivzx", "tzxexfnpbchnveca", "scxzoxpviynhzqzllrse", "olxykrznkoveaeqdiqku", "uglzonvjyulnnfvgs", NA, NA, NA, NA, "glfufxdwszzkgmvxhaak", "vpcrgrhxo", NA, "gmpzedkzsurehtqdc", "uttewqxgvmimvypwtt", NA, "jpzj", "cpu", "kxztzpfvwzcxtcdzorob", NA, "xjrsv", "zymwhuhtdgkksjochtfn", "tcwkolslwxmznfl", "yaadqjdjcniverzvpfnx", "filcpnp"))
result <- do.call(jmotif:::is_equal_str, testlist)
manyseries_to_wordbag 62 bytes in 1 blocks are possibly lost in loss record 20 of 1,299 sax-vsm.cpp:86 No Address Trace found
Test code
testlist <- list(a_size = 1487393735L, data = structure(c(3.38589826732686e+250, 1.20890913739657e-48, 7.34545276921348e-33, 8.13591288016893e-26, 1.15190525193524e+63, 3.68941849270307e+120, 3.29411726139608e-249, 1.88890586700697e-264, 6.13946242213266e+116, 1.5587883344527e-205, NaN, 5.89764006340363e-186, -Inf, 1.02458072888723e-158, 9.27521152339122e-223, 8.6029347915735e-183, 1.49953405558559e-151, 4.78045833541111e+42, 1.42994917572854e-123, 7.66970373073798e-41, 5.03454160196298e+219, 9.54594277912556e-52, 3.74299395647307e+93, 2.39314350837956e-24, NaN, 1.48416290413573e+135, 1.52311122102347e-251, 246.848687416845, 1.81658606591124e-67, 8.3087694103941e-24, 4.01935759801793e-38, 3.32348927402275e-230, Inf, 1.09058525120583e-100, 2.24119878209728e-74, 45679065.788357), .Dim = c(4L, 9L)), n_threshold = 3.82255275937833e-90,     nr_strategy = c("gvalonj", "smxwvqmjdn", "ybrhweniuhfvowblcvnl",     NA, "apsmslhbraafl", "vxygepqbqcfxmlpdtwnk", "ts", "", "iyvndjvsfrbsxnmjfhmi",     NA, "afyegcnvkpkhgldec", "dooxilxjrcgypzdvdqgb", "", "cokwpavuuohlmqlimrub",     "bqkzytybdmeohbeoogq", "lqcdbxkpyehkttehfrxb", "xy", NA,     NA, "", "bpdiuafsyjltwgkeg", "dzcuqwanhnyywlqlbeip", "hgmauaixtutfqkryxjrk",     NA, NA, "riemzsmbcwnchnbolnak", "yrlcgjykrjkdhnkpecua", NA    ), paa_size = -689818054L, w_size = 788788698L)
result <- do.call(jmotif:::manyseries_to_wordbag, testlist)
paa 73 bytes in 1 blocks are possibly lost in loss record 23 of 1,298 paa.cpp:98 No Address Trace found
Test code
testlist <- list(paa_num = -1921877987L, ts = c(-1.08601625427423e+29, 4.66921492101986e+235, 4.65379421460512e-159, 3.01409552264855e-266, 1.82230383021177e+46, -1.90092668933469e-228, -226469701.968652, -3.87559163775563e-130, -7.21268728857414e-155, 2.32294776002041e+82, 1.30273922919829e+123, -3.24695860313734e-270, 3.14188366245367e+139, -1.1436980507663e-107, -2.72973052237448e+304, 2.31795398029849e-239, -2.05871348560586e+185, -1.24457347469696e+221, -4.07393992207637e+220, 3.53661317237817e-191, -6.27900287964226e+184, 2.09368930096221e+28, -24.743672073476, -2.59815760840042e+194, -1.72729787728358e+34, 1.95854400190789e-86, -1.64875434279819e-57, -2.00885266595529e+182, -1.68868817395482e+214, -3.61616534489085e-215, 1.22443496541187e+42, 3.60802262218022e+221, 6.99429041017613e-07))
result <- do.call(jmotif:::paa, testlist)
sax_by_chunking 73 bytes in 1 blocks are possibly lost in loss record 23 of 1,298 paa.cpp:98 No Address Trace found
Test code
testlist <- list(a_size = -1783070820L, n_threshold = -2.50066782912961e+99,     paa_size = -299529119L, ts = c(-5.98363036950773e-227, -1.19880898533901e+242,     -1.13294782653951e+145, -2.17410975629619e-55, -3.10299318806034e+225,     4.34331851764076e+68, -2.21361257048244e-63, -2.38015218451453e-200,     -4.67282764921602e+80, 2.51640476161112e-119, 2.01315904685142e+292,     -2.93014886059429e+247, 1.04199701323152e+183, 1.12539894095025e+67,     3.43802366793046e+275, 8.44134379622743e-23, 9.98669286144375e+219,     -1.0455885485337e+115, -5.08408608362261e+268, 8.64585306045226e-273,     6.363755135566e+147, -2.00911052484833e+31, -7.95450640287254e-171,     3.30762869999367e+246, 9.22804029384491e-210, -1.19711679163567e+128,     -1.40869293351568e+242, 1.79378704703541e+165, 3.09664316446208e-83,     -5.96235975621467e-162, 6.91001103574737e-62, -4.20101798395003e+222,     3.35520494194456e+31, -2.18287413704879e+150, 98153177.040395,     -2.1344800437317e+265, 3.49887347894649e-198, 1.15887952796032e+255,     2.46928256230429e-163, 3.44244737793938e+23, -3.09357403115793e+275,     -2.82333675067637e-148))
result <- do.call(jmotif:::sax_by_chunking, testlist)
sax_via_window 62 bytes in 1 blocks are possibly lost in loss record 20 of 1,299 string.cpp:61 No Address Trace found
Test code
testlist <- list(a_size = 77314278L, n_threshold = 1.03791224547657e-279,     nr_strategy = c(NA, "skeoubeovxrnlcqp", "ekexfkefqppbtkwklrpp",     NA, "cyjywarehiyvcopnsnpo", "xhboovrs", "btxszykhowcjbsmcjfrf",     "nghzbqaiounmtvqewjjv", NA, NA, "wcicexniy", "esokwasb",     "uv", "pqeadqxkjfdnc", "t", NA, "lcmcngcmvvgsrvoxzugd", "gnmfeljlwqb",     NA, "pbtqckncywddgqlcjjch", NA, NA, NA, "sccpzdytrucbfpvpdvpb",     "vasyamnghglokiwuhctz", "sailmjsvvmftrgjcbpih", NA, "typjvwbnsahvgfcotbkh",     NA, "", "iphzzymqnyxkznclxysh", "fszdiipwowddaxxrirhu", NA,     "sbmpklmwhijkkuyexlkl", "hdztnvbbocsfkfqywlvg", "jghpzayotbysuelkeeue",     "mdbtoxtjhtdclemryjxv", NA, NA, NA, "zknrdsnxijjx", "draeppzbtgnixvdgsvms",     "ske", NA, "vqvbxbuocpoqlwocjqmm", NA, "fkachbvuysokoqfc",     "hwzmzrfabnhupsadiqib", NA, NA, "hkqyiisehcbxugtmhqoh", NA,     "uztncynfxckvwulnwlqq", "p", NA, "erbjqhsnfhqdnlbxsgss",     "ufdbkpqcrhpznduhbgha", "a", "qvudwglqacvqpfmqrijx", "lxcqsmjycbdlavitlnde",     "dwcbojewwujtndjvmtl", "ekydfpgstjoauizvebgi", "diimyq",     "ixrjhblqlokoiy", NA, NA, "nfyisahjlhjfrh", "rfiutpwtgsatofsponib"    ), paa_size = -1287526675L, ts = c(-6.45434794495422e-269,     6.72672283737528e-267, -1.02124486998706e-120, 4.05431857508005e+60,     2.95091562413324e+263, -1.45133819115277e+49, -82409851.1570325,     3.49751718907396e-108, -3.67964474202813e-207, 6100.12862689899,     2.80203688994811e-71, NA, NaN, -7.54697322665086e+122, -1.06800079725266e-256,     -2.36990231096439e-55, 1.61481951459153e-81, -7.28100240278858e-203,     -4.56570462327401e+117, Inf, -1.05830689192988e-132, 1.19510697426011e-85,     -1.22520586987551e-34, Inf, -1.97336296703725e+248, 5.67124999519961e-294,     7.84290735856784e+224, 9.39822024799828e-277, -5.43714102455753e-92,     8.7653519101205e-205, -1.34238717279722e-12, 1.05967012771612e+90,     1.5436450673897e+237, NA, -3.56482267239908e+296, 1.77940483416764e-144,     -7.58123087766868e+38, -57445786505731.1, 7.55947772570622e+289,     0), w_size = -1183062262L)
result <- do.call(jmotif:::sax_via_window, testlist)
series_to_wordbag 62 bytes in 1 blocks are possibly lost in loss record 20 of 1,298 sax-vsm.cpp:29 No Address Trace found
Test code
testlist <- list(a_size = 77314278L, n_threshold = 1.03791224547657e-279,     nr_strategy = c(NA, "skeoubeovxrnlcqp", "ekexfkefqppbtkwklrpp",     NA, "cyjywarehiyvcopnsnpo", "xhboovrs", "btxszykhowcjbsmcjfrf",     "nghzbqaiounmtvqewjjv", NA, NA, "wcicexniy", "esokwasb",     "uv", "pqeadqxkjfdnc", "t", NA, "lcmcngcmvvgsrvoxzugd", "gnmfeljlwqb",     NA, "pbtqckncywddgqlcjjch", NA, NA, NA, "sccpzdytrucbfpvpdvpb",     "vasyamnghglokiwuhctz", "sailmjsvvmftrgjcbpih", NA, "typjvwbnsahvgfcotbkh",     NA, "", "iphzzymqnyxkznclxysh", "fszdiipwowddaxxrirhu", NA,     "sbmpklmwhijkkuyexlkl", "hdztnvbbocsfkfqywlvg", "jghpzayotbysuelkeeue",     "mdbtoxtjhtdclemryjxv", NA, NA, NA, "zknrdsnxijjx", "draeppzbtgnixvdgsvms",     "ske", NA, "vqvbxbuocpoqlwocjqmm", NA, "fkachbvuysokoqfc",     "hwzmzrfabnhupsadiqib", NA, NA, "hkqyiisehcbxugtmhqoh", NA,     "uztncynfxckvwulnwlqq", "p", NA, "erbjqhsnfhqdnlbxsgss",     "ufdbkpqcrhpznduhbgha", "a", "qvudwglqacvqpfmqrijx", "lxcqsmjycbdlavitlnde",     "dwcbojewwujtndjvmtl", "ekydfpgstjoauizvebgi", "diimyq",     "ixrjhblqlokoiy", NA, NA, "nfyisahjlhjfrh", "rfiutpwtgsatofsponib"    ), paa_size = -1287526675L, ts = c(-6.45434794495422e-269,     6.72672283737528e-267, -1.02124486998706e-120, 4.05431857508005e+60,     2.95091562413324e+263, -1.45133819115277e+49, -82409851.1570325,     3.49751718907396e-108, -3.67964474202813e-207, 6100.12862689899,     2.80203688994811e-71, NA, NaN, -7.54697322665086e+122, -1.06800079725266e-256,     -2.36990231096439e-55, 1.61481951459153e-81, -7.28100240278858e-203,     -4.56570462327401e+117, Inf, -1.05830689192988e-132, 1.19510697426011e-85,     -1.22520586987551e-34, Inf, -1.97336296703725e+248, 5.67124999519961e-294,     7.84290735856784e+224, 9.39822024799828e-277, -5.43714102455753e-92,     8.7653519101205e-205, -1.34238717279722e-12, 1.05967012771612e+90,     1.5436450673897e+237, NA, -3.56482267239908e+296, 1.77940483416764e-144,     -7.58123087766868e+38, -57445786505731.1, 7.55947772570622e+289,     0), w_size = -1183062262L)
result <- do.call(jmotif:::series_to_wordbag, testlist)
str_to_repair_grammar 62 bytes in 1 blocks are possibly lost in loss record 20 of 1,298 repair.cpp:521 No Address Trace found
Test code
testlist <- list(str = c("rpomotxxsspagzjpybfz", "vpzkjovuacypafqpyu", NA, "egfpodiatdrekomlscww", "tefe", "komdhkgfntoemkjfpeh", NA, "mcjfotefmwwz", NA, NA, NA, "orrlmxzkxrjcrnjuzeuc", "eqgmdwti", "neboadsnkrzpzqvtwj", "ijuntjisivdvrzmm"))
result <- do.call(jmotif:::str_to_repair_grammar, testlist)

Analyzed functions summary

function name tested inputs inputs with issues
alphabet_to_cuts 3 0
early_abandoned_dist 3 0
euclidean_dist 3 0
find_discords_brute_force 3 2
find_discords_hotsax 3 3
find_discords_rra 3 3
idx_to_letter 3 3
is_equal_mindist 3 3
is_equal_str 3 3
letters_to_idx 3 0
manyseries_to_wordbag 3 3
paa 3 1
sax_by_chunking 3 1
sax_via_window 3 3
series_to_chars 3 0
series_to_string 3 0
series_to_wordbag 3 3
str_to_repair_grammar 3 3
subseries 3 0
znorm 3 0

Report details

  • Report generated by: 7403c04
  • Inputs generator seed: 1661798651

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