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

Clear rchk messages on CRAN #3033

Merged
merged 7 commits into from Sep 5, 2018
Merged

Clear rchk messages on CRAN #3033

merged 7 commits into from Sep 5, 2018

Conversation

mattdowle
Copy link
Member

@mattdowle mattdowle commented Sep 5, 2018

Current rchk messages on CRAN reproduced locally.

Package data.table version 1.11.4
Package built using 74847/R 3.6.0; x86_64-pc-linux-gnu; 2018-06-05 10:41:32 UTC; unix   
Checked with rchk version b882e37fb462917a8ab94e70394f3a797250b4e1
More information at https://github.com/kalibera/cran-checks/blob/master/rchk/PROTECT.md
  • Function chmatch2_old
    [UP] calling allocating function unlist2(V) with a fresh pointer (l <arg 1>) data.table/src/rbindlist.c:825

  • Function fmelt [UP] unprotected variable dtnames while calling allocating function Rf_allocVector data.table/src/fmelt.c:663
    [UP] unprotected variable dtnames while calling allocating function preprocess(?,?,?,V,V,?,?,?) data.table/src/fmelt.c:664
    [UP] allocating function getvaluecols may destroy its unprotected argument (dtnames <arg 2>), which is later used. data.table/src/fmelt.c:670
    [UP] calling allocating function getvaluecols with a fresh pointer (dtnames <arg 2>) data.table/src/fmelt.c:670
    [UP] allocating function getvarcols may destroy its unprotected argument (dtnames <arg 2>), which is later used. data.table/src/fmelt.c:671
    [UP] calling allocating function getvarcols with a fresh pointer (dtnames <arg 2>) data.table/src/fmelt.c:671
    [UP] allocating function getidcols may destroy its unprotected argument (dtnames <arg 2>), which is later used. data.table/src/fmelt.c:672
    [UP] unprotected variable dtnames while calling allocating function Rf_allocVector data.table/src/fmelt.c:675
    [UP] unprotected variable dtnames while calling allocating function Rf_allocVector data.table/src/fmelt.c:684

  • Function gmax
    [UP] calling allocating function Rf_coerceVector(V,?) with a fresh pointer (ans <arg 1>) data.table/src/gsumm.c:391

  • Function gmin
    [UP] calling allocating function Rf_coerceVector(V,?) with a fresh pointer (ans <arg 1>) data.table/src/gsumm.c:260

  • Function reorder
    [PB] has possible protection stack imbalance data.table/src/reorder.c:109

  • Function setselfref
    [UP] calling allocating function R_MakeExternalPtr with argument allocated using Rf_getAttrib(?,S:names) data.table/src/assign.c:36

  • Function userOverride
    [UP] calling allocating function chmatch(?,V,?,?) with argument allocated using Rf_getAttrib(?,S:names) data.table/src/freadR.c:227

@mattdowle mattdowle added this to the 1.11.6 milestone Sep 5, 2018
@mattdowle mattdowle changed the title Too early UNPROTECT in rbindlist.c. Thanks to rchk. Clear rchk messages on CRAN Sep 5, 2018
@codecov
Copy link

@codecov codecov bot commented Sep 5, 2018

Codecov Report

Merging #3033 into master will increase coverage by 0.01%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3033      +/-   ##
==========================================
+ Coverage   90.85%   90.87%   +0.01%     
==========================================
  Files          61       61              
  Lines       11736    11733       -3     
==========================================
- Hits        10663    10662       -1     
+ Misses       1073     1071       -2
Impacted Files Coverage Δ
src/rbindlist.c 89.27% <0%> (+0.34%) ⬆️
src/freadR.c 89.47% <100%> (ø) ⬆️
src/reorder.c 97.7% <100%> (ø) ⬆️
src/gsumm.c 87.86% <100%> (ø) ⬆️
src/assign.c 94.39% <100%> (ø) ⬆️
src/fmelt.c 84.71% <100%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8ea47d...8bef1a0. Read the comment docs.

@mattdowle
Copy link
Member Author

@mattdowle mattdowle commented Sep 5, 2018

Local results of rchk now look good, iiuc. These remaining messages :
too many states
protect stack is too deep ... incomplete
relate to the rchk tool's limit and not that the actual stack is too deep, iiuc. They are filtered out by cran-checks I believe.

$ cat packages/lib/data.table/libs/*check
ERROR: too many states (abstraction error?) in function assign
ERROR: too many states (abstraction error?) in function dogroups
ERROR: too many states (abstraction error?) in function freadMain
ERROR: too many states (abstraction error?) in function assign
ERROR: too many states (abstraction error?) in function dogroups

Function assign
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] unprotected variable names while calling allocating function Rf_any_duplicated /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:376
  [UP] unprotected variable names while calling allocating function Rf_coerceVector /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:598
  [UP] unprotected variable names while calling allocating function Rf_type2char /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:600
  [UP] unprotected variable names while calling allocating function Rf_type2char /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:601
  [UP] unprotected variable names while calling allocating function Rf_warning /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:620
  [UP] unprotected variable names while calling allocating function memrecycle /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:628
  [UP] unprotected variable names while calling allocating function Rf_allocVector /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:630
  [UP] calling allocating function chmatch(V,V,?,?) with argument allocated using Rf_mkString /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:727
  [UP] unsupported form of unprotect, unprotecting all variables, results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/assign.c:792

Function dogroups
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] unprotected variable names while calling allocating function Rprintf /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/dogroups.c:373
  [UP] unprotected variable names while calling allocating function Rf_allocVector /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/dogroups.c:375
  [UP] unsupported form of unprotect, unprotecting all variables, results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/dogroups.c:464

Function forder
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] unsupported form of unprotect, unprotecting all variables, results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/forder.c:1363

Function measurelist
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] unsupported form of unprotect, unprotecting all variables, results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/fmelt.c:143

Function preprocess.769
  [PB] has too high protection stack depth results will be incomplete
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] unprotected variable col_name while calling allocating function Rf_allocVector /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/rbindlist.c:526
  [PB] has possible protection stack imbalance /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/rbindlist.c:589

Function rbindlist
  [PB] has an unsupported form of unprotect with a variable results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/rbindlist.c:633
  [UP] unsupported form of unprotect, unprotecting all variables, results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/rbindlist.c:633
  [UP] unprotected variable lnames while calling allocating function Rf_allocVector /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/rbindlist.c:774
  [PB] has an unsupported form of unprotect with a variable results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/rbindlist.c:782
  [UP] unsupported form of unprotect, unprotecting all variables, results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/rbindlist.c:782

Function shift
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] protect stack is too deep, unprotecting all variables, results will be incomplete
  [UP] unsupported form of unprotect, unprotecting all variables, results will be incomplete /home/mdowle/build/rchk/trunk/packages/build/TC1THj1Z/data.table/src/shift.c:214
Analyzed 245 functions, traversed 6373563 states.

@mattdowle mattdowle merged commit a500a5a into master Sep 5, 2018
2 checks passed
@mattdowle mattdowle deleted the rchk branch Sep 5, 2018
@mattdowle mattdowle mentioned this pull request Sep 20, 2018
mattdowle added a commit that referenced this issue Sep 20, 2018
…ts, #3033. This NEWS item is live on GitHub and will reflect on CRAN in the next release. Realized missing news item as a result of tweeting thanks: https://twitter.com/MattDowle/status/1042835186801471488
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