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

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

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
KGE Conditional jump or move depends on uninitialised value(s) utils.cpp:77 No Address Trace found
Test code
testlist <- list(y = c(6.57305150484566e+169, 2.51151219393644e+174, 5.22158333403134e-252, 3.1643845041522e+271, 6.47312304903387e+78, -6.96902783697557e+273, -25923206.8100016, -1.15873282348713e+128, -5.77001881401162e-268, 4.71566013804623e-158, 8.54421508037923e-260, 1.7893885537665e-71, -5.75095642628657e-214, -3.91449752417397e+47, 4.09521792243108e-172), yhat = c(-3.01602712703718e-116, -Inf, -5.11914144340028e-87, -4.74745325454253e-161, 1.9868292859413e-87, -4.27233055513397e-144, -3.68816855175932e-75, -1.25551636088345e-16, 5.06719745151967e-216, -1.36343461158255e-216, Inf, 5.16293692073148e-143, 5.36654721542392e-32, 6.07738283899428e-151, -3.25378856026614e-198, -Inf, 2.26052987493762e+133, -5.39081152141193e+37, 4.42689507833081e+38, -2.09237434471312e+168, 9.19425670896201e+98, -4.74745325454253e-161, 3.41498917650591e-158, -3.61184714522086e-121, 0))
result <- do.call(ldsr:::KGE, testlist)
NSE Invalid read of size 8 utils.cpp:18 No Address Trace found
Test code
testlist <- list(y = c(-9.12586233651977e-19, 6.79516202850434e+261, 8.5566597344957e+269, 1.74546644375583e+150, 3.84126411430293e+180, -3.56837806447612e-92, -9.0787676849117e-217, 7.6294121324729e+61, 7.44801924125421e-173, -8.83765081515108e-256, 144541574.576236, 2.64344893769517e+105, -7.42138679915249e+36, 4.88393653691635e-234, 2.296722526615e-27, 5.15248266576007e-129, -9.48113393381023e-177, -5.47133432839211e-173, 7.15117005291422e-300, -1.27564965607943e-275, 7.94204520264543e-217, 3.57630000291174e+193, 14197103788144.8, -1.03231152385284e-192, -2.3680746785845e-43, 26982.4757219001, 8.96287553684444e-210, -1.14977301053033e-112, -1.64966838818384e-162, 2.41040503867643e-121, -3.23474171906189e-224, -277.740670838036, -4.53968994094441e+147, 9.68511096193502e+107, 8.2622698266114e-106, 1.63346349797051e-14, 7.10061955955173e+251, 6.53123937189407e+59, -1.90385396208938e+220, -4.35508630295919e-308, -3.99849935055321e-220, -1.92118431415919e+107, -6.78842677075831e+21, -4.82922058856928e+58, -3.1839176837812e+100, 7.33237763343544e+202, 4.18465976934889e-300, 1.7182810442729e+77, -6.8781510375882e+272, 2.27555277298321e-17, -2.56045354529612e+289, 8.14460923858262e-179, -4.68003397195878e-219, -3.31756850539115e-134, -8.24156003881318e+218, 3.66338515016463e+283, -3.55082360466146e+103, -1.51712388354612e-28), yhat = c(-2.6971099266653e+104, 7.84508656991454e-138, -3.36172527474855e-101, 3.48012350671421e+87, 8.2248571520291e+193, 5.21954182007129e-42, -4.40803938403931e-250, -2.50152403434249e+69, -3.27104533759999e+190, -1.48692854530641e+185, 6.73157499967311e-100, -1.36135503046341e-38, 7.53157052335103e-73, -2.68423991827343e+94, 2.77951755553856e+189, NA, 0.15838129274298, 1.08124226117447e-126, -122412717373.4, -2.73796701746416e-163, 4.31872666969925e-144, -6.04003707298926e+77, -2.93465727723673e+21, Inf, 7.2689241116324e+49, 4.74703166875505e+304, -5.38000753683969e-298, 1.85212171961911e-105, -1.4720332596289e-83, NA, 2.25845121389418e-273, -1.01709333310556e-274, 4.39502382026864e+38, 6.1383905789802e+143, 1.20663245358632e-157, -2.88653905429908e+195, -1.96617462628426e-14, -5.83633251911895e-40, NA, -8.0429798700863e+257, 0))
result <- do.call(ldsr:::NSE, testlist)
RE Invalid read of size 8 utils.cpp:94 No Address Trace found
Test code
testlist <- list(y = c(-1.29201924817198e-64, 1.24149479687285e-187, -3.14530477856073e+129, 1.3143566448593e+303, -5.16845760232439e+216, 1.81285900569289e+183, -1.54797064770531e+91, 1.17825806890187e+285, 8.52566222349506e-164, 1.78501428399517e-202, 5.2769745968309e-132, 2.49160738445453e-292, 1.25446071570633e-10, 9.36149433281088e-53, 2.28938947285312e+66, -4.9947104483273e-56, 2.25846474789851e+114, 2.0613613149231e-249, 7.82957242987593e+121, -7.44689958462065e-06, -1.00398256623134e+198, -8.9525217829079e-73, -9.33304758396964e-53, 2.80222377146708e-303, -2.96491315793155e-204, -2.51086064524164e-107, -1.35895266405387e-141, 4.58984645269754e+181, 1.62215647910401e+25, 3.84742189136568e-38, -7.06078620165598e-99, 8.00899100591674e-178, -1.2509231978048e-88, -8.94332303293384e+153, 3.43923929139206e+230, 3.1482737446234e+167, -7.92488560990735e+26, -1.10052281564261e+307, -28595.3347245412, 1.50152839847072e-195, 1.37923067464441e+94, -1.75582336944748e-52, 7.17244074085189e+23, -827.286839233596, 2.74578126138164e-235, 2.13936309076609e+293, -4.90825847583625e+285, -5.16836808705057e-170, 5.7190121495557e-273, -2.33811966821988e+129, -4.5346067611094e-131, -2.23901747640932e-54, 5.52207271118381e-78, -1.03679297354419e+280, -2.89682829738042e-52, 2.40694759441811e-260, -5.12203884254111e-110, -1.50415083363175e-68, -1.28150519686521e-286, 1.42482738888074e-126, 6.74912647276242e+111, -6.25879431386345e+129, 1.94048799763273e-189, 2.49489046724574e+188, -1.38447471486917e+165, 219575378549609, -2.32582581234953e-92, -6.7071812818951e+80, -2.6178737816561e-46, -1.73602724942121e-144, -3.59944229909157e-73, -6.27770080923879e+271), yc_bar = 9.32540319175846e+70, yhat = c(2.41491724633141e+249, 5.5978968543358e+72, 1.14332366595472e-151, -1.53106655461624e-62, -2.09865588690819e-60, 5.32860569611301e+78, -3.16238114648914e+66, -3.05984684283976e+113, 3.3532011449283e-254, 2.99240791920771e-158, -4.92479389947404e+172, 1.64017465764037e-48, -3.97204676463829e+220, -1.33617356135132e-44, 1.55967665059514e+45, 5.54813164444019e-157, Inf, 1.5459438953089e+169, 6.34564258593218e-28, -2.91356526900206e-157, 1.19158894976955e-175, -3.48891161379037e-295, -1.56020484783335e+182, -1.58298123619637e-210, -1.59028054752499e+157, 3.61810936248593e-216, 9.2060976746477e-250, -1.10495567982725e+306, -4.19358950267426e+191, 5.97451349453217e+181, 4.67788218410441e+24, 2.97408905721853e-282, Inf, 6.72322177737366e-276, -2.35405337656135e+154, 3.2125389606799e-05, NaN, 2347335381.51225, -3.54630439606088e+252, -1.64755887475032e-187, -3.64323378714247e-227, NaN))
result <- do.call(ldsr:::RE, testlist)
corr Invalid read of size 8 utils.cpp:56 utils.cpp:55
Test code
testlist <- list(x = c(-2.75085312557771e+96, -1.41371350338431e-307, -Inf, -1.7383216882698e+233, 1.36848240857742e-234, 187363437878427, -1.0691938531084e-196, -8.87588208057683e+294, 5.22528855611516e+151, -3.7609484219501e-276, -2.88013432019178e-297, 1.00648201601463e+160, 5.8720041945082e-155, -1.67525648621257e+270, -Inf, -1.02924606285325e-294, -1.3386172859017e-248, 4.77515762406838e-227, -5.18957382500747e-35, 3.67698031087018e+259, 7.46714859593962e+270, 2.03902542520484e+139, 3.72836722454487e+99, NA, -4.77027094441601e-214, -1.83901817969545e-224, 8.46714498018919e-81, -650548529910707200, 1.00366487268806e+144, 2.79970630192528e+196, 8.44972827192153e-134, 2.16269250141127e+33, 5.42667731113781e-272, -2.24728875055999e+286, 1.0783932744716e-118, -8.18837609680001e+53, -2.08128878906452e-225, 4.88773099528112e+201, -1.97128409035717e+204, -8.70743643372328e-210, -2.1680639185947e+280, 5.9541816907123e+83, -5.11972146408342e+61, -1.45543652789425e+283, 1.03750935073587e-15, -236029998157.253, 5.707098956129e-157, -3.75701184433467e-52, -2.25296796977089e+137, 0), y = c(8.53832208984403e-275, -9.44675927517121e+138, 1.18705278941799e-43, 2.87697123439867e-201, 4.11045906599166e-210, -3.19983886155389e+177, 7.91191642225985e+162, 2.37631833525706e-207, -2.22343126021691e-120, -9.4910720231286e+163, -1.14859182152247e+288, 4.92692925852386e-112, -1.44776637416344e-142, -5.40833823875104e-46, -1.08433711654295e+291, -2.24431775503225e+92, 2.08898648522427e+105, 8.87257014140548e+266, -6.42469848920529e+219, -6.3460746332926e-46, -3.97499050715981e-231, 4.34069537010384e-232, 7.23169055628211e+217, 5.04705386096979e+24, -1.70329148534144e+110, -2.32534439899982e-203, 43.9823256519228, 3.29102929808619e-278, -2.84453638406877e-72, 2.67918871629749e+194))
result <- do.call(ldsr:::corr, testlist)
nRMSE Invalid read of size 8 utils.cpp:37 No Address Trace found
Test code
testlist <- list(normConst = 9.32540319175846e+70, y = c(-1.29201924817198e-64, 1.24149479687285e-187, -3.14530477856073e+129, 1.3143566448593e+303, -5.16845760232439e+216, 1.81285900569289e+183, -1.54797064770531e+91, 1.17825806890187e+285, 8.52566222349506e-164, 1.78501428399517e-202, 5.2769745968309e-132, 2.49160738445453e-292, 1.25446071570633e-10, 9.36149433281088e-53, 2.28938947285312e+66, -4.9947104483273e-56, 2.25846474789851e+114, 2.0613613149231e-249, 7.82957242987593e+121, -7.44689958462065e-06, -1.00398256623134e+198, -8.9525217829079e-73, -9.33304758396964e-53, 2.80222377146708e-303, -2.96491315793155e-204, -2.51086064524164e-107, -1.35895266405387e-141, 4.58984645269754e+181, 1.62215647910401e+25, 3.84742189136568e-38, -7.06078620165598e-99, 8.00899100591674e-178, -1.2509231978048e-88, -8.94332303293384e+153, 3.43923929139206e+230, 3.1482737446234e+167, -7.92488560990735e+26, -1.10052281564261e+307, -28595.3347245412, 1.50152839847072e-195, 1.37923067464441e+94, -1.75582336944748e-52, 7.17244074085189e+23, -827.286839233596, 2.74578126138164e-235, 2.13936309076609e+293, -4.90825847583625e+285, -5.16836808705057e-170, 5.7190121495557e-273, -2.33811966821988e+129, -4.5346067611094e-131, -2.23901747640932e-54, 5.52207271118381e-78, -1.03679297354419e+280, -2.89682829738042e-52, 2.40694759441811e-260, -5.12203884254111e-110, -1.50415083363175e-68, -1.28150519686521e-286, 1.42482738888074e-126, 6.74912647276242e+111, -6.25879431386345e+129, 1.94048799763273e-189, 2.49489046724574e+188, -1.38447471486917e+165, 219575378549609, -2.32582581234953e-92, -6.7071812818951e+80, -2.6178737816561e-46, -1.73602724942121e-144, -3.59944229909157e-73, -6.27770080923879e+271), yhat = c(2.41491724633141e+249, 5.5978968543358e+72, 1.14332366595472e-151, -1.53106655461624e-62, -2.09865588690819e-60, 5.32860569611301e+78, -3.16238114648914e+66, -3.05984684283976e+113, 3.3532011449283e-254, 2.99240791920771e-158, -4.92479389947404e+172, 1.64017465764037e-48, -3.97204676463829e+220, -1.33617356135132e-44, 1.55967665059514e+45, 5.54813164444019e-157, Inf, 1.5459438953089e+169, 6.34564258593218e-28, -2.91356526900206e-157, 1.19158894976955e-175, -3.48891161379037e-295, -1.56020484783335e+182, -1.58298123619637e-210, -1.59028054752499e+157, 3.61810936248593e-216, 9.2060976746477e-250, -1.10495567982725e+306, -4.19358950267426e+191, 5.97451349453217e+181, 4.67788218410441e+24, 2.97408905721853e-282, Inf, 6.72322177737366e-276, -2.35405337656135e+154, 3.2125389606799e-05, NaN, 2347335381.51225, -3.54630439606088e+252, -1.64755887475032e-187, -3.64323378714247e-227, NaN))
result <- do.call(ldsr:::nRMSE, testlist)

Analyzed functions summary

function name tested inputs inputs with issues
KGE 3 2
NSE 3 1
RE 3 1
corr 3 1
nRMSE 3 1

Report details

  • Report generated by: 4468b72
  • Inputs generator seed: 1662467480

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