Skip to content

Conversation

@FabrizioSandri
Copy link
Owner

@FabrizioSandri FabrizioSandri commented Aug 18, 2022

This pull request implements the SHA reference that was discussed in the issue #13. These changes amount to:

  • Adding a reference to the commit that generated the report comment;
  • Redirecting the hyperlinks in the file_line and address_trace columns to the commit SHA rather than the pull request.

This PR also provides the following feature:

  • Include the inputs generator seed in the Report details paragraph.

Fixes #13

@github-actions
Copy link

github-actions bot commented Aug 18, 2022

RcppDeepState Report

function name message file line address trace R code
rcpp_read_out_of_bound Invalid read of size 4 read_out_of_bound.cpp:7 No Address Trace found
Test code
testlist <- list(rbound = -1295483057L)
result <- do.call(testSAN:::rcpp_read_out_of_bound, testlist)
rcpp_use_after_deallocate Argument 'size' of function __builtin_vec_new has a fishy (possibly negative) value: -1295483057 use_after_deallocate.cpp:6 No Address Trace found
Test code
testlist <- list(array_size = -1295483057L)
result <- do.call(testSAN:::rcpp_use_after_deallocate, testlist)
rcpp_use_after_free Argument 'size' of function malloc has a fishy (possibly negative) value: -5181932228 use_after_free.cpp:6 No Address Trace found
Test code
testlist <- list(alloc_size = -1295483057L)
result <- do.call(testSAN:::rcpp_use_after_free, testlist)
rcpp_write_index_outofbound Invalid write of size 4 write_index_outofbound.cpp:8 No Address Trace found
Test code
testlist <- list(wbound = -1295483057L)
result <- do.call(testSAN:::rcpp_write_index_outofbound, testlist)
rcpp_zero_sized_array Invalid write of size 4 zero_sized_array.cpp:8 zero_sized_array.cpp:7
Test code
testlist <- list(value = -1303962178L)
result <- do.call(testSAN:::rcpp_zero_sized_array, testlist)

Analyzed functions summary

function name tested inputs inputs with issues
rcpp_read_out_of_bound 3 3
rcpp_use_after_deallocate 3 3
rcpp_use_after_free 3 3
rcpp_use_uninitialized 3 0
rcpp_write_index_outofbound 3 3
rcpp_zero_sized_array 3 3

Report details

  • Report generated by: 77d7cf9
  • Inputs generator seed: 1660846819

@FabrizioSandri
Copy link
Owner Author

With the most recent commits, I added a third column to the summary table, which shows the number of tests that detected at least one error within the tested package.

In addition, I modified all of the column names to remove the underscore character between words.

@FabrizioSandri FabrizioSandri mentioned this pull request Aug 18, 2022
@tdhock
Copy link
Collaborator

tdhock commented Aug 18, 2022

code looks ok but in the result comment here, I don't see "a third column to the summary table" ?

@FabrizioSandri
Copy link
Owner Author

In this comment, I'm referring to the errors column inside the table beneath the Analyzed functions summary paragraph as the "third" column. Here is the summary table I am referring to:

function name tested inputs errors
rcpp_read_out_of_bound 3 3
rcpp_use_after_deallocate 3 3
rcpp_use_after_free 3 3
rcpp_use_uninitialized 3 0
rcpp_write_index_outofbound 3 3
rcpp_zero_sized_array 3 3

In the above table we can see that all the functions except rcpp_use_uninitialized have been analyzed and an error has been detected for each test. rcpp_use_uninitialized was analyzed three times but no error was reported (errors column set to 0).

@tdhock
Copy link
Collaborator

tdhock commented Aug 18, 2022

right, that makes sense and looks good overall.
you wrote that this number is "the number of tests that detected at least one error within the tested package" but I think it would be more accurate to say it is, for each function, the number of inputs which caused at least one valgrind message/issue, right?
the column name "errors" may therefore be misleading -- maybe change to "inputs with issues" or similar?

