Skip to content

Analyze the package with RcppDeepState#6

Open
FabrizioSandri wants to merge 1 commit intombinois:masterfrom
RcppDeepState:RcppDeepState
Open

Analyze the package with RcppDeepState#6
FabrizioSandri wants to merge 1 commit intombinois:masterfrom
RcppDeepState:RcppDeepState

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
EHI_2d_wrap_Rcpp 59 bytes in 1 blocks are possibly lost in loss record 19 of 1,295 EHI_2d_rcpp.cpp:64 No Address Trace found
Test code
testlist <- list(P = structure(c(-Inf, 2.43398435851577e+248, 1.59013680488832e-250, -Inf, -Inf), .Dim = c(5L, 1L)), mu = structure(c(1.0834606512828e+273, 1.62686151262099e-44, NaN, 1.55801325694663e-285, 1.45742081929847e+141, 3.47862244558079e-158, 1.02754716309416e-266, 9.49750334169087e+266, 2.37041849750586e+188, 1.5191459957083e+25, 1.0834606512828e+273, 1.0834606512828e+273), .Dim = c(2L, 6L)), r = c(5.10464279476411e-43, -1.45645601673224e+23, NA, NaN, NaN, 0), s = structure(c(NaN, NA), .Dim = 2:1))
result <- do.call(GPareto:::EHI_2d_wrap_Rcpp, testlist)
nonDomSet Conditional jump or move depends on uninitialised value(s) domination.cpp:111 No Address Trace found
Test code
testlist <- list(points = structure(c(4.56775105609915e-287, 1.81859923304056e-295, 8.1062425900735e-64, 7.11694352318875e+306, 1.73334656289608e+307, 3.44380699502178e+64, 1.4453008349837e-179, 1.84328660165918e+183, 1.82975051283643e-160, 8.44998078187985e+153, 6.52765858689108e+56, 5.95715222510839e-242, 3.84074743652866e+25, 1.4422551050794e+149, 2.16712441054392e+24, 1.15958893506955e+158, 1.02692194031728e-220, 5.11403457840785e-74, 8.38033175215582e+107, 3.01180307787909e+46, 4.75976872165529e+285, 9.84433862226551e-53, 7.23819126307277e+129, 1.28669904224108e-280, 6.6271603676937e-171, 6.62076449303485e-164, 1.93188890061853e-216, -Inf, 2.39467580935183e+91, 7.49500067081187e+139, NaN, 2.58437288691999e+180, NA, 4.05511938121754e+265, 5.71510273797735e-158, 6.58319421512729e+47, 2.89450190757533e-142, 9.02162127564076e+288, 1.22876685796988e+179, 5.28330663982864e-34, 2.0189481976844e+160, 1.33146597816265e+265, 1.46260871729898e+82, 1.88258495093702e+217, 3.88650194451191e+139, 1.97850623205024e+56, 2.03997990945197e-92, NA, 1.58099830960625e+58, 5.51566637755622e-42), .Dim = c(5L, 10L)), ref = structure(c(0.000122903386711554, 1.05985199907331e-235, 1.58680129343241e+97, NaN, 113400282885.549, NA, 4.46138793799111e+84, 1.58799649100803e+287, 1.63897258601885e-148, 1.96218329960305e+193, NA, NA), .Dim = 3:4))
result <- do.call(GPareto:::nonDomSet, testlist)

Analyzed functions summary

function name tested inputs inputs with issues
EHI_2d_wrap_Rcpp 3 2
distcpp_2 3 0
exipsi_Rcpp 3 0
hvolume2d_Rcpp 3 0
nonDomInd_cpp 3 0
nonDomSet 3 1

Report details

  • Report generated by: 64daf76
  • Inputs generator seed: 1663837268

@mbinois
Copy link
Owner

mbinois commented Sep 27, 2022

Hi Fabrizio,
Thank you for the PR. It seems to me that the problem comes from the random inputs that do not have the appropriate dimensions as well as NaN/Inf values. This is handled outside of these routines.
Best regards,
-M

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.

2 participants