ropensci / bibtex

bibtex parser for R
https://docs.ropensci.org/bibtex/
35 stars 12 forks source link

rchk issues #33

Closed coatless closed 1 year ago

coatless commented 3 years ago

https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/bibtex.out

Package bibtex version 0.4.2.3
Package built using 79226/R 4.1.0; x86_64-pc-linux-gnu; 2020-09-19 23:50:40 UTC; unix   
Checked with rchk version 36c7ad2294619ba0a81109c9acb675eea2c96e6d
More information at https://github.com/kalibera/cran-checks/blob/master/rchk/PROTECT.md

Suspicious call (two or more unprotected arguments) to Rf_setAttrib at makeSrcRef bibtex/src/bibparse.y:1178

Function asVector
  [PB] has negative depth bibtex/src/bibparse.y:1159
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:1160

Function do_read_bib
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:428

Function junk1
  [PB] has negative depth bibtex/src/bibparse.y:1081
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:1082

Function recordComment
  [PB] has negative depth bibtex/src/bibparse.y:994
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:995

Function recordInclude
  [PB] has negative depth bibtex/src/bibparse.y:986
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:987

Function recordPreamble
  [PB] has negative depth bibtex/src/bibparse.y:1008
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:1009

Function recordString
  [PB] has negative depth bibtex/src/bibparse.y:1001
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:1002

Function setToken
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:1058

Function xx_assignement
  [PB] has negative depth bibtex/src/bibparse.y:875
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:879

Function xx_assignement_list2
  [PB] has negative depth bibtex/src/bibparse.y:854
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:858

Function xx_atobject_comment
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:515

Function xx_atobject_entry
  [UP] unprotected variable object while calling allocating function Rf_allocVector bibtex/src/bibparse.y:543
  [UP] unprotected variable object while calling allocating function Rf_allocVector bibtex/src/bibparse.y:547
  [UP] unprotected variable object while calling allocating function Rf_install bibtex/src/bibparse.y:550
  [UP] unprotected variable object while calling allocating function Rf_setAttrib(V,S:entry,V) bibtex/src/bibparse.y:550
  [UP] unprotected variable object while calling allocating function Rf_install bibtex/src/bibparse.y:551
  [UP] unprotected variable object while calling allocating function Rf_setAttrib(V,S:names,V) bibtex/src/bibparse.y:551
  [UP] unprotected variable object while calling allocating function Rf_install bibtex/src/bibparse.y:552
  [UP] unprotected variable object while calling allocating function Rf_setAttrib(V,S:key,V) bibtex/src/bibparse.y:552
  [PB] has negative depth bibtex/src/bibparse.y:573
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:575

Function xx_atobject_include
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:593

Function xx_atobject_preamble
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:609

Function xx_atobject_string
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:625

Function xx_entry_head
  [PB] has negative depth bibtex/src/bibparse.y:684
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:689

Function xx_null
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:975

Function xx_object_list_2
  [PB] has negative depth bibtex/src/bibparse.y:474
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:478

Function xx_token_entry
  [PB] has negative depth bibtex/src/bibparse.y:642
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:647

Function xx_value
  [PB] has negative depth bibtex/src/bibparse.y:814
  [PB] has possible protection stack imbalance bibtex/src/bibparse.y:819

Function yydestruct
  [PB] has possible protection stack imbalance bibtex/src/bibparse.c:2734
  [PB] has negative depth bibtex/src/bibparse.y:211

Function yyparse
  [PB] has negative depth bibtex/src/bibparse.c:3409
  [PB] has negative depth bibtex/src/bibparse.c:3413
  [PB] has negative depth bibtex/src/bibparse.c:3537
  [PB] has possible protection stack imbalance bibtex/src/bibparse.c:3565
mwmclean commented 3 years ago

https://github.com/kalibera/rchk/blob/master/doc/USAGE.md

matthewwiese commented 2 years ago

I stumbled on this issue after digging around the past GSOC R projects, and wanted to lend a hand (since this just happens to intersect at some interests of mine). An exploratory/preliminary PR is #40.