@FabrizioSandri
Copy link
Owner Author

for each function, the number of inputs which caused at least one valgrind message/issue, right?

Yes you are right, this is more accurate

maybe change to "inputs with issues" or similar?

This is better; the keyword errors is misleading. I didn't want to give that column a complicated name, but I believe it is better to explain that it corresponds to the total number of inputs that created at least one problem.

Fixed with 77d7cf9

@tdhock
Copy link
Collaborator

tdhock commented Aug 18, 2022

great please merge if you are ready.

@FabrizioSandri FabrizioSandri merged commit 4aeb3fb into main Aug 18, 2022
@tdhock
Copy link
Collaborator

tdhock commented Aug 18, 2022

this is really cool, for binsegRcpp I got the following result, which shows that some inputs caused an issue, others did not.

RcppDeepState Report

function name message file line address trace R code
cum_median_interface 40 bytes in 1 blocks are definitely lost in loss record 14 of 1,294 interface.cpp:12 No Address Trace found
Test code
testlist <- list(data_vec = c(4.95282670985293e+269, 9.19220261345616e+228, 9.76446051871464e-227, 3.44002757211463e+142, 3.44564622360808e+125, Inf, -6.84590386509538e-154, 3.40246022599512e+269, -1.28923819757614e-165, 2.81518964059233e+167, -1.25531632864596e-287, -2.67427599032549e-248, 3.34588187587734e-119, -1.23551154415627e-21, -1.02610805187601e-109, 4.16940122332875e+269, -1.78387023887419e+248, -1.05722072744111e+98, -4.76115744068632e+183, -3.88035302297988e+101, -1.56937482455912e-56, NA, -4.75822295269467e+95, 1.98207210521439e-28, -1.15749005895586e-67, 1.50064938648988e-160, Inf, 1.13915958031741e+26, Inf, Inf, -5.34218289504947e-223, -4.2465118855095e-179, 5.50632255056954e-235, 1.39476247744266e+75, 1.69641978386394e-232, -1.77675561435822e-297, 4.25467706108586e-23, 4.89194157273472e+80, -2.27196098452465e-154, 3.08839698258598e+192, 2.35589726999274e-123, -2.63763169515399e+87, -3.19378705311954e+155, -3.74038104538462e-105, -3.16795961327089e+80, 9.14978341696139e+137, -1.50288014544269e-23, 1.43738183421206e-204, -2.35599803385513e-61, -2.99448212415941e+198, -4.0142655383189e+295, 1.61771792417167e+263, 0), weight_vec = c(2.59911756272486e+111, 1.23635737106356e-189, 1.53741044740229e-52, -4.41781541766863e+239, -6.40134612106056e-244, 1.22932559861284e-178, 9.45677812109935e+246, -6.03796060663925e+205, -1.90357180711086e-121, 6.15125704486057e+284, -2.75478977649574e+137, 6.11004203699546e+278, 3.40593845702388e+296, -3.91628109029268e-125, -1.85820166555954e-202, 3.3111091636182e-114, -4.91423732728992e-256, -3.13719918528368e+206, -2.76369409104372e-199, -1.24023111984261e-126, -2.4680069962022e+156, -3.00037236174766e-86, 2.65598591262111e-41, -6.74802436337638e+177, 1.09260531554511e+90, -1.48021774692267e+88, 20068460903947, -9.56718241162573e-150))
result <- do.call(binsegRcpp:::cum_median_interface, testlist)

Analyzed functions summary

function name tested inputs inputs with issues
binseg_interface 10 0
cum_median_interface 10 4
depth_first_interface 10 0

Report details

  • Report generated by: 32d0969
  • Inputs generator seed: 5

@FabrizioSandri
Copy link
Owner Author

This is fantastic; thank you for including the binsegRcpp RcppDeepState report in this pull request.

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.

SHA in PR comment?

3 participants