Martin Møller Skarbiniks Pedersen
2019-Aug-16 23:10 UTC
[R] gmp coredump - where to report?
Hi, I has trying to convert some raw values into a big number with the library gmp. However the library makes R crash. Two questions: 1. Should I report the problem and if yes, where can I report the problem? 2. Is the source code for the R version of GMP somewhere on eg. github, so I can post an issue? Regards Martin Here is the code that generate the core-dump: $ head -3 ~/R/x86_64-pc-linux-gnu-library/3.6/gmp/DESCRIPTION Package: gmp Version: 0.5-13.5 Date: 2019-02-21 $ R --version | head -3 R version 3.6.1 (2019-07-05) -- "Action of the Toes" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) $ R --vanilla> library(gmp) > as.bigz(charToRaw("a"))*** caught segfault *** address 0x560e78e1dd4c, cause 'memory not mapped' [[alternative HTML version deleted]]
(excerpts only)> I has trying to convert some raw values into a big number with the > library gmp. > However the library makes R crash. Two questions: > 1. Should I report the problem and if yes, where can I report the problem? > 2. Is the source code for the R version of GMP somewhere on eg. github, so > I can > post an issue?> > library(gmp) > > as.bigz(charToRaw("a"))> *** caught segfault *** > address 0x560e78e1dd4c, cause 'memory not mapped'(1) No, you should not. According to the gmp package documentation for the function as.bigz(): "either integer, numeric (i.e., double) or character vector" So, your *input is unsuitable*. In principle, it should give a better error message. However, the version number is < 1. So, I would wait for the authors to finish the package. However, it's possible they will read your post. (2) It's not an R version of GMP, as such. It's an R library, with the same name, which calls the C library. The source code is on CRAN, as per usual. [[alternative HTML version deleted]]
And for a different opinion... Packages that allow the user to trigger core dumps (regardless of how) should be reported and fixed. It is the responsibility of the R package author to put in input validation to avoid such errors. You can read the description file via the maintainer function or on the CRAN website (cc'ed). And not so much opinion as a quibble... in many compiled languages the term for a group of functions is a library... but in R a group of functions is a package and a group of installed packages in a specific directory layout is a library. This is clearly stated in the R Administration and Installation manual at the beginning of Section 6. Anyway, the lingo is that the package maintainer makes sure the C library is called with valid parameters, while the R user of that package installs the package in their user library and does not normally directly interact with the C library. On August 16, 2019 4:34:31 PM PDT, Abby Spurdle <spurdle.a at gmail.com> wrote:>(excerpts only) >> I has trying to convert some raw values into a big number with the >> library gmp. >> However the library makes R crash. Two questions: >> 1. Should I report the problem and if yes, where can I report the >problem? >> 2. Is the source code for the R version of GMP somewhere on eg. >github, so >> I can >> post an issue? > >> > library(gmp) >> > as.bigz(charToRaw("a")) > >> *** caught segfault *** >> address 0x560e78e1dd4c, cause 'memory not mapped' > >(1) >No, you should not. >According to the gmp package documentation for the function as.bigz(): >"either integer, numeric (i.e., double) or character vector" > >So, your *input is unsuitable*. > >In principle, it should give a better error message. >However, the version number is < 1. >So, I would wait for the authors to finish the package. >However, it's possible they will read your post. > >(2) >It's not an R version of GMP, as such. >It's an R library, with the same name, which calls the C library. >The source code is on CRAN, as per usual. > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.-- Sent from my phone. Please excuse my brevity.
I has trying to convert some raw values into a big number with the library gmp. However the library makes R crash. Two questions: 1. Should I report the problem and if yes, where can I report the problem? You can report the problem by calling bug.report(package="gmp") and filling in the details. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Aug 16, 2019 at 4:10 PM Martin M?ller Skarbiniks Pedersen < traxplayer at gmail.com> wrote:> Hi, > > I has trying to convert some raw values into a big number with the > library gmp. > However the library makes R crash. Two questions: > > 1. Should I report the problem and if yes, where can I report the problem? > 2. Is the source code for the R version of GMP somewhere on eg. github, so > I can > post an issue? > > Regards > Martin > > Here is the code that generate the core-dump: > > $ head -3 ~/R/x86_64-pc-linux-gnu-library/3.6/gmp/DESCRIPTION > Package: gmp > Version: 0.5-13.5 > Date: 2019-02-21 > > $ R --version | head -3 > R version 3.6.1 (2019-07-05) -- "Action of the Toes" > Copyright (C) 2019 The R Foundation for Statistical Computing > Platform: x86_64-pc-linux-gnu (64-bit) > > $ R --vanilla > > > library(gmp) > > as.bigz(charToRaw("a")) > > *** caught segfault *** > address 0x560e78e1dd4c, cause 'memory not mapped' > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]